forked from Nenirey/AWGG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bat
executable file
·91 lines (71 loc) · 1.89 KB
/
build.bat
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
@echo off
rem the next two line must be changed before run on your computer
set lazpath=C:\lazarus\
set PATH=%lazpath%;%PATH%
rem You can execute this script with different parameters:
rem components - compiling components needed for DC
rem plugins - compiling all DC plugins
rem all - compiling components, plugins and DC
rem default - compiling DC only
rem beta - compile in beta mode (using by default)
if not "%OS_TARGET%" == "" (
set AWGG_ARCH=%AWGG_ARCH% --os=%OS_TARGET%
)
if not "%CPU_TARGET%" == "" (
set AWGG_ARCH=%AWGG_ARCH% --cpu=%CPU_TARGET%
)
if "%1"=="beta" ( call :beta
) else (
if "%1"=="release" ( call :release
) else (
if "%1"=="default" ( call :default
) else (
if "%1"=="alpha" ( call :alpha
) else (
if "%1"=="all" ( call :all
) else (
if "%1"=="" ( call :beta
) else (
echo ERROR: Mode not defined: %1
echo Available modes: alpha, beta, release
))))))
pause
GOTO:EOF
:beta
rem Build versionitis
lazbuild src\versionitis.lpi
rem update version info
src\versionitis -verbose
rem Build AWGG
call :replace_old
lazbuild src\awgg.lpi --bm=beta %AWGG_ARCH%
rem Build Dwarf LineInfo Extractor
lazbuild tools\extractdwrflnfo.lpi
rem Extract debug line info
tools\extractdwrflnfo awgg.dbg
GOTO:EOF
:release
rem Build versionitis
lazbuild src\versionitis.lpi
rem update version info
src\versionitis -verbose
rem Build AWGG
call :replace_old
lazbuild src\awgg.lpi --bm=release %AWGG_ARCH%
rem Build Dwarf LineInfo Extractor
lazbuild tools\extractdwrflnfo.lpi
rem Extract debug line info
tools\extractdwrflnfo awgg.dbg
GOTO:EOF
:default
call :replace_old
lazbuild src\awgg.lpi %AWGG_ARCH%
GOTO:EOF
:alpha
call :replace_old
lazbuild src\awgg.lpi --bm=nightly %AWGG_ARCH%
GOTO:EOF
:replace_old
del /Q awgg.exe.old
ren awgg.exe awgg.exe.old
GOTO:EOF