-
Notifications
You must be signed in to change notification settings - Fork 137
/
build_win32.bat
96 lines (70 loc) · 1.81 KB
/
build_win32.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
@echo off
set ROOT=%~pd0
set OPENSSL_SOURCEDIR=%ROOT%openssl-1.0.??
set OPENSSL_INSTALDIR=%ROOT%openssl
set MAKEFLAGS=
if not "%1" == "" goto help
call :testroot %ROOT%
if errorlevel 1 goto error0
nmake -? >NUL 2>&1
if errorlevel 1 goto error1
ml -? >NUL 2>&1
if errorlevel 1 goto error1
perl -v >NUL 2>&1
if errorlevel 1 goto error2
cd /D %OPENSSL_SOURCEDIR% >NUL 2>&1
if errorlevel 1 goto error3
perl Configure VC-WIN32 no-asm no-ec --prefix=%OPENSSL_INSTALDIR%
if errorlevel 1 goto error
sed -i "/perl/ s/\\\\/\\//g" ms/do_ms.bat
call ms\do_ms
if errorlevel 1 goto error
sed -i "/PERL/ s/\\\\/\\//g; /PERL/ s/\\$@/\$(@:\\\\=\\/)/;" ms/nt*.mak
nmake -f ms\nt.mak clean
nmake -f ms\nt.mak
if errorlevel 1 goto error
nmake -f ms\nt.mak install
if errorlevel 1 goto error
cd ..\Stack
if errorlevel 1 goto error
nmake -f win32_msc.mak clean
if errorlevel 1 goto error
nmake -f win32_msc.mak
if errorlevel 1 goto error
cd ..\AnsiCSample
if errorlevel 1 goto error
nmake -f win32_msc.mak clean
if errorlevel 1 goto error
nmake -f win32_msc.mak
if errorlevel 1 goto error
cd ..
goto done
:testroot
if "%1" == "%ROOT%" exit /B 0
exit /B 1
:error0
echo fatal error: cannot continue.
echo the directory %ROOT% must not contain blanks
goto done
:error1
echo fatal error: cannot continue.
echo this batch has to be called from a
echo 32bit visual studio command shell
goto done
:error2
echo fatal error: cannot continue.
echo perl has to be in the path
goto done
:error3
echo fatal error: cannot continue.
echo openssl sources must be at %OPENSSL_SOURCEDIR%
goto done
:error
echo fatal error: cannot continue.
:help
echo this batch has to be called from a
echo 32bit visual studio command shell
echo the directory %ROOT% must not contain blanks
echo openssl sources must be at %OPENSSL_SOURCEDIR%
echo perl has to be in the path
:done