-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathHowToBuildXecretsFileClassic.txt
241 lines (156 loc) · 11.1 KB
/
HowToBuildXecretsFileClassic.txt
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
How to build Xecrets File Classic
This is the file encryption software previously known as AxCrypt 1.x.
["AxCrypt" is now a EU trademark of AxCrypt AB. Xecrets File Classic is in no way endorsed by, or connected except by history to, AxCrypt AB or their products.]
Introduction
============
Xecrets File Classic is distributed as an open source software under a GPL license. This is presumably how you came into posession of this file
and all the rest.
There are some things to know about building Xecrets File Classic. While I cannot give support for GPL builds, I still want to give some pointers on the
requirements. This list may be incomplete, please let me know if this is the case, contact me at [email protected] .
- When you first load the solution, you may get a "Security Warning for Setup". Please select "Load project normally". This is by design.
- Because of inconsistencies in various packages included in Xecrets File Classic, there are three platforms actually defined, and Visual Studio may
start off with a default of 'Mixed Platforms'. Change this immediately, and only build for 'Win32' and 'x64'. (Not x86 - that's for
the Setup project).
- Build the Win32 configuration first, since the x64 configuration depends on it.
- Xecrets File Classic is developed with Visual Studio 2022 Professional. It should be possible to build Xecrets File Classic entirely
with free tools (Visual Studio 2022 Community and/or MSBuild).
- There are some special tweaks to handle the different build environments for Xecrets File Classic, such as GPL Builds, Axantum developer builds and
Axantum build server builds. This is why you'll find some conditional code in various MSBuild project files.
- The end-result is not 100% binary identical to the released binaries, since they are timestamped and digitally signed, as well as
versioned in the continuous integration build server setup by Axantum Software AB.
Tools and Dependencies Installation
===================================
Executive summary (details in respective section below):
- Install, set AX_CRYPTOPP=install-path and build Crypto++ 8.7.0 (or later at your own risk)
- Install, set AX_ZLIB=install-path and build zlib 1.3 (or later at your own risk)
- Install WTL 10.0.10320 and set AX_WTL=Install-path (or later at your own risk)
- Install Microsoft Visual Studio 2022 Community Edition or Microsoft Visual Studio 2022 Professional Edition or better.
- Install Windows Installer XML (WiX) toolset v3.11.2 (or later at your own risk)
- Start Visual Studio 2022, open the Xecrets File Classic solution, and build.
AX_XXX refers to environment variables, used to refer to external dependency disk locations.
If you already have some components installed, just follow the list in the above order and skip the ones you already have.
It takes about 2 hours to set the whole thing up from scratch. These procedures have been tested on 64-bit Windows 10 Professional.
It should work equally well on all current Windows editions, but it has not been tested.
Details follows.
DEVELOPER PC VS BUILD SERVER
============================
We typically place contributed dependencies in (except when there is a default installlocation):
Developer PC: "C:\Users\[UserName]\Documents\Contrib\[CONTRIBUTION]"
Build Server: "C:\Lib\[CONTRIBUTION]"
Crypto++
========
Download Crypto++ Library 8.8.0 (or possibly later at your own risk) from http://www.cryptopp.com, unpack the zip-file.
Set the environment variable AX_CRYPTOPP to point to the installation directory, perhaps "C:\Users\[UserName]\Documents\Contrib\cryptopp880" .
You may need to restart Windows Explorer for the setting to take effect.
Open x64_x86 Cross Tools Command Prompt for VS 2022 (on X64 build host)
cd %AX_CRYPTOPP%
msbuild cryptlib.vcxproj /p:Configuration=Debug;Platform=Win32
msbuild cryptlib.vcxproj /p:Configuration=Release;Platform=Win32
Open x64 Native Tools Command Prompt for VS 2022 (on X64 build host)
cd %AX_CRYPTOPP%
msbuild cryptlib.vcxproj /p:Configuration=Debug;Platform=x64
msbuild cryptlib.vcxproj /p:Configuration=Release;Platform=x64
zlib
====
Download zlib 1.3 (or possibly later at your own risk) from http://www.zlib.net in zipfile format and unpack the zip-file.
Set the environment variable AX_ZLIB to point to the installation directory, perhaps "C:\Users\%USERNAME%\Documents\Contrib\zlib-1.3" .
You may need to restart Windows Explorer for the setting to take effect.
Due to a bug in zlibstat.vcxproj:
Open %AX_ZLIB%\contrib\vstudio\vc14\zlibvc.sln in Visual Studio 2022, Upgrade to toolset v143 and SDK 10.0.22621.0 (or later at your own risk).
Change 'zlibstat'
Properties | C/C++ | Code Generation | Runtime Library:
[Configuration Debug for both Win32 and x64]
"Multi-threaded Debug (/MTd)"
[Configuration ReleaseWithoutAsm and x64 (Win32 is actually ok in 1.3)]
"Multi-threaded (/MT)"
Librarian | All Options | Additional Options
[All Configurations for Win32 and x64]
(Empty)
Librarian | General | Target Machine
[All Configurations and Win32]
MachineX86 (/MACHINE:X86) (Is actually ok in 1.3 apparently)
Save the solution and project!
Open x64_x86 Cross Tools Command Prompt for VS 2022 (on X64 build host)
cd %AX_ZLIB%\contrib\vstudio\vc14
msbuild zlibstat.vcxproj /p:Configuration=Debug;Platform=Win32
msbuild zlibstat.vcxproj /p:Configuration=ReleaseWithoutAsm;Platform=Win32
Open x64 Native Tools Command Prompt for VS 2022 (on X64 build host)
cd %AX_ZLIB%\contrib\vstudio\vc14
msbuild zlibstat.vcxproj /p:Configuration=Debug;Platform=x64
msbuild zlibstat.vcxproj /p:Configuration=ReleaseWithoutAsm;Platform=x64
WTL
===
Download WTL 10.0.10320 (or possibly later at your own risk) from https://sourceforge.net/projects/wtl/files/ .
Set the environment variable AX_WTL to point to the installation directory, perhaps "C:\Users\%USERNAME%\Documents\Contrib\WTL10_10320_Release" .
You may need to restart Windows Explorer for the setting to take effect.
WTL needs no building, it's just a set of header files. But it does depend on ATL, Active Template Library, which is currently included
in Visual Studio 2022 all versions, but if not you can get it via the Windows Driver Kit. See more below.
ATL
===
ATL is part of Visual Studio 2022 Professional and Visual Studio 2022 Community Edition. No further action is needed, although you may
need to add it as an optional component in the Visual Studio installer.
Otherwise...
ATL needs no building, it's a set of header files and the libraries are pre-built.
MSBuild.Community.Tasks
=======================
The build process is dependent on a few extensions to MSBuild. It is included via a nuget package.
Visual Studio 2019 Community and Professional
=============================================
It was possible to build with Visual Studio 2019, but we have not regression tested this after upgrading to 2022. You'll probably have
to change toolset and target SDK. Possibly more.
Visual Studio 2017 Community and Professional
=============================================
It was possible to build with Visual Studio 2017, but we have not regression tested this after upgrading to 2019. You'll probably have
to change toolset and target SDK. Possibly more.
Visual Studio 2015 Community and Professional
=============================================
It was possible to build with Visual Studio 2015, but we have not regression tested this after upgrading to 2017. You'll probably have
to change toolset and target SDK. Possibly more.
Visual Studio Express 2013 for Windows
======================================
It was possible to build Xecrets File Classic with Visual Studio Express 2013 Express for Windows (the free version), although the .MSI installers must
be built from the command line in this case. It has not been tested with Visual Studio 2013 Express or the current code base.
Download Windows Driver Kit 7.1 (no later, ATL is removed) from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11800 .
Mount the ISO and install the 'Full Development Environment | Build Environments', typically to the standard location C:\WinDDK\7600.16385.1\ .
If you need software in order to mount the ISO as a DVD, try SlySoft Virtual CloneDrive at http://www.slysoft.com/en/virtual-clonedrive.html .
If you have disabled Autoplay, it's the 'KitSetup.exe' that you should run.
You'll also have to add the libraries to XecretsFile2Go linker properties, and then include directory to the properties so it can build.
If you have Visual Studio 2015 Professional or better, you can build it all from inside Visual Studio.
Check for updates at Microsoft with Windows Update, and be sure to explicitly search for updates. Install all important updates.
Visual Studio 2012 Update 2
===========================
It was possible to build Xecrets File Classic with Visual Studio 2012 Update 2, but this has not been regression-tested with the current code base.
It's essential to upgrade Visual Studio to the latest update, because Xecrets File Classic uses features that are not available otherwise, such as
targeting Windows XP. You'll find this in the Visual Studio 2012 Tools | Extensions and Updates | Updates menu dialog. This is not
required for Visual Studio 2013, which includes the XP headers from start.
Windows Installer XML (WiX) toolset
===================================
WiX is required to build the MSI setup. There is support for building from Visual Studio 2015 Community or better. You still need to install WiX.
https://www.firegiant.com/docs/heatwave/ Get Windows Installer XML (WiX) toolset
v4.0.2 (or later at your own risk) from https://wixtoolset.org/releases/ . Get
it via HeatWave, https://www.firegiant.com/docs/heatwave/ . Just follow the
instructions.
Build the Solution
==================
Start Visual Studio and open XecretsFileClassic.sln.
- You may get a warning about only opening projects from a trustworthy source. If you trust your source
of Xecrets File Classic, click OK and continue.
For Express:
- You'll get a warning about Setup.wixproj not being supported. Click OK and ignore...
- ...and as a result a warning about not all projects being loaded correctly. Click OK and ignore.
Now you can build the solution (except the installer when using Visual Studio Express).
Building from the command line
==============================
All is built using MSBuild. Please see Microsoft documentation for details. Briefly:
- Open a Developer Command Prompt for VS2022
- Change current directory to the location of the source code.
- Use the following to build for various configurations and platforms:
"%VSINSTALLDIR%vc\Auxiliary\Build\vcvarsall" x86
MSBuild XecretsFileClassic.sln /p:Configuration=Debug;Platform=Win32
MSBuild XecretsFileClassic.sln /p:Configuration=Release;Platform=Win32
"%VSINSTALLDIR%vc\Auxiliary\Build\vcvarsall" amd64
MSBuild XecretsFileClassic.sln /p:Configuration=Debug;Platform=x64
MSBuild XecretsFileClassic.sln /p:Configuration=Release;Platform=x64
- There is a command file 'Build.cmd' in the Xecrets File Classic solution folder that does this.
You need to build the Win32 Platform in order to build x64, since the installer contains references to executables that are only built
in for Win32 (i.e. x86 - Microsoft can't decide what name to use...).