Skip to content

Instantly share code, notes, and snippets.

@katopz
Created June 13, 2013 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katopz/5775861 to your computer and use it in GitHub Desktop.
Save katopz/5775861 to your computer and use it in GitHub Desktop.
export XLIB="/Users/christo.smal/Library/Developer/Xcode/DerivedData/wherever-lib.a"
export CERT="/wherever/if/you/want/to/sign/ane.p12"
export FLEXLIBPATH="../Path/of/flex/library/project"
export XIBPATH="/Path/of/where/xib/files/are"
export SWCFNAME="FWAne.swc"
export ANEFNAME="FWAne.ane"
ls -la $XLIB
echo Copying files ...
rm -rf debug/*
cp $FLEXLIBPATH/src/extension.xml .
cp $FLEXLIBPATH/bin/$SWCFNAME .
cp $XLIB ./debug
'# copy resource files such as images to debug folder
cp /path/to/my/images/referenced/from/xcode/*.png ./debug
echo Compiling xib''s
cp $XIBPATH/*.xib ./debug
cp /wherever/FloatingWindow.xib ./debug
/Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile debug/FloatingWindow.nib debug/FloatingWindow.xib --sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
rm -rf debug/*.xib
echo Extracting library.swc ...
cp $SWCFNAME kak
cd kak
unzip -xo $SWCFNAME
cp -X library.swf ../debug
cd ..
echo Copying some more files ...
rm -rf debug/*.ane
cp extension.xml debug
echo Building ANE ...
'# -package -target ane / extension.xml -swc -platform -C .
/Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0/bin/adt -package -target ane debug/unsigned.ane extension.xml -swc $SWCFNAME -platform iPhone-ARM -platformoptions ios-platformoptions.xml -C debug .
echo Signing ANE ...
'#/Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0/bin/adt -sign -storetype pkcs12 -keystore $CERT -storepass password -target ane debug/unsigned.ane $ANEFNAME
cp debug/unsigned.ane $ANEFNAME
echo done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment