forked from FDOS/freecom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildall.bat
147 lines (125 loc) · 3.68 KB
/
buildall.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
@ECHO OFF
REM we use BUILD_COMPILER as build.bat sets and clears COMPILER env var
if "%BUILD_COMPILER%"=="" set BUILD_COMPILER=wc
if NOT "%1"=="" goto %1
rd /s /q build
call clean
mkdir build
mkdir build\localize
copy VERSION.TXT build\localize\
copy command.lsm build\localize\
copy docs\localize.txt build\localize\
REM make FreeDOS package structure
md build\package
SET pkgdir=build\package
md %pkgdir%\APPINFO
md %pkgdir%\BIN
md %pkgdir%\DOC
md %pkgdir%\DOC\COMMAND
md %pkgdir%\HELP
md %pkgdir%\NLS
md %pkgdir%\SOURCE
md %pkgdir%\SOURCE\FREECOM
pushd .
set languages=NL Dutch ES Spanish DE German FI Finnish FR French IT Italian PO Polish PTR PT_BR RU Russian SE Swedish Ser Serbian SI Slovene TR Turkish UKR Ukr YUG YU437 EN English
set buildfile=%0
call %0 buildall padding %languages%
::for %%a in (Dutch Spanish German Finnish French Italian Polish PT_BR Russian Swedish Serbian Slovene Turkish Ukr YU437 English) DO %0 %%a
popd
pushd .
cd build\localize
7z a -mx9 -tzip ..\localize.zip .
popd
REM source with filetimes matching commit
pushd .
cd build
md source
cd source
git clone https://github.com/FDOS/freecom.git
cd freecom
REM this is from git-tools, it is not included with git
git restore-mtime
REM remove git references
rd /s /q .git
rd /s /q .github
del .gitattributes
del .gitignore
cd ..
7z a -mx9 -tzip ..\freecom-source.zip .
popd
REM make FreeDOS package
pushd .
copy command.lsm %pkgdir%\APPINFO\COMMAND.LSM
copy bin\fdcom.ico %pkgdir%\BIN\FDCOM.ICO
copy build\English\xmsswap\command.com %pkgdir%\BIN\COMMAND.COM
copy FILE_ID.DIZ %pkgdir%\DOC\COMMAND\FILE_ID.DIZ
copy README.md %pkgdir%\DOC\COMMAND\README.MD
copy VERSION.TXT %pkgdir%\DOC\COMMAND\VERSION.TXT
copy docs\HELP.EN %pkgdir%\HELP\COMMAND.EN
copy docs\html\commands\cmd.html %pkgdir%\DOC\COMMAND\CMD.HTM
copy docs\html\commands\FreeCOM.html %pkgdir%\DOC\COMMAND\FREECOM.HTM
copy utils\MAKECMD.BAT %pkgdir%\NLS\MAKECMD.BAT
:: language specific versions copied into NLS during build
copy build\freecom-source.zip %pkgdir%\SOURCE\FREECOM\SOURCES.ZIP
cd %pkgdir%
7z a -mx9 -tzip ..\command.zip .
popd
call clean
SET languages=
SET pkgdir=
SET buildfile=
ECHO Done bulding all!
goto end
:buildall
rem skip past buildall dummy on first pass, skip last language on each successive pass
shift
shift
rem %1 and %2 are abbr and language name
if "%1"=="" goto end
pushd .
ECHO building %2 (%1)
call %buildfile% dobuild %2
popd
copy build\%2\xmsswap\command.com %pkgdir%\NLS\CMD-%1.COM
goto buildall
:dobuild
rem skip past dobuild
shift
rem %1 is the language name (should match one of the *.LNG files)
mkdir build\%1
copy VERSION.TXT build\%1\
copy command.lsm build\%1\
mkdir build\%1\xmsswap
call build -r %BUILD_COMPILER% xms-swap %1
copy command.com build\%1\xmsswap\
copy tools\28.com build\%1\
copy tools\50.com build\%1\
copy tools\load_icd.exe build\%1\
copy strings\xmsswap.cln build\localize\
copy strings\fixstrs.exe build\localize\
copy strings\default.lng build\localize\
copy strings\%1.lng build\localize\
copy strings\strings.dat build\localize\%1.dat
copy tools\28.com build\localize\
copy tools\50.com build\localize\
copy tools\load_icd.exe build\localize\
mkdir build\%1\kswap
call build -r %BUILD_COMPILER% no-xms-swap %1
copy command.com build\%1\kswap\
copy docs\k-swap.txt build\%1\kswap\
copy tools\kssf.com build\%1\kswap\
copy tools\vspawn.com build\%1\kswap\
copy strings\command.cln build\localize\
copy tools\kssf.com build\localize\
copy tools\vspawn.com build\localize\
mkdir build\%1\debug
call build -r %BUILD_COMPILER% xms-swap debug %1
copy command.com build\%1\debug\
mkdir build\%1\plainedt
call build -r %BUILD_COMPILER% xms-swap plainedt %1
copy command.com build\%1\plainedt\
pushd .
cd build\%1
7z a -mx9 -tzip ..\%1.zip .
popd
:end