Giter VIP home page Giter VIP logo

maketi's Introduction

MakeTi

How to start the project

Add the files from this repo to the root dir of your project and type one of the following in a terminal:

$ make run

* To change the SDK version, change the SDK version in your tiapp.xml if SDK version is omitted defaults to Newest SDK version.
* Optionally Set the iOS SDK version by adding (selected version) to your tiapp.xml.

$ make run

To run the application on Android, type:

$ make clean && make run platform=android

To run the application on iPad, type:

$ make clean && make run platform=ipad

The default platform is iPhone

* You just have to use “make clean” before the run command if you change the device type. If you’re using the same device between executions, it’s not necessary to execute “make clean” because it will force Titanium to re-compile the entire project again, which is considerably slow.

Certificates

When running the deploy command you can be asked for certificates.
Select the right one (based on a numeric value), depending on your cert type, ie:

make deploy cert=0

Actions (only for iOS)

You can choose to deploy to device straight to iTunes or just create an adhoc build which you can either install to your device using iTunes, distribute to your testers or manually upload to TestFlight.

make clean && make deploy action=adhoc

How to run on your device

To run your app on an iOS device you must simply add your development cert to /certs/development.mobileprovision Creating the crets dir if needed.

After that, simply run

$ make deploy

To deploy the application on Android, type:

$ make clean && make deploy platform=android

To deploy the application on iPad, type:

$ make clean && make deploy platform=ipad

Android users also have an extra option of apkonly=true, so if you run:

make clean && make deploy platform=android apkonly=true

you will have an UNSIGNED (for dev use only, not for the market) apk located in:

(your project dir)/build/android/bin/app.apk

* When you do a deploy on any iOS platform, it MakeTi will present to you a list of avaliable certs on your system, next to each cert is an id. you must re-run your deploy command using the cert you wish to use by adding cert= to your command.

Changing the provisioning cert

You can change the used certificate with the following flag:

make deploy profile_file=enterprise

This will load the provisioning cert file from /certs/enterprise.mobileprovision

Build and deploy directly to TestFlight

Simply run

$ make deploy testflight=true

Now before you do this, you will need to add 2 lines to your tiapp.xml file
You can also have the app auto distributed by setting a comma seperated list of distrabution lists

I also added an optional notes feature like so:

$ make deploy testflight=true notes=“This is Beta 3 on my app”

That note will then be deliverd in the email to your beta testers informing them of the new app being ready to download.

* Due to restrictions in the TestFlight API… if you dont set tf_dist in your Tiapp.xml… users wont get an email letting them know they can download till you go onto the testflight site and check them as users of the latest beta.

Build and deploy directly to HockeyKit

Simply run

$ make deploy hockeykit=true

OR

$ make deploy platform=android hockeykit=true

To set your API key and app ID, simply add the following XML nodes to your tiapp.xml:
hockey_api (required)
hockey_ios_id (required for iOS upload, use the “Public app ID” HockeyKit provides)
hockey_android_id (required for android upload, use the “Public app ID” HockeyKit provides)

I also added an optional notes feature like so:

$ make deploy hockeykit=true notes=“This is Beta 3 on my app”

That note will then be deliverd in the email to your beta testers informing them of the new app being ready to download.

* Please not, an app must first be manualy created in HockeyKit, MakeTi wont create an app for you.

How to install the Textmate bundle

1. Double-click on the MakeTi.bundle pack to install the bundle in Textmate.
2. Edit the ANDROID_SDK_PATH variablie in Textmate to the correct path of the Android SDK.
To do this go to Preferences→Advanced→Shell variables add a new variable named ANDROID_SDK_PATH and set the path to the location of your Android SDK. (in my case is /android-sdk-mac_x86).
3. Open the whole project in Textmate.
B. Cmd+B within a file should open an option dialog letting you choose what to build for.

Simulator only for now

How to install the SublimeText2 package

1. Copy the MakeTi.sublime-package file to _~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages/
2. Restart SublimeText2.
3. Edit the ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/MakeTi/MakeTi.sublime-settings file to the correct path for the Android SDK.
4. Restart SublimeText2.
5. Open the whole project in SublimeText2.
6. Go to menu Tools→Build System and select MakeTi.
7. Cmd+B within a file should open an option dialog letting you choose what to build for.

