Simply get the free Visual Studio 2019 Community Edition (or newer), and then
open the VolumeLinker.sln
file that's already included in the root of the
project hierarchy. It is already pre-configured for perfect builds.
All dependencies will be automatically downloaded, since the Visual Studio file defines the necessary dependencies and grabs them via NuGet effortlessly.
Then simply compile the project in Release mode. Be sure to build both 32-bit
and 64-bit versions, and then simply pick up the VolumeLinker32.exe
and
VolumeLinker64.exe
files from the output directories.
First you must install several pre-requisites. The easiest way to do that is via the Chocolatey package manager. All install commands are included in parenthesis below. In the future, you will possibly want to upgrade the "2019" commands below to whatever package is the latest release when you're reading this. However, it should always be possible to install older versions of the compilers, so feel free to follow these instructions verbatim.
-
CMake 3.16 or higher (
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
). -
Visual Studio 2019 Build Tools (
choco install visualstudio2019buildtools
). -
Latest Visual C++ Compiler and Windows 10 SDK (
choco install visualstudio2019-workload-vctools
).
When you have all required tools above, simply use a command prompt and navigate
to the VolumeLinker
root folder of the project, and then type the following
commands to compile:
cd VolumeLinker
mkdir build32
cd build32
cmake -G "Visual Studio 16 2019" -A Win32 ..
cmake --build . --config Release --target VolumeLinker -j 14
mv ..\build\release\Release\VolumeLinker.exe .\Release\VolumeLinker32.exe
cd ..
mkdir build64
cd build64
cmake -G "Visual Studio 16 2019" -A x64 ..
cmake --build . --config Release --target VolumeLinker -j 14
mv ..\build\release\Release\VolumeLinker.exe .\x64\Release\VolumeLinker64.exe
The compiled binaries now exist in two locations:
VolumeLinker\build32\Release\VolumeLinker32.exe
for the 32-bit binary.VolumeLinker\build64\x64\Release\VolumeLinker64.exe
for the 64-bit binary.
This is my preferred build environment, since it's a very powerful IDE with support for all kinds of languages, extensions and great configurability!
To build with VSCode, follow these instructions:
-
First install all pre-requisites listed in the
CMake
section above. -
Inside VSCode, install the following extensions:
C/C++
(by Microsoft),CMake Tools
(by Microsoft). -
Open the
VolumeLinker\VolumeLinker
folder in VSCode. It should automatically detect the per-project "CMake Configure On Open" setting and ask you to run the configuration process. Say yes. If it doesn't ask you, press F1 (or Ctrl-Shift-P) to open the command palette and typeCMake: Configure
and run that command. -
Next, look at the bottom (status bar) of the VSCode window. Ensure that it's set to the
CMake: Release
configuration, and that your build kit is set toVisual Studio Build Tools 2019 Release - amd64
. Now just click on theBuild
button in the statusbar (currently defaults toF7
on the keyboard). -
After the build is complete, the 64-bit binary will exist in the following folder:
VolumeLinker\VolumeLinker\build\release\VolumeLinker.exe
. Take it out of there and manually rename it toVolumeLinker64.exe
. -
Repeat step 4 and 5, but use the
Visual Studio Build Tools 2019 Release - x86
build kit instead, and rename that compiled file toVolumeLinker32.exe
. -
Congratulations, you've now compiled the 32-bit and 64-bit versions!