forked from taradinoc/zilf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakedist.bat
63 lines (49 loc) · 1.43 KB
/
makedist.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
@echo off
setlocal
set zip7="C:\Program Files\7-Zip\7z.exe"
set winrar="C:\Program Files\WinRAR\WinRAR.exe"
if not exist zilf\bin\release\zilf.exe goto missing
if not exist zapf\bin\release\zapf.exe goto missing
rd /s /q dist
mkdir dist
for /f %%n in ('zilf\bin\release\zilf.exe -x DistFiles\distname.mud') do (
set distname=%%n
)
set dist=dist\%distname%
mkdir %dist%
mkdir %dist%\bin
mkdir %dist%\doc
mkdir %dist%\library
mkdir %dist%\sample
mkdir %dist%\sample\advent
copy distfiles\README.txt %dist%
copy zilf\bin\release\zilf.exe %dist%\bin
copy zilf\bin\release\zilf.emit.dll %dist%\bin
copy zilf\bin\release\zilf.common.dll %dist%\bin
copy COPYING.txt %dist%\bin
copy zapf\bin\release\zapf.exe %dist%\bin
copy zilf_manual.html %dist%\doc
copy zapf_manual.html %dist%\doc
copy zilf\quickref.txt %dist%\doc
copy library\*.zil %dist%\library
copy library\*.mud %dist%\library
copy library\LICENSE.txt %dist%\library
copy library\ZIL_ZILF_differences.txt %dist%\library
copy examples\*.zil %dist%\sample
copy examples\advent\*.zil %dist%\sample\advent
del /s %dist%\*~
if exist %zip7% goto use7z
if exist %winrar% goto usewinrar
echo Can't find 7-Zip or WinRAR. Not zipping.
exit /b 2
:use7z
pushd dist
%zip7% a %distname%.zip %distname%
exit /b 0
:usewinrar
pushd dist
%winrar% a -afzip %distname%.zip %distname%
exit /b 0
:missing
echo Can't find compiled program files.
exit /b 1