Skip to content
Browse files

updated hooks and plugin

  • Loading branch information...
1 parent ce1f3ba commit 797e854e96dc677afce07ffa6796e50b580dfc28 @tonylukasavage tonylukasavage committed Jan 8, 2013
Showing with 8 additions and 72 deletions.
  1. +4 −2 plugins/ti.alloy/hooks/alloy.js
  2. +4 −4 plugins/ti.alloy/plugin.py
  3. BIN plugins/ti.alloy/plugin.pyc
  4. +0 −66 tiapp.sample.xml
View
6 plugins/ti.alloy/hooks/alloy.js
@@ -30,10 +30,10 @@ exports.init = function (logger, config, cli, appc) {
var compilerCommand = afs.resolvePath(__dirname, '..', 'Alloy', 'commands', 'compile', 'index.js'),
config = {
- platform: cli.argv.platform,
+ platform: /(?:iphone|ipad)/.test(cli.argv.platform) ? 'ios' : cli.argv.platform,
version: '0',
simtype: 'none',
- devicefamily: /iphone|ios/.test(cli.argv.platform) ? build.deviceFamily : 'none',
+ devicefamily: /(?:iphone|ios)/.test(cli.argv.platform) ? build.deviceFamily : 'none',
deploytype: build.deployType || cli.argv['deploy-type'] || 'development'
};
@@ -57,6 +57,7 @@ exports.init = function (logger, config, cli, appc) {
e.toString().split('\n').forEach(function (line) {
line && logger.error(line);
});
+ process.exit(1);
}
Error.stackTraceLimit = origLimit;
finished();
@@ -124,6 +125,7 @@ exports.init = function (logger, config, cli, appc) {
child.on('exit', function (code) {
if (code) {
logger.error(__('Alloy compiler failed'));
+ process.exit(1);
} else {
logger.info(__('Alloy compiler completed successfully'));
}
View
8 plugins/ti.alloy/plugin.py
@@ -1,4 +1,3 @@
-
import os, sys, subprocess, hashlib
import subprocess
@@ -40,7 +39,8 @@ def compile(config):
"/opt/local/bin/"+binary,
userPath+"/local/bin/"+binary,
"/opt/bin/"+binary,
- "/usr/bin/"+binary
+ "/usr/bin/"+binary,
+ "/usr/local/share/npm/bin/"+binary
]
try:
@@ -59,8 +59,9 @@ def compile(config):
break
else:
print "not found"
+ binaryPath = None
- if binaryPath == None:
+ if binaryPath is None:
print "[ERROR] Couldn't find %s" % binary
sys.exit(1)
else:
@@ -77,7 +78,6 @@ def compile(config):
print "[INFO] alloy app found at %s" % f
rd = os.path.abspath(os.path.join(config['project_dir'], 'Resources'))
- # FIXME - need to support all platforms - https://jira.appcelerator.org/browse/ALOY-85
devicefamily = 'none'
simtype = 'none'
version = '0'
View
BIN plugins/ti.alloy/plugin.pyc
Binary file not shown.
View
66 tiapp.sample.xml
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><ti:app xmlns:ti="http://ti.appcelerator.org">
- <!-- App Properties - replace with your values. Enable ACS or manually create ACS app for keys -->
- <property name="acs-oauth-secret-production" type="string">XXX</property>
- <property name="acs-oauth-key-production" type="string">XXX</property>
- <property name="acs-api-key-production" type="string">XXX</property>
- <property name="acs-oauth-secret-development" type="string">XXX</property>
- <property name="acs-oauth-key-development" type="string">XXX</property>
- <property name="acs-api-key-development" type="string">XXX</property>
-
- <property name="ti.facebook.appid">YOUR_ID_HERE</property>
- <property name="twitter.consumerKey">YOUR_KEY_HERE</property>
- <property name="twitter.consumerSecret">YOUR_SECRET_HERE</property>
- <property name="ti.ui.defaultunit">dip</property>
-
- <deployment-targets>
- <target device="mobileweb">true</target>
- <target device="iphone">true</target>
- <target device="ipad">true</target>
- <target device="android">true</target>
- <target device="blackberry">false</target>
- </deployment-targets>
- <sdk-version>2.2.0.v20120904164912</sdk-version>
- <id>com.appcelerator.codestrong</id>
- <name>Codestrong</name>
- <version>1.0</version>
- <publisher>kwhinnery</publisher>
- <url>http://www.codestrong.com</url>
- <description>not specified</description>
- <copyright>2012 by kwhinnery</copyright>
- <icon>appicon.png</icon>
- <persistent-wifi>false</persistent-wifi>
- <prerendered-icon>false</prerendered-icon>
- <statusbar-style>default</statusbar-style>
- <statusbar-hidden>false</statusbar-hidden>
- <fullscreen>false</fullscreen>
- <navbar-hidden>false</navbar-hidden>
- <analytics>true</analytics>
- <guid>663bee76-3574-46ac-9f21-a6c53075771d</guid>
- <iphone>
- <orientations device="iphone">
- <orientation>Ti.UI.PORTRAIT</orientation>
- </orientations>
- <orientations device="ipad">
- <orientation>Ti.UI.PORTRAIT</orientation>
- <orientation>Ti.UI.UPSIDE_PORTRAIT</orientation>
- <orientation>Ti.UI.LANDSCAPE_LEFT</orientation>
- <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>
- </orientations>
- </iphone>
- <android xmlns:android="http://schemas.android.com/apk/res/android"/>
- <mobileweb>
- <precache/>
- <splash>
- <enabled>true</enabled>
- <inline-css-images>true</inline-css-images>
- </splash>
- <theme>default</theme>
- </mobileweb>
- <modules>
- <module platform="commonjs" version="2.3.0">ti.cloud</module>
- <module platform="android" version="1.0">ti.physicalSizeCategory</module>
- </modules>
- <plugins>
- <plugin version="1.0">ti.alloy</plugin>
- </plugins>
-</ti:app>

0 comments on commit 797e854

Please sign in to comment.
Something went wrong with that request. Please try again.