Ā» Problem statement
Ā» A pair of warnings
Ā» Cooking environment
Ā» Features of installing programs
Ā» Finishing Touches
Ā» Putting VirtualBox
Ā» Epilogue
Ā» Add-ons
Text::Template
wix311-binaries.zip
).LocalConfig.kmk
file (see below).VBoxSDL.exe
, a minimalist alternative to the standard VirtualBox.exe
shell, is based on this library. If you do not need VBoxSDL, then maybe you can do without the SDL library, but I did not check it.VBoxWebSrv.exe
. The absence of gSOAP is not a critical error, VB will successfully assemble without this service.doc\UserManual.pdf
). The absence of MiKTeX is not a critical error; VB will successfully assemble without PDF documentation.{x32|x64}
ā indicates that the package is installed in two different directories for the 32-bit and 64-bit versions.Program | Version | Installation path |
---|---|---|
Visual studio | 2010 Professional | C:\Program Files (x86)\Microsoft Visual Studio 10.0\ |
Sdk | 7.1 | C:\Program Files\Microsoft SDKs\Windows\v7.1\ |
Sdk | 8.1 | C:\Programs\DevKits\8.1\ |
WDK | 7.1.0 | C:\WinDDK\7600.16385.1\ |
ActivePerl | 5.26.1 Build 2601 x64 | C:\Programs\Perl\ |
ActivePython | 2.7.14.2717 x64 | C:\Programs\Python\ |
WiX | 3.11.1.2318 | C:\Programs\WiX\ |
Qt | 5.6.3 | C:\Programs\Qt\5.6.3-{x32|x64}\ |
MinGW-32 | 4.5.4 | C:\Programs\mingw32\ |
MinGW-64 | 4.5.4 | C:\Programs\mingw64\ |
Cygwin | - | C:\Programs\cygwin64\ |
SDL | 1.2.15 | C:\Programs\SDL\{x32|x64}\ |
cURL | 7.63.0 | C:\Programs\curl\{x32|x64}\ |
Openssl | 1.1.1a | C:\Programs\OpenSSL\{x32|x64}\ |
gSOAP | 2.8.77 | C:\Programs\gSOAP\ |
libvpx | 1.7.0 | C:\Programs\libvpx\ |
libopus | 1.3 | C:\Programs\libopus\ |
MiKTeX Portable | 2.9.5719 | C:\Programs\MiKTeX\ |
NASM | 2.13.03 x64 | C:\Programs\nasm\ |
DocBook XML DTD | 4.5 | C:\Programs\DocBook\xml\ |
DocBook XSL Stylesheets | 1.69.1 | C:\Programs\DocBook\xsl\ |
Text::Template
module, which is needed to build OpenSSL. This is done by the command: ppm install Text::Template
C:\Programs\Qt\
directory and rename the resulting qt-everywhere-opensource-src-5.6.3
subdirectory to 5.6.3-src
.build-x32
directory in which the build will take place. cd /d C:\Programs\Qt\build-x32 SET QTVER=5.6.3 "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x86 /win7 COLOR 07 SET QTDIR=C:\Programs\Qt\%QTVER%-x32 SET PATH=%QTDIR%\bin;%PATH% SET QMAKESPEC=win32-msvc2010
The color
command disables the green font color set by the SetEnv.Cmd
script.configure.bat
from the 5.6.3-src
directory. Since most Qt is not used in VB, you can speed up the build by disabling unnecessary components, but be aware that some VB options are very scrupulous. In particular, I came across the following: ..\5.6.3-src\configure.bat -prefix c:\Programs\Qt\5.6.3-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
-prefix
option) Qt writes inside the source code during configuration, so the compiled library will remember this path. This leads to the fact that when you start the Qt-application, by default it will look for plug-ins along this path, and only if nothing is found, it will refer to its own directory. In most situations, this works correctly, but if suddenly on the target machine in the c:\Programs\Qt\5.6.3-x32
directory there appears a different Qt build (with different flags), then VB will crash when launched.
qt.conf
file with contents to the VB directory: [Paths] Plugins=.
or correct the settings saved in Qt so that it defaults to the program directory. I went the second way, so that the final installation of VB looked more accurate. To do this, open the file C:\Programs\Qt\build-x32\qtbase\src\corelib\global\qconfig.cpp
, which was created by the configurator, to find a line like this: static const char qt_configure_prefix_path_str [512 + 12] = "qt_prfxpath=c:/Programs/Qt/5.6.3-x32";
and replace there all the way to a point to get the following: static const char qt_configure_prefix_path_str [512 + 12] = "qt_prfxpath=.";
The Qt installation will still be executed in the directory specified earlier, because it is already saved in Makefiles. This change will only affect the behavior of Qt programs when they are started.nmake
nmake install
command cd /d C:\Programs\Qt\build-x64 SET QTVER=5.6.3 "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x64 /win7 COLOR 07 SET QTDIR=C:\Programs\Qt\%QTVER%-x64 SET PATH=%QTDIR%\bin;%PATH% SET QMAKESPEC=win32-msvc2010
build-x32
, build-x64
and 5.6.3-src
directories can be deleted.
make
and yasm
packages
C:\Programs\SDL\x32\
and C:\Programs\SDL\x64\
.C:\Programs\SDL\x64\lib\x64\
to a higher level (in C:\Programs\SDL\x64\lib\
), the directories C:\Programs\SDL\x64\lib\x86
and x64
deleted .C:\Programs\SDL\x32\lib\x86\
to a higher level, delete the C:\Programs\SDL\x32\lib\x86
and x64
directories.nasm-2.13.03-win64.zip
archive into C:\Programs\
, rename the resulting nasm-2.13.03
to nasm
.
C:\Programs\OpenSSL\
directory, renaming the resulting subdirectory from openssl-1.1.1a
, respectively, to openssl-1.1.1a-x32
and openssl-1.1.1a-x64
. "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x86 /win7 COLOR 07 set PATH=%PATH%;C:\Programs\nasm cd /d C:\Programs\OpenSSL\openssl-1.1.1a-x32\ perl Configure VC-WIN32 no-shared --prefix=C:\Programs\OpenSSL\x32 --openssldir=C:\Programs\OpenSSL\x32\ssl nmake nmake test nmake install
The configurator can give a scary message that, say, can not find the compiler. Do not pay attention, it is a little out of it.
PATH
variable from here and add the no-asm
parameter to the Configure
call. "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x64 /win7 COLOR 07 set PATH=%PATH%;C:\Programs\nasm cd /d C:\Programs\OpenSSL\openssl-1.1.1a-x64\ perl Configure VC-WIN64A no-shared --prefix=C:\Programs\OpenSSL\x64 --openssldir=C:\Programs\OpenSSL\x64\ssl nmake nmake test nmake install
Denial of NASM is done similarly to the 32-bit version.C:\Programs\OpenSSL\openssl-1.1.1a-x32
and openssl-1.1.1a-x64
can be deleted.C:\Programs\curl\
directory, rename the resulting subdirectory from curl-7.63.0
to curl-7.63.0-x32
.C:\Programs\curl\curl-7.63.0-x32\winbuild\MakefileBuild.vc
in the editor, we find there in the area of āālines 61ā69 a conditional block like !IF "$(VC)"=="6" CC_NODEBUG = $(CC) /O2 /DNDEBUG CC_DEBUG = $(CC) /Od /Gm /Zi /D_DEBUG /GZ CFLAGS = /I. /I../lib /I../include /nologo /W4 /wd4127 /GX /DWIN32 /YX /FD /c /DBUILDING_LIBCURL !ELSE CC_NODEBUG = $(CC) /O2 /DNDEBUG CC_DEBUG = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd CFLAGS = /I. /I ../lib /I../include /nologo /W4 /wd4127 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL !ENDIF
and add a line after it: CFLAGS = $(CFLAGS) /DCURL_DISABLE_LDAP
If this is not done, then when linking VB, link errors will come up.C:\Programs\curl\curl-7.63.0-x32\winbuild\gen_resp_file.bat
, after the first line in it ( @echo OFF
) insert the command: cd .
This is a dummy command that does nothing, and its only task is to reset the ERRORLEVEL code. Otherwise, a situation may arise when this code is non-zero even before the batch file is started, and the batch file itself does not execute any commands that change the return code. As a result, nmake
believes that the batch file returned an error and interrupts the build.curl-7.63.0-x32
directory as curl-7.63.0-x64
. "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x86 /win7 COLOR 07 cd /d C:\Programs\curl\curl-7.63.0-x32\winbuild md C:\Programs\curl\x32 nmake /f Makefile.vc mode=static WITH_SSL=static DEBUG=no MACHINE=x86 SSL_PATH=C:\Programs\OpenSSL\x32 ENABLE_SSPI=no ENABLE_WINSSL=no ENABLE_IDN=no copy ..\builds\libcurl-vc-x86-release-static-ssl-static-ipv6\lib\libcurl_a.lib ..\..\x32\libcurl.lib xcopy /E ..\builds\libcurl-vc-x86-release-static-ssl-static-ipv6\include\curl ..\..\x32\include\curl\
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x64 /win7 COLOR 07 cd /d C:\Programs\curl\curl-7.63.0-x64\winbuild md C:\Programs\curl\x64 nmake /f Makefile.vc mode=static WITH_SSL=static DEBUG=no MACHINE=x64 SSL_PATH=C:\Programs\OpenSSL\x64 ENABLE_SSPI=no ENABLE_WINSSL=no ENABLE_IDN=no copy ..\builds\libcurl-vc-x64-release-static-ssl-static-ipv6\lib\libcurl_a.lib ..\..\x64\libcurl.lib xcopy /E ..\builds\libcurl-vc-x64-release-static-ssl-static-ipv6\include\curl ..\..\x64\include\curl\ copy ..\builds\libcurl-vc-x64-release-static-ssl-static-ipv6\bin\curl.exe ..\..\x64\curl.exe
Please note that, unlike the 32-bit version, here we also copy curl.exe
, we will need it later to download the image of guest add-ons.C:\Programs\curl\curl-7.63.0-x32
and curl-7.63.0-x64
.C:\Programs\libvpx-build\
directory.msbuild.exe
, which I could not get to work correctly in the existing environment. Instead, it turned out to be easier to launch a separate build by the Studio itself, since it allows you to work from the command line. However, you can perform this step using the graphical environment, if it is more familiar to someone, but in this case you will need to add the path C:\Programs\cygwin64\bin
to the PATH
variable (or otherwise specify it in the project), because there is an assembler, yasm.exe
, needed for building. So, in the terminal Cygwin run the following commands: mkdir -p /cygdrive/c/Programs/libvpx-build/build32 cd /cygdrive/c/Programs/libvpx-build/build32 ../libvpx-1.7.0/configure --target=x86-win32-vs10 --disable-install-bins --disable-examples --disable-tools --disable-docs --prefix=../../libvpx make "/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/devenv.com" vpx.sln /Project vpx.vcxproj /Rebuild "Release|Win32" make install mkdir -p /cygdrive/c/Programs/libvpx-build/build64 cd /cygdrive/c/Programs/libvpx-build/build64 ../libvpx-1.7.0/configure --target=x86_64-win64-vs10 --disable-install-bins --disable-examples --disable-tools --disable-docs --prefix=../../libvpx make "/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/devenv.com" vpx.sln /Project vpx.vcxproj /Rebuild "Release|x64" make install
C:\Programs\libvpx-build
can be deleted.C:\Programs\libopus-build\
directory, go to the opus-1.3\win32\VS2015
.opus.vcxproj
file in the editor (we do not need the other projects) and perform the following manipulations: <PlatformToolset>v140</PlatformToolset>
and change the version from v140
to v100
. If you are working in the IDE, then this option in the project settings is located on the Configuration Properties -> General page and is called āPlatrofm Toolsetā. Remember to select configurations and architectures in the drop-down lists at the top of the dialog. <ItemDefinitionGroup> <ClCompile>
and add the tag there: <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
In the Visual Studio project settings, this is done on the Configuration Properties -> C / C ++ -> General page by setting the āDebug Information Formatā option in āProgramDatabase (/ Zi)ā. As a matter of fact, any other valid value from the list will do, the base of debug information does not interest us, just if the value is invalid, the project refuses to be collected.opus.lib
and the include\
subdirectory into the target installation directory: cd /d C:\Programs\libopus-build\opus-1.3\win32\VS2015 md C:\Programs\libopus\lib\x64 md C:\Programs\libopus\lib\Win32 xcopy /EC:\Programs\libopus-build\opus-1.3\include C:\Programs\libopus\include\ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com" opus.sln /Project opus.vcxproj /Rebuild "Release|x64" copy x64\Release\opus.lib C:\Programs\libopus\lib\x64\ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com" opus.sln /Project opus.vcxproj /Rebuild "Release|Win32" copy Win32\Release\opus.lib C:\Programs\libopus\lib\Win32\
C:\Programs\libopus-build
can be deleted.gsoap-2.8\gsoap
and unpack the contents of this subdirectory in C:\Programs\gSOAP\
. To build correctly with OpenSSL 1.1.x, version 2.8.41 or higher is required. For earlier versions, you will need to impose a special patch (author: Mattias Ellert ). You can do this manually (the format is fairly obvious: open the files in turn, delete the lines marked with minuses, and add the marked positives; the rest of the lines help define the context), or you can take the standard patch utility ported for Windows and set it up.
C:\Programs\MiKTeX\
"C:\Programs\MiKTeX\miktex\bin\mpm.exe" --verbose --install=koma-script --install=ucs --install=tabulary --install=url --install=fancybox --install=fancyvrb --install=bera --install=charter --install=mptopdf
C:\Devel\
; I unpacked the source code archive into it and renamed the resulting directory to VirtualBox-src
.
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x64 /win7 COLOR 07 makecert.exe -a sha1 -r -pe -ss my -n "CN=Roga and Kopyta Ltd" C:\Devel\testcert_1.cer makecert.exe -a sha256 -r -pe -ss my -n "CN=Roga and Kopyta Ltd" 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
The name for the certificates (āRoga and Kopyta Ltdā) and the path to the files can be chosen at your discretion. Since the names are the same, you will need to use a digital fingerprint to distinguish between certificates. Open the certificate management console (run certmgr.msc
), open the list of personal certificates there. Double click on the first of the certificates āRoga and Kopyta Ltdā, in the opened dialog go to the Details tab. The Signature algorithm will indicate the signature algorithm: sha256RSA or sha1RSA. Further, at the very end of the list there will be a Thumbprint field with a value in the form of a sequence of hexadecimal numbers. Copy this value somewhere. Repeat the same for the second certificate. Be sure to note which one was sha256 and which one was sha1. (A simpler solution would be to give different names to the certificates, but two different signatures will look unaesthetic.)
C:\Programs\xmllint
.C:\Devel\VirtualBox-src\src\libs\libxml2-2.9.4
to C:\Programs\libxml2-2.9.4\
(it is necessary that the intermediate object files do not interfere with the assembly of the VB itself). "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x64 /win7 COLOR 07 cd /d C:\Programs\libxml2-2.9.4\win32 cscript.exe configure.js cruntime=/MT prefix=C:\Programs\xmllint iconv=no nmake /f Makefile.msvc nmake /f Makefile.msvc install
C:\Programs\libxml2-2.9.4
.C:\Devel\VirtualBox-src
and start:configure.vbs
file, do the following bullying with it: if Shell(DosSlashes(strPathVC & "/bin/cl.exe"), True) <> 0 then
and replace with the following: if Shell(DosSlashes(strPathVC & "/bin/cl.exe") & " /?", True) <> 0 then
This piece is responsible for finding and checking the compiler, but does not take into account that calling cl.exe
without arguments returns an error (which is treated as an inappropriate compiler). Adding the " /?
»Asks for help, and the return code is no longer erroneous.CheckForMinGW32Sub
function. 32- MinGW 3.3.3. 4.5.4, / , ( CheckForMinGWw64Sub
, ): function CheckForMinGW32Sub(strPathMingW32, strPathW32API) g_strSubOutput = "" if strPathW32API = "" then strPathW32API = strPathMingW32 LogPrint "trying: strPathMingW32=" &strPathMingW32 & " strPathW32API=" & strPathW32API if LogFileExists(strPathMingW32, "bin/gcc.exe") _ And LogFileExists(strPathMingW32, "bin/ld.exe") _ And LogFileExists(strPathMingW32, "bin/objdump.exe") _ And LogFileExists(strPathMingW32, "bin/dllwrap.exe") _ And LogFileExists(strPathMingW32, "bin/dlltool.exe") _ And LogFileExists(strPathMingW32, "bin/as.exe") _ And LogFileExists(strPathMingW32, "include/bfd.h") _ And LogFileExists(strPathMingW32, "lib32/libgcc_s.a") _ And LogFileExists(strPathMingW32, "i686-w64-mingw32/lib/dllcrt1.o") _ And LogFileExists(strPathMingW32, "i686-w64-mingw32/lib/dllcrt2.o") _ And LogFileExists(strPathMingW32, "i686-w64-mingw32/lib/libmsvcrt.a") _ And LogFileExists(strPathMingW32, "i686-w64-mingw32/lib/libmsvcr100.a") _ And LogFileExists(strPathMingW32, "i686-w64-mingw32/include/_mingw.h") _ And LogFileExists(strPathMingW32, "i686-w64-mingw32/include/stdint.h") _ And LogFileExists(strPathMingW32, "i686-w64-mingw32/include/windows.h") _ then if Shell(DosSlashes(strPathMingW32 & "/bin/gcc.exe") & " -dumpversion", True) = 0 then dim offVer, iMajor, iMinor, iPatch, strVer ' extract the version. strVer = Trim(Replace(Replace(g_strShellOutput, vbCr, ""), vbLf, "")) if (Mid(strVer, 2, 1) = ".") _ And (Mid(strVer, 4, 1) = ".") then iMajor = Int(Left(strVer, 1)) ' Is Int() the right thing here? I want atoi()!!! iMinor = Int(Mid(strVer, 3, 1)) iPatch = Int(Mid(strVer, 5)) else LogPrint "Malformed version: '" & strVer & "'" strVer = "" end if if strVer <> "" then if (iMajor = 4) And (iMinor >= 4) then CheckForMinGW32Sub = True g_strSubOutput = strVer else LogPrint "MinGW32 version '" & iMajor & "." & iMinor & "." & iPatch & "' is not supported (or configure.vbs failed to parse it correctly)." end if else LogPrint "Couldn't locate the GCC version in the output!" end if else LogPrint "Failed to run gcc.exe!" end if end if end function
CheckForCurlSub
, ā : if LogFileExists(strPathCurl, "include/curl/curl.h") _ And LogFindFile(strPathCurl, "libcurl.dll") <> "" _ And LogFindFile(strPathCurl, "libcurl.lib") <> "" _
libcurl, , DLL-, . , , libcurl.dll
, : if LogFileExists(strPathCurl, "include/curl/curl.h") _ And LogFindFile(strPathCurl, "libcurl.lib") <> "" _
CheckForPython
, VBOX_BLD_PYTHON
: CfgPrint "VBOX_BLD_PYTHON := " & strPathPython & "\python.exe"
python.exe : "/python.exe"
( ; , , ).CheckForQt
, : '' ' Checks for libvpx sub CheckForVpx(strOptVpx) dim strPathVpx, str strVpx = "libvpx" PrintHdr strVpx if strOptVpx = "" then MsgError "Invalid path specified!" exit sub end if if g_strTargetArch = "amd64" then strVsBuildArch = "x64" else strVsBuildArch = "Win32" end if strLibPathVpx = "lib/" & strVsBuildArch & "/vpxmd.lib" strPathVpx = "" if LogFileExists(strOptVpx, "include/vpx/vpx_encoder.h") _ And LogFileExists(strOptVpx, strLibPathVpx) _ then strPathVpx = UnixSlashes(PathAbs(strOptVpx)) CfgPrint "SDK_VBOX_VPX_INCS := " & strPathVpx & "/include" CfgPrint "SDK_VBOX_VPX_LIBS := " & strPathVpx & "/" & strLibPathVpx else MsgError "Can't locate " & strVpx & ". " _ & "Please consult the configure.log and the build requirements." exit sub end if PrintResult strVpx, strPathVpx end sub '' ' Checks for libopus sub CheckForOpus(strOptOpus) dim strPathOpus, str strOpus = "libopus" PrintHdr strOpus if strOptOpus = "" then MsgError "Invalid path specified!" exit sub end if if g_strTargetArch = "amd64" then strVsBuildArch = "x64" else strVsBuildArch = "Win32" end if strLibPathOpus = "lib/" & strVsBuildArch & "/opus.lib" strPathOpus = "" if LogFileExists(strOptOpus, "include/opus.h") _ And LogFileExists(strOptOpus, strLibPathOpus) _ then strPathOpus = UnixSlashes(PathAbs(strOptOpus)) CfgPrint "SDK_VBOX_OPUS_INCS := " & strPathOpus & "/include" CfgPrint "SDK_VBOX_OPUS_LIBS := " & strPathOpus & "/" & strLibPathOpus else MsgError "Can't locate " & strOpus & ". " _ & "Please consult the configure.log and the build requirements." exit sub end if PrintResult strOpus, strPathOpus end sub
usage
, , : Print " --with-libvpx=PATH " Print " --with-libopus=PATH "
Main
, , (, strOptMkisofs
): strOptVpx = "" strOptOpus = ""
select-case
, , , --with-mkisofs
: case "--with-libvpx" strOptVpx = strPath case "--with-libopus" strOptOpus = strPath
, , , , if g_blnInternalMode then
: CheckForVpx strOptVpx CheckForOpus strOptOpus
src\VBox\Runtime\Makefile.kmk
, VBoxRT_LIBS.win
VBoxRT-x86_LIBS.win
crypt32.lib
bcrypt.lib
: VBoxRT_LIBS.win = \ $(PATH_SDK_$(VBOX_WINDDK)_LIB)/vccomsup.lib \ $(PATH_SDK_$(VBOX_WINDDK)_LIB)/wbemuuid.lib \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
: VBoxRT_LIBS.win = \ $(PATH_SDK_$(VBOX_WINDDK)_LIB)/vccomsup.lib \ $(PATH_SDK_$(VBOX_WINDDK)_LIB)/wbemuuid.lib \ $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \ $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/crypt32.lib \ $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/bcrypt.lib
( delayimp.lib
!); : VBoxRT-x86_LIBS.win = \ $(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/vccomsup.lib \ $(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/wbemuuid.lib \ $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib
: VBoxRT-x86_LIBS.win = \ $(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/vccomsup.lib \ $(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/wbemuuid.lib \ $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib \ $(PATH_SDK_$(VBOX_WINPSDK)_LIB.x86)/crypt32.lib \ $(PATH_SDK_$(VBOX_WINPSDK)_LIB.x86)/bcrypt.lib
VBoxRT.dll
. : Oracle crypt32.dll
, , , , LIB- . , . . bcrypt.dll
OpenSSL 1.1.1.src\VBox\Runtime\r3\win\VBoxRT-openssl-1.1plus.def
, - : X509_STORE_set_flags
( X509_VERIFY_PARAM_set_flags
). , VBoxRT.dll
. gSOAP 2.8.45 X509_STORE_set_flags()
, VBoxRT
, OpenSSL - , OpenSSL , VBoxRT
. .src\VBox\Makefile.kmk
, : ifdef VBOX_WITH_ADDITIONS include $(PATH_SUB_CURRENT)/Additions/Makefile.kmk endif
: ifndef VBOX_WITHOUT_ADDITIONS_ISO $(VBOX_PATH_ADDITIONS_ISO)/VBoxGuestAdditions.iso: $(QUIET)$(MKDIR) -p $(@D) $(VBOX_RETRY) $(TOOL_CURL_FETCH) http://download.virtualbox.org/virtualbox/$(VBOX_VERSION_STRING_RAW)/VBoxGuestAdditions_$(VBOX_VERSION_STRING_RAW).iso -o $@ endif
, , , - .doc\manual\Makefile.kmk
: define def_vbox_refentry_to_user_sect1 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/user_$(2): $(3) \ $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl \ $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \ $$(VBOX_VERSION_STAMP) | $$(dir $$@) $$(call MSG_TOOL,xsltproc $$(notdir $$(filter %.xsl,$$^)),,$$(filter %.xml,$$^),$$@) $$(QUIET)$$(RM) -f "$$@" $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@ $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl $$< endef
$$(RM)
: $$(QUIET)$$(MKDIR) -p "$$(@D)"
( , !) , - .
doc\manual\Config.kmk
, : VBOX_FILE_URL_MAYBE_SLASH = $(if $(eq $(KBUILD_HOST),win),/,)
, , : VBOX_PATH_MANUAL_SRC_SLASHED = $(subst :/,:///,$(VBOX_PATH_MANUAL_SRC)) VBOX_PATH_MANUAL_OUTBASE_SLASHED = $(subst :/,:///,$(VBOX_PATH_MANUAL_OUTBASE))
: $(VBOX_XML_CATALOG): $(MAKEFILE_CURRENT) | $$(dir $$@) $(call MSG_L1,Creating catalog $@) $(QUIET)$(APPEND) -tn "$@" \ '<?xml version="1.0"?>' \ '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">' \ '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' \ ' <delegatePublic publicIdStartString="-//OASIS/ENTITIES DocBook XML" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \ ' <delegatePublic publicIdStartString="-//OASIS/DTD DocBook XML" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \ ' <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \ ' <delegateURI uriStartString="http://www.oasis-open.org/docbook/" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \ ' <delegateSystem systemIdStartString="$(VBOX_PATH_MANUAL_SRC)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ ' <delegateURI uriStartString="$(VBOX_PATH_MANUAL_SRC)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ ' <delegateURI uriStartString="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_SRC)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ ' <delegateURI uriStartString="$(VBOX_PATH_MANUAL_OUTBASE)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ '</catalog>'
, VBOX_PATH_MANUAL_SRC
VBOX_PATH_MANUAL_OUTBASE
, (, file://
, ). : $(VBOX_XML_CATALOG): $(MAKEFILE_CURRENT) | $$(dir $$@) $(call MSG_L1,Creating catalog $@) $(QUIET)$(APPEND) -tn "$@" \ '<?xml version="1.0"?>' \ '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">' \ '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' \ ' <delegatePublic publicIdStartString="-//OASIS/ENTITIES DocBook XML" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \ ' <delegatePublic publicIdStartString="-//OASIS/DTD DocBook XML" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \ ' <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \ ' <delegateURI uriStartString="http://www.oasis-open.org/docbook/" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_DOCBOOK)"/>' \ ' <delegateSystem systemIdStartString="$(VBOX_PATH_MANUAL_SRC)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ ' <delegateSystem systemIdStartString="$(VBOX_PATH_MANUAL_SRC_SLASHED)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ ' <delegateURI uriStartString="$(VBOX_PATH_MANUAL_SRC)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ ' <delegateURI uriStartString="$(VBOX_PATH_MANUAL_SRC_SLASHED)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ ' <delegateURI uriStartString="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_PATH_MANUAL_SRC)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ ' <delegateURI uriStartString="$(VBOX_PATH_MANUAL_OUTBASE)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ ' <delegateURI uriStartString="$(VBOX_PATH_MANUAL_OUTBASE_SLASHED)" catalog="file://$(VBOX_FILE_URL_MAYBE_SLASH)$(VBOX_XML_CATALOG_MANUAL)"/>' \ '</catalog>'
, : $(VBOX_XML_CATALOG_MANUAL): $(MAKEFILE_CURRENT) | $$(dir $$@)
. , , common/
, ( uri
), file://$(VBOX_FILE_URL_MAYBE_SLASH)
./IntegrityCheck
). , . ā VB ( ). Config.kmk
, ( «» - LocalConfig.kmk
; . ). .VBOX_INTEGRITY_CHECK
, . define VBOX_RE_SIGN_DLL_INTERNAL_FN
: if defined(VBOX_SIGNING_MODE) && defined(VBOX_CROSS_CERTIFICATE_FILE) VBOX_INTEGRITY_CHECK := /IntegrityCheck else VBOX_INTEGRITY_CHECK := /IntegrityCheck:NO endif
$(VBOX_VCC_EDITBIN) /LargeAddressAware /DynamicBase /NxCompat /Release /IntegrityCheck \ /Version:$(VBOX_VERSION_MAJOR)0$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \ "$@"
/IntegrityCheck
$(VBOX_INTEGRITY_CHECK)
. ifdef VBOX_SIGNING_MODE TEMPLATE_XXXXXX_LDFLAGS += -IntegrityCheck endif
or if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_HARDENING) TEMPLATE_XXXXXX_LDFLAGS += -IntegrityCheck endif
Ā« XXXXXX
Ā» . ā 6 , . , - . , , if defined(VBOX_SIGNING_MODE) && defined(VBOX_CROSS_CERTIFICATE_FILE)
or if defined(VBOX_SIGNING_MODE) && defined(VBOX_CROSS_CERTIFICATE_FILE) && defined(VBOX_WITH_HARDENING)
LocalConfig.kmk
, : 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 := Roga and Kopyta Ltd 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 := Roga and Kopyta Ltd 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\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
- :VBOX_CERTIFICATE_SUBJECT_NAME
VBOX_CERTIFICATE_SHA2_SUBJECT_NAME
SHA-1 SHA-256, .VBOX_CERTIFICATE_FINGERPRINT
VBOX_CERTIFICATE_SHA2_FINGERPRINT
, .VBOX_CROSS_CERTIFICATE_FILE_ARGS
VBOX_CROSS_CERTIFICATE_SHA2_FILE_ARGS
, VBOX_CROSS_CERTIFICATE_FILE
VBOX_CROSS_CERTIFICATE_SHA2_FILE
( Ā« _ARGS
Ā») - ( ). , , Microsoft .signtool
. Config.kmk
«Code Signing» , .bin
. , , 8.3. dir /x
. , , .VBOX_BUILD_PUBLISHER
. «_OSE» (. . «6.0.2_OSE»). - , ( , «_OSE»). cd /d C:\Devel\VirtualBox-src "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x64 /win7 COLOR 07 set BUILD_TARGET_ARCH=amd64 cscript configure.vbs --with-DDK=C:\WinDDK\7600.16385.1 --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\5.6.3-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-6.0.2_OSE-r127994-MultiArch_amd64.msi
configure.vbs
( AutoConfig.kmk
env.bat
). kmk
out\win.amd64\bin\
. MSI-. :kmk
.out\win.x86\ā¦
, 32- .VBOX_BUILD_PUBLISHER
.Config.kmk
VBOX_SVN_REV_FALLBACK
. , (, 6.0.2 128162). , . cd /d C:\Devel\VirtualBox-src "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /Release /x86 /win7 COLOR 07 set BUILD_TARGET_ARCH=x86 cscript configure.vbs --with-DDK=C:\WinDDK\7600.16385.1 --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\5.6.3-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-6.0.2_OSE-r127994-MultiArch.exe
, «_OSE» .
EXE
, MSI
. , 32- MSI- , .Source: https://habr.com/ru/post/357526/