Command Line Building

Heya,

Is it possible to build apps for the iPhone from the command line?

I’d like to introduce a few pre-build steps and write some scripts which will automate the entire process of installing the app on my iPhone without me having to step through it at each point.

Tom [import]uid: 11757 topic_id: 4616 reply_id: 304616[/import]

I’d like that too so I can do automated builds.

Anyone tried this?
Maybe the automation tool on the Mac could help? [import]uid: 8353 topic_id: 4616 reply_id: 14724[/import]

Lately I’ve been crashing Corona with a few misplaced object bounds when adding bodies to the physics engine. Anyway, from this it has become apparent that Ansca is using Hudson within the Corona Simulator? Can this be true? Check the following console log:

[text]
Assertion failed: (edge.LengthSquared() > 1.19209290e-7F * 1.19209290e-7F), function Set, file /Users/ansca/.hudson/jobs/Main-DMG/workspace/platform/mac/…/…/external/Box2D_v2.1.2/Box2D/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 149.
/Applications/Corona.268/Corona Terminal: line 9: 43715 Abort trap “$path/Corona Simulator.app/Contents/MacOS/Corona Simulator” $*
logout
[/text] [import]uid: 21649 topic_id: 4616 reply_id: 21218[/import]

@bsoisoi, I’ve seen lots (far too many) crashes like this that mention hudson. What is it and why do you mention it?
[import]uid: 8353 topic_id: 4616 reply_id: 21234[/import]

/Users/ansca/.hudson/jobs/Main-DMG/workspace/platform/mac/…/…/external/Box2D_v2.1.2/Box2D/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 149.

I actually misinterpreted the line above to indicate hudson was bundled within CoronaSDK. This actually indicates they use hudson to build CoronaSDK.

Are any Corona command line build tools available? For any mature software group, this is an absolute requirement! [import]uid: 21649 topic_id: 4616 reply_id: 21238[/import]

If you’re on a Mac, check out the Corona Simulator.app package contents. It contains ant build scripts! I’ll try now, but we might be able to use this for our own command-line builders [import]uid: 21649 topic_id: 4616 reply_id: 21261[/import]

Cool!

I’ve no experience with Ant, but I guess it’s about time I learnt how to use it.

I’ll have a look at them, thanks for the tip. [import]uid: 11757 topic_id: 4616 reply_id: 21382[/import]

Hello guys.

I have been trying to use the build.xml mentioned above, with no success so far.
It is not meant to be used by developers directly, so it is not well documented…

Here is my first guess (replace all the values accordingly to your environment of course):

[bash]
$ ln -s /Applications/Corona/Corona\ Simulator.app/Contents/Resources/build.xml corona_build_file

$ ant \
-f corona_build_file \
-DBUNDLE_DIR=/Applications/Corona/Corona\ Simulator.app/Contents/Resources \
-DSRC_DIR=src \
-DTEMP_DIR=build/temp \
-DDST_DIR=build/snapshot \
-DUSER_APP_NAME=snapshot \
pre-upload-zip post-build
[/bash]

BUNDLE_DIR = the location of a script called FastFileCreate, same as Corona’s build.xml
SRC_DIR = folder containing your main.lua
TEMP_DIR = any folder of your choice, where write is enabled
DST_DIR = destination folder for the build
USER_APP_NAME = the name of the build, I suppose

It does some stuff (copies some files and all the sounds in the temp dir and creates an “input.zip” file), but then it complains that a file called “output.zip” is not present. According to what I see in the build.xml file, no output.zip file can be created with ant. Maybe it is created by Corona ?

What results did you get?

I think the target “sign”, which require more parameters, is mandatory. Will try tommorrow.
Also, I don’t understand where the Code Signing Identity is handled.

Anyway, I hope it helps…
[import]uid: 67744 topic_id: 4616 reply_id: 42768[/import]

PS: see also

http://developer.anscamobile.com/forum/2011/02/07/support-command-line-thus-continuous-integration-builds

Let’s vote for that feature ! [import]uid: 67744 topic_id: 4616 reply_id: 42769[/import]