Last active
August 29, 2015 14:01
-
-
Save viezel/5727d900982b1dd4288a to your computer and use it in GitHub Desktop.
Build and copy android module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Build an Appcelerator Android Module | |
## Then copy it to the default module directory | |
## | |
## (c) Napp ApS | |
## Mads Møller | |
## | |
## HOW TO GUIDE | |
## 1. Copy this script into the root of your android module project | |
## 2. Open terminal and navigate to the root of your android module project | |
## 3. write: bash ./build-module-android.sh | |
## Compile the module | |
ant dist | |
## Path to the module manifest | |
FILENAME='./manifest' | |
## FIND MODULE ID | |
MODULE_ID=$(grep 'moduleid' $FILENAME -m 1) | |
MODULE_ID=${MODULE_ID#*: } # Remove everything up to a colon and space | |
## FIND MODULE VERSION | |
MODULE_VERSION=$(grep 'version' $FILENAME -m 1) ## only one match | |
MODULE_VERSION=${MODULE_VERSION#*: } # Remove everything up to a colon and space | |
## unzip compiled module - and override if existing | |
unzip -o ./dist/$MODULE_ID-android-$MODULE_VERSION.zip -d /Users/$USER/Library/Application\ Support/Titanium | |
## Optional: You could run a app now - using your new module | |
#PROJECT_PATH='/path/to/your/project/projectname' | |
#cd $PROJECT_PATH | |
#titanium clean | |
#titanium build -p android -T device --device-id <DEVICE_ID> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Build an Appcelerator Android Module | |
## Then copy it to the default module directory | |
## | |
## (c) Napp ApS | |
## Mads Møller | |
## | |
## HOW TO GUIDE | |
## 1. Copy this script into the root of your android module project | |
## 2. Open terminal and navigate to the root of your android module project | |
## 3. write: bash ./build-module-ios.sh | |
## clean build folder | |
find ./build -mindepth 1 -delete | |
## compile the module | |
./build.py | |
## where is manifest | |
FILENAME='./manifest' | |
## FIND MODULE ID | |
MODULE_ID=$(grep 'moduleid' $FILENAME -m 1) | |
MODULE_ID=${MODULE_ID#*: } # Remove everything up to a colon and space | |
## FIND MODULE VERSION | |
MODULE_VERSION=$(grep 'version' $FILENAME -m 1) ## only one match | |
MODULE_VERSION=${MODULE_VERSION#*: } # Remove everything up to a colon and space | |
## unzip compiled module - and override if existing | |
unzip -o ./$MODULE_ID-iphone-$MODULE_VERSION.zip -d /Users/$USER/Library/Application\ Support/Titanium | |
## Optional: You could run a app now - using your new module | |
PROJECT_PATH='/path/to/your/project/projectname' | |
cd $PROJECT_PATH | |
## Clean and build the app project | |
titanium clean | |
titanium build -p iphone -T simulator |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Was just about to start working on something like this! Good job 👍