|
| 1 | +# Instructions for compiling Xboinc executables |
| 2 | + |
| 3 | +The following instructions assume you are operating on an AlmaLinux 9 system with the necessary development tools installed. If you are using a different Linux distribution, package names and commands may vary slightly. |
| 4 | + |
| 5 | +## 1. Requirements |
| 6 | + |
| 7 | +* Development Tools: Ensure you have the necessary development tools installed, including `gcc`, `g++`, `make`, `cmake`, and `git`. |
| 8 | +* `python`: ensure you have a healthy Python environment with the `xboinc` package installed, along with its certified dependencies. |
| 9 | +* `vcpkg`: current setup uses the `vcpkg` dependency manager to handle BOINC libraries. To install `vcpkg`, follow these steps: |
| 10 | + |
| 11 | + ```bash |
| 12 | + git clone https://github.com/microsoft/vcpkg.git |
| 13 | + cd vcpkg |
| 14 | + ./bootstrap-vcpkg.sh |
| 15 | + ./vcpkg integrate install |
| 16 | + ``` |
| 17 | + After bootstrapping, you can then install the desired library triplets, for the case of BOINC libraries, you can run: |
| 18 | + ```bash |
| 19 | + # for x64 Linux |
| 20 | + ./vcpkg install boinc:x64-linux |
| 21 | + # for x64 Windows |
| 22 | + ./vcpkg install boinc:x64-mingw-static |
| 23 | + ``` |
| 24 | +* `mingw-w64`: If you are targeting Windows, you will need to install the `mingw-w64` toolchain. On AlmaLinux, you can do this with the following command: |
| 25 | + ```bash |
| 26 | + sudo dnf install mingw64-binutils mingw64-cpp mingw64-crt mingw64-filesystem mingw64-gcc mingw64-gcc-c++ mingw64-headers mingw64-libgcc mingw64-winpthreads mingw64-winpthreads-static |
| 27 | + ``` |
| 28 | + |
| 29 | +## 2. Building the Executable |
| 30 | + |
| 31 | +### 2.1 Standard Linux Build |
| 32 | + |
| 33 | +**Without BOINC integration:** |
| 34 | +```bash |
| 35 | +mkdir build |
| 36 | +cd build |
| 37 | +python3 -c "import xboinc as xb; xb.generate_executable()" |
| 38 | +``` |
| 39 | + |
| 40 | +**With BOINC integration:** |
| 41 | +```bash |
| 42 | +mkdir build-boinc |
| 43 | +cd build-boinc |
| 44 | +python3 -c "import xboinc as xb; xb.generate_executable(vcpkg_root='/path/to/vcpkg')" |
| 45 | +``` |
| 46 | + |
| 47 | +### 2.2 Cross-compilation for Windows (MinGW) |
| 48 | + |
| 49 | +**Without BOINC integration:** |
| 50 | +```bash |
| 51 | +mkdir build-mingw |
| 52 | +cd build-mingw |
| 53 | +python3 -c "import xboinc as xb; xb.generate_executable(target_triplet='x64-mingw-static')" |
| 54 | +``` |
| 55 | + |
| 56 | +**With BOINC integration** |
| 57 | +```bash |
| 58 | +mkdir build-mingw-boinc |
| 59 | +cd build-mingw-boinc |
| 60 | +python3 -c "import xboinc as xb; xb.generate_executable(vcpkg_root='/path/to/vcpkg', target_triplet='x64-mingw-static')" |
| 61 | +``` |
0 commit comments