Skip to content

Commit 9af02fb

Browse files
committed
CrossOver AIR templates added & installer patches FD files on CrossOver install...
1 parent df77bf1 commit 9af02fb

File tree

27 files changed

+1489
-2
lines changed

27 files changed

+1489
-2
lines changed

FlashDevelop/Bin/Debug/Projects/160 ActionScript 3 - AIR AS3 Projector/bat/SetupSDK.bat.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ set FLEX_SDK=$(FlexSDK)
1010
if exist "%FD_CUR_SDK%" set FLEX_SDK=%FD_CUR_SDK%
1111

1212
:validation
13-
if not exist "%FLEX_SDK%" goto flexsdk
13+
if not exist "%FLEX_SDK%\bin" goto flexsdk
1414
goto succeed
1515

1616
:flexsdk
1717
echo.
1818
echo ERROR: incorrect path to Flex SDK in 'bat\SetupSDK.bat'
1919
echo.
20-
echo %FLEX_SDK%
20+
echo Looking for: %FLEX_SDK%\bin
2121
echo.
2222
if %PAUSE_ERRORS%==1 pause
2323
exit
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<project version="2">
3+
<!-- Output SWF options -->
4+
<output>
5+
<movie outputType="Application" />
6+
<movie input="" />
7+
<movie path="bin\$(ProjectID).swf" />
8+
<movie fps="30" />
9+
<movie width="800" />
10+
<movie height="600" />
11+
<movie version="17" />
12+
<movie minorVersion="0" />
13+
<movie platform="AIR" />
14+
<movie background="#FFFFFF" />
15+
</output>
16+
<!-- Other classes to be compiled into your SWF -->
17+
<classpaths>
18+
<class path="src" />
19+
</classpaths>
20+
<!-- Build options -->
21+
<build>
22+
<option accessible="False" />
23+
<option allowSourcePathOverlap="False" />
24+
<option benchmark="False" />
25+
<option es="False" />
26+
<option loadConfig="" />
27+
<option optimize="True" />
28+
<option showActionScriptWarnings="True" />
29+
<option showBindingWarnings="True" />
30+
<option showDeprecationWarnings="True" />
31+
<option showUnusedTypeSelectorWarnings="True" />
32+
<option strict="True" />
33+
<option useNetwork="True" />
34+
<option useResourceBundleMetadata="True" />
35+
<option warnings="True" />
36+
<option verboseStackTraces="False" />
37+
<option additional="" />
38+
<option customSDK="" />
39+
</build>
40+
<!-- SWC Include Libraries -->
41+
<includeLibraries>
42+
<!-- example: <element path="..." /> -->
43+
</includeLibraries>
44+
<!-- SWC Libraries -->
45+
<libraryPaths>
46+
<!-- example: <element path="..." /> -->
47+
</libraryPaths>
48+
<!-- External Libraries -->
49+
<externalLibraryPaths>
50+
<!-- example: <element path="..." /> -->
51+
</externalLibraryPaths>
52+
<!-- Runtime Shared Libraries -->
53+
<rslPaths>
54+
<!-- example: <element path="..." /> -->
55+
</rslPaths>
56+
<!-- Assets to embed into the output SWF -->
57+
<library>
58+
<!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> -->
59+
</library>
60+
<!-- Class files to compile (other referenced classes will automatically be included) -->
61+
<compileTargets>
62+
<compile path="src\$(PackageSlash)Main.as" />
63+
</compileTargets>
64+
<!-- Paths to exclude from the Project Explorer tree -->
65+
<hiddenPaths>
66+
<!-- example: <hidden path="..." /> -->
67+
</hiddenPaths>
68+
<!-- Executed before build -->
69+
<preBuildCommand />
70+
<!-- Executed after build -->
71+
<postBuildCommand alwaysRun="False" />
72+
<!-- Other project options -->
73+
<options>
74+
<option showHiddenPaths="False" />
75+
<option testMovie="Custom" />
76+
<option testMovieCommand="bat\RunApp.bat $(TargetBuild)" />
77+
<option defaultBuildTargets="win_adl,unix_adl,win_ie,unix_browser,win_player,unix_player" />
78+
</options>
79+
</project>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@echo off
2+
3+
:: Set working dir
4+
cd %~dp0 & cd ..
5+
6+
set PAUSE_ERRORS=1
7+
call bat\SetupSDK.bat
8+
call bat\SetupApp.bat
9+
10+
echo.
11+
echo Starting AIR Debug Launcher...
12+
echo.
13+
14+
:: Run webserver if needed, and wait the server to start and prefix out file
15+
if [%USE_SERVER%] == [true] (
16+
start /B "%PROGRAMFILES%\FlashDevelop\Tools\webserver\server.exe" -document_root "%CD%" -listening_port 8080
17+
set OUT_FILE=http://localhost:8080/%OUT_FILE%
18+
ping -n 2 127.0.0.1>nul
19+
)
20+
21+
:: CROSSOVER NOTE:
22+
:: FDEXE.sh needs execution rights, run once in Terminal: sudo chmod +x path/to/fd/FDEXE.sh
23+
24+
:: Handle selected target
25+
if [%1] == [unix_adl] (
26+
echo Running Mac/Linux ADL...
27+
FDEXE.sh "%UNIX_FLEX_SDK%/bin/adl" -profile extendedDesktop %APP_XML:\=/% %APP_DIR:\=/%
28+
) else if [%1] == [win_adl] (
29+
echo Running Windows ADL...
30+
adl -profile extendedDesktop "%APP_XML%" "%APP_DIR%"
31+
) else if [%1] == [unix_player] (
32+
echo Running Mac/Linux Flash Player...
33+
FDEXE.sh %OUT_FILE%
34+
) else if [%1] == [win_player] (
35+
echo Running Windows Flash Player...
36+
start %OUT_FILE%
37+
) else if [%1] == [unix_browser] (
38+
echo Running Mac/Linux Browser...
39+
:: Mac and Linux commands, select correct:
40+
FDEXE.sh open -a Safari %OUT_FILE%
41+
:: FDEXE.sh xdg-open %OUT_FILE%
42+
) else if [%1] == [win_ie] (
43+
echo Running Windows IE...
44+
start iexplore %OUT_FILE%
45+
)
46+
if errorlevel 1 goto error
47+
goto end
48+
49+
:error
50+
pause
51+
52+
:end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
:: Set working dir
2+
cd %~dp0 & cd ..
3+
4+
:user_configuration
5+
6+
:: About AIR application packaging
7+
:: http://livedocs.adobe.com/flex/3/html/help.html?content=CommandLineTools_5.html#1035959
8+
:: http://livedocs.adobe.com/flex/3/html/distributing_apps_4.html#1037515
9+
10+
:: NOTICE: all paths are relative to project root
11+
12+
:: Your certificate information
13+
set CERT_NAME="$(PROJECTNAME)"
14+
set CERT_PASS=fd
15+
set CERT_FILE="bat\$(PROJECTID).p12"
16+
set SIGNING_OPTIONS=-storetype pkcs12 -keystore %CERT_FILE% -storepass %CERT_PASS%
17+
18+
:: Application descriptor
19+
set APP_XML=application.xml
20+
21+
:: Define SWF file for FP and SWF/HTML file for browser
22+
set OUT_FILE=bin/$(PROJECTID).swf
23+
24+
:: Use local webserver, appends localhost prefix to out file
25+
set USE_SERVER=false
26+
27+
:: Files to package
28+
set APP_DIR=bin
29+
set FILE_OR_DIR=-C %APP_DIR% .
30+
31+
:: Your application ID (must match <id> of Application descriptor) and remove spaces
32+
for /f "tokens=3 delims=<>" %%a in ('findstr /R /C:"^[ ]*<id>" %APP_XML%') do set APP_ID=%%a
33+
set APP_ID=%APP_ID: =%
34+
35+
:: Output
36+
set AIR_PATH=air
37+
set AIR_NAME=$(PROJECTID)
38+
39+
:: Skip validation on CrossOver
40+
goto end
41+
42+
:validation
43+
findstr /C:"<id>%APP_ID%</id>" "%APP_XML%" > NUL
44+
if errorlevel 1 goto badid
45+
goto end
46+
47+
:badid
48+
echo.
49+
echo ERROR:
50+
echo Application ID in 'bat\SetupApp.bat' (APP_ID)
51+
echo does NOT match Application descriptor '%APP_XML%' (id)
52+
echo.
53+
if %PAUSE_ERRORS%==1 pause
54+
exit
55+
56+
:end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
:: Set working dir
2+
cd %~dp0 & cd ..
3+
4+
:user_configuration
5+
6+
:: Static path to Flex SDK
7+
set FLEX_SDK=$(FlexSDK)
8+
9+
:: Static path to Mac/Linux Flex SDK
10+
set UNIX_FLEX_SDK=/Users/UserName/FlexSDK
11+
12+
:: Use FD supplied SDK path if executed from FD
13+
if exist "%FD_CUR_SDK%" set FLEX_SDK=%FD_CUR_SDK%
14+
15+
:validation
16+
if not exist "%FLEX_SDK%\bin" goto flexsdk
17+
goto succeed
18+
19+
:flexsdk
20+
echo.
21+
echo ERROR: incorrect path to Flex SDK in 'bat\SetupSDK.bat'
22+
echo.
23+
echo Looking for: %FLEX_SDK%\bin
24+
echo.
25+
if %PAUSE_ERRORS%==1 pause
26+
exit
27+
28+
:succeed
29+
set PATH=%FLEX_SDK%\bin;%PATH%
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<project>
3+
<!-- Output SWF options -->
4+
<output>
5+
<movie disabled="False" />
6+
<movie input="" />
7+
<movie path="bin\$(ProjectID).swf" />
8+
<movie fps="30" />
9+
<movie width="800" />
10+
<movie height="600" />
11+
<movie version="1" />
12+
<movie minorVersion="5" />
13+
<movie platform="AIR" />
14+
<movie background="#FFFFFF" />
15+
</output>
16+
<!-- Other classes to be compiled into your SWF -->
17+
<classpaths>
18+
<class path="src" />
19+
</classpaths>
20+
<!-- Build options -->
21+
<build>
22+
<option accessible="False" />
23+
<option allowSourcePathOverlap="False" />
24+
<option benchmark="False" />
25+
<option es="False" />
26+
<option loadConfig="" />
27+
<option optimize="True" />
28+
<option showActionScriptWarnings="True" />
29+
<option showBindingWarnings="True" />
30+
<option showDeprecationWarnings="True" />
31+
<option showUnusedTypeSelectorWarnings="True" />
32+
<option strict="True" />
33+
<option useNetwork="True" />
34+
<option useResourceBundleMetadata="True" />
35+
<option warnings="True" />
36+
<option verboseStackTraces="False" />
37+
<option staticLinkRSL="True" />
38+
<option additional="" />
39+
<option customSDK="" />
40+
</build>
41+
<!-- SWC Include Libraries -->
42+
<includeLibraries>
43+
<!-- example: <element path="..." /> -->
44+
</includeLibraries>
45+
<!-- SWC Libraries -->
46+
<libraryPaths>
47+
<!-- example: <element path="..." /> -->
48+
</libraryPaths>
49+
<!-- External Libraries -->
50+
<externalLibraryPaths>
51+
<!-- example: <element path="..." /> -->
52+
</externalLibraryPaths>
53+
<!-- Runtime Shared Libraries -->
54+
<rslPaths>
55+
<!-- example: <element path="..." /> -->
56+
</rslPaths>
57+
<!-- Intrinsic Libraries -->
58+
<intrinsics>
59+
<element path="Library\AS3\frameworks\Flex3" />
60+
</intrinsics>
61+
<!-- Assets to embed into the output SWF -->
62+
<library>
63+
<!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> -->
64+
</library>
65+
<!-- Class files to compile (other referenced classes will automatically be included) -->
66+
<compileTargets>
67+
<compile path="src\$(PackageSlash)Main.mxml" />
68+
</compileTargets>
69+
<!-- Paths to exclude from the Project Explorer tree -->
70+
<hiddenPaths>
71+
<!-- example: <hidden path="..." /> -->
72+
</hiddenPaths>
73+
<!-- Executed before build -->
74+
<preBuildCommand />
75+
<!-- Executed after build -->
76+
<postBuildCommand alwaysRun="False" />
77+
<!-- Other project options -->
78+
<options>
79+
<option showHiddenPaths="False" />
80+
<option testMovie="Custom" />
81+
<option testMovieCommand="bat\RunApp.bat $(TargetBuild)" />
82+
<option defaultBuildTargets="win_adl,unix_adl,win_ie,unix_browser,win_player,unix_player" />
83+
</options>
84+
</project>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@echo off
2+
3+
:: Set working dir
4+
cd %~dp0 & cd ..
5+
6+
set PAUSE_ERRORS=1
7+
call bat\SetupSDK.bat
8+
call bat\SetupApp.bat
9+
10+
echo.
11+
echo Starting AIR Debug Launcher...
12+
echo.
13+
14+
:: Run webserver if needed, and wait the server to start and prefix out file
15+
if [%USE_SERVER%] == [true] (
16+
start /B "%PROGRAMFILES%\FlashDevelop\Tools\webserver\server.exe" -document_root "%CD%" -listening_port 8080
17+
set OUT_FILE=http://localhost:8080/%OUT_FILE%
18+
ping -n 2 127.0.0.1>nul
19+
)
20+
21+
:: CROSSOVER NOTE:
22+
:: FDEXE.sh needs execution rights, run once in Terminal: sudo chmod +x path/to/fd/FDEXE.sh
23+
24+
:: Handle selected target
25+
if [%1] == [unix_adl] (
26+
echo Running Mac/Linux ADL...
27+
FDEXE.sh "%UNIX_FLEX_SDK%/bin/adl" -profile extendedDesktop %APP_XML:\=/% %APP_DIR:\=/%
28+
) else if [%1] == [win_adl] (
29+
echo Running Windows ADL...
30+
adl -profile extendedDesktop "%APP_XML%" "%APP_DIR%"
31+
) else if [%1] == [unix_player] (
32+
echo Running Mac/Linux Flash Player...
33+
FDEXE.sh %OUT_FILE%
34+
) else if [%1] == [win_player] (
35+
echo Running Windows Flash Player...
36+
start %OUT_FILE%
37+
) else if [%1] == [unix_browser] (
38+
echo Running Mac/Linux Browser...
39+
:: Mac and Linux commands, select correct:
40+
FDEXE.sh open -a Safari %OUT_FILE%
41+
:: FDEXE.sh xdg-open %OUT_FILE%
42+
) else if [%1] == [win_ie] (
43+
echo Running Windows IE...
44+
start iexplore %OUT_FILE%
45+
)
46+
if errorlevel 1 goto error
47+
goto end
48+
49+
:error
50+
pause
51+
52+
:end

0 commit comments

Comments
 (0)