forked from IndySockets/Indy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Fulld_2007.bat
116 lines (96 loc) · 3.23 KB
/
Fulld_2007.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
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
@echo off
if (%1)==() goto test_command
if (%1)==(start) goto start
goto endok
:test_command
if (%COMSPEC%)==() goto no_command
%COMSPEC% /E:9216 /C %0 start %1 %2 %3
goto endok
:no_command
echo No Command Interpreter found
goto endok
:start
echo Start
call clean.bat
echo on
rem this generates setenv.bat, containing the environment variables used for compiling
rem e.g.:
rem SET NDD11=\path\to\delphi2007
rem SET NDWINSYS=\path\to\system32
computil SetupD11
if exist setenv.bat call setenv.bat
if (%NDD11%)==() goto enderror
if (%NDWINSYS%)==() goto enderror
set DCC32=%NDD11%\Bin\dcc32.exe
if not exist %DCC32% goto enderror
rem all output for Delphi 2007 goes into D11 (that's the number 1 not a lower case L)
set DOUT=..\D11
if not exist %DOUT%\*.* md %DOUT% >nul
if not exist %DOUT%\dcu\*.* md %DOUT%\dcu >nul
if exist %DOUT%\*.* call clean.bat %DOUT%
rem /B = Build
rem /O = object directories
rem /D = conditionals
rem /JL = generate files for C++
rem /H = output hints
rem /W = output warnings
set OPTIONS=/B /Oobjs /DBCB /JL /H /W
rem /LN = output for .bpl file
rem /LE = output for .dcp file
set EXEOUTPUTDIRS=/LN..\%DOUT% /LE..\%DOUT%
rem /N0 = output for dcu files (that's a zero, not an upper case o)
rem /NH = output for hpp files (these do not go into the dcu subdir
rem /NO = output for obj files
rem /NB = output for bpi files
rem note the additional '..\' here: We descend into subdirs later on
set OTHEROUTPUTDIRS=/N0..\%DOUT%\dcu /NH..\%DOUT% /NO..\%DOUT%\dcu /NB..\%DOUT%\dcu
rem D- = no debug information
rem L- = no local debug symbols
rem N+ = ??
rem P+ = open string parameters
rem R- = no range checking
rem S- = ??
rem T- = no typed @ parameter
rem W- = no stack frames
set SWITCHES=D-L-n+p+r-s-t-w-
ECHO ****************
ECHO Compile System
ECHO ****************
pushd System
%DCC32% IndySystem110.dpk %OPTIONS% %EXEOUTPUTDIRS% %OTHEROUTPUTDIRS% /$%SWITCHES% %2 %3 %4
if errorlevel 1 goto enderror
rem copy ..\..\D11\IndySystem110.bpl %NDWINSYS% >nul
popd
ECHO **************
ECHO Compile Core
ECHO **************
pushd Core
%DCC32% IndyCore110.dpk %OPTIONS% %EXEOUTPUTDIRS% %OTHEROUTPUTDIRS% /$%SWITCHES% %2 %3 %4
if errorlevel 1 goto enderror
%DCC32% dclIndyCore110.dpk %OPTIONS% %EXEOUTPUTDIRS% %OTHEROUTPUTDIRS% /$%SWITCHES% %2 %3 %4
if errorlevel 1 goto enderror
rem copy ..\..\D11\IndyCore110.bpl %NDWINSYS% >nul
rem copy ..\..\D11\dclIndyCore110.bpl %NDWINSYS% >nul
popd
ECHO *******************
ECHO Compile Protocols
ECHO *******************
pushd Protocols
ECHO ************************
ECHO IdCompressionIntercept
ECHO ************************
rem %NDD11%\Bin\dcc32.exe -DBCB -B -M -JPHNE -N..\..\D11 /U..\..\D11 -H -W -Z IdCompressionIntercept.pas -$d-l-
rem if errorlevel 1 goto enderror
%DCC32% IndyProtocols110.dpk %OPTIONS% %EXEOUTPUTDIRS% %OTHEROUTPUTDIRS% /$%SWITCHES% %2 %3 %4
if errorlevel 1 goto enderror
%DCC32% dclIndyProtocols110.dpk %OPTIONS% %EXEOUTPUTDIRS% %OTHEROUTPUTDIRS% /$%SWITCHES% %2 %3 %4
if errorlevel 1 goto enderror
rem copy ..\..\D11\IndyProtocols110.bpl %NDWINSYS% >nul
rem copy ..\..\D11\dclIndyProtocols110.bpl %NDWINSYS% >nul
popd
goto endok
:enderror
popd
call clean.bat
echo Error!
:endok