-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.html
477 lines (472 loc) · 28.8 KB
/
README.html
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<title>Compiling Virtualbox on Windows</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
<link href="https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.css" rel="stylesheet" type="text/css">
<style>
.task-list-item { list-style-type: none; } .task-list-item-checkbox { margin-left: -20px; vertical-align: middle; }
</style>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'Ubuntu', 'Droid Sans', sans-serif;
font-size: 14px;
line-height: 1.6;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/katex-copytex@latest/dist/katex-copytex.min.js"></script>
</head>
<body>
<h1 id="compiling-virtualbox-on-windows">Compiling Virtualbox on Windows</h1>
<h2 id="attempt-2-log">Attempt #2 Log</h2>
<p>Entire process was copied from <a href="https://habr.com/en/post/447300/">CaptainFlint's blog post</a></p>
<p>The following is just a log of what I was able to get completed.</p>
<hr>
<h3 id="april-26-2019">April 26, 2019</h3>
<p><strong>Note: First the dev environment must be created. For my sanity and resetting/reproducing results I used a Hyper-V virtual machine.</strong></p>
<h3 id="create-dev-environment">Create Dev Environment:</h3>
<ul>
<li>Install Windows 10 on Hyper-V (Using Oct 2018 Update 1809) Create ISO (?) <a href="https://www.microsoft.com/en-us/software-download/windows10">Link</a>
<ul>
<li>How to enable <a href="https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v">Hyper-V</a></li>
<li>Do all available updates for Windows. In updates options, turn on updates for other MS products.</li>
</ul>
</li>
<li>Install Visual Studio 2010 Premium (Trial) (Web Installer). <a href="https://my.visualstudio.com/Downloads?q=visual%20studio%202010&wt.mc_id=o~msft~vscom~older-downloads">Link</a>
<ul>
<li>This requires free(?) subscription to Microsoft Dev Essentials. <a href="https://visualstudio.microsoft.com/dev-essentials/">Link</a></li>
<li>Do all available updates for Windows again. Ensure Service Pack 1 for Visual Studio 2019 gets install.
<ul>
<li>There were 8 updates when I did this.</li>
</ul>
</li>
<li>Then update again.</li>
<li>Uninstall all "Microsoft Visual C++ <*>" from Windows.</li>
</ul>
</li>
<li>Install Windows SDK v7.1 <a href="https://www.microsoft.com/en-us/download/details.aspx?id=8279">Link</a></li>
<li>Install Windows Driver Development Kit (WDK) v7.1 <a href="https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11800">Link</a></li>
<li>Install Visual C++ 2010 SP1 Compiler Update for SDK v7.1 <a href="https://www.microsoft.com/en-us/download/details.aspx?id=4422">Link</a>
<ul>
<li>Check for Windows updates again.</li>
</ul>
</li>
<li>Install Windows SDK v8.1 <a href="https://dev.windows.com/downloads/windows-8-1-sdk">Link</a>
<ul>
<li>Installed to C:\Programs\DevKits\8.1\</li>
</ul>
</li>
<li>Install ActivePerl <a href="https://www.activestate.com/products/activeperl/downloads/">Link</a>
<ul>
<li>Install to directory <code>C:\Programs\Perl\</code></li>
</ul>
</li>
<li>Install ActivePython <a href="https://www.activestate.com/products/activepython/downloads/">Link</a>
<ul>
<li>Install to directory <code>C:\Programs\Python\</code></li>
</ul>
</li>
<li>Install Windows Driver Development Kit v7.1 <a href="https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11800">Link</a>
<ul>
<li>Will require auto installation of more .NET frameworks.</li>
</ul>
</li>
</ul>
<p>Shut down and saved Hyper-V checkpoint.</p>
<hr>
<h3 id="april-27-2019">April 27, 2019</h3>
<p><strong>Attempt to finish dev environment.</strong></p>
<ul>
<li>
<p>Install WiX 311 <a href="http://wixtoolset.org/">Link</a></p>
<ul>
<li>Install binaries version to <code>C:\Programs\WiX</code></li>
</ul>
</li>
<li>
<p>Install cygwin <a href="https://cygwin.com/install.html">Link</a></p>
<ul>
<li>Install x64 to <code>C:\Programs\cygwin64</code></li>
<li>Add the packages <code>make</code> and <code>yasm</code></li>
</ul>
</li>
<li>
<p>Download and extract Qt 5.6.3 source <a href="http://download.qt.io/official_releases/qt/5.6/5.6.3/single/qt-everywhere-opensource-src-5.6.3.zip">Link</a></p>
<ul>
<li>
<p>Extract to <code>C:\Programs\Qt</code></p>
</li>
<li>
<p>Rename folder extracted to <code>5.6.3-src</code>.</p>
</li>
<li>
<p>Create folder <code>build-x32</code> and <code>build-x64</code> next to it.</p>
</li>
<li>
<p>Run the following commands from a cmd prompt:</p>
<pre><code class="language-powershell"><div>cd /d C:\Programs\Qt\build-x32
SET QTVER=<span class="hljs-number">5.6</span>.<span class="hljs-number">3</span>
<span class="hljs-string">"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd"</span> /Release /x86 /win7
COLOR <span class="hljs-number">07</span>
SET QTDIR=C:\Programs\Qt\%QTVER%-x32
SET PATH=%QTDIR%\bin;%PATH%
SET QMAKESPEC=win32-msvc2010
..\<span class="hljs-number">5.6</span>.<span class="hljs-number">3</span>-src\configure.bat -prefix c:\Programs\Qt\<span class="hljs-number">5.6</span>.<span class="hljs-number">3</span>-x32 -mp -opensource -confirm-license -nomake tests -nomake examples -no-compile-examples -release -shared -pch -no-ltcg -accessibility -no-sql-sqlite -opengl desktop -no-openvg -no-nis -no-iconv -no-evdev -no-mtdev -no-inotify -no-eventfd -largefile -no-system-proxies -qt-zlib -qt-pcre -no-icu -qt-libpng -qt-libjpeg -qt-freetype -no-fontconfig -qt-harfbuzz -no-angle -incredibuild-xge -no-plugin-manifests -qmake -qreal double -rtti -strip -no-ssl -no-openssl -no-libproxy -no-dbus -no-audio-backend -no-wmf-backend -no-qml-debug -no-direct2d -directwrite -no-style-fusion -native-gestures -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtconnectivity -skip qtdeclarative -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns
</div></code></pre>
</li>
<li>
<p>Edit file <code>C:\Programs\Qt\build-x32\qtbase\src\corelib\global\qconfig.cpp</code></p>
<p>Change the following line:</p>
<pre><code class="language-cpp"><div><span class="hljs-keyword">static</span> <span class="hljs-keyword">const</span> <span class="hljs-keyword">char</span> qt_configure_prefix_path_str [<span class="hljs-number">512</span> + <span class="hljs-number">12</span>] = <span class="hljs-string">"qt_prfxpath=c:/Programs/Qt/5.6.3-x32"</span>;
</div></code></pre>
<p>To:</p>
<pre><code class="language-cpp"><div><span class="hljs-keyword">static</span> <span class="hljs-keyword">const</span> <span class="hljs-keyword">char</span> qt_configure_prefix_path_str [<span class="hljs-number">512</span> + <span class="hljs-number">12</span>] = <span class="hljs-string">"qt_prfxpath=."</span>;
</div></code></pre>
</li>
<li>
<p>Run <code>nmake</code></p>
</li>
<li>
<p>Run <code>nmake install</code></p>
</li>
<li>
<p>Next we do the same for x64</p>
</li>
<li>
<p>Open a new command prompt</p>
<pre><code class="language-powershell"><div>md C:\Programs\Qt\build-x64
cd /d C:\Programs\Qt\build-x64
SET QTVER=<span class="hljs-number">5.6</span>.<span class="hljs-number">3</span>
<span class="hljs-string">"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd"</span> /Release /x64 /win7
COLOR <span class="hljs-number">07</span>
SET QTDIR=C:\Programs\Qt\%QTVER%-x64
SET PATH=%QTDIR%\bin;%PATH%
SET QMAKESPEC=win32-msvc2010
..\<span class="hljs-number">5.6</span>.<span class="hljs-number">3</span>-src\configure.bat -prefix c:\Programs\Qt\<span class="hljs-number">5.6</span>.<span class="hljs-number">3</span>-x64 -mp -opensource -confirm-license -nomake tests -nomake examples -no-compile-examples -release -shared -pch -no-ltcg -accessibility -no-sql-sqlite -opengl desktop -no-openvg -no-nis -no-iconv -no-evdev -no-mtdev -no-inotify -no-eventfd -largefile -no-system-proxies -qt-zlib -qt-pcre -no-icu -qt-libpng -qt-libjpeg -qt-freetype -no-fontconfig -qt-harfbuzz -no-angle -incredibuild-xge -no-plugin-manifests -qmake -qreal double -rtti -strip -no-ssl -no-openssl -no-libproxy -no-dbus -no-audio-backend -no-wmf-backend -no-qml-debug -no-direct2d -directwrite -no-style-fusion -native-gestures -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtconnectivity -skip qtdeclarative -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns
</div></code></pre>
</li>
<li>
<p>Edit file <code>C:\Programs\Qt\build-x64\qtbase\src\corelib\global\qconfig.cpp</code></p>
<p>Change the following line:</p>
<pre><code class="language-cpp"><div><span class="hljs-keyword">static</span> <span class="hljs-keyword">const</span> <span class="hljs-keyword">char</span> qt_configure_prefix_path_str [<span class="hljs-number">512</span> + <span class="hljs-number">12</span>] = <span class="hljs-string">"qt_prfxpath=c:/Programs/Qt/5.6.3-x64"</span>;
</div></code></pre>
<p>To:</p>
<pre><code class="language-cpp"><div><span class="hljs-keyword">static</span> <span class="hljs-keyword">const</span> <span class="hljs-keyword">char</span> qt_configure_prefix_path_str [<span class="hljs-number">512</span> + <span class="hljs-number">12</span>] = <span class="hljs-string">"qt_prfxpath=."</span>;
</div></code></pre>
</li>
<li>
<p>Run <code>nmake</code></p>
</li>
<li>
<p>Run <code>nmake install</code></p>
</li>
<li>
<p>Safe to delete src and build directories.</p>
</li>
</ul>
</li>
<li>
<p>Download and extract 32 and 64 bit MinGW archives.</p>
<ul>
<li><a href="https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.5-release/i686-w64-mingw32-gcc-4.5.4-release-win32_rubenvb.7z/download">32bit</a> to <code>C:\Programs\mingw32</code></li>
<li><a href="https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.5-release/x86_64-w64-mingw32-gcc-4.5.4-release-win64_rubenvb.7z/download">64bit</a> to <code>C:\Programs\mingw64</code></li>
</ul>
</li>
<li>
<p>Download and extract NASM <a href="https://www.nasm.us/">Link</a></p>
<ul>
<li>Extract to <code>C:\Programs\</code> rename directory to <code>nasm</code></li>
</ul>
</li>
<li>
<p>Download and extract OpenSSL <a href="https://www.openssl.org/source/">Link</a></p>
<ul>
<li>Extract twice into <code>C:\Programs\OpenSSL\openssl-1.1.1b-x32</code> and <code>openssl-1.1.1b-x64</code>.</li>
<li>Run to make the 32bit version:<pre><code class="language-powershell"><div><span class="hljs-string">"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd"</span> /Release /x86 /win7
COLOR <span class="hljs-number">07</span>
set PATH=%PATH%;C:\Programs\nasm
cd /d C:\Programs\OpenSSL\openssl-<span class="hljs-number">1.1</span>.<span class="hljs-number">1</span>b-x32\
perl Configure VC-WIN32 no-shared --prefix=C:\Programs\OpenSSL\x32 --openssldir=C:\Programs\OpenSSL\x32\ssl
nmake
nmake test
nmake install
</div></code></pre>
<strong>Ignore warnings during <code>perl Configure</code></strong></li>
<li>Run to make the 64bit version (Start a new console.):<pre><code class="language-powershell"><div><span class="hljs-string">"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd"</span> /Release /x64 /win7
COLOR <span class="hljs-number">07</span>
set PATH=%PATH%;C:\Programs\nasm
cd /d C:\Programs\OpenSSL\openssl-<span class="hljs-number">1.1</span>.<span class="hljs-number">1</span>b-x64\
perl Configure VC-WIN64A no-shared --prefix=C:\Programs\OpenSSL\x64 --openssldir=C:\Programs\OpenSSL\x64\ssl
nmake
nmake test
nmake install
</div></code></pre>
<strong>Again, ignore warnings during <code>perl Configure</code></strong></li>
<li>Delete build directories <code>C:\Programs\OpenSSL\openssl-1.1.1b-x32</code> and <code>openssl-1.1.1b-x64</code></li>
</ul>
</li>
<li>
<p>Download and extract SDL v1.2.x. Development Libraries for Visual C++ <a href="http://www.libsdl.org/download-1.2.php">Link</a></p>
<ul>
<li>Extract to <code>C:\Programs\SDL\x32</code> and <code>C:\Programs\SDL\x64</code>.
<ul>
<li>Move contents of <code>C:\Programs\SDL\x32\lib\x86</code> into parent directory.</li>
<li>Move contents of <code>C:\Programs\SDL\x64\lib\x64</code> into parent directory.</li>
</ul>
</li>
</ul>
</li>
<li>
<p>Download and extract cURL source code <a href="https://curl.haxx.se/download.html">Link</a></p>
<ul>
<li>Extract to <code>C:\Programs\curl\</code> and rename subdirectory to <code>curl-7.64.1-x32</code></li>
<li>Edit <code>C:\Programs\curl\curl-7.64.1-x32\winbuild\MakefileBuild.vc</code></li>
<li>After the following <code>!IF "$(VC)"=="6"</code> add:<pre><code class="language-vc"><div>CFLAGS = $(CFLAGS) /DCURL_DISABLE_LDAP
</div></code></pre>
</li>
<li>Open <code>C:\Programs\curl\curl-7.64.1-x32\winbuild\gen_resp_file.bat</code>
<ul>
<li>Add <code>cd .</code> after line 1.</li>
</ul>
</li>
<li>Copy <code>curl-7.64.1-x32</code> to <code>curl-7.64.1-x64</code></li>
<li>Build the 32 and 64 bit version with the following:<pre><code class="language-bat"><div>"C:\Program Files\Microsoft SDKs\Windows\v7.<span class="hljs-number">1</span>\Bin\SetEnv.<span class="hljs-built_in">Cmd</span>" /Release /x86 /win7
<span class="hljs-built_in">COLOR</span> <span class="hljs-number">07</span>
<span class="hljs-built_in">cd</span> /d C:\Programs\curl\curl-<span class="hljs-number">7</span>.<span class="hljs-number">64</span>.<span class="hljs-number">1</span>-x32\winbuild
<span class="hljs-built_in">md</span> C:\Programs\curl\x32
nmake /f Makefile.vc <span class="hljs-built_in">mode</span>=static WITH_SSL=static DEBUG=no MACHINE=x86 SSL_PATH=C:\Programs\OpenSSL\x32 ENABLE_SSPI=no ENABLE_WINSSL=no ENABLE_IDN=no
<span class="hljs-built_in">copy</span> ..\builds\libcurl-vc-x86-release-static-ssl-static-ipv6\lib\libcurl_a.lib ..\..\x32\libcurl.lib
<span class="hljs-built_in">xcopy</span> /E ..\builds\libcurl-vc-x86-release-static-ssl-static-ipv6\include\curl ..\..\x32\include\curl\
</div></code></pre>
<pre><code class="language-bat"><div>"C:\Program Files\Microsoft SDKs\Windows\v7.<span class="hljs-number">1</span>\Bin\SetEnv.<span class="hljs-built_in">Cmd</span>" /Release /x64 /win7
<span class="hljs-built_in">COLOR</span> <span class="hljs-number">07</span>
<span class="hljs-built_in">cd</span> /d C:\Programs\curl\curl-<span class="hljs-number">7</span>.<span class="hljs-number">64</span>.<span class="hljs-number">1</span>-x64\winbuild
<span class="hljs-built_in">md</span> C:\Programs\curl\x64
nmake /f Makefile.vc <span class="hljs-built_in">mode</span>=static WITH_SSL=static DEBUG=no MACHINE=x64 SSL_PATH=C:\Programs\OpenSSL\x64 ENABLE_SSPI=no ENABLE_WINSSL=no ENABLE_IDN=no
<span class="hljs-built_in">copy</span> ..\builds\libcurl-vc-x64-release-static-ssl-static-ipv6\lib\libcurl_a.lib ..\..\x64\libcurl.lib
<span class="hljs-built_in">xcopy</span> /E ..\builds\libcurl-vc-x64-release-static-ssl-static-ipv6\include\curl ..\..\x64\include\curl\
<span class="hljs-built_in">copy</span> ..\builds\libcurl-vc-x64-release-static-ssl-static-ipv6\bin\curl.exe ..\..\x64\curl.exe
</div></code></pre>
</li>
</ul>
</li>
<li>
<p>Download and extract libvpx 1.7.0 (not newer) <a href="https://github.com/webmproject/libvpx/releases">Link</a></p>
<ul>
<li>Extract to <code>C:\Programs\libvpx-build\</code></li>
<li>Launch Cygwin terminal<pre><code class="language-bash"><div>mkdir -p /cygdrive/c/Programs/libvpx-build/build32
<span class="hljs-built_in">cd</span> /cygdrive/c/Programs/libvpx-build/build32
../libvpx-1.7.0/configure --target=x86-win32-vs10 --<span class="hljs-built_in">disable</span>-install-bins --<span class="hljs-built_in">disable</span>-examples --<span class="hljs-built_in">disable</span>-tools --<span class="hljs-built_in">disable</span>-docs --prefix=../../libvpx
make
<span class="hljs-string">"/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/devenv.com"</span> vpx.sln /Project vpx.vcxproj /Rebuild <span class="hljs-string">"Release|Win32"</span>
make install
mkdir -p /cygdrive/c/Programs/libvpx-build/build64
<span class="hljs-built_in">cd</span> /cygdrive/c/Programs/libvpx-build/build64
../libvpx-1.7.0/configure --target=x86_64-win64-vs10 --<span class="hljs-built_in">disable</span>-install-bins --<span class="hljs-built_in">disable</span>-examples --<span class="hljs-built_in">disable</span>-tools --<span class="hljs-built_in">disable</span>-docs --prefix=../../libvpx
make
<span class="hljs-string">"/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/devenv.com"</span> vpx.sln /Project vpx.vcxproj /Rebuild <span class="hljs-string">"Release|x64"</span>
make install
</div></code></pre>
<strong>After each make command there will be errors. Just keep going to make install</strong></li>
</ul>
</li>
<li>
<p>Download and extract libopus <a href="http://opus-codec.org/downloads/">Link</a></p>
<ul>
<li>Extract to <code>C:\Programs\libopus-build\</code></li>
<li>Open <code>opus.vcxproj</code> and change all <code>v140</code> to <code>v100</code></li>
<li>Find <code><ClCompile></code> and add <code><DebugInformationFormat>ProgramDatabase</DebugInformationFormat></code></li>
<li>Run the following:<pre><code class="language-powershell"><div>cd /d C:\Programs\libopus-build\opus-<span class="hljs-number">1.3</span>\win32\VS2015
md C:\Programs\libopus\lib\x64
md C:\Programs\libopus\lib\Win32
xcopy /E C:\Programs\libopus-build\opus-<span class="hljs-number">1.3</span>\include C:\Programs\libopus\include\
<span class="hljs-string">"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com"</span> opus.sln /Project opus.vcxproj /Rebuild <span class="hljs-string">"Release|x64"</span>
copy x64\Release\opus.lib C:\Programs\libopus\lib\x64\
<span class="hljs-string">"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com"</span> opus.sln /Project opus.vcxproj /Rebuild <span class="hljs-string">"Release|Win32"</span>
copy Win32\Release\opus.lib C:\Programs\libopus\lib\Win32\
</div></code></pre>
</li>
</ul>
</li>
<li>
<p>Download and extract gSOAP 2.8.41 or higher <a href="https://sourceforge.net/projects/gsoap2/files/gsoap-2.8/">Link</a></p>
<ul>
<li>Open archive, inside <code>gsoap-2.8\gsoap</code> extract to <code>C:\Programs\gSOAP\</code>.</li>
</ul>
</li>
<li>
<p>Download and extract DocBook XML DTD 4.5 <a href="http://www.oasis-open.org/docbook/xml/4.5/docbook-xml-4.5.zip">Link</a></p>
<ul>
<li>Extract to <code>C:\Programs\DocBook\xml\</code></li>
</ul>
</li>
<li>
<p>Download and extract DocBook XSL Stylesheets 1.69.1 <a href="https://sourceforge.net/projects/docbook/files/OldFiles/docbook-xsl-1.69.1.zip/download">Link</a></p>
<ul>
<li>Extract to <code>C:\Programs\DocBook\xsl\</code></li>
</ul>
</li>
<li>
<p>Download MiKTeX Portable <a href="https://miktex.org/download">Link</a></p>
<ul>
<li>Extract to <code>C:\Programs\MiKTeX\</code></li>
<li>Run:<pre><code class="language-powershell"><div><span class="hljs-string">"C:\Programs\MiKTeX\texmfs\install\miktex\bin\mpm.exe"</span> --verbose --install=koma-script --install=ucs --install=tabulary --install=url --install=fancybox --install=fancyvrb --install=bera --install=charter --install=mptopdf
</div></code></pre>
</li>
</ul>
</li>
<li>
<p>Download VirtualBox source code. Put it in <code>C:\Devel\VirtualBox-src</code></p>
<ul>
<li>I used the svn co from the <a href="http://virtualbox.org">virtualbox.org</a> site. This is >6.0.6. The instructions I am using are for 6.0.4. I was able to find sources from non-official sites for 6.0.4. The subversion checkout would not compile correctly.</li>
<li><a href="https://fossies.org/">https://fossies.org/</a> has mirrored versions.</li>
</ul>
</li>
<li>
<p>Add certificates. Run the following:</p>
<pre><code class="language-powershell"><div><span class="hljs-string">"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd"</span> /Release /x64 /win7
COLOR <span class="hljs-number">07</span>
makecert.exe -a sha1 -r -pe -ss my -n <span class="hljs-string">"CN=<cert name>"</span> C:\Devel\testcert_1.cer
makecert.exe -a sha256 -r -pe -ss my -n <span class="hljs-string">"CN=<cert name>"</span> C:\Devel\testcert_256.cer
certmgr.exe -add C:\Devel\testcert_1.cer -s -r localMachine root
certmgr.exe -add C:\Devel\testcert_256.cer -s -r localMachine root
</div></code></pre>
<ul>
<li>Run <code>certmgr.src</code> and copy the fingerprints for the new certs created to a text file.</li>
</ul>
</li>
<li>
<p>Building xmllint from VirtualBox-src</p>
<ul>
<li>Copy <code>C:\Devel\VirtualBox-src\src\libs\libxml2-2.9.4</code> into <code>C:\Programs\</code></li>
<li>Run:<pre><code class="language-powershell"><div><span class="hljs-string">"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd"</span> /Release /x64 /win7
COLOR <span class="hljs-number">07</span>
cd /d C:\Programs\libxml2-<span class="hljs-number">2.9</span>.<span class="hljs-number">4</span>\win32
cscript.exe configure.js cruntime=/MT prefix=C:\Programs\xmllint iconv=no
nmake /f Makefile.msvc
nmake /f Makefile.msvc install
</div></code></pre>
</li>
<li>Remove `C:\Programs\libxml2-2.9.4</li>
</ul>
</li>
<li>
<p>Apply the <a href="https://github.com/CaptainFlint/virtualbox-winbuild-article/blob/master/misc/vbox_build.patch">patch</a> manually or using a patch tool. I did this manually to verify there were no version changes.</p>
<p><strong>Note: It looks like the doc files were changed in 6.0.6. That file may not need modification. Will test after first successful/failed compile.</strong></p>
</li>
<li>
<p>Create a LocalConfig.kmk file in the root source tree.</p>
<pre><code class="language-config"><div>VBOX_WITH_HARDENING :=
VBOX_PATH_WIX := C:\Programs\WiX
VBOX_GSOAP_INSTALLED := 1
VBOX_PATH_GSOAP := C:\Programs\gSOAP
VBOX_WITH_COMBINED_PACKAGE := 1
VBOX_WITH_QT_PAYLOAD := 1
VBOX_WITH_QTGUI_V5 := 1
VBOX_SIGNING_MODE := release
VBOX_CERTIFICATE_SUBJECT_NAME := <cert name>
VBOX_CERTIFICATE_FINGERPRINT := XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
VBOX_CERTIFICATE_SHA2_SUBJECT_NAME := <cert name>
VBOX_CERTIFICATE_SHA2_FINGERPRINT := XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
VBOX_TSA_URL := http://timestamp.digicert.com
VBOX_TSA_SHA2_URL := http://timestamp.digicert.com
VBOX_TSA_URL_ARGS := /t "$(VBOX_TSA_URL)"
VBOX_TSA_SHA2_URL_ARGS := /tr "$(VBOX_TSA_SHA2_URL)" /td sha256
VBOX_CROSS_CERTIFICATE_FILE :=
VBOX_CROSS_CERTIFICATE_FILE_ARGS :=
VBOX_CROSS_CERTIFICATE_SHA2_FILE :=
VBOX_CROSS_CERTIFICATE_SHA2_FILE_ARGS :=
VBOX_PATH_SIGN_TOOLS := C:\Programs\DevKits\8.1\bin\x64
VBOX_PATH_SELFSIGN := C:\WinDDK\7600.16385.1\bin\selfsign
VBOX_PATH_WISUMINFO := "C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\sysmgmt\msi\scripts\WiSumInf.vbs"
VBOX_PATH_WISUBSTG := "C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\sysmgmt\msi\scripts\WiSubStg.vbs"
VBOX_WITH_DOCS := 1
VBOX_WITH_DOCS_CHM := 1
VBOX_WITH_DOCS_PACKING := 1
VBOX_WITH_ADDITIONS :=
VBOX_WITH_ADDITIONS_PACKING := 1
VBOX_HAVE_XMLLINT := 1
VBOX_XMLLINT := C:\Programs\xmllint\bin\xmllint.exe
VBOX_PATH_DOCBOOK := C:/Programs/DocBook/xsl
VBOX_PATH_DOCBOOK_DTD := C:/Programs/DocBook/xml
VBOX_PATH_HTML_HELP_WORKSHOP := "C:\Program Files (x86)\HTML Help Workshop"
VBOX_PDFLATEX := C:\Programs\MiKTeX\texmfs\install\miktex\bin\pdflatex.exe
VBOX_PDFLATEX_CMD := $(VBOX_PDFLATEX) -halt-on-error -interaction batchmode
TOOL_CURL_FETCH := C:\Programs\curl\x64\curl.exe
PATH_TOOL_NASM := C:/Programs/nasm
VBOX_INSTALLER_LANGUAGES := en_US
VBOX_WITH_TESTCASES :=
VBOX_WITH_VALIDATIONKIT :=
VBOX_WITH_VBOX_IMG := 1
VBOX_WITH_RECORDING := 1
VBOX_WITH_AUDIO_RECORDING := 1
SDK_VBOX_VPX := 1
VBOX_WITH_LIBVPX := 1
SDK_VBOX_OPUS := 1
VBOX_WITH_LIBOPUS := 1
VBOX_BUILD_PUBLISHER := _OSE
</div></code></pre>
<ul>
<li>Change the VBOX_CERT lines to match the certs created earlier.</li>
</ul>
</li>
</ul>
<p><strong>Development environment is complete. Celebratory beer!</strong></p>
<p>Now we compile VBox:</p>
<ul>
<li>Compile, starting with 64 bit version.<pre><code class="language-powershell"><div>cd /d C:\Devel\VirtualBox-src
<span class="hljs-string">"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd"</span> /Release /x64 /win7
COLOR <span class="hljs-number">07</span>
set BUILD_TARGET_ARCH=amd64
cscript configure.vbs --with-DDK=C:\WinDDK\<span class="hljs-number">7600.16385</span>.<span class="hljs-number">1</span> --with-MinGW-w64=C:\Programs\mingw64 --with-MinGW32=C:\Programs\mingw32 --with-libSDL=C:\Programs\SDL\x64 --with-openssl=C:\Programs\OpenSSL\x64 --with-openssl32=C:\Programs\OpenSSL\x32 --with-libcurl=C:\Programs\curl\x64 --with-libcurl32=C:\Programs\curl\x32 --with-Qt5=C:\Programs\Qt\<span class="hljs-number">5.6</span>.<span class="hljs-number">3</span>-x64 --with-libvpx=C:\Programs\libvpx --with-libopus=C:\Programs\libopus --with-python=C:/Programs/Python
env.bat
kmk
kmk C:/Devel/VirtualBox-src/out/win.x86/release/obj/Installer/VirtualBox-<span class="hljs-number">6.0</span>.<span class="hljs-number">4</span>_OSE-r128164-MultiArch_amd64.msi
</div></code></pre>
Compile notes:
<ol>
<li>Mine failed on the kmk command. There was a permission error. I manually changed the folder causing problems to not be read only and reran the kmk command.</li>
<li>Failed again with permission errors. Reextracted source for 6.0.4. Applied patch using a python patch tool.</li>
<li>Failed again with permission errors. Reset security settings on source folder. Try and download a clean copy not using svn?</li>
<li>Ignore Compile Warning C4946 <a href="https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4946?view=vs-2019">Link</a></li>
</ol>
</li>
</ul>
<p>At this point I was still getting compiler errors and numerous permission denied errors. I re-extracted the 6.0.4 again and patched.</p>
<hr>
<h3 id="april-28-2019">April 28, 2019</h3>
<p>Reran the 64bit compilation. Unchecking any folder that gave permission denied errors until it finished.</p>
<ul>
<li>
<p>Compile the 32 bit version:</p>
<pre><code class="language-powershell"><div>cd /d C:\Devel\VirtualBox-src
<span class="hljs-string">"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd"</span> /Release /x86 /win7
COLOR <span class="hljs-number">07</span>
set BUILD_TARGET_ARCH=x86
cscript configure.vbs --with-DDK=C:\WinDDK\<span class="hljs-number">7600.16385</span>.<span class="hljs-number">1</span> --with-MinGW-w64=C:\Programs\mingw64 --with-MinGW32=C:\Programs\mingw32 --with-libSDL=C:\Programs\SDL\x32 --with-openssl=C:\Programs\OpenSSL\x32 --with-libcurl=C:\Programs\curl\x32 --with-Qt5=C:\Programs\Qt\<span class="hljs-number">5.6</span>.<span class="hljs-number">3</span>-x32 --with-libvpx=C:\Programs\libvpx --with-libopus=C:\Programs\libopus --with-python=C:/Programs/Python
env.bat
kmk
kmk C:/Devel/VirtualBox-src/out/win.x86/release/bin/VirtualBox-<span class="hljs-number">6.0</span>.<span class="hljs-number">4</span>_OSE-r128164-MultiArch.exe
</div></code></pre>
<p>Compile notes:</p>
<ol>
<li>The 32bit version also had number permission denied errors. But not as many as the 64bit.</li>
</ol>
<p>We now have the installer in <code>out/win.x86/release/bin/</code>.</p>
</li>
</ul>
<p><img src="file:///d:\Drive\Documents\School\VBox\images\2019-04-28_01_49_18-Window.png" alt="First"></p>
<p><img src="file:///d:\Drive\Documents\School\VBox\images\2019-04-28_01_51_36-Window.png" alt="Second"></p>
<p><img src="file:///d:\Drive\Documents\School\VBox\images\2019-04-28_12_55_27-Window.png" alt="Third"></p>
<p><img src="file:///d:\Drive\Documents\School\VBox\images\2019-04-28_13_12_48-Window.png" alt="Success"></p>
<p>Final thoughts/TODO:</p>
<ol>
<li>Figure out why there are permission errors in my setup. Could be a windows user/process elevation issue? Except the folders were owned by <code>everyone</code>, they are just getting set to <code>readonly</code>. It appears all folders are set this way but only a few steps fail with <code>Permission Denied</code> errors. Unchecking the <code>readonly</code> flag and rerunning kmk works.</li>
<li>Attempt to compile from subversion and/or 6.0.6 again.</li>
<li>Compiled with outdated VS 2010 Premium, can keys still be obtained? Currently using trial version.</li>
</ol>
</body>
</html>