-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,432 changed files
with
283,724 additions
and
436 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
CORDOVA_DIR=$(dirname "$0") | ||
source "$CORDOVA_DIR/init" | ||
|
||
#package app | ||
"$CORDOVA_NODE/node" "$CORDOVA_DIR/lib/build" "$@" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@ECHO OFF | ||
goto comment | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
:comment | ||
call "%~dps0init" | ||
"%CORDOVA_NODE%\node.exe" "%~dps0\lib\build" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
CORDOVA_DIR=$(dirname "$0") | ||
source "$CORDOVA_DIR/init" | ||
|
||
"$CORDOVA_NODE/node" "$CORDOVA_DIR/lib/clean" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@ECHO OFF | ||
goto comment | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
:comment | ||
call "%~dps0init" | ||
"%CORDOVA_NODE%\node.exe" "%~dps0\lib\clean" %* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
<!-- | ||
Widget Configuration Reference: | ||
http://docs.blackberry.com/en/developers/deliverables/15274/ | ||
--> | ||
|
||
<widget xmlns="http://www.w3.org/ns/widgets" | ||
xmlns:rim="http://www.blackberry.com/ns/widgets" | ||
version="1.0.0.1" id="com.megster.nfc.reader"> | ||
|
||
<name>Webworks Application</name> | ||
|
||
<author>Your Name Here</author> | ||
|
||
<description> | ||
A sample Apache Cordova application that responds to the deviceready event. | ||
</description> | ||
|
||
<license href="http://opensource.org/licenses/alphabetical"> | ||
</license> | ||
|
||
<!-- Expose access to all URIs, including the file and http protocols --> | ||
<access subdomains="true" uri="file:///store/home" /> | ||
<access subdomains="true" uri="file:///SDCard" /> | ||
<access subdomains="true" uri="*" /> | ||
|
||
<icon src="res/icon/blackberry10/icon-80.png" /> | ||
<rim:splash src="res/screen/blackberry10/splash-1280x768.png" /> | ||
<rim:splash src="res/screen/blackberry10/splash-720x720.png" /> | ||
<rim:splash src="res/screen/blackberry10/splash-768x1280.png" /> | ||
|
||
<content src="index.html" /> | ||
|
||
<rim:permissions> | ||
<rim:permit>access_shared</rim:permit> | ||
</rim:permissions> | ||
|
||
</widget> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#! /bin/sh | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
#!/bin/sh | ||
CURRENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
LOCAL_NODE_BIN=$CURRENT_DIR/dependencies/node/bin | ||
LOCAL_BBTOOLS=$CURRENT_DIR/dependencies/bb-tools/bin | ||
|
||
if [ -z "$CORDOVA_NODE" ]; then | ||
if [ -x "$LOCAL_NODE_BIN" ]; then | ||
#set CORDOVA_NODE to local node version, if exists | ||
CORDOVA_NODE=$LOCAL_NODE_BIN | ||
else | ||
#set CORDOVA_NODE to whichever node is on path, if exists | ||
NODE_PATH=$(command -v node) | ||
if [ ! -z "$NODE_PATH" ]; then | ||
CORDOVA_NODE=$(dirname $NODE_PATH) | ||
fi | ||
fi | ||
|
||
export CORDOVA_NODE=$CORDOVA_NODE | ||
fi | ||
|
||
if [ -z "$CORDOVA_BBTOOLS" ]; then | ||
if [ -x "$LOCAL_BBTOOLS" ]; then | ||
#set CORDOVA_BBTOOLS to local bbtools, if exists | ||
CORDOVA_BBTOOLS=$LOCAL_BBTOOLS | ||
else | ||
#set CORDOVA_BBTOOLS to whichever bbtools is on path, if exists | ||
BBTOOLS_PATH=$(command -v blackberry-nativepackager) | ||
if [ ! -z "$BBTOOLS_PATH" ]; then | ||
CORDOVA_BBTOOLS=$(dirname $BBTOOLS_PATH) | ||
fi | ||
fi | ||
|
||
export CORDOVA_BBTOOLS=$CORDOVA_BBTOOLS | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* | ||
* Copyright 2012 Research In Motion Limited. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
var jWorkflow = require("jWorkflow"), | ||
wrench = require("wrench"), | ||
nativePkgr = require("./native-packager"), | ||
fileManager = require("./file-manager"), | ||
localize = require("./localize"), | ||
logger = require("./logger"), | ||
signingHelper = require("./signing-helper"), | ||
targetIdx = 0; | ||
|
||
function buildTarget(previous, baton) { | ||
baton.take(); | ||
|
||
var target = this.session.targets[targetIdx++], | ||
session = this.session, | ||
config = this.config; | ||
|
||
//Create output folder | ||
wrench.mkdirSyncRecursive(session.outputDir + "/" + target); | ||
|
||
//Copy resources (could be lost if copying assets from other project) | ||
fileManager.copyNative(this.session, target); | ||
//Generate user config here to overwrite default | ||
fileManager.generateUserConfig(session, config); | ||
|
||
if (config.packageCordovaJs) { | ||
//Package cordova.js to chrome folder | ||
fileManager.copyWebworks(this.session); | ||
} | ||
|
||
//Generate frameworkModules.js (this needs to be done AFTER all files have been copied) | ||
fileManager.generateFrameworkModulesJS(session); | ||
|
||
//Call native-packager module for target | ||
nativePkgr.exec(session, target, config, function (code) { | ||
if (code !== 0) { | ||
logger.error(localize.translate("EXCEPTION_NATIVEPACKAGER")); | ||
baton.pass(code); | ||
} else { | ||
if (target === "device" && session.isSigningRequired(config)) { | ||
signingHelper.execSigner(session, target, function (error) { | ||
if (error && error.code) { | ||
baton.pass(error.code); | ||
} else { | ||
//Pass 0 to signify success | ||
baton.pass(0); | ||
} | ||
}); | ||
} else { | ||
baton.pass(code); | ||
} | ||
} | ||
}); | ||
} | ||
|
||
function buildWorkflow(session, context) { | ||
if (session.targets && session.targets.length > 0) { | ||
var order; | ||
|
||
session.targets.forEach(function (target, idx) { | ||
if (idx === 0) { | ||
order = jWorkflow.order(buildTarget, context); | ||
} else { | ||
order = order.andThen(buildTarget, context); | ||
} | ||
}); | ||
|
||
return order; | ||
} else { | ||
logger.debug("NOTHING TO BUILD, NO TARGETS"); | ||
} | ||
} | ||
|
||
module.exports = { | ||
build: function (session, config, callback) { | ||
var context = { | ||
session: session, | ||
config: config | ||
}, | ||
workflow = buildWorkflow(session, context); | ||
|
||
if (workflow) { | ||
workflow.start({ | ||
"callback": callback | ||
}); | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright 2012 Research In Motion Limited. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
var self = {}; | ||
|
||
self.ROOT = ""; | ||
self.CHROME = self.ROOT + "/chrome"; | ||
self.LIB = self.CHROME + "/lib"; | ||
self.EXT = self.CHROME + "/plugin"; | ||
self.UI = self.ROOT + "/ui-resources"; | ||
self.PLUGINS = self.ROOT + "/plugins"; | ||
self.JNEXT_PLUGINS = self.ROOT + "/plugins/jnext"; | ||
|
||
module.exports = self; |
Oops, something went wrong.