forked from fpoussin/Qt5-MSVC-Static
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_openssl.bat
53 lines (38 loc) · 1.72 KB
/
build_openssl.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
@echo off
setlocal
set SSLRELEASE=1.0.x
set SSLARCH=WIN32
IF NOT v%SSLVER:1.1.=% == v%SSLVER% set SSLRELEASE=1.1.x
IF %VSCMD_ARG_TGT_ARCH% == x64 set SSLARCH=WIN64A
echo Configuring OpenSSL %SSLVER% for %SSLARCH%...
IF exist %SSLINSTALLDIR% (
echo OpenSSL already installed!
echo Delete or rename %SSLINSTALLDIR% if you want to rebuild it.
) ELSE (
IF exist %SSLBUILDDIR% (
cd %SSLBUILDDIR%
IF %SSLRELEASE% == 1.1.x (
rd build /s /q
md build
cd build
start /W /BELOWNORMAL "Configuring OpenSSL..." perl ..\Configure VC-%SSLARCH% enable-static-engine no-shared --prefix=%SSLINSTALLDIR%
echo Building / Installing OpenSSL...
start /W /BELOWNORMAL "Building / Installing OpenSSL..." nmake install_sw
IF %errorlevel% NEQ 0 exit /b %errorlevel%
) ELSE (
start /W /BELOWNORMAL "Configuring OpenSSL 1/2..." perl Configure VC-%SSLARCH% enable-static-engine --prefix=%SSLINSTALLDIR%
IF %SSLARCH% == WIN32 start /W /BELOWNORMAL "Configuring OpenSSL 2/2..." ms\do_nasm ^&^& exit
IF %SSLARCH% == WIN64A start /W /BELOWNORMAL "Configuring OpenSSL 2/2..." ms\do_win64a ^&^& exit
echo Building OpenSSL...
start /W /BELOWNORMAL "Building OpenSSL..." nmake -f ms\nt.mak clean all
IF %errorlevel% NEQ 0 exit /b %errorlevel%
echo Installing OpenSSL...
start /W /BELOWNORMAL "Installing OpenSSL..." nmake -f ms\nt.mak install
IF %errorlevel% NEQ 0 exit /b %errorlevel%
)
) ELSE (
echo Could not find OpenSSL sources in %SSLBUILDDIR%
exit /b 1
)
)
endlocal