lime
lime copied to clipboard
Added "-listen" flag to AIR build params
Build AIR app with -listen flag instead of -connect to debug AIR app on device over the usb (default port 7936)
The first and third commits look fine at a glance, but 9f4f124 isn't a great way to do this.
- All projects have to keep track of
assetsFolders
, even though only AIR projects need it. - Since you're passing a whole directory, AIR will ignore any asset filters (include/exclude) from project.xml.
- AIR doesn't know how to process Haxe templates, so any of those are present it may break the build.
I do see the reasoning here. Windows has a hard limit on command line length, and their suggestions to work around it amount to "pass less data" and "store your data in a file for the program to read." Passing less data isn't a great option (as described above), so it would be nice to use the second option. But of course AIR doesn't support it.
How about this for a solution?
- Collect the assets individually (instead of using
assetsFolders
). - Create a temporary folder. Call it
targetDirectory + "/assets"
or something. - Copy all non-embedded assets to this folder, one by one. So instead of
files.push(asset.targetPath)
, you runAssetHelper.copyAsset(asset, targetDirectory + "/assets")
. - Now that the temporary folder has the correct assets, pass it to AIR:
files.push(targetDirectory + "/assets")
.