forked from FDOS/freecom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkdist.bat
150 lines (118 loc) · 3.46 KB
/
mkdist.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
@echo off
: Prepare binary distribution
set DBG=Yes
set DBG=
: don't forget to pass on the default rather than mine
copy config.std config.mak
copy /u docs\download.txt .
for %pkg in (binary debug plainedt xmsswap) for %fnam in (ptchldrv.exe ptchsize.exe kssf.com vspawn.com command.com) (set fn=packages\%pkg.std\%fnam %+ if exist %fn del /q %fn)
set _DBG=REM
if NOT "%DBG%"=="" set _DBG=
%_DBG setdos /y1 %+ %_DBG echo on
set compiler=tc101
set compiler=bc5
set lng=english
set model=
set xms_swap=
iff exist config.h.backup then
echo config.h.backup exists
echo something went wrong last time
cancel 30
endiff
iff not isdir old then
mkdir old
if not isdir old (echo Cannot create OLD %+ quit 10)
else
del /y old\*.*
endiff
for %stem in (cmddebug command kssf kssf_dbg) do for %ext in (new exe com cln) do (set file=%stem.%ext %+ if exist %file move %file old\%file)
%_DBG setdos /y0 %+ %_DBG echo off
dmake clobber || quit
%_DBG setdos /y1 %+ %_DBG echo on
: pause
: Make the "with debug" binary
set ndebug=
set debug=1
set compiler=bc5
%_DBG setdos /y0 %+ %_DBG echo off
dmake MODEL!:=l || quit
%_DBG setdos /y1 %+ %_DBG echo on
: pause
if not exist com.com goto ende
move com.com packages\debug.std\command.com
if exist com.com goto ende
for %file in (tools\kssf.com tools\vspawn.com tools\ptchldrv.exe tools\ptchsize.exe) (if exist %file move %file packages\debug.std\ %+ if exist %file goto ende)
:noKSSFDBG
: pause
: Disable all debug stuff
set ndebug=Yes
set debug=
set compiler=tc101
set model=s
set XMS_SWAP=Yes
%_DBG setdos /y0 %+ %_DBG echo off
dmake || quit
%_DBG setdos /y1 %+ %_DBG echo on
if not exist com.com goto ende
iff not exist tools\ptchsize.exe then
echo no PTCHSIZE
goto ende
endiff
tools\ptchsize.exe com.com +7KB
if errorlevel 1 goto ende
move com.com packages\xmsswap.std\command.com
copy /b shell\com.exe +infores + criter\criter + criter\criter1 packages\localize.std\xmsswap.cln
if exist com.com goto ende
set XMS_SWAP=
: pause
ren /q config.h config.h.backup || cancel 20
echo #define IGNORE_ENHANCED_INPUT >config.h
type config.h.backup >>config.h
set err=
%_DBG setdos /y0 %+ %_DBG echo off
dmake || set err=%?
%_DBG setdos /y1 %+ %_DBG echo on
del /q config.h
ren /q config.h.backup config.h || cancel 21
if not x%err == x cancel %err
if not exist com.com goto ende
iff not exist tools\ptchsize.exe then
echo no PTCHSIZE
goto ende
endiff
tools\ptchsize.exe com.com +6KB
if errorlevel 1 goto ende
move com.com packages\plainedt.std\command.com
if exist com.com goto ende
: pause
del /q shell\*.exe lastmake.mk
touch config.h
%_DBG setdos /y0 %+ %_DBG echo off
dmake -W config.h || quit
%_DBG setdos /y1 %+ %_DBG echo on
: pause
if not exist com.com goto ende
copy /b shell\com.exe +infores + criter\criter + criter\criter1 command.cln
ren com.com command.com
if exist com.com goto ende
iff not exist tools\ptchsize.exe then
echo no PTCHSIZE
goto ende
endiff
tools\ptchsize.exe command.com +6KB
if errorlevel 1 goto ende
for %file in (tools\kssf.com tools\vspawn.com tools\ptchldrv.exe tools\ptchsize.exe) (if exist %file copy %file packages\plainedt.std\ %+ if exist %file move %file packages\binary.std\ %+ if exist %file goto ende)
perl get_ver.pl .\command.com
: %_DBG echo on %+ setdos /y1
:: Make HTML documents
pushd docs\html\commands || quit
echo Updating HTML documents
call upd_html.bat
popd
: %_DBG echo on %+ setdos /y1
call mkpkgs.bat
%_DBG setdos /y0 %+ %_DBG echo off
dmake clean dist || quit
%_DBG setdos /y1 %+ %_DBG echo on
rm -frd old
:ende