This repository has been archived by the owner on Mar 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
build-windows.cmd
73 lines (53 loc) · 1.61 KB
/
build-windows.cmd
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
@echo off
:: Visual Studio Environment
set VSCMD="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
set VSCMD_64="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
:: OPENSSL Configuration Options
set /p OPENSSL_CONFIG_OPTIONS=<config-params-windows.txt
:: Output Directory
set OUTPUT_DIR="%CD%\libs\windows"
:: Clean output directory
rmdir /S /Q %OUTPUT_DIR%
cd vendor\openssl
call git clean -dfx
call git checkout -f
:: Build 32 bit binaries
:: Run Visual Studio 32 bits shell
call %VSCMD%
:: Set make output directory
set MAKE_OUTPUT_DIR="%CD%\output\openssl-32"
:: Clean output directory
rmdir /S /Q %MAKE_OUTPUT_DIR%
:: Configure and make
perl Configure VC-WIN32 %OPENSSL_CONFIG_OPTIONS% --prefix=%MAKE_OUTPUT_DIR%
call ms\do_ms.bat
nmake -f ms\mt.mak
nmake -f ms\nt.mak install
:: Copy binary
mkdir %OUTPUT_DIR%\x86
copy %MAKE_OUTPUT_DIR%\lib\libeay32.lib %OUTPUT_DIR%\x86
:: Reset and done
call git clean -dfx
call git checkout -f
:: Build 64 bit binaries
:: Run Visual Studio 64 bits shell
call %VSCMD_64%
:: Set make output directory
set MAKE_OUTPUT_DIR="%CD%\output\openssl-64"
:: Clean output directory
rmdir /S /Q %MAKE_OUTPUT_DIR%
:: Configure and make
perl Configure VC-WIN64A %OPENSSL_CONFIG_OPTIONS% --prefix=%MAKE_OUTPUT_DIR%
call ms\do_win64a.bat
nmake -f ms\mt.mak
nmake -f ms\nt.mak install
:: Copy binary
mkdir %OUTPUT_DIR%\amd64
copy %MAKE_OUTPUT_DIR%\lib\libeay32.lib %OUTPUT_DIR%\amd64
mkdir %OUTPUT_DIR%\x86_64
copy %MAKE_OUTPUT_DIR%\lib\libeay32.lib %OUTPUT_DIR%\x86_64
:: Reset and done
call git clean -dfx
call git checkout -f
:: Exit
cd ..\..\