diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d393ab..4b42b11 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,10 +13,6 @@ on: workflow_dispatch: -defaults: - run: - shell: bash - permissions: actions: none checks: none @@ -28,6 +24,9 @@ permissions: repository-projects: none security-events: none statuses: read +defaults: + run: + shell: bash env: VCPKG_COMMITTISH: 962e5e39f8a25f42522f51fffc574e05a3efd26b @@ -45,10 +44,42 @@ jobs: VCPKG_TRIPLET: custom-triplet steps: + - name: Remove Old VS version (Hack) + shell: pwsh + run: | + Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" + $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" + $componentsToRemove= @( + "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM.Spectre" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM64" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.ARM64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.x86.x64" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.x86.x64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.Spectre" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM.Spectre" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM64" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.ATL.ARM64.Spectre" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.Spectre" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM.Spectre" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM64" + "Microsoft.VisualStudio.Component.VC.14.35.17.5.MFC.ARM64.Spectre" + ) + [string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_} + $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache') + # should be run twice + $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden + $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden + - name: Checkout Git repository uses: actions/checkout@v3 with: submodules: true + fetch-depth: 0 - name: Setup vcpkg uses: friendlyanon/setup-vcpkg@v1 @@ -64,12 +95,11 @@ jobs: - name: Configure run: cmake -S . -B build - -G "${{env.CMAKE_GENERATOR}}" + -G "${{env.CMAKE_GENERATOR}}" -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_OVERLAY_PORTS=build/overlays/ports -DVCPKG_OVERLAY_TRIPLETS=config/vcpkg_triplets -DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TRIPLET}} - -DCMAKE_VS_PLATFORM_TOOLSET_VERSION=14.37 - name: Build run: | @@ -121,6 +151,8 @@ jobs: steps: - name: Checkout Git repository uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: "Install dependencies" run: | @@ -181,6 +213,8 @@ jobs: steps: - name: Checkout Git repository uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: "Install dependencies" run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 52ed58c..2cecdd7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ include_directories(${PROJECT_BINARY_DIR}) add_compile_definitions("$<$:DEBUG>") if (WIN32) set (USE_STD_FORMAT true) - if (MSVC_VERSION AND MSVC_VERSION VERSION_LESS 17.7) + if (MSVC_VERSION AND MSVC_VERSION VERSION_LESS 1937) message(FATAL_ERROR "Visual Studio 17.7 and later supported only") endif () endif () diff --git a/docs/BUILDING.md b/docs/BUILDING.md index f8e4d11..36b2aed 100755 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -12,9 +12,9 @@ rsgain builds natively on Unix and Windows, and features a cross-platform CMake - fmt - inih -The source code is written in C++20, and as such requires a relatively modern compiler to build: +The Windows version uses C++23, and the Unix versions use C++20 with plans to upgrade to C++23 in the future. As such, it requires a relatively modern compiler to build: -- On Windows, use Visual Studio 2022 +- On Windows, Visual Studio 2022 17.7 or later is required - On Linux, use GCC 10 or later - On macOS, the latest available Xcode for your machine should work