This repository was archived by the owner on Jan 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFullc_5.bat
227 lines (169 loc) · 6.68 KB
/
Fullc_5.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
@echo off
REM ****************************************************************************
REM
REM Author : Malcolm Smith, MJ freelancing
REM http://www.mjfreelancing.com
REM
REM Pre-requisites: \Lib\Protocols\ZLib must contain the ZLIB OBJ files
REM \Lib\System contains the project / pas/ res files for IndySystem
REM \Lib\Core contains the project / pas/ res files for IndyCore
REM \Lib\Protocols contains the project / pas/ res files for IndyProtocols
REM
REM ****************************************************************************
computil SetupC5
if exist setenv.bat call setenv.bat
if exist setenv.bat del setenv.bat > nul
if (%NDC5%)==() goto enderror
if not exist %NDC5%\bin\dcc32.exe goto endnocompiler
if not exist ..\C5\*.* md ..\C5
if exist ..\C5\*.* call clean.bat ..\C5\
cd System
copy IndySystem50.dpk ..\..\C5 > nul
copy *IndySystem50.cfg1 ..\..\C5 > nul
copy *IndySystem50.cfg2 ..\..\C5 > nul
copy *.res ..\..\C5 > nul
copy *.pas ..\..\C5 > nul
copy *.inc ..\..\C5 > nul
cd ..\..\C5
REM ************************************************************
REM Compile IndySystem50 - Round 1
REM ************************************************************
copy IndySystem50.cfg1 IndySystem50.cfg > nul
%NDC5%\bin\dcc32.exe /B IndySystem50.dpk
if errorlevel 1 goto enderror
REM ************************************************************
REM Compile IndySystem50 - Round 2
REM ************************************************************
del IndySystem50.cfg > nul
copy IndySystem50.cfg2 IndySystem50.cfg > nul
%NDC5%\bin\dcc32.exe /B IndySystem50.dpk
if errorlevel 1 goto enderror
REM ************************************************************
REM Correct the LSP file (quote everything)
REM ************************************************************
..\Lib\LspFix.exe IndySystem50.lsp
%NDC5%\bin\tlib.exe IndySystem50.lib @IndySystem50.lsp /P64
if errorlevel 1 goto enderror
REM ************************************************************
REM Prepare to copy all CORE related files
REM ************************************************************
cd ..\Lib\Core
copy *IndyCore50.dpk ..\..\C5 > nul
copy *IndyCore50.cfg1 ..\..\C5 > nul
copy *IndyCore50.cfg2 ..\..\C5 > nul
copy *.res ..\..\C5 > nul
copy *.pas ..\..\C5 > nul
copy *.dcr ..\..\C5 > nul
copy *.inc ..\..\C5 > nul
cd ..\..\C5
REM ************************************************************
REM Compile IndyCore50 - Round 1
REM ************************************************************
copy IndyCore50.cfg1 IndyCore50.cfg > nul
%NDC5%\bin\dcc32.exe /B IndyCore50.dpk
if errorlevel 1 goto enderror
REM ************************************************************
REM Compile IndyCore50 - Round 2
REM ************************************************************
del IndyCore50.cfg > nul
copy IndyCore50.cfg2 IndyCore50.cfg > nul
%NDC5%\bin\dcc32.exe /B IndyCore50.dpk
if errorlevel 1 goto enderror
..\Lib\LspFix.exe IndyCore50.lsp
%NDC5%\bin\tlib.exe IndyCore50.lib @IndyCore50.lsp /P64
if errorlevel 1 goto enderror
REM ************************************************************
REM Compile dclIndyCore50 - Round 1
REM ************************************************************
copy dclIndyCore50.cfg1 dclIndyCore50.cfg > nul
%NDC5%\bin\dcc32.exe /B dclIndyCore50.dpk
if errorlevel 1 goto enderror
REM ************************************************************
REM Compile dclIndyCore50 - Round 2
REM ************************************************************
del dclIndyCore50.cfg > nul
copy dclIndyCore50.cfg2 dclIndyCore50.cfg > nul
%NDC5%\bin\dcc32.exe /B dclIndyCore50.dpk
if errorlevel 1 goto enderror
rem ..\Lib\LspFix.exe dclIndyCore50.lsp
rem %NDC5%\bin\tlib.exe dclIndyCore50.lib @dclIndyCore50.lsp /P64
rem if errorlevel 1 goto enderror
REM ************************************************************
REM Prepare to copy all PROTOCOLS related files
REM ************************************************************
cd ..\Lib\Protocols
copy zlib\*.obj ..\..\C5 > nul
copy *IndyProtocols50.dpk ..\..\C5 > nul
copy *IndyProtocols50.cfg1* ..\..\C5 > nul
copy *IndyProtocols50.cfg2 ..\..\C5 > nul
copy *.res ..\..\C5 > nul
copy *.pas ..\..\C5 > nul
copy *.dcr ..\..\C5 > nul
copy *.inc ..\..\C5 > nul
cd ..\..\C5
REM ************************************************************
REM Compile IndyProtocols50 - Round 1a (dummy build to get headers)
REM ************************************************************
copy IndyProtocols50.cfg1a IndyProtocols50.cfg > nul
%NDC5%\bin\dcc32.exe /B IndyProtocols50.dpk
if errorlevel 1 goto enderror
REM ************************************************************
REM Compile IndyProtocols50 - Round 1b (dummy build to get headers)
REM ************************************************************
del IndyProtocols50.cfg > nul
copy IndyProtocols50.cfg1b IndyProtocols50.cfg > nul
%NDC5%\bin\dcc32.exe /B IndyProtocols50.dpk
if errorlevel 1 goto enderror
REM ************************************************************
REM Compile IndyProtocols50 - Round 2
REM ************************************************************
del IndyProtocols50.cfg > nul
copy IndyProtocols50.cfg2 IndyProtocols50.cfg > nul
%NDC5%\bin\dcc32.exe /B IndyProtocols50.dpk
if errorlevel 1 goto enderror
..\Lib\LspFix.exe IndyProtocols50.lsp
%NDC5%\bin\tlib.exe IndyProtocols50.lib @IndyProtocols50.lsp /P64
if errorlevel 1 goto enderror
REM ************************************************************
REM Compile dclIndyProtocols50 - Round 1
REM ************************************************************
copy dclIndyProtocols50.cfg1 dclIndyProtocols50.cfg > nul
%NDC5%\bin\dcc32.exe /B dclIndyProtocols50.dpk
if errorlevel 1 goto enderror
REM ************************************************************
REM Compile dclIndyProtocols50 - Round 2
REM ************************************************************
del dclIndyProtocols50.cfg > nul
copy dclIndyProtocols50.cfg2 dclIndyProtocols50.cfg > nul
%NDC5%\bin\dcc32.exe /B dclIndyProtocols50.dpk
if errorlevel 1 goto enderror
REM ************************************************************
REM Set all files we want to keep with the R attribute then
REM delete the rest before restoring the attribute
REM ************************************************************
attrib +r Id*.hpp
attrib +r *.bpl
attrib +r Indy*.bpi
attrib +r Indy*.lib
attrib +r indysystem50.res
attrib +r indycore50.res
attrib +r indyprotocols50.res
del /Q /A:-R *.* > nul
attrib -r Id*.hpp
attrib -r *.bpl
attrib -r Indy*.bpi
attrib -r Indy*.lib
attrib -r indysystem50.res
attrib -r indycore50.res
attrib -r indyprotocols50.res
goto endok
:enderror
echo Error!
pause
goto endok
:endnocompiler
echo C++Builder 5 Compiler Not Present!
goto endok
:endok
rem call clean
cd ..\Lib