Run external command before packaging for iOS or Android?

So, I know you can run an external command before launching a build in a simulator, but how can I do this before packaging for iOS or Android?  There doesn't seem to be an interface for adding commands before or after the compilation process, not in the build configuration and not the "Package AIR Application..." dialogue, etc.

Any advice?

Thanks, adq.

5 comments

So, nothing?

We need to compile AIR projects with advanced telemetry for profiling, and for the sake of convenience and development speed, we need to do so from the simulator as well as on the device... so, can you help us out here?

Certainly we can write sh or bat scripts to compile and package for us, BUT, for us, one of the selling features of AIR development with IntelliJ was that a project could be packaged, platform specific, and that external tools would allow us to apply advanced telemetry.  I mean, at this point, I could switch to crappy old FlashDevelop, which can generate build scripts for us, applying therein advanced telemetry...

Problematically, though, IntelliJ's Run/Debug configurations do NOT wait for post-make commands to complete BEFORE launching the simulator; this sucks in the case of wanting to apply advanced telemetry. And the build/package interface and or build configuration provide no way of applying external tools.  Quite possibly, AIR developement has about 2 to 3 more years of life, and the majority of it will be for mobile, soooooooo, can you address these issues, or is it time to switch back to FlashBuilder 4.7?

0

Sorry for delay, somehow I missed the thread.

Does Flash Builder support your workflow?

If your app is pure ActionScript (without Flex) then to enable advanced telemetry you only need to add -advanced-telemetry flag as Additional compiler options at Compiler Options tab of the Flash build configuuration (Project Structure dialog). Make sure that the app is marked as Pure AS (General tab).
This flag is only supported by ActionScript Compiler 2.0, so make sure that 'Prefer ASC 2.0' is enabled at Settings | Compiler | Flex Compiler. Also you need to have AIR SDK with ASC 2.0 overlaid on top of Flex SDK installation.
In the latest IntelliJ IDEA 12.1 EAP it is possible to select AIR SDK (without Flex SDK) at Dependencies tab - AIR SDK with ASC 2.0 contains all libs/tools for pure AS development.

0
IntelliJ's Run/Debug configurations do NOT wait for post-make commands to complete

I'm pretty sure that 'run external tool' or 'run ant target' configured as 'Before launch' at the Flash run configuration dialog is executed before packaging and app start.

0

Thanks for your reply man!

AlexanderD wrote:

I'm pretty sure that 'run external tool' or 'run ant target' configured as 'Before launch' at the Flash run configuration dialog is executed before packaging and app start.


Well, not in this case... I was using a python script as an external tool configured as BEFORE launch to apply advanced telemetry, and IntelliJ would launch the application before the py script was finished running, etc.

But, like you recommended, I'll try just adding the compiler option...

Thanks again!

0

Indeed, there's a bug with External tasks as 'before launch' option, but it is already fixed in the latest IntelliJ IDEA 12.1 Release Candidate.

0

Please sign in to leave a comment.