| 1 |
@echo off |
|---|
| 2 |
|
|---|
| 3 |
:: AIR application packaging |
|---|
| 4 |
:: More information: |
|---|
| 5 |
:: http://livedocs.adobe.com/flex/3/html/help.html?content=CommandLineTools_5.html#1035959 |
|---|
| 6 |
|
|---|
| 7 |
:: Path to Flex SDK binaries |
|---|
| 8 |
set PATH=%PATH%;C:\flex3sdk\bin |
|---|
| 9 |
|
|---|
| 10 |
:: Signature (see 'CreateCertificate.bat') |
|---|
| 11 |
set CERTIFICATE=SelfSigned.pfx |
|---|
| 12 |
set SIGNING_OPTIONS=-storetype pkcs12 -keystore %CERTIFICATE% |
|---|
| 13 |
if not exist %CERTIFICATE% goto certificate |
|---|
| 14 |
|
|---|
| 15 |
:: Output |
|---|
| 16 |
if not exist air md air |
|---|
| 17 |
set AIR_FILE=air/TLife.air |
|---|
| 18 |
|
|---|
| 19 |
:: Input |
|---|
| 20 |
set APP_XML=application.xml |
|---|
| 21 |
set FILE_OR_DIR=-C bin . |
|---|
| 22 |
|
|---|
| 23 |
echo Signing AIR setup using certificate %CERTIFICATE%. |
|---|
| 24 |
call adt -package %SIGNING_OPTIONS% %AIR_FILE% %APP_XML% %FILE_OR_DIR% |
|---|
| 25 |
if errorlevel 1 goto failed |
|---|
| 26 |
|
|---|
| 27 |
echo. |
|---|
| 28 |
echo AIR setup created: %AIR_FILE% |
|---|
| 29 |
echo. |
|---|
| 30 |
goto end |
|---|
| 31 |
|
|---|
| 32 |
:certificate |
|---|
| 33 |
echo Certificate not found: %CERTIFICATE% |
|---|
| 34 |
echo. |
|---|
| 35 |
echo Troubleshotting: |
|---|
| 36 |
echo A certificate is required, generate one using 'CreateCertificate.bat' |
|---|
| 37 |
echo. |
|---|
| 38 |
goto end |
|---|
| 39 |
|
|---|
| 40 |
:failed |
|---|
| 41 |
echo AIR setup creation FAILED. |
|---|
| 42 |
echo. |
|---|
| 43 |
echo Troubleshotting: |
|---|
| 44 |
echo did you configure the Flex SDK path in this Batch file? |
|---|
| 45 |
echo. |
|---|
| 46 |
|
|---|
| 47 |
:end |
|---|
| 48 |
pause |
|---|