I'm trying to package an ANE file for desktop and am almost bald now :/.
I just made an HelloWorld extension with a simple "sayHello" method that simply returns the string "Hello World".
I made a JAR file of it, created the extension's XML definition as follow :
<extension xmlns="http://ns.adobe.com/air/extension/3.1"> <id>com.nurun.helloworld</id> <versionNumber>1.0.0</versionNumber> <platforms> <platform name="Windows-x86"> <applicationDeployment> <nativeLibrary>HelloWorld.jar</nativeLibrary> <initializer>com.nurun.ane.hw.HelloWorldExtension</initializer> <finalizer>com.nurun.ane.hw.HelloWorldExtension</finalizer> </applicationDeployment> </platform> </platforms> </extension>
I compiled my SWC, extracted the library.swf file out of it (is it still necessary or ADT finally does it itself.?) and use the
Damn CTRL+S.. someday i'll stop doing this on my browser. Weird that it submits the post anyway :/..
So, i use this batch file to package the ANE :
set signing_options=-storetype pkcs12 -keystore "D:\NativeExtensions\HelloWorld\flash\assets\certificate.p12" -storepass XXXX
"%air_directory%"\adt -package %signing_options% -tsa none -target ane "%dest_ANE%" "%extension_XML%" -swc "%library_SWC%" -platform Windows-x86 "%library_SWF%" -C %library_directory%
And all i get is the following error :
Missing native library implementation "HelloWorld.jar" for platform Windows-x86
I put my HelloWorld.jar aside the batch file, tried to put it on a "Windows" folder and many other things... but can't get rid of this error.
I can't find nothing about this error anywhere (neither here http://help.adobe.com/en_US/air/build/WSBE9908A0-8E3A-4329-8ABD-12F2A1 9AB5E9.html) so i'm a bit stuck.
I'm certainly missing a point here but don't know what.
Any help would be much apreciated because i have no idea where the problem comes from :/
I finally got it working.
The problem came from the command line.
I included all the "assets" folder on the extension instead of setting just the JAR file as follow :
"%air_directory%"\adt -package %signing_options% -tsa none -target ane "%dest_ANE%" "%extension_XML%" -swc "%library_SWC%" -platform Windows-x86 "%library_SWF%" "%library_JAR%"
Actually i think it would be hard to get a JAVA ANE runing on windows.
Because by defautl windows just doesn't know how to run a jar file.
I guess we would have to package the JRE/JVM/whatever with the application or something like that... anyway, it's far outside of my small skills ^^..
At least i succeed having a java extension working on android, so the extension is good.
The problem is more the execution.
In the window to run on it is still possible, whether you want to pack Java virtual machine.
May I wanted to write a jar bag similar android.jar..
But Java and air, are running in the virtual machine, with Java to do the expansion of the window, feel little sense...