I'm trying to get file support into my ADT helper tool before I release an update. I am still having problems.
According to the Adobe docs on the subject, the following commands can be used:
-C "path/to/new/working/directory" [files and folders to include] -e [files and folders to include] [package directory to add these to]
The following example works fine for me:
// This changes the working directory to my audio resources folder, and then packages the file 'track.mp3' into the root folder of my application package. -C "C:\\resources\audio" "track.mp3"
Hoiwever using -e option in any way generates an error:
// This copies the file 'sfx.mp3' from the current working directory to the application package subdirectory 'lib' -e sfx.mp3 lib
This also causes an error:
// Change the working directory to resources/audio and then copy the file called 'sfx.mp3' to the 'lib' subfolder of the application package. Error. -C "C:\\resources\audio" -e sfx.mp3 lib
The error in both cases is:
File does not exist: sfx.mp3
Any ideas how I can use the -e option? Does the working directory not come in to it - do i always have to use an absolute path to my file?
Thanks in advance,
Not sure if it will help in your situation, but I just include files by adding the filepath at the end of my adt command line (no -e or -c). Eg (included files or bolded):
"C:\Program Files (x86)\Java\jre6\bin\java" -jar C:\Users\t.randall\Documents\AIRSDK\AIR_3.0\lib\adt.jar -package -target ipa-ad-hoc -storetype pkcs12 -keystore ..\..\Deployment\CareerBox.p12 -storepass pass -provisioning-profile ..\..\Deployment\CareerBox.mobileprovision ..\..\CareerBox.ipa CareerBox_iPhone-app.xml CareerBox_iPhone.swf AppIconsForPublish\Icon29x.png AppIconsForPublish\Icon57x.png AppIconsForPublish\Icon@2x.png AppIconsForPublish\Icon512x.png AppIconsForPublish\Icon48x.png AppIconsForPublish\Icon72x.png Default.png Default@2x.png Default-Landscape~ipad.png Data\Cards.xml Data\CareerCards.xml
It's a bit easier to stick all your files in a folder and read them out of it.. At the end of the adt command line (before any native extensions -extensionDir) is where you specify files to include. I typically make one folder and include that just by typing the name of it. The only PITA is yes, all those app icon and default startup screen filenames.
I found this page useful in working out how to package entire folders: http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac1e63e3d128cdca 935b-8000.html
You don't have to use -e at all. In fact I think -e is just for individual files.