Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 6cfd87a

Browse files
committed
3.0
1 parent 8943a0e commit 6cfd87a

File tree

1,012 files changed

+145816
-308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,012 files changed

+145816
-308
lines changed

2.0/project/one2/config.xml

+20-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
1-
<?xml version='1.0' encoding='utf-8'?>
2-
<widget id="one" version="2.2.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3-
<name>ONE</name>
4-
<description>
5-
ONE Unofficial App.
6-
</description>
7-
<name xml:lang="zh-CN">一个</name>
8-
<author email="[email protected]" href="http://about.me/anpho">
9-
anpho
10-
</author>
11-
<content src="index.html" />
12-
<icon src="img/logo.png" />
13-
<access origin="*" />
14-
<preference name="fullscreen" value="true" />
15-
<preference name="webviewbounce" value="false" />
16-
<preference name="WebSecurity" value="disable"/>
17-
<preference name="AutoHideSplashScreen" value="false" />
18-
19-
<rim:splash src="img/splash-1280x768.png"/>
20-
<rim:splash src="img/splash-1280x720.png"/>
21-
<rim:splash src="img/splash-768x1280.png"/>
22-
<rim:splash src="img/splash-720x1280.png"/>
23-
<rim:splash src="img/splash-720x720.png"/>
24-
</widget>
1+
<widget id="one"
2+
xmlns="http://www.w3.org/ns/widgets"
3+
xmlns:cdv="http://cordova.apache.org/ns/1.0" version="2.2.10">
4+
<name>ONE</name>
5+
<name xml:lang="zh-CN">一个</name>
6+
<description>ONE Unofficial App.</description>
7+
<rim:splash src="img/splash-1280x768.png"/>
8+
<rim:splash src="img/splash-1280x720.png"/>
9+
<rim:splash src="img/splash-768x1280.png"/>
10+
<rim:splash src="img/splash-720x1280.png"/>
11+
<rim:splash src="img/splash-720x720.png"/>
12+
<content src="index.html"/>
13+
<icon src="img/logo.png"/>
14+
<access origin="*"/>
15+
<preference name="fullscreen" value="true"/>
16+
<preference name="webviewbounce" value="false"/>
17+
<preference name="WebSecurity" value="disable"/>
18+
<preference name="AutoHideSplashScreen" value="false"/>
19+
<author email="[email protected]" href="http://about.me/anpho">anpho</author>
20+
</widget>

2.0/project/one2/img/logo.png

14.9 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.1.0.13
1+
v2.2.0.15
Binary file not shown.
Binary file not shown.

2.0/project/one2/platforms/blackberry10/build/options

-79
This file was deleted.
Binary file not shown.

2.0/project/one2/platforms/blackberry10/cordova/bb10-ndk-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
<<COMMENT
33
Licensed to the Apache Software Foundation (ASF) under one
44
or more contributor license agreements. See the NOTICE file

2.0/project/one2/platforms/blackberry10/cordova/defaults.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
-->
2121
<!--
2222
Widget Configuration Reference:
23-
http://docs.blackberry.com/en/developers/deliverables/15274/
23+
https://developer.blackberry.com/html5/documentation/v2_1/config_doc_elements.html
2424
-->
2525
<widget xmlns="http://www.w3.org/ns/widgets"
2626
xmlns:rim="http://www.blackberry.com/ns/widgets"

2.0/project/one2/platforms/blackberry10/cordova/lib/build.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ try {
8181
keystorepass = session.getKeyStorePass(command),
8282
err;
8383

84+
copyArgIfExists("buildId");
85+
copyArgIfExists("signing");
86+
8487
if (command.release) {
85-
copyArgIfExists("buildId");
8688
if (command.signing) {
8789
//Note: Packager refers to signing password as "password" not "keystorepass"
8890
bbwpArgv.push("--password");

2.0/project/one2/platforms/blackberry10/cordova/lib/cmdline.js

+10-9
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var command = require("commander"),
2020

2121
command
2222
.version('1.0.0.0')
23-
.usage('[drive:][path]archive [-s [dir]] [[ -g genpassword] [-buildId num]] [-o dir] [-d] [-p paramsjsonfile]')
23+
.usage('[drive:][path]archive [-s [dir]] [[ -g genpassword] [-buildId num]] [-o dir] [-d] [-p paramsjsonfile] [--signing]')
2424
.option('-s, --source [dir]', 'Save source. The default behavior is to not save the source files. If dir is specified then creates dir\\src\\ directory structure. If no dir specified then the path of archive is assumed')
2525
.option('-g, --password <password>', 'Signing key password')
2626
.option('-buildId <num>', '[deprecated] Use --buildId.')
@@ -30,7 +30,8 @@ command
3030
.option('-p, --params <params JSON file>', 'Specifies additional parameters to pass to downstream tools.')
3131
.option('--appdesc <filepath>', 'Optionally specifies the path to the bar descriptor file (bar-descriptor.xml). For internal use only.')
3232
.option('-v, --verbose', 'Turn on verbose messages')
33-
.option('-l, --loglevel <loglevel>', 'set the logging level (error, warn, verbose)');
33+
.option('-l, --loglevel <loglevel>', 'set the logging level (error, warn, verbose)')
34+
.option('--signing', 'indicates the build process is trying to sign the app'); // --signing won't be passed to blackberry-nativepackager, package-validator.js uses this flag to check indicate if it is signing
3435

3536
function parseArgs(args) {
3637
var option,
@@ -50,14 +51,14 @@ function parseArgs(args) {
5051
command.parse(args);
5152

5253
//Check for any invalid command line args
53-
for (i = 0; i < args.length; i++) {
54-
//Remove leading dashes if any
55-
option = args[i].substring(2);
56-
if (args[i].indexOf("--") === 0 && !command[option]) {
57-
throw localize.translate("EXCEPTION_CMDLINE_ARG_INVALID", args[i]);
54+
args.forEach(function (arg) {
55+
if (typeof arg === "string" && arg.indexOf("--") === 0) {
56+
var option = arg.substring(2);
57+
if (!command[option]) {
58+
throw localize.translate("EXCEPTION_CMDLINE_ARG_INVALID", arg);
59+
}
5860
}
59-
}
60-
61+
});
6162
return this;
6263
}
6364

2.0/project/one2/platforms/blackberry10/cordova/lib/config-parser.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ function processWidgetData(data, widgetConfig, session) {
151151
widgetConfig.autoDeferNetworkingAndJavaScript = true;
152152
widgetConfig.theme = "default";
153153
widgetConfig.autoHideSplashScreen = "true";
154+
widgetConfig.useSpatialNavigation = false;
154155

155156
//set locally available features to access list
156157
if (data.feature) {
@@ -539,6 +540,7 @@ function processNameAndDescription(data, widgetConfig) {
539540
function processCordovaPreferences(data, widgetConfig) {
540541
if (data.preference) {
541542
var preference = JSON.parse(JSON.stringify(processParamObj(data.preference)).toLowerCase()),
543+
spatialNavigation = preference.spatialnavigation,
542544
hideFormControl = preference.hidekeyboardformaccessorybar;
543545

544546
widgetConfig.packageCordovaJs = preference.packagecordovajs === "enable";
@@ -555,7 +557,7 @@ function processCordovaPreferences(data, widgetConfig) {
555557
}
556558

557559
// <preference name="HideKeyboardFormAccessoryBar" value="enable/true or disable/false" />
558-
if (preference.hidekeyboardformaccessorybar) {
560+
if (hideFormControl) {
559561
widgetConfig.enableFormControl = (hideFormControl !== 'enable') && (hideFormControl !== 'true');
560562
}
561563

@@ -591,6 +593,11 @@ function processCordovaPreferences(data, widgetConfig) {
591593
if (preference.diskcache) {
592594
widgetConfig.enableDiskCache = (preference.diskcache === 'enable');
593595
}
596+
597+
// <preference name="spatialNavigation" value="enable/true or disable/false" />
598+
if (spatialNavigation) {
599+
widgetConfig.useSpatialNavigation = (spatialNavigation === 'enable') || (spatialNavigation === 'true');
600+
}
594601
}
595602
}
596603

2.0/project/one2/platforms/blackberry10/cordova/lib/localize.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ var Localize = require("localize"),
2929
"en": "Build ID set in config.xml [version], but signing key file was not found: $[1]"
3030
},
3131
"EXCEPTION_MISSING_SIGNING_PASSWORD": {
32-
"en": "Cannot sign application - No signing password provided [-g]"
32+
"en": "Cannot sign application - No signing password provided [--keystorepass]"
3333
},
3434
"WARNING_SIGNING_PASSWORD_EXPECTED": {
35-
"en": "Build ID set in config.xml [version], but no signing password was provided [-g]. Bar will be unsigned"
35+
"en": "Build ID set in config.xml [version], but no signing password was provided [--keystorepass]. Bar will be unsigned"
3636
},
3737
"EXCEPTION_DEBUG_TOKEN_NOT_FOUND": {
38-
"en": "Failed to find debug token. If you have an existing debug token, please copy it to $[1]/.cordova/blackberry10debugtoken.bar. To generate a new debug token, execute the 'run' command."
38+
"en": "Failed to find debug token. If you have an existing debug token, please copy it to $[1]. To generate a new debug token, execute the 'run' command."
3939
},
4040
"EXCEPTION_DEBUG_TOKEN_WRONG_FILE_EXTENSION": {
4141
"en": "Specified debug token not a .bar extension"

2.0/project/one2/platforms/blackberry10/cordova/lib/native-packager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function generateOptionsFile(session, target, config) {
218218
optionsStr += "-debugToken" + NL;
219219
optionsStr += conf.DEBUG_TOKEN + NL;
220220
} else {
221-
logger.warn(localize.translate("EXCEPTION_DEBUG_TOKEN_NOT_FOUND", pkgrUtils.homedir()));
221+
logger.warn(localize.translate("EXCEPTION_DEBUG_TOKEN_NOT_FOUND", path.join(pkgrUtils.homedir(), '.cordova', 'blackberry10debugtoken.bar')));
222222
}
223223
optionsStr += "-devMode" + NL;
224224
}

2.0/project/one2/platforms/blackberry10/cordova/lib/packager-validator.js

+27-24
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ _self = {
4040
keysPassword = session.storepass && typeof session.storepass === "string",
4141
commandLinebuildId = session.buildId && typeof session.buildId === "string",//--buildId
4242
buildId = widgetConfig.buildId && typeof widgetConfig.buildId === "string",//Finalized Build ID
43+
signing = session.signing,
4344

4445
//Constants
4546
AUTHOR_P12 = "author.p12",
@@ -55,35 +56,37 @@ _self = {
5556
throw localize.translate("EXCEPTION_MISSING_SIGNING_KEY_FILE", file);
5657
};
5758

58-
//If -g <password> or --buildId is set, but signing key files are missing, throw an error
59-
if (keysPassword || commandLinebuildId) {
60-
if (!keysFound) {
61-
signingFileError(AUTHOR_P12);
62-
} else if (keysDefault && !cskFound && !bbidFound) {
63-
//Only warn about BBID since the old tokens are deprecated
64-
signingFileError(BARSIGNER_BBID);
65-
} else if (keysDefault && cskFound && !dbFound) {
66-
signingFileError(BARSIGNER_DB);
67-
}
59+
if (signing) {
60+
//If -g <password> or --buildId is set, but signing key files are missing, throw an error
61+
if ((keysPassword || commandLinebuildId)) {
62+
if (!keysFound) {
63+
signingFileError(AUTHOR_P12);
64+
} else if (keysDefault && !cskFound && !bbidFound) {
65+
//Only warn about BBID since the old tokens are deprecated
66+
signingFileError(BARSIGNER_BBID);
67+
} else if (keysDefault && cskFound && !dbFound) {
68+
signingFileError(BARSIGNER_DB);
69+
}
6870

69-
//If a buildId exists in config, but no keys were found, throw a warning
70-
} else if (buildId) {
71-
if (!keysFound) {
72-
signingFileWarn(AUTHOR_P12);
73-
} else if (keysDefault && !cskFound && !bbidFound) {
74-
//Only warn about BBID since the old tokens are deprecated
75-
signingFileWarn(BARSIGNER_BBID);
76-
} else if (keysDefault && cskFound && !dbFound) {
77-
signingFileWarn(BARSIGNER_DB);
71+
//If a buildId exists in config, but no keys were found, throw a warning
72+
} else if (buildId) {
73+
if (!keysFound) {
74+
signingFileWarn(AUTHOR_P12);
75+
} else if (keysDefault && !cskFound && !bbidFound) {
76+
//Only warn about BBID since the old tokens are deprecated
77+
signingFileWarn(BARSIGNER_BBID);
78+
} else if (keysDefault && cskFound && !dbFound) {
79+
signingFileWarn(BARSIGNER_DB);
80+
}
7881
}
79-
}
8082

81-
if (commandLinebuildId && !keysPassword) {
82-
//if --buildId was provided with NO password, throw error
83-
throw localize.translate("EXCEPTION_MISSING_SIGNING_PASSWORD");
83+
if (commandLinebuildId && !keysPassword) {
84+
//if --buildId was provided with NO password, throw error
85+
throw localize.translate("EXCEPTION_MISSING_SIGNING_PASSWORD");
86+
}
8487
}
8588

86-
//if --appdesc was provided, but the file is not existing, throw an error
89+
//if --appdesc was provided, but the file does not exist, throw an error
8790
if (session.appdesc && !fs.existsSync(session.appdesc)) {
8891
throw localize.translate("EXCEPTION_APPDESC_NOT_FOUND", session.appdesc);
8992
}

0 commit comments

Comments
 (0)