Packaging a native extension (Example batch file with all the options necessary to make one)

There has been a lot of questions and confusion on actually writing your batch file to compile/package your ANE file. Well i have decided to create a prototype of the batch file and share it here on my blog.

Your .bat file contents are as below.

set adt_directory=C:Program FilesAdobeAdobe Flash Builder 4.6sdks4.6.0bin
set root_directory=C:Projects
set library_directory=%root_directory%NativeExtLibrary
set native_directory=%root_directory%NativeExt
set signing_options=-storetype pkcs12 -keystore "C:Projectsp12key.p12" -tsa none
set dest_ANE=%root_directory%nativeExtPackagingANE.ane
set extension_XML=%library_directory%srcextension.xml
set library_SWC=%library_directory%binNativeExtLibrary.swc
set SWF_directory=%library_directory%binNativeExtLibrary
"%adt_directory%"/adt -package %signing_options% -target ane "%dest_ANE%" "%extension_XML%" -swc "%library_SWC%" -platform Android-ARM -C "%SWF_directory%" library.swf -C "%native_directory%" NativeExt.jar

Below explaining the variables in your bat file.

root_directory – root folder of your flex projects.
library_directory – location of your Native extension wrapper Flex library project.
native_directory – location of your native extension project(for Android-ARM it will be android project location).
signing_options – signed certificate for your extension and its options (-tsa none option to discard timestamp).
dest_ANE – location to create your ane file.
extension_XML – location of Native extension wrapper Flex library project extension descriptor file.
library_SWC – location of your Native extension wrapper Flex library project compilation file.
SWF_directory – location of your library.swf file.
Android-ARM – packaging ane for Android

[showmyads]

Download file.

 

Advertisements

6 Responses to Packaging a native extension (Example batch file with all the options necessary to make one)

  1. Danel says:

    Hi, just have a lillte suggestion, would you like to test your batch with my anebuilder? I got Mac version so far which works quite well, using it all most everyday. But windows batch and app is being missed.

    It would be really awesome if you’re up for this challenge.

    You can find anebuilder and sources on my blog. http://as3breeze.com/ane-builder

  2. Danel says:

    Great to hear. Let me know if you got questions 🙂

  3. […] There has been a lot of questions and confusion on actually writing your batch file to compile/package your ANE file. Well i have decided to create a prototype of the batch file and share it here on my blog…  […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: