This repository has been archived by the owner on May 6, 2022. It is now read-only.
forked from openssl/openssl
-
Notifications
You must be signed in to change notification settings - Fork 57
/
INSTALL.WINUNIVERSAL
124 lines (77 loc) · 3.97 KB
/
INSTALL.WINUNIVERSAL
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
INSTALLATION ON WINDOWS 10 UNIVERSAL PLATFORM
----------------------------------
[Instructions for building for Windows CE can be found in INSTALL.WCE]
[Instructions for building for Win64 can be found in INSTALL.W64]
[Instructions for building for Win32 can be found in INSTALL.W32]
[Instructions for building for Windows Phone 8.0/8.1 or Windows Store 8.1 can be found in INSTALL.WINAPP]
Requirments.
- You need Perl location for Win32 or Win64 in your PATH environmental variable.
- Visual Studio 2015 or Visual Studio 2017
- Tools for Windows 10 [https://dev.windows.com/en-US/windows-10-developer-preview-tools]
QUICK MULTI-PLATFORM INSTALL
-----------------------------------------------------------------------
Execute the following script in the source root tree.
> ms\do_vsprojects14.bat (for Visual Studio 2015)
> ms\do_vsprojects15.bat (for Visual Studio 2017)
Open visual studio solution created
> vsout\openssl.sln
This file will generate a solution file that contains 4 projects.
2 OpenSSL Projects
Universal 10.0 DLL (Win32|x64|arm) (Debug|Release)
Universal 10.0 STATIC (Win32|x86|arm) (Debug|Release)
2 Test Apps which host the tests and run them
Run the test application to validate the libraries. It executes the same tests as the commandline
test suite.
Libraries are built on the following location
vsout\$(ProjectConfiguration)\$(Configuration)\$(Arch)\bin
Modify ms\do_vsprojects.bat for custom builds
You can build this solution file via the command line using devenv.exe, or MSBuild.exe, or via the UI
Once all configuration are build run
> ms\do_packwinuniversal.bat
To pack the build output into vsout\package
SINGLE PLATFORM INSTALL
-----------------------------------------------------------------------
Firstly you should run Configure with platform VC-WINUNIVERSAL
> perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL
Next you need to build the Makefiles:
> ms\do_winuniversal
Then from CMD.exe, the following environment variables must be set for nmake build.
INCLUDE
LIB
LIBPATH
In addition nmake.exe, link.exe and cl.exe must be available in the environmental variable %PATH%
Run ms\setVSvars.bat to set this environmental variables, and fix the path if needed, following flavours are supported, If your version is not supported by this batch you will need to manually set previous variables
ms\setVSvars universal10.0arm
ms\setVSvars universal10.0Win32
ms\setVSvars universal10.01x64
Start nmake compilation with.
> nmake -f ms\nt.mak init
> nmake -f ms\nt.mak
Alternatively you can generate DLLs with the following command
> nmake -f ms\ntdll.mak
If all is well it should compile and you will have libs for openssl. on the directory out32 or out32dll if DLL build.
Tweaks:
Troubleshooting
---------------
Since the Win32 build is only occasionally tested it may not always compile
cleanly. If you get an error about functions not having numbers assigned
when you run ms\do_ms then this means the Win32 ordinal files are not up to
date. You can do:
> perl util\mkdef.pl crypto ssl update
then ms\do_XXX should not give a warning any more. However the numbers that
get assigned by this technique may not match those that eventually get
assigned in the Git tree: so anything linked against this version of the
library may need to be recompiled.
If you get errors about unresolved symbols there are several possible
causes.
If this happens when the DLL is being linked and you have disabled some
ciphers then it is possible the DEF file generator hasn't removed all
the disabled symbols: the easiest solution is to edit the DEF files manually
to delete them. The DEF files are ms\libeay32.def ms\ssleay32.def.
Another cause is if you missed or ignored the errors about missing numbers
mentioned above.
Linking your application
------------------------
If you link with static OpenSSL libraries [those built with ms/nt.mak],
then you're expected to additionally link your application with
WS2_32.LIB.