You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/10/24 20:51:17 UTC

[1/2] git commit: Tweak createproject.sh to accept the platform list from the command line

Updated Branches:
  refs/heads/master 5ab66f572 -> e28f7935c


Tweak createproject.sh to accept the platform list from the command line


Project: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/commit/9144a157
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/9144a157
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/9144a157

Branch: refs/heads/master
Commit: 9144a1570dffca1cc25c9a8c90bdbaf94dcba648
Parents: 5ab66f5
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Oct 24 14:50:39 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Oct 24 14:50:39 2013 -0400

----------------------------------------------------------------------
 createproject.sh | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/9144a157/createproject.sh
----------------------------------------------------------------------
diff --git a/createproject.sh b/createproject.sh
index 531e5c9..17bb5c1 100755
--- a/createproject.sh
+++ b/createproject.sh
@@ -1,12 +1,12 @@
 #!/bin/bash
 
 CORDOVA=${CORDOVA-cordova}
+PLATFORMS=${PLATFORMS-ios}
 
 set -x
-$CORDOVA create CordovaAppHarness org.apache.appharness CordovaAppHarness
+$CORDOVA create CordovaAppHarness org.apache.appharness CordovaAppHarness || exit 1
 cd CordovaAppHarness
 
-
 echo '
 var cordova = require("../../cordova-cli/cordova");
 
@@ -36,17 +36,21 @@ npm install grunt grunt-contrib-watch
 
 rm -r www
 ln -s ../www www
-$CORDOVA platform add ios
-../../cordova-ios/bin/update_cordova_subproject platforms/ios/CordovaAppHarness.xcodeproj
+
+$CORDOVA platform add $PLATFORMS || exit 1
+
+if [[ $PLATFORMS = *ios* ]]; then
+    ../../cordova-ios/bin/update_cordova_subproject platforms/ios/CordovaAppHarness.xcodeproj
+fi
 
 $CORDOVA plugin add ../UrlRemap
-$CORDOVA plugin add ../../../mobile_chrome_apps/zip
-$CORDOVA plugin add ../../../BarcodeScanner # https://github.com/wildabeast/BarcodeScanner.git
 $CORDOVA plugin add ../../cordova-plugin-file
 $CORDOVA plugin add ../../cordova-plugin-file-transfer
 $CORDOVA plugin add ../../cordova-labs/file-extras
+$CORDOVA plugin add https://github.com/wildabeast/BarcodeScanner.git # Optional
 $CORDOVA plugin add ../../cordova-plugin-device # Not used by harness, but used by mobile-spec.
-
+# Currently unused. Will want it for .cdvh .crx support.
+# $CORDOVA plugin add ../../../mobile_chrome_apps/zip
 
 exit 0
 
@@ -55,5 +59,3 @@ for l in ../cordova-plugin-* ; do
   $CORDOVA plugin add "$l"
 done
 
-
-


[2/2] git commit: Update README.md to mention createproject.sh script and updated plugin list

Posted by ag...@apache.org.
Update README.md to mention createproject.sh script and updated plugin list


Project: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/commit/e28f7935
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/e28f7935
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/e28f7935

Branch: refs/heads/master
Commit: e28f7935cf11857f7418a1f0b8b9c091fc901758
Parents: 9144a15
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Oct 24 14:50:46 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Oct 24 14:50:46 2013 -0400

----------------------------------------------------------------------
 README.md | 34 +++++++++++++++++++++++++---------
 1 file changed, 25 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/e28f7935/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 6d2a165..764b792 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,43 @@
 cordova-app-harness
 ===================
 
-An wrapper app for Cordova that can download and run Cordova apps as well as
-Chrome packaged apps. This enables an edit &amp; refresh workflow. Also enables
-local development of apps without needing the Android / iOS SDK.
+An App that can download and run Cordova apps.
+
+Primary Goals:
+* Super-fast edit &amp; refresh workflow
+* Test on devices without needing platform SDKs
 
 ## Building the App Harness
-* Create a new CLI app:
+
+TLDR - using a Unix environment, run:
+
+    ./createproject.sh
+
+The manual way:
+
+1. Create a new CLI app:
 
         cordova create CordovaAppHarness com.yourcompany.appharness CordovaAppHarness
 
-* Add whichever platforms you want (currently only iOS and Android are supported by the underlying plugins: UrlRemap, zip):
+1. Add whichever platforms you want (currently only iOS and Android are supported by the underlying plugins: UrlRemap, zip):
 
         cordova platform add android ios
 
-* Add the `zip` ([](https://github.com/MobileChromeApps/zip)) and `UrlRemap` (bundled in this repo) plugins to the project (`cordova plugin add ...`)
-* If you want to be able to scan QR codes instead of typing URLs, add the `BarcodeScanner` ([](https://github.com/wildabeast/BarcodeScanner.git)) plugin.
+1. Add the following plugins:
+   * org.apache.cordova.UrlRemap (exists in the `UrlRemap` directory)
+   * com.phonegap.plugins.barcodescanner (optional - adds barcode scanning)
+   * org.apache.cordova.file
+   * org.apache.cordova.file-extras (exists in cordova-labs right now)
+   * org.apache.cordova.file-transfer
 
-* Clone the the `cordova-app-harness` repository.
-* Copy the `www` directory into the project:
+1. Clone the the `cordova-app-harness` repository.
+1. Copy the `www` directory into the project:
 
      rm -r CordovaAppHarness/www
      cp -a cordova-app-harness/www CordovaAppHarness/www
+     cordova prepare
+
+1. Add any plugins that your apps might need.
 
 ## Features
 * Install and test multiple applications.