forked from fdorg/flashdevelop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildl.cmd
More file actions
116 lines (82 loc) · 3.13 KB
/
Copy pathbuildl.cmd
File metadata and controls
116 lines (82 loc) · 3.13 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
:: Builds the binary locally and launches the installer
:: Set paths
set PATH=%PATH%;C:\Windows\Microsoft.NET\Framework\v4.0.30319\
set PATH=%PATH%;C:\Program Files\Git\bin\
set PATH=%PATH%;C:\Program Files (x86)\Git\bin\
set PATH=%PATH%;C:\Program Files\7-Zip\
set PATH=%PATH%;C:\Program Files (x86)\7-Zip\
set PATH=%PATH%;C:\Program Files (x86)\NSIS
:: Need path up
cd ..
:flashdevelop
:: Reset bin files
git clean -f -x -d FlashDevelop\Bin\Debug
del FlashDevelop\Installer\Binary\*.exe /Q
del FlashDevelop\Installer\Binary\*.zip /Q
:: Check for build errors
if %errorlevel% neq 0 goto :error
:: Build the PluginCore
msbuild PluginCore\PluginCore.csproj /p:Configuration=Release /p:Platform="AnyCPU" /t:Rebuild
:: Check for build errors
if %errorlevel% neq 0 goto :error
:: Extract version from HEAD
call SetVersion.bat
:: Build the solutions
msbuild FlashDevelop.sln /p:Configuration=Release /p:Platform="Any CPU" /t:Rebuild
ping -n 5 127.0.0.1 > nul
msbuild FlashDevelop.sln /p:Configuration=Release /p:Platform=x86 /t:Rebuild
:: Check for build errors
if %errorlevel% neq 0 goto :error
:: Create the installer
makensis FlashDevelop\Installer\Installer.nsi
:: Check for nsis errors
if %errorlevel% neq 0 goto :error
:: Create the archive
7z a -tzip FlashDevelop\Installer\Binary\FlashDevelop.zip .\FlashDevelop\Bin\Debug\* -xr!.empty
:: Check for 7zip errors
if %errorlevel% neq 0 goto :error
:haxedevelop
:: Reset bin files
git clean -f -x -d FlashDevelop\Bin\Debug
:: Remove unnecessary files
rd "FlashDevelop\Bin\Debug\Tools\flexpmd" /s /q
rd "FlashDevelop\Bin\Debug\Tools\flexlibs\frameworks\libs\player" /s /q
for /d %%G in ("FlashDevelop\Bin\Debug\Projects\*ActionScript 3*") do rd /s /q "%%~G"
del "FlashDevelop\Bin\Debug\StartPage\images\*.*" /q
:: Copy distro files
xcopy Distros\HaxeDevelop /s /e /y
:: Build the PluginCore
msbuild PluginCore\PluginCore.csproj /p:Configuration=Release /p:Platform="AnyCPU" /t:Rebuild
:: Check for build errors
if %errorlevel% neq 0 goto :error
:: Extract version from HEAD
call SetVersion.bat
:: Build the solutions
msbuild FlashDevelop.sln /p:Configuration=Release /p:Platform="Any CPU" /t:Rebuild
ping -n 5 127.0.0.1 > nul
msbuild FlashDevelop.sln /p:Configuration=Release /p:Platform=x86 /t:Rebuild
:: Check for build errors
if %errorlevel% neq 0 goto :error
:: Rename binaries
ren FlashDevelop\Bin\Debug\FlashDevelop.exe HaxeDevelop.exe
ren FlashDevelop\Bin\Debug\FlashDevelop64.exe HaxeDevelop64.exe
ren FlashDevelop\Bin\Debug\FlashDevelop.exe.config HaxeDevelop.exe.config
ren FlashDevelop\Bin\Debug\FlashDevelop64.exe.config HaxeDevelop64.exe.config
: Remove files after build
del "FlashDevelop\Bin\Debug\Plugins\CodeAnalyzer.dll" /q
:: Check for build errors
if %errorlevel% neq 0 goto :error
:: Create the installer
makensis FlashDevelop\Installer\Installer.nsi
:: Check for nsis errors
if %errorlevel% neq 0 goto :error
:: Create the archive
7z a -tzip FlashDevelop\Installer\Binary\HaxeDevelop.zip .\FlashDevelop\Bin\Debug\* -xr!.empty
:finish
:: Revert distro changes with backup
git stash save "Local CI Backup..."
:: Done, Run FD
start FlashDevelop\Installer\Binary\FlashDevelop.exe
exit 0
:error
exit -1