All following steps are to be done in a MinGW64 shell (notin a MSYS shell, which also getsinstalled by the MSYS2 installer) pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-make pacman -S mingw-w64-x86_64-glm mingw-w64-x86_64-libsigc++ mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-yaml-cpp mingw-w64-x86_64-glew pacman -S mingw-w64-x86_64-glfw cd ~ rm -rf mingw-w64-x86_64-vulkan-*.zst wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-vulkan-headers-1.3.268-1-any.pkg.tar.zst wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-vulkan-loader-1.3.268-1-any.pkg.tar.zst wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-vulkan-validation-layers-1.3.268-1-any.pkg.tar.zst pacman -U mingw-w64-x86_64-vulkan-loader-1.3.268-1-any.pkg.tar.zst mingw-w64-x86_64-vulkan-headers-1.3.268-1-any.pkg.tar.zst mingw-w64-x86_64-vulkan-validation-layers-1.3.268-1-any.pkg.tar.zst rm -rf mingw-w64-x86_64-vulkan-*.zst https://repo.msys2.org/mingw/mingw64/ git config submodule.recurse true cd ~ git clone https://github.com/anthonix/ffts.git cd ~ cd ffts mkdir build cd build cmake -G"MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=$MSYSTEM_PREFIX -DENABLE_SHARED=ON -DCMAKE_BUILD_TYPE=Release .. mingw32-make -j mingw32-make install cd ~ git clone https://github.com/KhronosGroup/glslang.git cd glslang mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. sudo make -j install ############################### # VulkanSDK-1.3.268.0 mingw64 # ############################### https://vulkan.lunarg.com/sdk/home #------------------------------------------------------------------------------------------------------------------------------------------ # Windows mingw64 glslang build (as it is not fully integrated in VulkanSDK-1.3.268.0 for Windows and built with Visual Studio 2019) #------------------------------------------------------------------------------------------------------------------------------------------ cd ~ git clone https://github.com/KhronosGroup/glslang.git cd glslang git checkout tags/vulkan-sdk-1.3.268.0 git clone https://github.com/google/googletest.git External/googletest cd External/googletest git checkout 0c400f67fcf305869c5fb113dd296eca266c9725 cd ../.. ./update_glslang_sources.py SOURCE_DIR=~/glslang BUILD_DIR=$SOURCE_DIR/build mkdir -p $BUILD_DIR cd $BUILD_DIR cmake -DCMAKE_BUILD_TYPE=Release -G"Ninja" $SOURCE_DIR -DCMAKE_INSTALL_PREFIX="$(pwd)/install" cmake --build . --config Release --target install ################################################################################ # For Release build Windows official way msys2/PKGBUILD https://github.com/glscopeclient/scopehal-docs/blob/master/section-gettingstarted.tex#L260 ############################################################################################ cd ~ git clone --recurse-submodules https://github.com/glscopeclient/scopehal-apps.git cd ~ cd scopehal-apps git pull --recurse-submodules cd ~/scopehal-apps/msys2 export VK_SDK_PATH=/c/VulkanSDK/1.3.268.0 export PATH=$VK_SDK_PATH/Bin:$PATH export VULKAN_SDK=$VK_SDK_PATH export GLSLANG_BUILD_PATH=~/glslang/build/install CXXFLAGS+=" -Wno-format" MINGW_ARCH=mingw64 makepkg-mingw --noconfirm --noprogressbar -sCLf ######################################################### # For Release build Windows alternative way ninja ######################################################### cd ~ git clone --recurse-submodules https://github.com/glscopeclient/scopehal-apps.git cd ~ cd scopehal-apps git pull --recurse-submodules mkdir build cd build export VK_SDK_PATH=/c/VulkanSDK/1.3.268.0 export PATH=/c/VulkanSDK/1.3.268.0/Bin:$PATH export VULKAN_SDK=$VK_SDK_PATH export GLSLANG_BUILD_PATH=~/glslang/build/install CXXFLAGS+=" -Wno-format" cmake -G"Ninja" -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release .. # Build MSI & Portable Zip cmake -G"Ninja" -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DWIXPATH="/c/Program Files (x86)/WiX Toolset v3.11/bin" .. cmake.exe --build ./ ############## # build debug ############## cd ~ cd scopehal-apps git pull --recurse-submodules mkdir build_debug cd build_debug export VK_SDK_PATH=/c/VulkanSDK/1.3.268.0 export PATH=/c/VulkanSDK/1.3.268.0/Bin:$PATH export VULKAN_SDK=$VK_SDK_PATH export GLSLANG_BUILD_PATH=~/glslang/build/install CXXFLAGS+=" -Wno-format" cmake -G"Ninja" -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug .. # Build MSI & Portable Zip cmake -G"Ninja" -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug -DWIXPATH="/c/Program Files (x86)/WiX Toolset v3.11/bin" .. cmake.exe --build ./ ######################################################### # For Release build Windows alternative way mingw32-make ######################################################### cd ~ git clone --recurse-submodules https://github.com/glscopeclient/scopehal-apps.git cd ~ cd scopehal-apps git pull --recurse-submodules mkdir build cd build export VK_SDK_PATH=/c/VulkanSDK/1.3.268.0 export PATH=/c/VulkanSDK/1.3.268.0/Bin:$PATH export VULKAN_SDK=$VK_SDK_PATH export GLSLANG_BUILD_PATH=~/glslang/build/install cmake -G"MinGW Makefiles" -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release .. mingw32-make -j # strip exe/dll -DCMAKE_CXX_FLAGS="-s" => does not work after build to be tested with a clean build cmake -G"MinGW Makefiles" -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-s" .. mingw32-make -j ##################################### # For Dev/Debug build Windows ##################################### cd ~ git --recursive clone https://github.com/glscopeclient/scopehal-apps.git cd ~ cd scopehal-apps mkdir build cd build cmake -G"MinGW Makefiles" -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug .. mingw32-make -j8 cd ~ BUILD_NAME=glscopeclient_build_debug mkdir $BUILD_NAME cd ~/scopehal-apps/build_debug cp C:/msys64/mingw64/bin/libglib-2.0-0.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/libglibmm-2.4-1.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/libgtkmm-3.0-1.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/libatkmm-1.6-1.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/libgdkmm-3.0-1.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/libcairomm-1.0-1.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/libgiomm-2.4-1.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/libgcc_s_seh-1.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/glfw3.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/glew32.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/SPIRV.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/libstdc++-6.dll ~/$BUILD_NAME/ cp C:/msys64/mingw64/bin/libOpenCL.dll ~/$BUILD_NAME/ cp ./src/glscopeclient/glscopeclient.exe ~/$BUILD_NAME/ cp ./src/ngscopeclient/ngscopeclient.exe ~/$BUILD_NAME/ cp -r ../src/glscopeclient/gradients ~/$BUILD_NAME/ cp -r ../src/glscopeclient/icons ~/$BUILD_NAME/ cp -r ../src/glscopeclient/masks ~/$BUILD_NAME/ cp -r ../src/glscopeclient/shaders ~/$BUILD_NAME/ cp -r ./lib/scopeprotocols/shaders ~/$BUILD_NAME cp -r ../src/glscopeclient/styles ~/$BUILD_NAME/ cp ./lib/graphwidget/libgraphwidget.dll ~/$BUILD_NAME/ cp ./lib/log/liblog.dll ~/$BUILD_NAME/ cp ./lib/scopeexports/libscopeexports.dll ~/$BUILD_NAME/ cp ./lib/scopehal/libscopehal.dll ~/$BUILD_NAME/ cp ./lib/scopeprotocols/libscopeprotocols.dll ~/$BUILD_NAME/ How to Debug scopeSession 64b66b Debug workaround with gdb: cd ~ cd glscopeclient_build_debug export OMP_WAIT_POLICY=PASSIVE winpty gdb ./glscopeclient.exe set pagination off set args 64b66b.scopesession catch throw catch catch catch fork catch vfork set follow-fork-mode child break EyePattern.cpp:50 break EyePattern.cpp:61 run Ctrl-C How to Debug scopeSession SPI Debug workaround with gdb: cd ~ cd glscopeclient_build_debug export OMP_WAIT_POLICY=PASSIVE winpty gdb ./glscopeclient.exe set pagination off set args --debug spi-compressed.scopesession break abort run Ctrl-C How to Debug Rigol MSO5000 Ethernet Debug workaround with gdb: cd ~ cd glscopeclient_build_debug export OMP_WAIT_POLICY=PASSIVE winpty gdb ./glscopeclient.exe set args --debug RigolMSO5k:rigol:lan:192.168.0.10:5555 run Ctrl-C In case of crash SIGSEGV cd ~ cd glscopeclient_build_debug export OMP_WAIT_POLICY=PASSIVE winpty gdb ./glscopeclient.exe set pagination off set args --debug RigolMSO5k:rigol:lan:192.168.0.10:5555 catch fork catch vfork set follow-fork-mode child break abort run Ctrl-C where glscopeclient.exe myscope:demo:null:null --debug --trace PipelineCacheManager run glscopeclient --debug myscope:demo:null:null or just launch with no args and select the "demo" driver and null transport How to Debug Demo Debug workaround with gdb: cd ~ cd glscopeclient_build_debug export OMP_WAIT_POLICY=PASSIVE winpty gdb ./glscopeclient.exe winpty gdb ./ngscopeclient.exe set args --debug myscope:demo:null:null export OMP_WAIT_POLICY=PASSIVE gdb ./ngscopeclient.exe set args --debug --stdout-only set pagination off break abort catch throw catch catch set follow-fork-mode child run Ctrl-C b TestWaveformSource.cpp:280 frame 1 print *p (gdb) print *p $1 = {offsets = 0x0, ws = 0x0, oe_ws = 0x0, eo_ws = 0x0, ee_ws = 0x0, is = 0x0, ws_is = 0x0, i0 = 0, i1 = 0, n_luts = 0, N = 131071, lastlut = 0x0, transform = 0x6a4c45ea , transform_base = 0x0, transform_size = 0, constants = 0x0, plans = 0xea61b70, rank = 1, Ns = 0x0, Ms = 0x0, buf = 0x12e1f780, transpose_buf = 0x0, destroy = 0x6a4c453c , A = 0x12e9f7e0, B = 0x12f1f840, i2 = 0} bt full frame where thread apply all bt info locals info args print varname display/i $pc display /3i $pc print r14 layout asm => Crash gdb ??