-
Notifications
You must be signed in to change notification settings - Fork 511
CompileClient
The BOINC client software includes:
- The core client
- The BOINC Manager
- boinc_cmd
- The BOINC screensaver (Windows and Mac only)
If you want to build the client software for use on hosts equivalent to yours, build it using:
./_autosetup
./configure --disable-server --enable-client CXXFLAGS="-O3 "
make
cd packages/generic/sea/
make
The executables are located under the folder BOINC.
If instead you intend to build portable binaries of the client software that should run on a wide variety of GNU/Linux platforms, we recommended that you build the client software using a virtual machine (e.g. running under Oracle VirtualBox, download the Compatibility virtual machine image). In this case you should build using:
./_autosetup
./configure --disable-server --enable-client-release --build=i686-pc-linux-gnu \
CXXFLAGS="-march=x86-64 -O3 -ffast-math"
make
See details of the build system.
The result (in the sea/ directory) will be a self-extracting archive (boinc_x.y.z_i686-pc-linux-gnu.sh) containing the BOINC client software.
- Download and install prerequisites
- Download current source code
- Configure (with --disable_server) and make
The result (in the sea/ directory) will be a self-extracting archive (boinc_x.y.z_PLATFORM.sh) containing the BOINC client software. If you have old versions of libraries (curl, openssl etc.) in /usr/lib, and newer versions somewhere else (like /usr/local/lib) you may need to tell the linker where to find the newer versions, as in:
./configure LDFLAGS=-L/usr/local/lib
Here is the list of packages that are needed to compile the BOINC graphics libs on Debian (the same packages should also be available on Ubuntu):
freeglut3-dev libsm-dev libice-dev libxmu-dev libxi-dev libx11-dev libjpeg62-dev
Software Prerequisites:
- Download and install Visual Studio 2022 Community Edition (or any other edition of Visual Studio 2022 if you have a license).
- Download the BOINC source code.
Double-click on the boinc.sln file in the win_build directory to launch Visual Studio. From here you should be able to perform any build operation you want.
Launching the BOINC Build Environment for Windows x64:
cd \src\boinc\win_build
msbuild win_build\boinc.sln -p:Configuration=Release -p:Platform=x64
Launching the BOINC Build Environment for Windows ARM64:
cd \src\boinc\win_build
msbuild win_build\boinc.sln -p:Configuration=Release -p:Platform=ARM64
To build Debug version just replace
-p:Configuration=Release
with
-p:Configuration=Debug
BOINC uses vcpkg, Microsoft's cross-platform package manager for C and C++ libraries, to manage third-party dependencies. vcpkg automatically downloads, builds, and integrates external libraries into the Visual Studio project, ensuring consistent builds across different environments and platforms.
The main benefits of using vcpkg include:
- Automatic dependency resolution and building
- Cross-platform support (x64, ARM64)
- Consistent library versions across development environments
- Simplified dependency updates and management
To add a new third-party library dependency to the BOINC project:
-
Edit the vcpkg manifest file located at
3rdParty/vcpkg_ports/configs/msbuild/vcpkg.json:
{
"name": "boinc-msbuild",
"dependencies":
[
"curl",
{
"name": "openssl",
"features": ["ssl3", "weak-ssl-ciphers"],
"default-features": false
},
"your-new-library-name"
]
}You can specify dependencies as simple strings (e.g., "curl") or as objects with additional configuration options such as features and default-features.
-
Rebuild the vcpkg dependencies by building the
vcpkg_3rdparty_dependenciesproject or rebuilding the entire solution. The build system will automatically download and compile the new library.
For more information about vcpkg manifest files, see Microsoft's vcpkg manifest documentation.
After adding a vcpkg port, you need to link the resulting library files to your Visual Studio project. BOINC supports four build configurations:
- Debug|x64 - Debug build for 64-bit Intel/AMD processors
- Release|x64 - Release build for 64-bit Intel/AMD processors
- Debug|ARM64 - Debug build for 64-bit ARM processors
- Release|ARM64 - Release build for 64-bit ARM processors
To add library files to link against:
-
Open your
.vcxprojfile in a text editor or use Visual Studio's Property Pages. -
Locate or create the
<ItemDefinitionGroup>section for the<Link>configuration. -
Add the library files to
<AdditionalDependencies>. Use conditional statements to specify different libraries for Debug vs. Release configurations:
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>your-library.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies Condition="'$(Configuration)'=='Debug'">your-library-debugd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies Condition="'$(Configuration)'=='Release'">your-library.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>Note: Many libraries append a d suffix to their Debug library names (e.g., libpng16d.lib for Debug, libpng16.lib for Release). Check the vcpkg installation directory to verify the actual library names:
- Debug libraries:
3rdParty\Windows\vcpkg\installed\{triplet}\debug\lib\ - Release libraries:
3rdParty\Windows\vcpkg\installed\{triplet}\lib\
Where {triplet} is either x64-windows-static or arm64-windows-static.
The platform-specific (x64 vs ARM64) libraries are automatically selected by the build system based on the $(Platform) variable, so you typically don't need separate conditions for different architectures.
For more details on configuring Visual Studio projects, see:
Instructions for building the BOINC client on Mac OS X are on a separate page.