ANEBuilder

ANEBuilder is a app built with Adobe AIR which allows you to compile ANE files. It is same thing like terminal but easier for your eyes.

The above video shows v1.0 ANEBuilder and as you can see it has changed since then.

AneBuilder_v1.1_screen demoYou select location of the heart components, such as ADT location in some SDK folder, where your project is and so on and you simply compile it.

 

If you are interested to get hold of the source, head over to BitBucket.

Please report bugs, feature requests in issue tracker

Download ANEBuilder app: ANEBuilder (1668)

Updates in this post:

  1. 10 jan 2013 – v1.2.4 – Bug fix
  2. JAR Compiling

Problems building JAR file in ANEBuilder

After i implemented JAR compiler method in build.sh i started to have som weird promblem in Flash Builder.

Here is an example from my current ANE project:

Here is 2 different scenarios:

1) Ready JAR file

One of the options is to manually export the JAR file from Eclipse. I have not found any good flow for this process in others words, the export method is too painful cause of too many steps before i actually got a JAR file. This is more noticeable when needing to export quite many times for trial and error.

Now the JAR file, when exported, works well in ANEBuilder, here we can close this chapter.

2) Compiling JAR from ANEBuilder

As of 1.1.6 version of ANEBuilder i had fixed some bugs in compiler but noticed later that, when selecting Android Project folder and letting build.sh to compile the JAR file, something didnt want work out quite well. The above AS3 code, when adding eventlistener to context, i got null error (1009) in Flash Builder, yep the context is null.

So desperately looking for the answer to this problem… i’ve found it. Tho im a bit unsure how well it will work on different Android Projects.

As earlier said, that build script was taken from one of the Lee Brimelows tutorials and modified quite much to suite ANEBuilder. The original line of that JAR builder script looked like following:

I thought this will take the entire content in bin folder and will compile it to ready-to-use JAR file, which it did to 70%, still not quite sure why it did not work in my case. I think it has something to do with how the Android project folder is structured.

Following image is Lee’s original structure, which works for that particular shell script:Lee's original Android project folder structure

And following image illustrates mine:

screener android project

Conclusion

I do not know why they are different, which preferences were used and so on. Maybe it has something to do with me having newer version of Eclipse with newer version of Android SDK.

Solution

I hope following piece of code will make it work for everyone who uses ANEBuilder.

Not a big change :) but this worked in my case. So if you are having problems, with context being null in Flash Lib, the first thing you may look into is the build.sh and to that piece of code.

Remember, post any issued or suggestions you might have on bitbucket!

Update: If your JAR compiling in ANEBuilder throws 100+ errors, this might be due some extra files in your Android Java project /bin/ folder. Below is a screenshot of my Android Java project folder, this maybe helps out a little.screener android project

ANEBuilder (1668)

ANEBuilder on BitBucket

For you who would love to help out with Windows version

Are you up for the challenge ?

Create a build.bat file, and place it in ANEBuilder source folder. (The same folder where
the ANEBuilder.swf is ^_^).

There are 10 total arguments passed from ANEBuilder to the build script
All these paths are absolute.

  • $1 = ADT – Path to adt.bat for compiling the ANE
  • $2 = JAR_LIB – Path to where Android JAVA project is located, it can be either a JAR file or the Project folder, depending on parameter $10
  • $3 = IOS_LIB – Path to iOS lib file. I believe it is either a .A or .M file
  • $4 = SWC – Path to Flash Library SWC file. This file needs to be unzipped by the build.bat
  • $5 = XML – Path to extension.xml file which is needed for compiling
  • $6 = DESTINATION – Where the $4 (SWC) will be unzipped to and where the .ane will be placed
  • $7 = ANE_NAME – Name for the ANE file
  • $8 = CERT_PATH – Path to the .p12 certificate
  • $9 = CERT_PASS – .p12 certificate password
  • $10 = CREATE_JAR – This is used in OS X, ANEBuilder passes here variable “yes”  for the build script to create a JAR file from selected Android JAVA project. Dunno if that is doable in Windows. You can try :)

You might need to change some code in the Main.as file to make it fully working.
I believe when using file.nativePath method, windows has its own way of dealing
with absolute filepaths. Currently all path handlings are suited for MAC.

6 thoughts on “ANEBuilder

  1. Pingback: ANEBuilder post on its own page | AS3 Breeze

  2. Jesper Sjögren

    Hi.
    The app doen´t seem to work for me, i get the lower “menu” bar with news, logs and compile but nothing els.

    I´ve tried to reinstall it and I´ve tried earlier versions but still the same result.
    ANEBuilder is a fantastic idea, and i really need it atm so its a bit frustrating that it doesn´t work for me :S

    im on a MAC with OS X 10.8.4 (if that helps any)
    plz if this project is abandoned can anyone direct me to something that does the same?

    Reply
    1. DanelKirch

      Id recommennd you to download the sources and compile your own builder, you will in that case see errors in flash and know why it doesnt work out as it should :)

      Reply
      1. Jesper Sjögren

        Thx DanelKirch.

        I did what u said and it worked like a sharm.
        I have to say that i love this program.

        Reply
  3. Thijs Roumen

    When I compile I get this log: with the error “unable to build a valid certificate chain”.
    Do you know what this indicates?

    Creating folders in /Users/thijsroumen/Documents/ANEFramework/ANE Builder

    rm: /Users/thijsroumen/Documents/ANEFramework/ANE Builder/ExportBluetoothConnext.ane: No such file or directory

    1. Done

    2. Handling the SWC (copy, unzip, moving the resources)

    Copy XML to new location

    Archive: /Users/thijsroumen/Documents/ANEFramework/ANE Builder/build/ane/VibrationActionScriptLibrary.swc

    inflating: /Users/thijsroumen/Documents/ANEFramework/ANE Builder/build/ane/library.swf

    inflating: /Users/thijsroumen/Documents/ANEFramework/ANE Builder/build/ane/catalog.xml

    2. Done

    3. Compiling the ANE now

    3.1 compiling for iOS

    Unable to build a valid certificate chain for the signer.

    3. Done

    ANE creation complete

    Shell is done with exitCode 0

    Reply
    1. Sirchad

      Did you ever find what causes the “unable to build a valid certificate chain” error?

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">