Simulator only for now

To-Do

- Deploy to AppStore / Marketplace

- Don’t ask if I want to replace the existing version of the app in iTunes (iOS only)

- Update the Textmate and SublimeText2 plugins for the new build options MakeTi offers (deploy to device and to testflight).

License

Licensed under Apache Public License (Version 2).

Originally Developed by Guilherme Chapiewski. Extended and edited by Matt Apperson.

maketi's People

Contributors

dbankier avatar donthorp avatar iskugor avatar mattapperson avatar matttuttle avatar mfferreira avatar mihaibojin avatar omorandi avatar pedrobrasileiro avatar rborn avatar sukima avatar supermario avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maketi's Issues

Build to mobile web generates error in index.html

Build process seemed to run fine. Set my web root to the /build/mobileweb folder. Page loads and red Titanium error page comes up with "UncaughtTypeError: Cannot call method 'install' of undefined at /index.html (line 17854)

certs flag

not clear from documentation on how to use certs flag

Not building as universal

Setting the iPad flag doesn't make Ti build as a universal app, the app gets built as iPhone with the x2 button.

Can we get universal??

Build Needs Device Running Issue

The build currently needs the device to be running or an associated emulator window for android builds. I would like to decouple this so we can build quicker and avoid any emulator issues that are not related to building the app.

Here is a log that illustrates this point:

make run platform=android
Building with Titanium... as
PROJECT_ROOT='/usr/local/hudson/hudson-home/jobs/RabbleApp/workspace' DEVICE_TYPE=android bash '/usr/local/hudson/hudson-home
[DEBUG] Titanium not found... Testing another directory
[DEBUG] Titanium found...
[DEBUG] Titanium SDK 1.8.0.1.v20120116174635 found...
[ERROR] Could not find a running emulator.
[ERROR] Run this command in a separate terminal session: ~/Android/tools/emulator-arm -avd 10

Location of ti sdk

I love this, but I found an issue. Hi I don't like TiStudio I'm still using the ol'good Developer, with the SDK in /Library instead of ~/Library.
Anyway, having TiStudio installed I have the Titanium in my home folder, so the script fails to load the sdk.

Maybe a different way of searching for the SDK would be better (search the whole path of the SDK in ~ then in /)
What do you think ?

Deploy isnt working

HI,
i tried to make an deploy to my iPhone but it give me an odd error for example it strips out the U out of my developer Profilename for no reason and after that it can not build couz of an error pls see below.

Hope u can have a look soon? :)

Toni

  1. Step
    SHELL make deploy

Please re-run the build command using a 'cert' flag, with the value set to the index of one of the certs below...
[0] Toni Grski (XXXXXXXXXX)


  1. Step
    SHELL make deploy cert=0

[BEROR]Code Sign error: The identity 'iPhone Developer: Toni Grski (XXXXXXXXXX)' doesn't match any valid certificate/private key pair in the default keychain

Unknown or unsupported SDK version: 5.0

Hi,

First of all, thanks for creating this project, I just want to use vim to code my projects :)

Ok, here you have the last lines of my 'make run', obviously, the iOS simulator runs without executing the App.

[INFO] Launching application in Simulator
Unknown or unsupported SDK version: 5.0
[DEBUG] Simulator SDK Roots:
[DEBUG] 'Simulator - iOS 5.1' (5.1)
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk
[INFO] Launched application in Simulator (3.87 seconds)
[INFO] Application has exited from Simulator

My Titanium SDK Version is 2.1.0.GA.
Xcode 4.3.3.

Am I doing something wrong? thank you!

Certificate (Deploy)

When I execute make deploy, everything works just as expected. There is another issue open for "direct transfer via xcode" so I won't touch that here.

However, since I have only one certificate installed on my mac, it's sometimes annoying when the console asks me to select a certificate by executing make deploy cert=0 where 0 is the certificate index from the list.

Can this step be somehow avoided?

[DEBUG] Titanium SDK 1.8.0.1 found...

Hi,
the script couldn't find my TiSDK-Folder so i had a look at it and found out that the path was relative to the script so I added a starting SLASH to it -> fixed

