diff options
author | Art Dahm <art@dragongears.com> | 2013-01-12 23:49:59 -0800 |
---|---|---|
committer | Art Dahm <art@dragongears.com> | 2013-01-12 23:49:59 -0800 |
commit | 34021f2c23f1d74fcae5a1650e1ff25ef8bdd3cd (patch) | |
tree | df3e23abf0d58e7b3d6b0082b0f3aa7cf57e1057 /tools | |
parent | 166043b5f33ca47a15d16b17bf3a31557a14140d (diff) | |
download | biblez-ng-34021f2c23f1d74fcae5a1650e1ff25ef8bdd3cd.tar.gz |
Added "--cordova-webos" command line option to tools/deploy.bat and tools/deploy.sh to deploy Enyo 2 app as a Cordova webOS app.
Copies appinfo.json and a Cordova JavaScript file from the project root directory to the 'deploy' directory.
Runs palm-package to package app into the 'bin' directory.
Cordova webOS Instructions:
Set up your project the same way you would set up any other bootplate project.
Modify your index.html and JavaScript files as outlined in this blog post: http://blog.openwebosproject.org/post/39278618299/javascript-apps-for-open-webos-with-enyo-and-cordova
Copy appinfo.json from the PhoneGap 'lib/webos/framework' directory and a cordova JavaScript file from the PhoneGap 'lib/webos/lib' directory
Modify appinfo.json for your project and add an icon
run tools\deploy.bat --cordova-webos or tools/deploy.sh --cordova-webos to deploy your app.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/deploy.bat | 22 | ||||
-rwxr-xr-x | tools/deploy.sh | 19 |
2 files changed, 40 insertions, 1 deletions
diff --git a/tools/deploy.bat b/tools/deploy.bat index a14879e..3138635 100755 --- a/tools/deploy.bat +++ b/tools/deploy.bat @@ -14,4 +14,24 @@ REM node location SET NODE=node.exe REM use node to invoke deploy.js with imported parameters -%NODE% "%DEPLOY%" %*
\ No newline at end of file +%NODE% "%DEPLOY%" %* + +REM copy files and package if deploying to cordova webos +:again +if not "%1" == "" ( + + if "%1" == "--cordova-webos" ( + REM copy appinfo.json and cordova*.js files + SET SRC=%TOOLS%..\ + for %%A in ("%~dp0./..") do SET DEST=%TOOLS%..\deploy\%%~nA + copy %SRC%appinfo.json %DEST% + copy %SRC%cordova*.js %DEST% + + REM package it up + if not exist %SRC%bin mkdir %SRC%bin + palm-package.bat %DEST% --outdir=%SRC%bin + ) + + shift + goto again +) diff --git a/tools/deploy.sh b/tools/deploy.sh index e64aa17..e5a96e5 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -18,3 +18,22 @@ else echo "No node found in path" exit 1 fi + +# copy files and package if deploying to cordova webos +while [ "$1" != "" ]; do + case $1 in + -w | --cordova-webos ) + # copy appinfo.json and cordova*.js files + SRC="$TOOLS/../" + DEST="$TOOLS/../deploy/"${PWD##*/} + + cp "$SRC"appinfo.json $DEST -v + cp "$SRC"cordova*.js $DEST -v + + # package it up + mkdir -p "$DEST/bin" + palm-package "$DEST/bin" + ;; + esac + shift +done |