Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-20602] Hyperloop: Build doesn't work with 5.4.0 #9

Merged
merged 4 commits into from
Mar 31, 2016
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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
2 changes: 1 addition & 1 deletion android/plugins/hyperloop/hooks/android/hyperloop.js
Original file line number Diff line number Diff line change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some more places where we need to replace the 5.2.0 version with 5.4.0 (see attached screenshot)
bildschirmfoto 2016-03-28 um 22 42 01

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Just note that build.properties and titanium.xconfig is subject to the local machine with 5.4.0 installed. Most likely will standardise this on travis ci (in another ticket)

7 changes: 3 additions & 4 deletions iphone/plugin/hyperloop.js
Original file line number Diff line number Diff line change
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))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

))) One bracket too much, the build crashes. Also, does this.builder.tiapp.properties['run-on-main-thread'].value catch the false value as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! the value is either true or false so ya.

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
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 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