Ok ... after getting the air and apk with shared runtime packaging working, I 
started working on the apks with captive runtimes. Adobe sort of hard-coded 
where adt looks for stuff while with shared runtimes. This isn't too bad cause 
all stuff it's looking for is relative and below to the location of adt.jar. As 
soon as it comes to captive runtimes the path seems to be: ../runtimes/air and 
../runtimes/air-captive ... this is really bad for using this in maven as 
multiple versions of adt would share one runtimes directory and I would start 
polluting my maven lokal repo with non-maven-nonsense.

Therefore I started a completely new approach. I created several packagers that 
know what they need to operate. In a setup-phase such a packager retrieves 
maven artifacts and installs a minimal AIR sdk in the target/adt directory of 
the current project. This contains all the parts it needs to do its job, but 
only those parts. So for air only adt.jar is needed, for android all the 
android stuff is added too ... I hope this will keep the overhead to a minimum.

As soon as the mini sdks are prepared I have to start a new JVM which I pass in 
the parameters the same way I would when executing adt commands on the command 
line.

For this I had to throw away EVERYTHING of the old sign-air mojo of Flexmojos. 
I started from scratch and am extending the thing with parameters as needed. 
The cool thing is that from now on IntelliJ will never ever again complain 
about this stupid "storepass" as the sign-air mojo was the one requesting this.

For me it would be interesting which config options you guys need as I will be 
adding them on a need to build basis.

At least now "air", "apk" and "apk-captive-runtime" seem to be working ... at 
least I can install all on my Mac (air, android) and the apk (android), 
apk-captive-runtime (android)

Chris

________________________________________
Von: Christofer Dutz <christofer.d...@c-ware.de>
Gesendet: Donnerstag, 16. Juli 2015 10:48
An: dev@flex.apache.org
Betreff: AW: AW: Thoughts on mobile packaging for Flexmojos

Ok ... more good news ...

I just updated the mavenizer to package the missing parts.

Together with my lokal changes on Flexmojos I am now able do do native 
packaging for Android without any need to do tweaking ... but now I'll have to 
concentrate on correct parametrization of the Air packagers. Currently my 
Android application is bundled as APK file, but the name is still ".air" and 
even if the log output claims it to contain the native runtime, it seems not to 
contain it ... will take a little, but I think at last we are on the finishing 
track. As soon as I'm happy with Android, I'll probably work on Desktop 
(Windows, Mac, ...) ... after that the iOS support will probably suck most ;-)

Will have to do some testing on windows machines as I'm currently only working 
on my Mac ... especially regarding iOS packaging this is probably the biggest 
challenge.

Chris

________________________________________
Von: Christofer Dutz <christofer.d...@c-ware.de>
Gesendet: Mittwoch, 15. Juli 2015 16:27
An: dev@flex.apache.org
Betreff: AW: AW: Thoughts on mobile packaging for Flexmojos

First things first:

[INFO] --- flexmojos-maven-plugin:7.1.0-SNAPSHOT:package-air 
(default-package-air) @ dukecon-flex-core ---
[INFO] Flexmojos 7.1.0-SNAPSHOT
[INFO]   GPL License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[INFO]   completed 0 of 100
NOTE: The application has been packaged with a shared runtime.
[INFO]   completed 100 of 100
[INFO]   AIR package created: 
/Users/christoferdutz/Projects/JUG-DA/DukeCon/DukeCon-Flex/core/target/dukecon-flex-core-1.0.0-SNAPSHOT.air
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ 
dukecon-flex-core ---
[INFO] Installing 
/Users/christoferdutz/Projects/JUG-DA/DukeCon/DukeCon-Flex/core/target/dukecon-flex-core-1.0.0-SNAPSHOT.air
 to 
/Users/christoferdutz/Maven-Repository/org/dukecon/dukecon-flex-core/1.0.0-SNAPSHOT/dukecon-flex-core-1.0.0-SNAPSHOT.air
[INFO] Installing 
/Users/christoferdutz/Projects/JUG-DA/DukeCon/DukeCon-Flex/core/pom.xml to 
/Users/christoferdutz/Maven-Repository/org/dukecon/dukecon-flex-core/1.0.0-SNAPSHOT/dukecon-flex-core-1.0.0-SNAPSHOT.pom
[INFO] Installing 
/Users/christoferdutz/Projects/JUG-DA/DukeCon/DukeCon-Flex/core/target/dukecon-flex-core-1.0.0-SNAPSHOT.swf
 to 
/Users/christoferdutz/Maven-Repository/org/dukecon/dukecon-flex-core/1.0.0-SNAPSHOT/dukecon-flex-core-1.0.0-SNAPSHOT.swf
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 57.582s
[INFO] Finished at: Wed Jul 15 15:58:31 CEST 2015
[INFO] Final Memory: 29M/232M
[INFO] ------------------------------------------------------------------------

Even if the file name create seems to be wrong (well it has to be wrong as I 
only changed the packager not the name of the output file), but the file output 
seems to be an APK as I could install it on my android device 8-D
(Judging from the size though it doesn't seem to be containing the captive 
runtime ... even if the log seems to be claiming to include it)

So the POC was successful ... now I have to think of a way how to get this 
useable. First thing will be an adjustment of the SDK Converter to deploy the 
(smali and baksmali) in the lib/android/lib directory as part of the air 
compiler artifact. Then I'll have to zip up everything else in the android 
directory as a zip and add that as a zip to the adt artifact with the 
classifier "android". This zip needs to be downloaded and extracted as it is 
required to be located in the same directory as the adt.jar (So I'll do it the 
same way the flex framework-zip is handled)

Think it will be a difficult task to get this working properly, but I think 
with this first POC I have at least proven that it's possible :-)

Chris


________________________________________
Von: Christofer Dutz <christofer.d...@c-ware.de>
Gesendet: Mittwoch, 15. Juli 2015 11:37
An: dev@flex.apache.org
Betreff: AW: AW: Thoughts on mobile packaging for Flexmojos

Well digging even deeper into this I'll probably name it "package-air" goal and 
pass in the platform type somehow.

It seems Velo initially intended on setting the packaging type of the maven 
project to configure the output. At least the dead code in Flexmojos suggests 
this. The class FlexExtension contains all of the constants understood by the 
adt tool.

I don't want to do this as I would like to have an "air" package type which 
automatically creates the "air" artifact, but allow multiple packaging 
executions to produce different output bundles in one build ... so I could 
produce ".air", ".apk", ".ipk", ".exe" and ".dmg" in one run of "mvn package".

Currently I'm trying to finish a poc that remote controlls the ADT class. Keep 
your fingers crossed :-)

Chris



________________________________________
Von: piotrz <piotrzarzyck...@gmail.com>
Gesendet: Mittwoch, 15. Juli 2015 11:05
An: dev@flex.apache.org
Betreff: Re: AW: Thoughts on mobile packaging for Flexmojos

Hi Chris,

For newbie guys it will be more descriptive if you use Android, iOS. :)

Thanks,
Piotr



-----
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.2333347.n4.nabble.com/Thoughts-on-mobile-packaging-for-Flexmojos-tp48508p48512.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to