-
-
Notifications
You must be signed in to change notification settings - Fork 274
Running zmNinja from Source
- Install Dependencies - needed for all platforms
- Download zmNinja
- Configure build configure zmNinja and get all required plugins
- Making an iOS build
- Making an Android build
- Making a desktop build
- Troubleshooting
NOTE If you want to run it on your desktop, you can directly download desktop binaries here and if you want it for Android/iOS you can get from the play/appstore. This is only for those who want to run from source.
Note: If you are building from source, you are mostly on your own. I have very limited time to debug environment differences/package differences between what I have and what you may have. I'm not a nodejs/grunt etc expert and stuff seems to change all the time.
Version note: The code is compiled using the following versions of tools. If you are using newer versions of ionic the code may not compile - I don't have the time to upgrade yet. Finally, if you choose to go the source route, I expect you to spend a lot of time yourself debugging first before you create an issue. Even if you do create an issue, I have very limited bandwidth to debug source compilation issues for you. Thanks.
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
Gulp CLI : CLI version 3.9.1 Local version 3.9.1
local packages:
Cordova Platforms : android 6.3.0 ios 4.5.4
Ionic Framework : ionic1 1.3.5
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
Node : v6.11.2
npm : 3.10.10
OS : macOS High Sierra
Xcode : Xcode 9.4 Build version 9F1027a
Environment Variables:
ANDROID_HOME : /Users/pp/Library/Android/sdk/
Misc:
backend : legacy
Install NodeJS from here. As of Dec 2017, I'm using Node v6.11.2 (ionic-v1 projects seem to cause errors with newer versions of node. I use n to manage node versions and switch between them)
npm install -g cordova ionic bower And some more:
npm install -g gulp
npm install node-sass
npm install async
npm install jshint(Note you may need to do sudo depending on how your system is set up. It's better you don't, but if you must, well, you must)
If you get a newer version, you should adjust your cordova version to the mentioned version above in order to be able to successfully compile zmNinja. To change the version you can follow these instructions: change cordova version
git clone --depth 1 https://github.com/pliablepixels/zmNinja.gitcd zmNinja
npm install
bower install
cordova prepareNote: You need to be doing this on a mac, with Xcode and the SDK installed
There are a few steps you need to take to get the iOS build working for the first time. If you don't do this, you may get a compilation error that says ld: library not found for -lGoogleToolboxForMac
cd platforms/ios
pod install
You also need to ensure a provisioning profile is attached and the push notification plugin capability is properly configured. Load up platforms/ios/zmNinja.xcworkspace and assign it a code signing profile.Make sure the "Capabilities" tab shows a correctly configured "remote notification" capability. I'm going light on details, because I assume you are a developer.
This does not produce an iOS ready ipa. What you need to do then is to open platforms/ios/zmNinja.xcworkspace
in Xcode, and run.
To compile a debug build for iOS, from zmNinja project root:
ionic cordova build iosIf this results in a missing provisioning profile error,
Note that you need the Android SDK installed and configured properly for this to work.
From the zmNinja project root:
ionic cordova build androidIf this complains of missing SDKs, you need to install the SDK version it requests This should produce an APK file. To install it on your phone over adb, you'd do something like
adb install -r platforms/android/build/outputs/apk/android-armv7-debug.apkI use electron to build the desktop app.
Summary
### Set up desktop dependencies
npm install -g electron
npm install -g asar
Make sure electron is installed. You should be able to do a which electron
Also make sure unzip and wget tools are installed in your system.
If this is the first time you are building a desktop version, you need to download electron images
for various platforms. There is a helper script called prepare_desktop.sh that you can run. This creates
a directory called desktop inside your zmNinja directory. It currently downloads all supported platforms.
./prepare_desktop.sh
This will download a bunch of files. If completed successfully, you can proceed to the next step.
Once you are done with prepare_desktop.sh, you can do a ./make_desktop.sh. This will actually build images for all platforms.
cd into the desktop directory and run whichever port you want
You need to ./make_desktop.sh each time you make changes.
npm install -g electron
npm install -g asarMake sure electron is installed. You should be able to do a which electron
Also make sure unzip and wget tools are installed in your system.
If this is the first time you are building a desktop version, you need to download electron images
for various platforms. There is a helper script called prepare_desktop.sh that you can run. This creates
a directory called desktop inside your zmNinja directory. It currently downloads all supported platforms.
./prepare_desktop.shThis will download a bunch of files. If completed successfully, you can proceed to the next step.
Once you are done with prepare_desktop.sh, you can do a ./make_desktop.sh. This will actually build images for all platforms.
cd into the desktop directory and run whichever port you want
You need to ./make_desktop.sh each time you make changes.