Skip to content

Commit

Permalink
Merge pull request #9 from cheekiatng/timob-20602
Browse files Browse the repository at this point in the history
[TIMOB-20602] Hyperloop: Build doesn't work with 5.4.0
  • Loading branch information
hansemannn committed Mar 31, 2016
2 parents c14d5e5 + 694c896 commit 9b3450b
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repo contains source code for the Hyperloop® product.

You must have the following on your machine to build it using `build.sh`, however, you can use `./tools/build.sh` to bootstrap your environment with the necessary build tools if you do not:

- Titanium SDK 5.2.0 or later (from master)
- Titanium SDK 5.4.0 or later (from master)
- Xcodebuild + iOS SDK 9.0
- grunt
- Ant
Expand Down
2 changes: 1 addition & 1 deletion android/build.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
titanium.platform=${user.home}/Library/Application Support/Titanium/mobilesdk/osx/5.2.0.GA/android
titanium.platform=${user.home}/Library/Application Support/Titanium/mobilesdk/osx/5.4.0.GA/android
android.platform=/opt/android-sdk/platforms/android-23
google.apis=/opt/android-sdk/add-ons/addon-google_apis-google-23
android.ndk=/opt/android-ndk
4 changes: 2 additions & 2 deletions android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 1.1.1
version: 1.1.2
apiversion: 2
architectures: armeabi armeabi-v7a x86
description: hyperloop-android
Expand All @@ -15,4 +15,4 @@ name: hyperloop-android
moduleid: hyperloop
guid: bdaca69f-b316-4ce6-9065-7a61e1dafa39
platform: android
minsdk: 5.2.0.GA
minsdk: 5.4.0
4 changes: 2 additions & 2 deletions android/plugins/hyperloop/hooks/android/hyperloop.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports.cliVersion = '>=3.2';
metabase = require(path.join(__dirname, 'metabase'));

// set this to enforce a minimum Titanium SDK
var TI_MIN = '5.2.0';
var TI_MIN = '5.4.0';

/*
State.
Expand Down Expand Up @@ -112,7 +112,7 @@ exports.cliVersion = '>=3.2';
logger.error('You cannot use the Hyperloop compiler without configuring Android to use main thread execution.');
logger.error('Add the following to your tiapp.xml <ti:app> section:');
logger.error('');
logger.error(' <property name="run-on-main-thread" type="boolean">true</property>');
logger.error(' <property name="run-on-main-thread" type="bool">true</property>');
logger.warn('');
process.exit(1);
}
Expand Down
4 changes: 2 additions & 2 deletions android/plugins/hyperloop/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperloop",
"version": "1.1.1",
"version": "1.1.2",
"description": "Access native Android and Java APIs from within Titanium.",
"author": "Chris Williams",
"license": "Appcelerator Software Subscription",
Expand All @@ -15,4 +15,4 @@
"wrench": "^1.5.8",
"xmldom": "^0.1.19"
}
}
}
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ if [ $? -ne 0 ];
then
exit $?
fi
cp -R build/zip/modules/iphone ../dist/modules
cp -R build/zip/plugins/hyperloop ../dist/plugins/
cp -R build/zip/modules/ ../dist/modules
cp -R build/zip/plugins/ ../dist/plugins/
cd ..

echo "Creating combined zip with iOS and Android"
Expand Down
2 changes: 1 addition & 1 deletion documentation/ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ You should extract the zip file at the root level of your Titanium (or Alloy) pr
For iOS, you'll need to add the following two elements as children to the `ios` element:

```xml
<property name="run-on-main-thread" type="bool">true</property>
<ios>
<run-on-main-thread>true</run-on-main-thread>
<use-jscore-framework>true</use-jscore-framework>
</ios>
```
Expand Down
2 changes: 1 addition & 1 deletion iphone/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ "${CI}" = "1" ];
then
echo "Testing ..."
xcodebuild clean >/dev/null
xcodebuild -sdk iphonesimulator9.1 -destination 'platform=iOS Simulator,name=iPhone 6' -scheme hyperloop -target Tests -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='USE_JSCORE_FRAMEWORK=1' test | xcpretty -r junit
xcodebuild -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6' -scheme hyperloop -target Tests -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='USE_JSCORE_FRAMEWORK=1' test | xcpretty -r junit
if [ $? -ne 0 ];
then
exit $?
Expand Down
4 changes: 2 additions & 2 deletions iphone/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 1.1.1
version: 1.1.2
apiversion: 2
architectures: armv7 arm64 i386 x86_64
description: hyperloop
Expand All @@ -15,4 +15,4 @@ name: hyperloop
moduleid: hyperloop
guid: bdaca69f-b316-4ce6-9065-7a61e1dafa39
platform: iphone
minsdk: 5.2.0.GA
minsdk: 5.4.0
11 changes: 5 additions & 6 deletions iphone/plugin/hyperloop.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports.init = init;
// set this to enforce a ios-min-version
var IOS_MIN = '7.0';
// set this to enforce a minimum Titanium SDK
var TI_MIN = '5.2.0';
var TI_MIN = '5.4.0';
// set the iOS SDK minium
var IOS_SDK_MIN = '9.0';

Expand Down Expand Up @@ -136,12 +136,11 @@ HyperloopiOSBuilder.prototype.validate = function validate() {
process.exit(1);
}

// check for the run-on-main-thread configuration
if (!this.builder.tiapp.ios['run-on-main-thread']) {
if (!(this.builder.tiapp.properties && this.builder.tiapp.properties.hasOwnProperty('run-on-main-thread') && this.builder.tiapp.properties['run-on-main-thread'].value)) {
this.logger.error('You cannot use the Hyperloop compiler without configuring iOS to use main thread execution.');
this.logger.error('Add the following to your tiapp.xml <ios> section:');
this.logger.error('Add the following to your tiapp.xml <ti:app> section:');
this.logger.error('');
this.logger.error(' <run-on-main-thread>true</run-on-main-thread>\n');
this.logger.error(' <property name="run-on-main-thread" type="bool">true</property>');
process.exit(1);
}

Expand Down Expand Up @@ -987,7 +986,7 @@ HyperloopiOSBuilder.prototype.hookXcodebuild = function hookXcodebuild(data) {
});
}

addParam('GCC_PREPROCESSOR_DEFINITIONS', 'HYPERLOOP=1');
addParam('GCC_PREPROCESSOR_DEFINITIONS', '$(inherited) HYPERLOOP=1');

// inject the params into the xcodebuild args
var args = data.args[1];
Expand Down
2 changes: 1 addition & 1 deletion iphone/plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperloop",
"version": "1.0.1",
"version": "1.1.2",
"description": "Provides direct native API access from Titanium",
"keywords": [
"appcelerator",
Expand Down
2 changes: 1 addition & 1 deletion iphone/titanium.xcconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// define this is running locally but don't check in your change
TITANIUM_SDK = ~/Library/Application Support/Titanium/mobilesdk/osx/5.2.0.GA
TITANIUM_SDK = ~/Library/Application Support/Titanium/mobilesdk/osx/5.4.0.GA
TITANIUM_BASE_SDK = "$(TITANIUM_SDK)/iphone/include"
TITANIUM_BASE_SDK2 = "$(TITANIUM_SDK)/iphone/include/TiCore"
TITANIUM_BASE_SDK3 = "$(TITANIUM_SDK)/iphone/include/JavaScriptCore"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperloop",
"version": "1.1.1",
"version": "1.1.2",
"description": "Access native APIs from within Titanium.",
"keywords": [
"appcelerator",
Expand Down

0 comments on commit 9b3450b

Please sign in to comment.