Created
September 14, 2011 15:45
-
-
Save rymawby/1216925 to your computer and use it in GitHub Desktop.
Script to take a directory of swf files and create air files from them. These are not signed but will run on platforms such as set top boxes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
mkdir packaged_air_files | |
for f in *.swf | |
do | |
echo "Processing $f" | |
mkdir packaged_air_files/dir$f | |
mkdir packaged_air_files/dir$f/META-INF | |
mkdir packaged_air_files/dir$f/META-INF/AIR | |
touch packaged_air_files/dir$f/META-INF/AIR/application.xml | |
echo "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?><application xmlns=\"http://ns.adobe.com/air/application/2.5\"><id>$f</id><filename>$f</filename><name>$f</name><versionNumber>1.0.0</versionNumber><initialWindow><content>$f</content><transparent>false</transparent><visible>true</visible><width>1280</width><height>720</height></initialWindow></application>" > packaged_air_files/dir$f/META-INF/AIR/application.xml | |
touch packaged_air_files/dir$f/META-INF/AIR/hash | |
echo ",á≠g∏4¯/DÎÜÆsd‘.ò≈Ã˘∫4?Ÿ±%!" > packaged_air_files/dir$f/META-INF/AIR/hash | |
touch packaged_air_files/dir$f/mimetype | |
echo "application/vnd.adobe.air-application-installer-package+zip" > packaged_air_files/dir$f/mimetype | |
cp $f packaged_air_files/dir$f | |
cd packaged_air_files/dir$f | |
zip -Rm temp '*' | |
mv temp.zip ../${f%.*}.air | |
cd ../../ | |
rmdir packaged_air_files/dir$f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment