diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-09-02 16:19:30 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-09-02 16:19:30 -0400 |
| commit | 5215843e9ed4423f3da0d46be4bf086763592218 (patch) | |
| tree | 8cc806b42a1fd2de55b275ee700a5a9941b9c78b | |
| parent | 32c278944adabea867c6b69e9d267906a93912a5 (diff) | |
nits
Former-commit-id: 6d8f8c66c1ca636b11c1ac0af99fc3345f6215eb
| -rwxr-xr-x | build_android.sh | 70 | ||||
| -rw-r--r-- | config.xml | 7 | ||||
| -rw-r--r-- | plugins/fetch.json | 12 |
3 files changed, 50 insertions, 39 deletions
diff --git a/build_android.sh b/build_android.sh index 5db0a337..b9daded9 100755 --- a/build_android.sh +++ b/build_android.sh @@ -4,8 +4,8 @@ NINJAKEYSTORE=~/Desktop/zmNinja.keystore if [ ! -f "$NINJAKEYSTORE" ]; then - echo "zmNinja keystore not found" - exit + echo "zmNinja keystore not found" + exit fi # clean up past builds @@ -18,21 +18,21 @@ rm -f release_files/* # 2 == build native only BUILD_MODE="all" if [ "$1" = "1" ]; then - BUILD_MODE="xwalk" - echo "only building crosswalk" + BUILD_MODE="xwalk" + echo "only building crosswalk" fi - + if [ "$1" = "2" ]; then - BUILD_MODE="native" - echo "only building native view (5+)" + BUILD_MODE="native" + echo "only building native view (5+)" fi ############ Crosswalk build #################################### if [ "$BUILD_MODE" = "xwalk" ] || [ "$BUILD_MODE" = "all" ]; then - echo "Building Release mode for Xwalk android..." - echo "--------------------------------------------" - echo "Adding crosswalk..." + echo "Building Release mode for Xwalk android..." + echo "--------------------------------------------" + echo "Adding crosswalk..." #ionic plugin add cordova-plugin-crosswalk-webview --variable "XWALK_VERSION"="18+" ionic plugin add cordova-plugin-crosswalk-webview @@ -43,34 +43,33 @@ if [ "$BUILD_MODE" = "xwalk" ] || [ "$BUILD_MODE" = "all" ]; then cordova plugin add https://github.com/danjarvis/cordova-plugin-crosswalk-certificate ionic platform remove android ionic platform add android - cp "$NINJAKEYSTORE" platforms/android - - ionic build android --release + cp "$NINJAKEYSTORE" platforms/android + ionic build android --release # copy builds to my release directory - cp platforms/android/build/outputs/apk/android-x86-release-unsigned.apk release_files/ - cp platforms/android/build/outputs/apk/android-armv7-release-unsigned.apk release_files/ - echo "Copied files to release_files" + cp platforms/android/build/outputs/apk/android-x86-release-unsigned.apk release_files/ + cp platforms/android/build/outputs/apk/android-armv7-release-unsigned.apk release_files/ + echo "Copied files to release_files" # sign them - cd release_files/ - jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../platforms/android/zmNinja.keystore android-armv7-release-unsigned.apk zmNinja - jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../platforms/android/zmNinja.keystore android-x86-release-unsigned.apk zmNinja - ~/Library/Android/sdk/build-tools/22.0.1/zipalign -v 4 android-x86-release-unsigned.apk zmNinja-x86-pre5.apk - ~/Library/Android/sdk/build-tools/22.0.1/zipalign -v 4 android-armv7-release-unsigned.apk zmNinja-arm-pre5.apk - rm -f android-x86-release-unsigned.apk android-armv7-release-unsigned.apk - cd .. + cd release_files/ + jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../platforms/android/zmNinja.keystore android-armv7-release-unsigned.apk zmNinja + jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../platforms/android/zmNinja.keystore android-x86-release-unsigned.apk zmNinja + ~/Library/Android/sdk/build-tools/22.0.1/zipalign -v 4 android-x86-release-unsigned.apk zmNinja-x86-pre5.apk + ~/Library/Android/sdk/build-tools/22.0.1/zipalign -v 4 android-armv7-release-unsigned.apk zmNinja-arm-pre5.apk + rm -f android-x86-release-unsigned.apk android-armv7-release-unsigned.apk + cd .. fi ############ Native web view build ############################### if [ "$BUILD_MODE" = "native" ] || [ "$BUILD_MODE" = "all" ]; then - echo "Building Release mode for android 5+..." - echo "--------------------------------------------" + echo "Building Release mode for android 5+..." + echo "--------------------------------------------" #clean up past build stuff - rm -fr platforms/android/build/outputs/* - echo "Adding default browser..." + rm -fr platforms/android/build/outputs/* + echo "Adding default browser..." ionic plugin remove cordova-plugin-crosswalk-webview # use the right plugin for SSL certificate mgmt @@ -78,21 +77,20 @@ if [ "$BUILD_MODE" = "native" ] || [ "$BUILD_MODE" = "all" ]; then cordova plugin add https://github.com/hypery2k/cordova-certificate-plugin ionic platform remove android ionic platform add android - cp "$NINJAKEYSTORE" platforms/android + cp "$NINJAKEYSTORE" platforms/android # Make sure native builds are only deployed in devices < Android 5 - ionic build android --release -- --minSdkVersion=21 + ionic build android --release -- --minSdkVersion=21 # copy build to release folder and sign - cp platforms/android/build/outputs/apk/android-release-unsigned.apk release_files/ - echo "Copied files to release_files" + cp platforms/android/build/outputs/apk/android-release-unsigned.apk release_files/ + echo "Copied files to release_files" - cd release_files/ - jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../platforms/android/zmNinja.keystore android-release-unsigned.apk zmNinja + cd release_files/ + jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../platforms/android/zmNinja.keystore android-release-unsigned.apk zmNinja ~/Library/Android/sdk/build-tools/22.0.1/zipalign -v 4 android-release-unsigned.apk zmNinja.apk - rm -f android-release-unsigned.apk - - cd .. + rm -f android-release-unsigned.apk + cd .. fi @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget android-packageName="com.pliablepixels.zmninja_pro" id="com.pliablepixels.zmninjapro" ios-CFBundleIdentifier="com.pliablepixels.zmninja-pro" version="1.2.17" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget android-packageName="com.pliablepixels.zmninja_pro" id="com.pliablepixels.zmninjapro" ios-CFBundleIdentifier="com.pliablepixels.zmninja-pro" version="1.2.18" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>zmNinja</name> <description> High performance ZoneMinder client @@ -80,4 +80,9 @@ </platform> <icon src="resources/android/icon/drawable-xhdpi-icon.png" /> <plugin name="cordova-sqlite-storage" spec="~1.4.6-pre6a" /> + <preference name="xwalkVersion" value="20+" /> + <preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" /> + <preference name="xwalkMode" value="embedded" /> + <preference name="xwalkMultipleApk" value="true" /> + <preference name="android-minSdkVersion" value="16" /> </widget> diff --git a/plugins/fetch.json b/plugins/fetch.json index adfb9ae0..ab0b287b 100644 --- a/plugins/fetch.json +++ b/plugins/fetch.json @@ -186,10 +186,18 @@ "is_top_level": true, "variables": {} }, - "cordova-plugin-certificates": { + "cordova-plugin-crosswalk-webview": { + "source": { + "type": "registry", + "id": "cordova-plugin-crosswalk-webview" + }, + "is_top_level": true, + "variables": {} + }, + "cordova-plugin-crosswalk-certificate": { "source": { "type": "git", - "url": "https://github.com/hypery2k/cordova-certificate-plugin", + "url": "https://github.com/danjarvis/cordova-plugin-crosswalk-certificate", "subdir": "." }, "is_top_level": true, |
