-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWinBuild.txt
More file actions
128 lines (92 loc) · 4.35 KB
/
Copy pathWinBuild.txt
File metadata and controls
128 lines (92 loc) · 4.35 KB
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
125
126
127
128
Building with Microsoft Visual Studio
=====================================
This document describes how to build gttlvutil using
Microsoft Visual Studio tools and different libraries.
Prerequisites
=====================================
To be able to build gttlvutil one must have the following software pieces:
1) Microsoft Visual Studio 10 or Windows SDK 7.1 for building tools.
2) Cryptography provider. Following are supported:
2.1) OpenSSL (recommended). Preferred version 0.9.8g.
2.2) Windows native CryptoAPI.
3) WiX Toolset 3.9 for installer build.
Given versions are used in testing. It is strongly recommended
to use exactly the same versions.
Windows native libraries are already installed with Windows, but when using
OpenSSL the location of library must be specified. See makefile option OPENSSL_DIR.
The structure of the OpenSSL directory must be as follows:
dll
include
|openssl
lib
Build Process
=====================================
Below is the abstract structure of the project, describing the location
of the documentation, source code, makefiles and output. Root directory
contains top-level build scripts that are used to build gttlvutil. After
successful build obj and bin directories are created. Obj directory contains
compiled obj files. Out directory contains executable and if built the msi
installer file.
WinBuild32.bat and WinBuild64.bat are default build scripts for corresponding
environment. They use Windows native CryptoAPI as cryptography provider.
Top level build scripts:
WinBuild32.bat
WinBuild64.bat
makefile
Documentation and source code for gttlvutil:
doc
| *.pdf
src
| *.c
| *.h
Folders and files generated during build:
obj
|*.obj
|*.wxsobj
bin
|*.exe
|*.msi
Configuring Build Scripts
=====================================
For building process the above described top-level makefile or default
version of build script must be called. For more sophisticated build
configuration the default build scripts must be modified. See the options
of makefile and examples at the end of this document to learn how to
configure it according to your needs.
Makefile can be executed via CMD shell or Visual Studio command prompt
shell. When using CMD shell the environment must be configured using setenv
command. For example setenv /x64 configures the build environment for
64-bit build. Makefile option INSTALL_MACHINE does not change the build
environment and is only used to configure the installer build.
It must be noted that when an environment variable is defined with the same
name as one of the makefile options and the option is not set during nmake
call, the environment variable is used in the build.
Makefile has following tasks:
1) default - build executables.
2) installer - build Windows installer.
3) clean - clean build.
Makefile has following options:
1) RTL - select C run-time library (RTL) (MT, MTd, MD, MDd).
Default is MT.
2) INSTALL_MACHINE
- values 32 and 64 for configuring installer task.
Default is 64.
To configure build environment for 32 on 64 bit build
setenv /x64 or /x86 must be called.
3) HASH_PROVIDER
- values OPENSSL and CRYPTOAPI for configuring cryptography
provider.
4) OPENSSL_DIR - directory containing OpenSSL library and include files.
5) LDEXTRA - extra flags for linker.
6) CCEXTRA - extra flags for compiler.
If HASH_PROVIDER=OPENSSL, then OPENSSL_DIR must be specified.
Examples
=====================================
1) Build gttlvutil with Windows native CryptoAPI:
nmake HASH_PROVIDER=CRYPTOAPI
2) Build gttlvutil with OpenSSL:
nmake HASH_PROVIDER=OPENSSL OPENSSL_DIR="C:\OpenSSL"
3) Build gttlvutil using MTd RTL and OpenSSL:
nmake HASH_PROVIDER=OPENSSL OPENSSL_DIR="C:\OpenSSL" RTL=MTd
4) Build gttlvutil installer for 64bit OS with Windows native CryptoAPI:
nmake HASH_PROVIDER=CRYPTOAPI INSTALL_MACHINE=64 installer