Command Line Building

8 replies [Last post]
personalnadir
User offline. Last seen 32 weeks 22 hours ago. Offline
Joined: 24 Nov 2010

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

Replies

thegwill
User offline. Last seen 35 weeks 4 days ago. Offline
Joined: 21 Aug 2010

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

Anyone tried this?
Maybe the automation tool on the Mac could help?

bsoisoi
User offline. Last seen 2 years 42 weeks ago. Offline
Joined: 19 Jan 2011

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:

1
2
3
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

thegwill
User offline. Last seen 35 weeks 4 days ago. Offline
Joined: 21 Aug 2010

@bsoisoi, I've seen lots (far too many) crashes like this that mention hudson. What is it and why do you mention it?

bsoisoi
User offline. Last seen 2 years 42 weeks ago. Offline
Joined: 19 Jan 2011

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

bsoisoi
User offline. Last seen 2 years 42 weeks ago. Offline
Joined: 19 Jan 2011

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

personalnadir
User offline. Last seen 32 weeks 22 hours ago. Offline
Joined: 24 Nov 2010

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.

silverthorax
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 8 Jun 2011

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

1
2
3
4
5
6
7
8
9
10
$ 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

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

silverthorax
User offline. Last seen 10 weeks 4 days ago. Offline
Joined: 8 Jun 2011

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.