diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..9660c42 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +ANDROID_KEYSTORE_PATH=../path/to/your.keystore +ANDROID_ZIPALIGN_PATH=../path/to/zipalign/binary diff --git a/.gitignore b/.gitignore index 0286574..df52371 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,12 @@ # Specifies intentionally untracked files to ignore when using Git # http://git-scm.com/docs/gitignore +# Don't check in individual build config settings +.env + +# Don't check in production Android builds +PasswordMaker.apk + *~ *.sw[mnpcod] *.log diff --git a/Readme.md b/Readme.md index ec16cab..8a820f6 100644 --- a/Readme.md +++ b/Readme.md @@ -8,6 +8,20 @@ A modern mobile app supporting [Password Maker](https://passwordmaker.org/). Built with [Ionic](https://ionicframework.com/) and [Angular](https://angular.io/). +## Run locally + +* `ionic serve` +* Note that the clipboard feature is currently not available in browser. + +## Build + +### Android + +* Configure your local `.env` - copy from `.env.example` if missing. +* Run: `./build-helpers/android.sh` +* Enter signing key's password if prompted. +* Signed `PasswordMaker.apk` is created in the project root. + ## Icon & splash screen These use [Ionicons](https://ionicons.com/)' iOS-style key SVG (MIT licensed). diff --git a/build-helpers/android.sh b/build-helpers/android.sh new file mode 100755 index 0000000..ef9a6b5 --- /dev/null +++ b/build-helpers/android.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Load configs +. .env + +ionic cordova build android --prod --release +jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore $ANDROID_KEYSTORE_PATH platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk webful +$ANDROID_ZIPALIGN_PATH -v 4 platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk PasswordMaker.apk