titanium.sh | Line : 7
from
TI_DIR="Library/Application Support/Titanium"
to
TI_DIR="/Library/Application Support/Titanium"

Build error

I'm rubbish at py scripts, but my project builds with TiStudio - I think we all hate it. But I get the following error with MakeTi:

...Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1007, in main
asf.write(cssc.code)
AttributeError: 'CSSCompiler' object has no attribute 'code'

Any pointers?

Deploy on android not working

Hi,

I am trying to deploy on my Android phone (running ICS (4.0.3)).

OS : 10.7..3
SDK : 1.8.2
Java : 1.6.0_29
Xcode : 4.2.1

I am running the command "make clean && make deploy platform=android apkonly=true". It will compile the project but does not seem to be installing the app on my phone. The script exit without error. Here are the last DEBUG message outputted form the script:

[DEBUG] jarsigner - stropass tirocks -keystore "/Users/nicolas/...." -signedjar /Users/nicolas....... tidev
[DEBUG] /Android/android-sdk-mac_86/tools/zipalign -v 4 /Users/nicolas..... /Users/nicolas/.....

I tried running the command without the apkonly part and it gives the same result. Am I missing a step (like manually installing the app ?). Running "adb devices", I can see that my phone is successfully being detected.

Thanks,

Nicolas

Testflight build commands

the documentation for using testflight is a little unclear.

it appears that you need to deploy and use testflight at the same time? something like this

 make deploy cert=0 testflight=true

when i tried to use the command as documented, i get an error

make run = IndexError: list index out of range

airbox:Polarion JS API basti [master] $ make run
No platform selected... running as iphone.
Building with Titanium... as
PROJECT_ROOT='/Users/basti/Development/titanium/Polarion JS API' DEVICE_TYPE= bash './/bin/titanium.sh'
[DEBUG] Titanium not found... Testing another directory
[DEBUG] Titanium exists...
[DEBUG] Titanium SDK 2.1.1.GA found...
'/Users/basti/Library/Application Support/Titanium/mobilesdk/osx/2.1.1.GA/iphone/builder.py' run '/Users/basti/Development/titanium/Polarion JS API/' 5.0 com.tsystems.polarium.polarionjs 'Polaron JS API' iphone
[INFO] One moment, building ...
Traceback (most recent call last):
File "/Users/basti/Library/Application Support/Titanium/mobilesdk/osx/2.1.1.GA/iphone/builder.py", line 1604, in
main(sys.argv)
File "/Users/basti/Library/Application Support/Titanium/mobilesdk/osx/2.1.1.GA/iphone/builder.py", line 697, in main
link_version = check_iphone_sdk(iphone_version)
File "/Users/basti/Library/Application Support/Titanium/mobilesdk/osx/2.1.1.GA/iphone/builder.py", line 67, in check_iphone_sdk
return sorted(found,version_sort)[0]
IndexError: list index out of range

Deploy error

I try deploy app in iTunes with

make deploy cert=2

and error

No platform selected... building for iphone.
Building with Titanium... as 
PROJECT_ROOT='/Users/pedrobrasileiro/Desenvolvimento/Projetos/spllite/mobile' DEVICE_TYPE= BUILD_TYPE='device' bash './/bin/titanium.sh'
[DEBUG] Titanium not found... Testing another directory
[DEBUG] Titanium not found... Testing another directory
[DEBUG] Titanium exists...

[WARN] Only action=install and action=adhoc are supported. Choosing action=install.


[WARN] Defaulting profile_file to 'development'.

[DEBUG] Titanium SDK 2.1.3.GA found...
'/Users/pedrobrasileiro/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.GA/iphone/provisioner.py' '/Users/pedrobrasileiro/Desenvolvimento/Projetos/spllite/mobile/certs/.mobileprovision'
Loading provisioning profile...
No matching processes belonging to you were found
'/Users/pedrobrasileiro/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.GA/iphone/builder.py'  6.0 '/Users/pedrobrasileiro/Desenvolvimento/Projetos/spllite/mobile/'     br.com.pedrobrasileiro.projetos.mobile.spllite 'Spllite' '0DF90B32-BDA3-449F-8F94-D824182E05DB' 'Pedro Brasileiro (KDW85TD7J6)' 'iphone'
Traceback (most recent call last):
  File "/Users/pedrobrasileiro/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.GA/iphone/builder.py", line 1594, in <module>
    main(sys.argv)
  File "/Users/pedrobrasileiro/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.GA/iphone/builder.py", line 614, in main
    ti = TiAppXML(tiapp_xml)
  File "/Users/pedrobrasileiro/Google Drive/Titanium_SDK/osx/2.1.3.GA/tiapp.py", line 52, in __init__
    data = codecs.open(self.file,'r','utf-8','replace')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 881, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: u'br.com.pedrobrasileiro.projetos.mobile.spllite/tiapp.xml'
