External tools needed for building, not included in this repository.
Download the Installer from here:
https://visualstudio.microsoft.com/vs/community/
Make sure to install the following components:
- MSVC v134 - VS 2022 C++ x64/x86 build tools (Latest)
- C++ CMake tools for Windows
- C++ Clang tools for Windows (17.0.3 - x64/x86)
- Windows 11 SDK (10.0.26100.0)
tested with Visual Studio Community 17.10.2
Manually install CMake from:
Add it to the PATH
and make sure it is available in the terminal via:
cmake --version
In Visual Studio to use the external Cmake executable set it up under Tools -> Options
:
This is optional, only used for some scripts, not the main build.
Download the Installer from here:
https://www.python.org/downloads/
Make sure python
is available in the PATH.
tested with Python 3.12.4
Download the Installer from here:
https://git-scm.com/download/win/
Make sure git
is avaiable in the PATH.
tested with 2.45.2
Qt is not build from source and is best installed with the Qt Installer:
https://www.qt.io/download-qt-installer-oss
The only required package for building is:
- MSVC 2019 64-bit (before Qt 6.8)
- MSVC 2022 64-bit (beginning Qt 6.8)
Recommended for debugging:
- Sources
- Qt Debug Information Files
Anything else can be disabled
tested with Qt 6.7.1
Add a system wide environment variable:
CMAKE_PREFIX_PATH
C:\Qt\6.7.1\msvc2019_64\lib\cmake\
Add this to PATH
:
C:\Qt\6.7.1\msvc2019_64\bin\
External libraries are part of the git repository as submodules.
Check out the required submodules by running:
python3 external/checkout.py
The script initializes and updates all required submodules for the platform to the SHA specified by the current commit.
The project has almost 100 submodules the script parallizes the git operations and should finish within 1-2 minutes depending on the download speed.
Re-run the script in case a different tag / branch / commit is checked out.
If you installed MSVC and Qt in the standard locations and want to make a release build you can use the script
scripts/build_win_release.bat
The result will be in the logiksim/_build_win_release
folders.
Alternatively for custom builds you can follow the build steps here.
Add Qt to PATH
and CMAKE_PREFIX_PATH
. Replace the version as needed, e.g 6.7.1
:
set PATH=C:/Qt/6.x.x/msvc2019_64/bin;%PATH%
set CMAKE_PREFIX_PATH=C:/Qt/6.x.x/msvc2019_64/lib/cmake
Activate the MSVC Compiler. This will make cmake
, ninja
, clang-cl
avaiable:
CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
Create an emtpy build folder inside the logiksim git repostiroy root:
mkdir build
cd build
Open Developer Command Prompt for VS 2022
For debug builds use:
cmake --preset windows-clang-debug
cd build\windows-clang-debug
ninja
For release builds use:
cmake --preset windows-clang-release
cd build\windows-clang-release
ninja
Configuration should take 30 - 60 seconds.
Run the build
ninja
This will build all dependencies from source (except Qt) and then build LogikSim.
A complete build from scratch should take about 3-5 minutes depending on the machine.
This should build all the binaries you can run the GUI with:
simulation_srp_gui
Run the tests with
simulation_srp_test
Run the benchmark with
simulation_srp_benchmark
Run the non-gui experimental main (used for testing out new features directly)
simulation_srp_main