NativeProcessでアプリを起動する記事を以前書いたのだが、なんだかわかりにくかったので、作り直した。

AS内のコードだけでは、アプリが完成しない。いくつか設定の書き換えが必要。
ファイル一式
https://github.com/umhr/ExecutableTester
application.xml
supportedProfilesにextendedDesktop desktopとなるようにする。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <?xml version="1.0" encoding="utf-8" ?>  <application xmlns="http://ns.adobe.com/air/application/18.0"> 	<id>ExecutableTester</id>  	<versionNumber>1.0</versionNumber>  	<filename>ExecutableTester</filename>  	<name>ExecutableTester</name>  	<description></description>  	<copyright></copyright>  	<initialWindow>  		<title>ExecutableTester</title>  		<content>ExecutableTester.swf</content>  		<systemChrome>standard</systemChrome>  		<transparent>false</transparent>  		<visible>true</visible>  		<minimizable>true</minimizable>  		<maximizable>true</maximizable>  		<resizable>true</resizable>  	</initialWindow>  	<supportedProfiles>extendedDesktop desktop</supportedProfiles> 	<!--  	More options: 	http://livedocs.adobe.com/flex/3/html/File_formats_1.html#1043413 	--> </application> | 
Packager.bat
拡張子をexeにする。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | @echo off :: Set working dir cd %~dp0 & cd .. if not exist %CERT_FILE% goto certificate :: AIR output if not exist %AIR_PATH% md %AIR_PATH% set OUTPUT=%AIR_PATH%\%AIR_NAME%%AIR_TARGET%.exe :: Package echo. echo Packaging %AIR_NAME%%AIR_TARGET%.air using certificate %CERT_FILE%... ::call adt -package %OPTIONS% %SIGNING_OPTIONS% %OUTPUT% %APP_XML% %FILE_OR_DIR% call adt -package -tsa none %OPTIONS% %SIGNING_OPTIONS% -target native %OUTPUT% %APP_XML% %FILE_OR_DIR% if errorlevel 1 goto failed goto end :certificate echo. echo Certificate not found: %CERT_FILE% echo. echo Troubleshooting:  echo - generate a default certificate using 'bat\CreateCertificate.bat' echo. if %PAUSE_ERRORS%==1 pause exit :failed echo AIR setup creation FAILED. echo. echo Troubleshooting:  echo - verify AIR SDK target version in %APP_XML% echo. if %PAUSE_ERRORS%==1 pause exit :end echo. | 
PackageApp.bat
-tsa noneを削除
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | @echo off :: Set working dir cd %~dp0 & cd .. set PAUSE_ERRORS=1 call bat\SetupSDK.bat call bat\SetupApp.bat set AIR_TARGET= ::set AIR_TARGET=-captive-runtime ::set OPTIONS=-tsa none set OPTIONS= call bat\Packager.bat pause | 
 
			

 
		 
				
			 
				
			 
				
			