diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4954328a9..15de6f70f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,12 +13,12 @@ on: - "**.ui" # Directories - - "buildconfig/" - - "cmake/" - - "launcher/" - - "libraries/" - - "program_info/" - - "tests/" + - "buildconfig/**" + - "cmake/**" + - "launcher/**" + - "libraries/**" + - "program_info/**" + - "tests/**" # Files - "CMakeLists.txt" @@ -26,21 +26,23 @@ on: # Workflows - ".github/workflows/build.yml" - - ".github/actions/package/" - - ".github/actions/setup-dependencies/" + - ".github/actions/package/**" + - ".github/actions/setup-dependencies/**" pull_request: paths: # File types - "**.cpp" - "**.h" + - "**.java" + - "**.ui" # Directories - - "buildconfig/" - - "cmake/" - - "launcher/" - - "libraries/" - - "program_info/" - - "tests/" + - "buildconfig/**" + - "cmake/**" + - "launcher/**" + - "libraries/**" + - "program_info/**" + - "tests/**" # Files - "CMakeLists.txt" @@ -48,8 +50,8 @@ on: # Workflows - ".github/workflows/build.yml" - - ".github/actions/package/" - - ".github/actions/setup-dependencies/" + - ".github/actions/package/**" + - ".github/actions/setup-dependencies/**" workflow_call: inputs: build-type: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f14bacc02..964e322b1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,43 +13,45 @@ on: - "**.ui" # Directories - - "buildconfig/" - - "cmake/" - - "launcher/" - - "libraries/" - - "program_info/" - - "tests/" + - "buildconfig/**" + - "cmake/**" + - "launcher/**" + - "libraries/**" + - "program_info/**" + - "tests/**" # Files - "CMakeLists.txt" - "COPYING.md" # Workflows - - ".github/codeql" + - ".github/codeql/**" - ".github/workflows/codeql.yml" - - ".github/actions/setup-dependencies/" + - ".github/actions/setup-dependencies/**" pull_request: paths: # File types - "**.cpp" - "**.h" + - "**.java" + - "**.ui" # Directories - - "buildconfig/" - - "cmake/" - - "launcher/" - - "libraries/" - - "program_info/" - - "tests/" + - "buildconfig/**" + - "cmake/**" + - "launcher/**" + - "libraries/**" + - "program_info/**" + - "tests/**" # Files - "CMakeLists.txt" - "COPYING.md" # Workflows - - ".github/codeql" + - ".github/codeql/**" - ".github/workflows/codeql.yml" - - ".github/actions/setup-dependencies/" + - ".github/actions/setup-dependencies/**" workflow_dispatch: jobs: diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index dcfd2ea14..1d5c5e9cc 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -16,15 +16,15 @@ on: - "**.ui" # Build files - - "flatpak/" + - "flatpak/**" # Directories - - "buildconfig/" - - "cmake/" - - "launcher/" - - "libraries/" - - "program_info/" - - "tests/" + - "buildconfig/**" + - "cmake/**" + - "launcher/**" + - "libraries/**" + - "program_info/**" + - "tests/**" # Files - "CMakeLists.txt" @@ -37,17 +37,19 @@ on: # File types - "**.cpp" - "**.h" + - "**.java" + - "**.ui" # Build files - - "flatpak/" + - "flatpak/**" # Directories - - "buildconfig/" - - "cmake/" - - "launcher/" - - "libraries/" - - "program_info/" - - "tests/" + - "buildconfig/**" + - "cmake/**" + - "launcher/**" + - "libraries/**" + - "program_info/**" + - "tests/**" # Files - "CMakeLists.txt" diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 2a9e2db6a..ecd71977e 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -16,16 +16,16 @@ on: # Build files - "**.nix" - - "nix/" + - "nix/**" - "flake.lock" # Directories - - "buildconfig/" - - "cmake/" - - "launcher/" - - "libraries/" - - "program_info/" - - "tests/" + - "buildconfig/**" + - "cmake/**" + - "launcher/**" + - "libraries/**" + - "program_info/**" + - "tests/**" # Files - "CMakeLists.txt" @@ -38,19 +38,21 @@ on: # File types - "**.cpp" - "**.h" + - "**.java" + - "**.ui" # Build files - "**.nix" - - "nix/" + - "nix/**" - "flake.lock" # Directories - - "buildconfig/" - - "cmake/" - - "launcher/" - - "libraries/" - - "program_info/" - - "tests/" + - "buildconfig/**" + - "cmake/**" + - "launcher/**" + - "libraries/**" + - "program_info/**" + - "tests/**" # Files - "CMakeLists.txt" diff --git a/cmake/windowsMSVCPreset.json b/cmake/windowsMSVCPreset.json index 603a0a9ff..278f09b94 100644 --- a/cmake/windowsMSVCPreset.json +++ b/cmake/windowsMSVCPreset.json @@ -12,15 +12,15 @@ "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" - } + }, + "generator": "Ninja" }, { "name": "windows_msvc_arm64_cross_base", "hidden": true, "inherits": [ "windows_msvc_base" - ], - "architecture": "arm64" + ] }, { "name": "windows_msvc_debug", @@ -28,8 +28,7 @@ "base_debug", "windows_msvc_base" ], - "displayName": "Windows MSVC (Debug)", - "generator": "Ninja" + "displayName": "Windows MSVC (Debug)" }, { "name": "windows_msvc_release", @@ -98,11 +97,7 @@ ], "displayName": "Windows MSVC (Release)", "configurePreset": "windows_msvc_release", - "configuration": "Release", - "nativeToolOptions": [ - "/p:UseMultiToolTask=true", - "/p:EnforceProcessCountAcrossBuilds=true" - ] + "configuration": "Release" }, { "name": "windows_msvc_arm64_cross_debug", @@ -111,11 +106,7 @@ ], "displayName": "Windows MSVC (ARM64 cross, Debug)", "configurePreset": "windows_msvc_arm64_cross_debug", - "configuration": "Debug", - "nativeToolOptions": [ - "/p:UseMultiToolTask=true", - "/p:EnforceProcessCountAcrossBuilds=true" - ] + "configuration": "Debug" }, { "name": "windows_msvc_arm64_cross_release", @@ -124,11 +115,7 @@ ], "displayName": "Windows MSVC (ARM64 cross, Release)", "configurePreset": "windows_msvc_arm64_cross_release", - "configuration": "Release", - "nativeToolOptions": [ - "/p:UseMultiToolTask=true", - "/p:EnforceProcessCountAcrossBuilds=true" - ] + "configuration": "Release" }, { "name": "windows_msvc_ci", @@ -137,11 +124,7 @@ ], "displayName": "Windows MSVC (CI)", "configurePreset": "windows_msvc_ci", - "configuration": "Release", - "nativeToolOptions": [ - "/p:UseMultiToolTask=true", - "/p:EnforceProcessCountAcrossBuilds=true" - ] + "configuration": "Release" }, { "name": "windows_msvc_arm64_cross_ci", @@ -150,11 +133,7 @@ ], "displayName": "Windows MSVC (ARM64 cross, CI)", "configurePreset": "windows_msvc_arm64_cross_ci", - "configuration": "Release", - "nativeToolOptions": [ - "/p:UseMultiToolTask=true", - "/p:EnforceProcessCountAcrossBuilds=true" - ] + "configuration": "Release" } ], "testPresets": [ diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 5246de19d..6204acabd 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -1458,6 +1458,12 @@ if(WIN32 OR (DEFINED Launcher_BUILD_FILELINKER AND Launcher_BUILD_FILELINKER)) add_executable("${Launcher_Name}_filelink" WIN32 filelink/filelink_main.cpp) target_sources("${Launcher_Name}_filelink" PRIVATE filelink/filelink.exe.manifest) + # HACK: Fix manifest issues with Ninja in release mode (and only release mode) and MSVC + # I have no idea why this works or why it's needed. UPDATE THIS IF YOU EDIT THE MANIFEST!!! -@getchoo + # Thank you 2018 CMake mailing list thread https://cmake.cmake.narkive.com/LnotZXus/conflicting-msvc-manifests + if(MSVC) + set_property(TARGET "${Launcher_Name}_filelink" PROPERTY LINK_FLAGS "/MANIFESTUAC:level='requireAdministrator'") + endif() target_link_libraries("${Launcher_Name}_filelink" filelink_logic)