8. November, 2011

Adobe AIR 3: How to build a Captive Runtime, Standalone Bundle Executable App

Von webfraggle

The challenge was to build a Adobe Air 3 Standalone Executable. Also called a „Captive Runtime“ or a Bundle.

Here are some better descriptions:

But it was not so easy as it sounds because the order of the adt options are very important!

If the order isn’t correct you get the error „-storetype is required„.

And if you are behind a firewall or no internet connection, the timestamp server isn’t reachable. So use „-tsa none“ if you get „Could not generate timestamp: Connection timed out: connect„.

Here is my ant task which do the job with the correct order. But the order of the options in a terminal command should be the same.

<target name="07. [package exe]">
	<mkdir dir="${publish.dir}"/>
	<input message="certificate password:" addproperty="certPassword" />
	<java jar="${sdk.dir}/${adt}" fork="true" failonerror="true" dir="${deploy.dir}/">
		<arg value="-package" />
		<arg value="-keystore"/>
		<arg value="${air.certificate}"/>
		<arg value="-storetype"/>
		<arg value="pkcs12"/>
		<arg value="-storepass"/>
		<arg value="${certPassword}"/>
		<!-- <arg value="-tsa" />
		<arg value="none" /> -->
		<arg value="-target" />
		<arg value="bundle" />
		<!-- Name Of File To Create-->
		<arg value="${publish.dir}/${publish.exe}" />
		<!-- App Descriptor-->
		<arg value="${application.descriptor}" />
		<!-- Files To Package -->
		<arg value="Icon*" />
		<arg value="Default*" />
		<arg value="iTunesArtwork.png" />
		<arg value="-C" />
		<arg value="${deploy.dir}/" />
		<arg value="${deploy.swf}" />

Hope this helps some people having the same problems.