.//bin/titanium.sh: line 193: [: ==: unary operator expected
.//bin/titanium.sh: line 196: [: ==: unary operator expected
[INFO] One moment  building ...

Session could not be started

My application has been successfully built by make run, but iOS simulator has not been started. Error messages is following.

[INFO] Launching application in Simulator
[INFO] Launched application in Simulator (3.03 seconds)
[DEBUG] executing command: xcodebuild -version
[DEBUG] Xcode 4.2
[DEBUG] Build version 4D199
[INFO] Found 5.0 patch installed
[DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 "Simulator session timed out." UserInfo=0x1001cfe30 {NSLocalizedDescription=Simulator session timed out.}
[INFO] Application has exited from Simulator

I tried 'reset content and settings' at iOS simulator, but the result is same. Also, iOS simulator has been successfully started by running from Titanium studio.

My environment is following.

  • OS: 10.7.3
  • Titanium SDK: 1.8.2
  • XCode: 4.2

error once after make clean

Hi! I'm getting the same error when 1st I do a 'make clean' and then 'make run'. The second time and so, works as expected. Am I doing something wrong? Thanks in advance!

The trace:

[ERROR] Your TARGET_BUILD_DIR is incorrectly set. Most likely you have configured in Xcode a customized build location. Titanium does not currently support this configuration.
[ERROR] Expected dir /Workspace/GuiaSercotel/build/iphone/build/Debug-iphonesimulator, was: /Users/yellow/Dropbox/Workspace/GuiaSercotel/build/iphone/build/Debug-iphonesimulator
[ERROR] Error: Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1274, in main
execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=LOG__ID=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s %s" % (log_id,sdk_version,debugstr,kroll_coverage)],False)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1202, in execute_xcode
sys.exit(1)
SystemExit: 1

deploy problem

Hi, Thanks for sharing this tool. I prefer using command line tool instead of TiStudio. So I'm so glad to try this.
Well, I go tthe error when I tried "make deploy cert=[certification number].

Please take a look at below.

cloud9:clitest kazkonno$ make deploy cert=0
No platform selected... building for iphone.
Building with Titanium... as
PROJECT_ROOT='/Users/kazkonno/Documents/Titanium Studio Workspace/clitest' DEVICE_TYPE= BUILD_TYPE='device' bash '/Users/kazkonno/Documents/Titanium Studio Workspace/clitest/bin/titanium.sh'
[DEBUG] Titanium not found... Testing another directory
[DEBUG] Titanium found...
[DEBUG] Titanium SDK 1.8.0.1 found...
Loading provisioning profile...
[INFO] One moment building ...
Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 1523, in
main(sys.argv)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.8.0.1/iphone/builder.py", line 713, in main
debughost,debugport = debughost.split(":")

ValueError: need more than 1 value to unpack

Is this a kind of miss-reading provisioning file or something?

Titanium SDK 1.8.1 not found

Hi,

first, thank you so much for this, once I get it working, I'll be really pleased not to have to use TiStudio anymore!

When I run "make run", it tells me that it cannot find the Titanium SDK. Here is the output from the CLI (plus some directory listing - because it does make some directory)..

[email protected] /Users/Nicolas/Sites/titanium/ti [master+]
->ls
MakeTi.sublime-package Makefile bin
MakeTi.tmbundle README.textile tiapp.xml

[email protected] /Users/Nicolas/Sites/titanium/ti [master+]
->make run
No platform selected... running as iphone.
Building with Titanium... as
PROJECT_ROOT='/Users/Nicolas/Sites/titanium/ti' DEVICE_TYPE= bash './/bin/titanium.sh'
[DEBUG] Titanium not found... Testing another directory
[DEBUG] Titanium found...
[ERROR] Titanium SDK 1.8.1 not found...
make: *** [run] Error 1

[email protected] /Users/Nicolas/Sites/titanium/ti [master+]
->ls
MakeTi.sublime-package Makefile bin tiapp.xml
MakeTi.tmbundle README.textile build

So it does create some folder but that's about it.. I have modified the Android SDK path in the make file to reflect to where it is.

Also, is there a way to auto-generate the tiapp.xml file or should I be manually adding it to my project each time ?

Finally, I was wondering if I should be using the generated "MakeTi" (after cloning the repo) folder and changing the name or put this folder inside my project folder. Currently I am using the MakeTi folder and changing the name.

Thanks a lot!

make clean isn't working

Hi,
FYI unf. "make clean" isn't working.

clean:
    @rm -rf '${PROJECT_ROOT}/build/iphone/*'
    @mkdir -p '${PROJECT_ROOT}/build/iphone/'
    @echo "Deleted: ${PROJECT_ROOT}/build/iphone/*"
    @rm -rf '${PROJECT_ROOT}/build/android/*'
    @mkdir -p '${PROJECT_ROOT}/build/android/'
    @echo "Deleted: ${PROJECT_ROOT}/build/android/*"

it seems you have to remove the ' characters
@rm -rf ${PROJECT_ROOT}/build/iphone/*

@rm -rf ${PROJECT_ROOT}/build/android/*

deploy: curl called twice

Hi,

i have a little problem when deploying. The deploy is done twice
it s because of this line
Acually i am not sure why really.
I tried something:
adding a DONE variable that i set to true after the curl and check line 296. But it wont work as it seems that in those two lines the DONE variable is not in the same env.

Can you help me?

make run errors

I tried using this via make run, but the following erros were given:

Errorlog.jpg

From what I understood by reading the README, I placed Makefile and the bin folder in the root of my project.

iOS simulator not run

Everything looks compiled .. but no simulator

[DEBUG] Simulator SDK Roots:
[DEBUG] 'Simulator - iOS 7.0' (7.0)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk
[INFO] Launched application in Simulator (19.60 seconds)
[INFO] Application has exited from Simulator

Titanium SDK not found

Hey, I have tried to deploy an Alloy sample application which works in Titanium Studio normally. But I can't deploy because "make run" don't find Titanium Path. (OS 10.6.8)

I did this operations in console:

James:alloy03 ivanjimenezutiel$ ls -l /Library/Application\ Support/Titanium/
total 0
drwxr-xr-x 4 ivanjimenezutiel admin 136 4 mar 11:02 mobilesdk
drwxr-xr-x 6 ivanjimenezutiel admin 204 15 dic 14:28 modules

James:alloy03 ivanjimenezutiel$ export TITANIUM_PATH=/Library/Application\ Support/Titanium/
James:alloy01 ivanjimenezutiel$ pwd
/Users/ivanjimenezutiel/Documents/Dropbox/Titanium_Studio_Workspace/alloy01
James:alloy01 ivanjimenezutiel$ ls
CHANGELOG.txt MakeTi.tmbundle app plugins
LICENSE Makefile bin tiapp.xml
LICENSE.txt README build
MakeTi README.textile build.log
MakeTi.sublime-package Resources manifest
James:alloy01 ivanjimenezutiel$

...and then I tried to do "make run"...

James:alloy01 ivanjimenezutiel$ make run
make: *** No rule to make target `run'. Stop.
James:alloy01 ivanjimenezutiel$ make run
No platform selected... running as iphone.
Building with Titanium... as
PROJECT_ROOT='/Users/ivanjimenezutiel/Documents/Dropbox/Titanium_Studio_Workspace/alloy01' DEVICE_TYPE= bash './/bin/titanium.sh'

[WARN] Only action=install and action=adhoc are supported. Choosing action=install.

[WARN] Defaulting profile_file to 'development'.

[ERROR] Titanium SDK for 3.0.2.GA not found. You could try setting TITANIUM_PATH.
make: *** [run] Error 1

Some help it would appreciated.
Thanks

P.D.: Makefile was set with ANDROID_SDK path

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.