mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
Merge branch 'develop' into recommended-memory
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
90
.github/workflows/build.yml
vendored
90
.github/workflows/build.yml
vendored
@ -53,6 +53,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
|
cmake_preset: linux
|
||||||
qt_ver: 6
|
qt_ver: 6
|
||||||
qt_host: linux
|
qt_host: linux
|
||||||
qt_arch: ""
|
qt_arch: ""
|
||||||
@ -64,11 +65,13 @@ jobs:
|
|||||||
|
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
name: "Windows-MinGW-w64"
|
name: "Windows-MinGW-w64"
|
||||||
|
cmake_preset: windows_mingw
|
||||||
msystem: clang64
|
msystem: clang64
|
||||||
vcvars_arch: "amd64_x86"
|
vcvars_arch: "amd64_x86"
|
||||||
|
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
name: "Windows-MSVC"
|
name: "Windows-MSVC"
|
||||||
|
cmake_preset: windows_msvc
|
||||||
msystem: ""
|
msystem: ""
|
||||||
architecture: "x64"
|
architecture: "x64"
|
||||||
vcvars_arch: "amd64"
|
vcvars_arch: "amd64"
|
||||||
@ -82,6 +85,7 @@ jobs:
|
|||||||
|
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
name: "Windows-MSVC-arm64"
|
name: "Windows-MSVC-arm64"
|
||||||
|
cmake_preset: windows_msvc_arm64_cross
|
||||||
msystem: ""
|
msystem: ""
|
||||||
architecture: "arm64"
|
architecture: "arm64"
|
||||||
vcvars_arch: "amd64_arm64"
|
vcvars_arch: "amd64_arm64"
|
||||||
@ -95,6 +99,7 @@ jobs:
|
|||||||
|
|
||||||
- os: macos-14
|
- os: macos-14
|
||||||
name: macOS
|
name: macOS
|
||||||
|
cmake_preset: ${{ inputs.build_type == 'Debug' && 'macos_universal' || 'macos' }}
|
||||||
macosx_deployment_target: 11.0
|
macosx_deployment_target: 11.0
|
||||||
qt_ver: 6
|
qt_ver: 6
|
||||||
qt_host: mac
|
qt_host: mac
|
||||||
@ -154,6 +159,7 @@ jobs:
|
|||||||
if: (runner.os != 'Windows' || matrix.msystem == '') && inputs.build_type == 'Debug'
|
if: (runner.os != 'Windows' || matrix.msystem == '') && inputs.build_type == 'Debug'
|
||||||
uses: hendrikmuhs/ccache-action@v1.2.18
|
uses: hendrikmuhs/ccache-action@v1.2.18
|
||||||
with:
|
with:
|
||||||
|
create-symlink: ${{ runner.os != 'Windows' }}
|
||||||
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}-${{ matrix.architecture }}
|
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}-${{ matrix.architecture }}
|
||||||
|
|
||||||
- name: Use ccache on Debug builds only
|
- name: Use ccache on Debug builds only
|
||||||
@ -275,75 +281,30 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
|
|
||||||
##
|
##
|
||||||
# CONFIGURE
|
# SOURCE BUILD
|
||||||
##
|
##
|
||||||
|
|
||||||
- name: Configure CMake (macOS)
|
- name: Run CMake workflow
|
||||||
if: runner.os == 'macOS'
|
if: ${{ runner.os != 'Windows' || matrix.msystem == '' }}
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
CMAKE_PRESET: ${{ matrix.cmake_preset }}
|
||||||
|
PRESET_TYPE: ${{ inputs.build_type == 'Debug' && 'debug' || 'ci' }}
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_ENABLE_JAVA_DOWNLOADER=ON -DLauncher_BUILD_PLATFORM=official -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -G Ninja
|
cmake --workflow --preset "$CMAKE_PRESET"_"$PRESET_TYPE"
|
||||||
|
|
||||||
- name: Configure CMake (Windows MinGW-w64)
|
# NOTE: Split due to the `shell` requirement for msys2
|
||||||
if: runner.os == 'Windows' && matrix.msystem != ''
|
# TODO(@getchoo): Get ccache working!
|
||||||
|
- name: Run CMake workflow (Windows MinGW-w64)
|
||||||
|
if: ${{ runner.os == 'Windows' && matrix.msystem != '' }}
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
|
env:
|
||||||
|
CMAKE_PRESET: ${{ matrix.cmake_preset }}
|
||||||
|
PRESET_TYPE: ${{ inputs.build_type == 'Debug' && 'debug' || 'ci' }}
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_ENABLE_JAVA_DOWNLOADER=ON -DLauncher_BUILD_PLATFORM=official -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=6 -DCMAKE_OBJDUMP=/mingw64/bin/objdump.exe -DLauncher_BUILD_ARTIFACT=${{ matrix.name }}-Qt${{ matrix.qt_ver }} -G Ninja
|
cmake --workflow --preset "$CMAKE_PRESET"_"$PRESET_TYPE"
|
||||||
|
|
||||||
- name: Configure CMake (Windows MSVC)
|
|
||||||
if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture != 'arm64'
|
|
||||||
run: |
|
|
||||||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_ENABLE_JAVA_DOWNLOADER=ON -DLauncher_BUILD_PLATFORM=official -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" -DLauncher_FORCE_BUNDLED_LIBS=ON -DLauncher_BUILD_ARTIFACT=${{ matrix.name }}-Qt${{ matrix.qt_ver }} -G Ninja
|
|
||||||
|
|
||||||
- name: Configure CMake (Windows MSVC arm64)
|
|
||||||
if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture == 'arm64'
|
|
||||||
run: |
|
|
||||||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_ENABLE_JAVA_DOWNLOADER=ON -DLauncher_BUILD_PLATFORM=official -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" -A${{ matrix.architecture}} -DLauncher_FORCE_BUNDLED_LIBS=ON -DLauncher_BUILD_ARTIFACT=${{ matrix.name }}-Qt${{ matrix.qt_ver }}
|
|
||||||
|
|
||||||
- name: Configure CMake (Linux)
|
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: |
|
|
||||||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_ENABLE_JAVA_DOWNLOADER=ON -DLauncher_BUILD_PLATFORM=official -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DLauncher_BUILD_ARTIFACT=Linux-Qt${{ matrix.qt_ver }} -G Ninja
|
|
||||||
|
|
||||||
##
|
|
||||||
# BUILD
|
|
||||||
##
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
run: |
|
|
||||||
cmake --build ${{ env.BUILD_DIR }}
|
|
||||||
|
|
||||||
- name: Build (Windows MinGW-w64)
|
|
||||||
if: runner.os == 'Windows' && matrix.msystem != ''
|
|
||||||
shell: msys2 {0}
|
|
||||||
run: |
|
|
||||||
cmake --build ${{ env.BUILD_DIR }}
|
|
||||||
|
|
||||||
- name: Build (Windows MSVC)
|
|
||||||
if: runner.os == 'Windows' && matrix.msystem == ''
|
|
||||||
run: |
|
|
||||||
cmake --build ${{ env.BUILD_DIR }} --config ${{ inputs.build_type }}
|
|
||||||
|
|
||||||
##
|
|
||||||
# TEST
|
|
||||||
##
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
run: |
|
|
||||||
ctest -E "^example64|example$" --test-dir build --output-on-failure
|
|
||||||
|
|
||||||
- name: Test (Windows MinGW-w64)
|
|
||||||
if: runner.os == 'Windows' && matrix.msystem != ''
|
|
||||||
shell: msys2 {0}
|
|
||||||
run: |
|
|
||||||
ctest -E "^example64|example$" --test-dir build --output-on-failure
|
|
||||||
|
|
||||||
- name: Test (Windows MSVC)
|
|
||||||
if: runner.os == 'Windows' && matrix.msystem == '' && matrix.architecture != 'arm64'
|
|
||||||
run: |
|
|
||||||
ctest -E "^example64|example$" --test-dir build --output-on-failure -C ${{ inputs.build_type }}
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# PACKAGE BUILDS
|
# PACKAGE BUILDS
|
||||||
@ -542,8 +503,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Package (Linux, portable)
|
- name: Package (Linux, portable)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
|
env:
|
||||||
|
CMAKE_PRESET: ${{ matrix.cmake_preset }}
|
||||||
|
PRESET_TYPE: ${{ inputs.build_type == 'Debug' && 'debug' || 'ci' }}
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PORTABLE_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=official -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DLauncher_BUILD_ARTIFACT=Linux-Qt${{ matrix.qt_ver }} -DINSTALL_BUNDLE=full -G Ninja
|
cmake --preset "$CMAKE_PRESET"_"$PRESET_TYPE" -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PORTABLE_DIR }} -DINSTALL_BUNDLE=full
|
||||||
cmake --install ${{ env.BUILD_DIR }}
|
cmake --install ${{ env.BUILD_DIR }}
|
||||||
cmake --install ${{ env.BUILD_DIR }} --component portable
|
cmake --install ${{ env.BUILD_DIR }} --component portable
|
||||||
|
|
||||||
|
64
.github/workflows/codeql.yml
vendored
64
.github/workflows/codeql.yml
vendored
@ -2,37 +2,48 @@ name: "CodeQL Code Scanning"
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# NOTE: `!` doesn't work with `paths-ignore` :(
|
|
||||||
# So we a catch-all glob instead
|
|
||||||
# https://github.com/orgs/community/discussions/25369#discussioncomment-3247674
|
|
||||||
paths:
|
paths:
|
||||||
- "**"
|
# File types
|
||||||
- "!.github/**"
|
- "**.cpp"
|
||||||
- ".github/workflows/codeql.yml"
|
- "**.h"
|
||||||
- "!flatpak/"
|
- "**.java"
|
||||||
- "!nix/"
|
|
||||||
- "!scripts/"
|
|
||||||
|
|
||||||
- "!.git*"
|
# Directories
|
||||||
- "!.envrc"
|
- "buildconfig/"
|
||||||
- "!**.md"
|
- "cmake/"
|
||||||
|
- "launcher/"
|
||||||
|
- "libraries/"
|
||||||
|
- "program_info/"
|
||||||
|
- "tests/"
|
||||||
|
|
||||||
|
# Files
|
||||||
|
- "CMakeLists.txt"
|
||||||
- "COPYING.md"
|
- "COPYING.md"
|
||||||
- "!renovate.json"
|
|
||||||
|
# Workflows
|
||||||
|
- ".github/codeql"
|
||||||
|
- ".github/workflows/codeql.yml"
|
||||||
pull_request:
|
pull_request:
|
||||||
# See above
|
|
||||||
paths:
|
paths:
|
||||||
- "**"
|
# File types
|
||||||
- "!.github/**"
|
- "**.cpp"
|
||||||
- ".github/workflows/codeql.yml"
|
- "**.h"
|
||||||
- "!flatpak/"
|
|
||||||
- "!nix/"
|
|
||||||
- "!scripts/"
|
|
||||||
|
|
||||||
- "!.git*"
|
# Directories
|
||||||
- "!.envrc"
|
- "buildconfig/"
|
||||||
- "!**.md"
|
- "cmake/"
|
||||||
|
- "launcher/"
|
||||||
|
- "libraries/"
|
||||||
|
- "program_info/"
|
||||||
|
- "tests/"
|
||||||
|
|
||||||
|
# Files
|
||||||
|
- "CMakeLists.txt"
|
||||||
- "COPYING.md"
|
- "COPYING.md"
|
||||||
- "!renovate.json"
|
|
||||||
|
# Workflows
|
||||||
|
- ".github/codeql"
|
||||||
|
- ".github/workflows/codeql.yml"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -71,9 +82,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Configure and Build
|
- name: Configure and Build
|
||||||
run: |
|
run: |
|
||||||
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -G Ninja
|
cmake --preset linux_debug
|
||||||
|
cmake --build --preset linux_debug
|
||||||
cmake --build build
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v3
|
||||||
|
61
.github/workflows/flatpak.yml
vendored
61
.github/workflows/flatpak.yml
vendored
@ -5,35 +5,52 @@ on:
|
|||||||
# We don't do anything with these artifacts on releases. They go to Flathub
|
# We don't do anything with these artifacts on releases. They go to Flathub
|
||||||
tags-ignore:
|
tags-ignore:
|
||||||
- "*"
|
- "*"
|
||||||
# NOTE: `!` doesn't work with `paths-ignore` :(
|
|
||||||
# So we a catch-all glob instead
|
|
||||||
# https://github.com/orgs/community/discussions/25369#discussioncomment-3247674
|
|
||||||
paths:
|
paths:
|
||||||
- "**"
|
# File types
|
||||||
- "!.github/**"
|
- "**.cpp"
|
||||||
- ".github/workflows/flatpak.yml"
|
- "**.h"
|
||||||
- "!nix/"
|
- "**.java"
|
||||||
- "!scripts/"
|
|
||||||
|
|
||||||
- "!.git*"
|
# Build files
|
||||||
- "!.envrc"
|
- "flatpak/"
|
||||||
- "!**.md"
|
|
||||||
|
# Directories
|
||||||
|
- "buildconfig/"
|
||||||
|
- "cmake/"
|
||||||
|
- "launcher/"
|
||||||
|
- "libraries/"
|
||||||
|
- "program_info/"
|
||||||
|
- "tests/"
|
||||||
|
|
||||||
|
# Files
|
||||||
|
- "CMakeLists.txt"
|
||||||
- "COPYING.md"
|
- "COPYING.md"
|
||||||
- "!renovate.json"
|
|
||||||
|
# Workflows
|
||||||
|
- ".github/workflows/flatpak.yml"
|
||||||
pull_request:
|
pull_request:
|
||||||
# See above
|
|
||||||
paths:
|
paths:
|
||||||
- "**"
|
# File types
|
||||||
- "!.github/**"
|
- "**.cpp"
|
||||||
- ".github/workflows/flatpak.yml"
|
- "**.h"
|
||||||
- "!nix/"
|
|
||||||
- "!scripts/"
|
|
||||||
|
|
||||||
- "!.git*"
|
# Build files
|
||||||
- "!.envrc"
|
- "flatpak/"
|
||||||
- "!**.md"
|
|
||||||
|
# Directories
|
||||||
|
- "buildconfig/"
|
||||||
|
- "cmake/"
|
||||||
|
- "launcher/"
|
||||||
|
- "libraries/"
|
||||||
|
- "program_info/"
|
||||||
|
- "tests/"
|
||||||
|
|
||||||
|
# Files
|
||||||
|
- "CMakeLists.txt"
|
||||||
- "COPYING.md"
|
- "COPYING.md"
|
||||||
- "!renovate.json"
|
|
||||||
|
# Workflows
|
||||||
|
- ".github/workflows/flatpak.yml"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
64
.github/workflows/nix.yml
vendored
64
.github/workflows/nix.yml
vendored
@ -4,34 +4,56 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "*"
|
- "*"
|
||||||
# NOTE: `!` doesn't work with `paths-ignore` :(
|
|
||||||
# So we a catch-all glob instead
|
|
||||||
# https://github.com/orgs/community/discussions/25369#discussioncomment-3247674
|
|
||||||
paths:
|
paths:
|
||||||
- "**"
|
# File types
|
||||||
- "!.github/**"
|
- "**.cpp"
|
||||||
- ".github/workflows/nix.yml"
|
- "**.h"
|
||||||
- "!flatpak/"
|
- "**.java"
|
||||||
- "!scripts/"
|
|
||||||
|
|
||||||
- "!.git*"
|
# Build files
|
||||||
- "!.envrc"
|
- "**.nix"
|
||||||
- "!**.md"
|
- "nix/"
|
||||||
|
- "flake.lock"
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
- "buildconfig/"
|
||||||
|
- "cmake/"
|
||||||
|
- "launcher/"
|
||||||
|
- "libraries/"
|
||||||
|
- "program_info/"
|
||||||
|
- "tests/"
|
||||||
|
|
||||||
|
# Files
|
||||||
|
- "CMakeLists.txt"
|
||||||
- "COPYING.md"
|
- "COPYING.md"
|
||||||
- "!renovate.json"
|
|
||||||
|
# Workflows
|
||||||
|
- ".github/workflows/nix.yml"
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
paths:
|
paths:
|
||||||
- "**"
|
# File types
|
||||||
- "!.github/**"
|
- "**.cpp"
|
||||||
- ".github/workflows/nix.yml"
|
- "**.h"
|
||||||
- "!flatpak/"
|
|
||||||
- "!scripts/"
|
|
||||||
|
|
||||||
- "!.git*"
|
# Build files
|
||||||
- "!.envrc"
|
- "**.nix"
|
||||||
- "!**.md"
|
- "nix/"
|
||||||
|
- "flake.lock"
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
- "buildconfig/"
|
||||||
|
- "cmake/"
|
||||||
|
- "launcher/"
|
||||||
|
- "libraries/"
|
||||||
|
- "program_info/"
|
||||||
|
- "tests/"
|
||||||
|
|
||||||
|
# Files
|
||||||
|
- "CMakeLists.txt"
|
||||||
- "COPYING.md"
|
- "COPYING.md"
|
||||||
- "!renovate.json"
|
|
||||||
|
# Workflows
|
||||||
|
- ".github/workflows/nix.yml"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
61
.github/workflows/trigger_builds.yml
vendored
61
.github/workflows/trigger_builds.yml
vendored
@ -4,39 +4,48 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- "renovate/**"
|
- "renovate/**"
|
||||||
# NOTE: `!` doesn't work with `paths-ignore` :(
|
|
||||||
# So we a catch-all glob instead
|
|
||||||
# https://github.com/orgs/community/discussions/25369#discussioncomment-3247674
|
|
||||||
paths:
|
paths:
|
||||||
- "**"
|
# File types
|
||||||
- "!.github/**"
|
- "**.cpp"
|
||||||
|
- "**.h"
|
||||||
|
- "**.java"
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
- "buildconfig/"
|
||||||
|
- "cmake/"
|
||||||
|
- "launcher/"
|
||||||
|
- "libraries/"
|
||||||
|
- "program_info/"
|
||||||
|
- "tests/"
|
||||||
|
|
||||||
|
# Files
|
||||||
|
- "CMakeLists.txt"
|
||||||
|
- "COPYING.md"
|
||||||
|
|
||||||
|
# Workflows
|
||||||
- ".github/workflows/build.yml"
|
- ".github/workflows/build.yml"
|
||||||
- ".github/workflows/trigger_builds.yml"
|
- ".github/workflows/trigger_builds.yml"
|
||||||
- "!flatpak/"
|
|
||||||
- "!nix/"
|
|
||||||
- "!scripts/"
|
|
||||||
|
|
||||||
- "!.git*"
|
|
||||||
- "!.envrc"
|
|
||||||
- "!**.md"
|
|
||||||
- "COPYING.md"
|
|
||||||
- "!renovate.json"
|
|
||||||
pull_request:
|
pull_request:
|
||||||
# See above
|
|
||||||
paths:
|
paths:
|
||||||
- "**"
|
# File types
|
||||||
- "!.github/**"
|
- "**.cpp"
|
||||||
|
- "**.h"
|
||||||
|
|
||||||
|
# Directories
|
||||||
|
- "buildconfig/"
|
||||||
|
- "cmake/"
|
||||||
|
- "launcher/"
|
||||||
|
- "libraries/"
|
||||||
|
- "program_info/"
|
||||||
|
- "tests/"
|
||||||
|
|
||||||
|
# Files
|
||||||
|
- "CMakeLists.txt"
|
||||||
|
- "COPYING.md"
|
||||||
|
|
||||||
|
# Workflows
|
||||||
- ".github/workflows/build.yml"
|
- ".github/workflows/build.yml"
|
||||||
- ".github/workflows/trigger_builds.yml"
|
- ".github/workflows/trigger_builds.yml"
|
||||||
- "!flatpak/"
|
|
||||||
- "!nix/"
|
|
||||||
- "!scripts/"
|
|
||||||
|
|
||||||
- "!.git*"
|
|
||||||
- "!.envrc"
|
|
||||||
- "!**.md"
|
|
||||||
- "COPYING.md"
|
|
||||||
- "!renovate.json"
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,6 +14,7 @@ CMakeLists.txt.user.*
|
|||||||
CMakeSettings.json
|
CMakeSettings.json
|
||||||
/CMakeFiles
|
/CMakeFiles
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
|
CMakeUserPresets.json
|
||||||
/.project
|
/.project
|
||||||
/.settings
|
/.settings
|
||||||
/.idea
|
/.idea
|
||||||
|
14
CMakePresets.json
Normal file
14
CMakePresets.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
|
||||||
|
"version": 8,
|
||||||
|
"cmakeMinimumRequired": {
|
||||||
|
"major": 3,
|
||||||
|
"minor": 28
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"cmake/linuxPreset.json",
|
||||||
|
"cmake/macosPreset.json",
|
||||||
|
"cmake/windowsMinGWPreset.json",
|
||||||
|
"cmake/windowsMSVCPreset.json"
|
||||||
|
]
|
||||||
|
}
|
81
cmake/commonPresets.json
Normal file
81
cmake/commonPresets.json
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
|
||||||
|
"version": 8,
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "base",
|
||||||
|
"hidden": true,
|
||||||
|
"binaryDir": "build",
|
||||||
|
"installDir": "install",
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_PLATFORM": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "base_debug",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": [
|
||||||
|
"base"
|
||||||
|
],
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "base_release",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": [
|
||||||
|
"base"
|
||||||
|
],
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"ENABLE_LTO": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "base_ci",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": [
|
||||||
|
"base_release"
|
||||||
|
],
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_PLATFORM": "official",
|
||||||
|
"Launcher_FORCE_BUNDLED_LIBS": "ON"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testPresets": [
|
||||||
|
{
|
||||||
|
"name": "base",
|
||||||
|
"hidden": true,
|
||||||
|
"output": {
|
||||||
|
"outputOnFailure": true
|
||||||
|
},
|
||||||
|
"execution": {
|
||||||
|
"noTestsAction": "error"
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"exclude": {
|
||||||
|
"name": "^example64|example$"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "base_debug",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": [
|
||||||
|
"base"
|
||||||
|
],
|
||||||
|
"output": {
|
||||||
|
"debug": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "base_release",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": [
|
||||||
|
"base"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
180
cmake/linuxPreset.json
Normal file
180
cmake/linuxPreset.json
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
|
||||||
|
"version": 8,
|
||||||
|
"include": [
|
||||||
|
"commonPresets.json"
|
||||||
|
],
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "linux_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Linux"
|
||||||
|
},
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Linux-Qt6",
|
||||||
|
"Launcher_ENABLE_JAVA_DOWNLOADER": "ON"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"linux_base"
|
||||||
|
],
|
||||||
|
"displayName": "Linux (Debug)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"linux_base"
|
||||||
|
],
|
||||||
|
"displayName": "Linux (Release)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux_ci",
|
||||||
|
"inherits": [
|
||||||
|
"base_ci",
|
||||||
|
"linux_base"
|
||||||
|
],
|
||||||
|
"displayName": "Linux (CI)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Linux-Qt6"
|
||||||
|
},
|
||||||
|
"installDir": "/usr"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildPresets": [
|
||||||
|
{
|
||||||
|
"name": "linux_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Linux"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux_debug",
|
||||||
|
"inherits": [
|
||||||
|
"linux_base"
|
||||||
|
],
|
||||||
|
"displayName": "Linux (Debug)",
|
||||||
|
"configurePreset": "linux_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux_release",
|
||||||
|
"inherits": [
|
||||||
|
"linux_base"
|
||||||
|
],
|
||||||
|
"displayName": "Linux (Release)",
|
||||||
|
"configurePreset": "linux_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux_ci",
|
||||||
|
"inherits": [
|
||||||
|
"linux_base"
|
||||||
|
],
|
||||||
|
"displayName": "Linux (CI)",
|
||||||
|
"configurePreset": "linux_ci"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testPresets": [
|
||||||
|
{
|
||||||
|
"name": "linux_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Linux"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"linux_base"
|
||||||
|
],
|
||||||
|
"displayName": "Linux (Debug)",
|
||||||
|
"configurePreset": "linux_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"linux_base"
|
||||||
|
],
|
||||||
|
"displayName": "Linux (Release)",
|
||||||
|
"configurePreset": "linux_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux_ci",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"linux_base"
|
||||||
|
],
|
||||||
|
"displayName": "Linux (CI)",
|
||||||
|
"configurePreset": "linux_ci"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"workflowPresets": [
|
||||||
|
{
|
||||||
|
"name": "linux_debug",
|
||||||
|
"displayName": "Linux (Debug)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "linux_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "linux_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "linux_debug"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux",
|
||||||
|
"displayName": "Linux (Release)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "linux_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "linux_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "linux_release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux_ci",
|
||||||
|
"displayName": "Linux (CI)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "linux_ci"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "linux_ci"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "linux_ci"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
272
cmake/macosPreset.json
Normal file
272
cmake/macosPreset.json
Normal file
@ -0,0 +1,272 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
|
||||||
|
"version": 8,
|
||||||
|
"include": [
|
||||||
|
"commonPresets.json"
|
||||||
|
],
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "macos_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Darwin"
|
||||||
|
},
|
||||||
|
"generator": "Ninja"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_universal_base",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": [
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_OSX_ARCHITECTURES": "x86_64;arm64",
|
||||||
|
"Launcher_BUILD_ARTIFACT": "macOS-Qt6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (Debug)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (Release)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_universal_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"macos_universal_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (Universal Binary, Debug)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_universal_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"macos_universal_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (Universal Binary, Release)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_ci",
|
||||||
|
"inherits": [
|
||||||
|
"base_ci",
|
||||||
|
"macos_universal_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (CI)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_ARTIFACT": "macOS-Qt6"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildPresets": [
|
||||||
|
{
|
||||||
|
"name": "macos_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Darwin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_debug",
|
||||||
|
"inherits": [
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (Debug)",
|
||||||
|
"configurePreset": "macos_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_release",
|
||||||
|
"inherits": [
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (Release)",
|
||||||
|
"configurePreset": "macos_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_universal_debug",
|
||||||
|
"inherits": [
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (Universal Binary, Debug)",
|
||||||
|
"configurePreset": "macos_universal_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_universal_release",
|
||||||
|
"inherits": [
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (Universal Binary, Release)",
|
||||||
|
"configurePreset": "macos_universal_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_ci",
|
||||||
|
"inherits": [
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (CI)",
|
||||||
|
"configurePreset": "macos_ci"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testPresets": [
|
||||||
|
{
|
||||||
|
"name": "macos_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Darwin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "MacOS (Debug)",
|
||||||
|
"configurePreset": "macos_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (Release)",
|
||||||
|
"configurePreset": "macos_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_universal_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "MacOS (Universal Binary, Debug)",
|
||||||
|
"configurePreset": "macos_universal_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_universal_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (Universal Binary, Release)",
|
||||||
|
"configurePreset": "macos_universal_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_ci",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"macos_base"
|
||||||
|
],
|
||||||
|
"displayName": "macOS (CI)",
|
||||||
|
"configurePreset": "macos_ci"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"workflowPresets": [
|
||||||
|
{
|
||||||
|
"name": "macos_debug",
|
||||||
|
"displayName": "macOS (Debug)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "macos_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "macos_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "macos_debug"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos",
|
||||||
|
"displayName": "macOS (Release)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "macos_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "macos_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "macos_release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_universal_debug",
|
||||||
|
"displayName": "macOS (Universal Binary, Debug)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "macos_universal_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "macos_universal_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "macos_universal_debug"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_universal",
|
||||||
|
"displayName": "macOS (Universal Binary, Release)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "macos_universal_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "macos_universal_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "macos_universal_release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos_ci",
|
||||||
|
"displayName": "macOS (CI)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "macos_ci"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "macos_ci"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "macos_ci"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
311
cmake/windowsMSVCPreset.json
Normal file
311
cmake/windowsMSVCPreset.json
Normal file
@ -0,0 +1,311 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
|
||||||
|
"version": 8,
|
||||||
|
"include": [
|
||||||
|
"commonPresets.json"
|
||||||
|
],
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
|
},
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Windows-MSVC-Qt6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_arm64_cross_base",
|
||||||
|
"hidden": true,
|
||||||
|
"inherits": [
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"architecture": "arm64",
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Windows-MSVC-arm64-Qt6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (Debug)",
|
||||||
|
"generator": "Ninja"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (Release)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_arm64_cross_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"windows_msvc_arm64_cross_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (ARM64 cross, Debug)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_arm64_cross_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"windows_msvc_arm64_cross_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (ARM64 cross, Release)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_ci",
|
||||||
|
"inherits": [
|
||||||
|
"base_ci",
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (CI)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Windows-MSVC-Qt6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_arm64_cross_ci",
|
||||||
|
"inherits": [
|
||||||
|
"base_ci",
|
||||||
|
"windows_msvc_arm64_cross_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (ARM64 cross, CI)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Windows-MSVC-arm64-Qt6"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildPresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_debug",
|
||||||
|
"inherits": [
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (Debug)",
|
||||||
|
"configurePreset": "windows_msvc_debug",
|
||||||
|
"configuration": "Debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_release",
|
||||||
|
"inherits": [
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (Release)",
|
||||||
|
"configurePreset": "windows_msvc_release",
|
||||||
|
"configuration": "Release",
|
||||||
|
"nativeToolOptions": [
|
||||||
|
"/p:UseMultiToolTask=true",
|
||||||
|
"/p:EnforceProcessCountAcrossBuilds=true"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_arm64_cross_debug",
|
||||||
|
"inherits": [
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (ARM64 cross, Debug)",
|
||||||
|
"configurePreset": "windows_msvc_arm64_cross_debug",
|
||||||
|
"configuration": "Debug",
|
||||||
|
"nativeToolOptions": [
|
||||||
|
"/p:UseMultiToolTask=true",
|
||||||
|
"/p:EnforceProcessCountAcrossBuilds=true"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_arm64_cross_release",
|
||||||
|
"inherits": [
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (ARM64 cross, Release)",
|
||||||
|
"configurePreset": "windows_msvc_arm64_cross_release",
|
||||||
|
"configuration": "Release",
|
||||||
|
"nativeToolOptions": [
|
||||||
|
"/p:UseMultiToolTask=true",
|
||||||
|
"/p:EnforceProcessCountAcrossBuilds=true"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_ci",
|
||||||
|
"inherits": [
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (CI)",
|
||||||
|
"configurePreset": "windows_msvc_ci",
|
||||||
|
"configuration": "Release",
|
||||||
|
"nativeToolOptions": [
|
||||||
|
"/p:UseMultiToolTask=true",
|
||||||
|
"/p:EnforceProcessCountAcrossBuilds=true"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_arm64_cross_ci",
|
||||||
|
"inherits": [
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (ARM64 cross, CI)",
|
||||||
|
"configurePreset": "windows_msvc_arm64_cross_ci",
|
||||||
|
"configuration": "Release",
|
||||||
|
"nativeToolOptions": [
|
||||||
|
"/p:UseMultiToolTask=true",
|
||||||
|
"/p:EnforceProcessCountAcrossBuilds=true"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testPresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (Debug)",
|
||||||
|
"configurePreset": "windows_msvc_debug",
|
||||||
|
"configuration": "Debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (Release)",
|
||||||
|
"configurePreset": "windows_msvc_release",
|
||||||
|
"configuration": "Release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_ci",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"windows_msvc_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MSVC (CI)",
|
||||||
|
"configurePreset": "windows_msvc_ci",
|
||||||
|
"configuration": "Release"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"workflowPresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_debug",
|
||||||
|
"displayName": "Windows MSVC (Debug)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "windows_msvc_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "windows_msvc_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "windows_msvc_debug"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc",
|
||||||
|
"displayName": "Windows MSVC (Release)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "windows_msvc_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "windows_msvc_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "windows_msvc_release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_arm64_cross_debug",
|
||||||
|
"displayName": "Windows MSVC (ARM64 cross, Debug)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "windows_msvc_arm64_cross_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "windows_msvc_arm64_cross_debug"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_arm64_cross",
|
||||||
|
"displayName": "Windows MSVC (ARM64 cross, Release)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "windows_msvc_arm64_cross_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "windows_msvc_arm64_cross_release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_ci",
|
||||||
|
"displayName": "Windows MSVC (CI)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "windows_msvc_ci"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "windows_msvc_ci"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "windows_msvc_ci"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_msvc_arm64_cross_ci",
|
||||||
|
"displayName": "Windows MSVC (ARM64 cross, CI)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "windows_msvc_arm64_cross_ci"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "windows_msvc_arm64_cross_ci"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
183
cmake/windowsMinGWPreset.json
Normal file
183
cmake/windowsMinGWPreset.json
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
|
||||||
|
"version": 8,
|
||||||
|
"include": [
|
||||||
|
"commonPresets.json"
|
||||||
|
],
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
|
},
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Windows-MinGW-w64-Qt6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"windows_mingw_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MinGW (Debug)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"windows_mingw_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MinGW (Release)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_ci",
|
||||||
|
"inherits": [
|
||||||
|
"base_ci",
|
||||||
|
"windows_mingw_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MinGW (CI)",
|
||||||
|
"cacheVariables": {
|
||||||
|
"Launcher_BUILD_ARTIFACT": "Windows-MinGW-w64-Qt6"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildPresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_debug",
|
||||||
|
"inherits": [
|
||||||
|
"windows_mingw_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MinGW (Debug)",
|
||||||
|
"configurePreset": "windows_mingw_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_release",
|
||||||
|
"inherits": [
|
||||||
|
"windows_mingw_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MinGW (Release)",
|
||||||
|
"configurePreset": "windows_mingw_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_ci",
|
||||||
|
"inherits": [
|
||||||
|
"windows_mingw_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MinGW (CI)",
|
||||||
|
"configurePreset": "windows_mingw_ci"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testPresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
|
},
|
||||||
|
"filter": {
|
||||||
|
"exclude": {
|
||||||
|
"name": "^example64|example$"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_debug",
|
||||||
|
"inherits": [
|
||||||
|
"base_debug",
|
||||||
|
"windows_mingw_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MinGW (Debug)",
|
||||||
|
"configurePreset": "windows_mingw_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_release",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"windows_mingw_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MinGW (Release)",
|
||||||
|
"configurePreset": "windows_mingw_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_ci",
|
||||||
|
"inherits": [
|
||||||
|
"base_release",
|
||||||
|
"windows_mingw_base"
|
||||||
|
],
|
||||||
|
"displayName": "Windows MinGW (CI)",
|
||||||
|
"configurePreset": "windows_mingw_ci"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"workflowPresets": [
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_debug",
|
||||||
|
"displayName": "Windows MinGW (Debug)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "windows_mingw_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "windows_mingw_debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "windows_mingw_debug"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw",
|
||||||
|
"displayName": "Windows MinGW (Release)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "windows_mingw_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "windows_mingw_release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "windows_mingw_release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows_mingw_ci",
|
||||||
|
"displayName": "Windows MinGW (CI)",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "configure",
|
||||||
|
"name": "windows_mingw_ci"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"name": "windows_mingw_ci"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"name": "windows_mingw_ci"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -269,9 +269,9 @@ bool FileIgnoreProxy::ignoreFile(QFileInfo fileInfo) const
|
|||||||
return m_ignoreFiles.contains(fileInfo.fileName()) || m_ignoreFilePaths.covers(relPath(fileInfo.absoluteFilePath()));
|
return m_ignoreFiles.contains(fileInfo.fileName()) || m_ignoreFilePaths.covers(relPath(fileInfo.absoluteFilePath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FileIgnoreProxy::filterFile(const QString& fileName) const
|
bool FileIgnoreProxy::filterFile(const QFileInfo& file) const
|
||||||
{
|
{
|
||||||
return m_blocked.covers(fileName) || ignoreFile(QFileInfo(QDir(m_root), fileName));
|
return m_blocked.covers(relPath(file.absoluteFilePath())) || ignoreFile(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileIgnoreProxy::loadBlockedPathsFromFile(const QString& fileName)
|
void FileIgnoreProxy::loadBlockedPathsFromFile(const QString& fileName)
|
||||||
|
@ -69,7 +69,7 @@ class FileIgnoreProxy : public QSortFilterProxyModel {
|
|||||||
// list of relative paths that need to be removed completely from model
|
// list of relative paths that need to be removed completely from model
|
||||||
inline SeparatorPrefixTree<'/'>& ignoreFilesWithPath() { return m_ignoreFilePaths; }
|
inline SeparatorPrefixTree<'/'>& ignoreFilesWithPath() { return m_ignoreFilePaths; }
|
||||||
|
|
||||||
bool filterFile(const QString& fileName) const;
|
bool filterFile(const QFileInfo& fileName) const;
|
||||||
|
|
||||||
void loadBlockedPathsFromFile(const QString& fileName);
|
void loadBlockedPathsFromFile(const QString& fileName);
|
||||||
|
|
||||||
|
@ -72,7 +72,6 @@ bool InstanceImportTask::abort()
|
|||||||
bool wasAborted = false;
|
bool wasAborted = false;
|
||||||
if (m_task)
|
if (m_task)
|
||||||
wasAborted = m_task->abort();
|
wasAborted = m_task->abort();
|
||||||
Task::abort();
|
|
||||||
return wasAborted;
|
return wasAborted;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,7 +305,7 @@ void InstanceImportTask::processFlame()
|
|||||||
connect(inst_creation_task.get(), &Task::status, this, &InstanceImportTask::setStatus);
|
connect(inst_creation_task.get(), &Task::status, this, &InstanceImportTask::setStatus);
|
||||||
connect(inst_creation_task.get(), &Task::details, this, &InstanceImportTask::setDetails);
|
connect(inst_creation_task.get(), &Task::details, this, &InstanceImportTask::setDetails);
|
||||||
|
|
||||||
connect(inst_creation_task.get(), &Task::aborted, this, &Task::abort);
|
connect(inst_creation_task.get(), &Task::aborted, this, &InstanceImportTask::emitAborted);
|
||||||
connect(inst_creation_task.get(), &Task::abortStatusChanged, this, &Task::setAbortable);
|
connect(inst_creation_task.get(), &Task::abortStatusChanged, this, &Task::setAbortable);
|
||||||
|
|
||||||
connect(inst_creation_task.get(), &Task::warningLogged, this, [this](const QString& line) { m_Warnings.append(line); });
|
connect(inst_creation_task.get(), &Task::warningLogged, this, [this](const QString& line) { m_Warnings.append(line); });
|
||||||
@ -407,7 +406,7 @@ void InstanceImportTask::processModrinth()
|
|||||||
connect(inst_creation_task.get(), &Task::status, this, &InstanceImportTask::setStatus);
|
connect(inst_creation_task.get(), &Task::status, this, &InstanceImportTask::setStatus);
|
||||||
connect(inst_creation_task.get(), &Task::details, this, &InstanceImportTask::setDetails);
|
connect(inst_creation_task.get(), &Task::details, this, &InstanceImportTask::setDetails);
|
||||||
|
|
||||||
connect(inst_creation_task.get(), &Task::aborted, this, &Task::abort);
|
connect(inst_creation_task.get(), &Task::aborted, this, &InstanceImportTask::emitAborted);
|
||||||
connect(inst_creation_task.get(), &Task::abortStatusChanged, this, &Task::setAbortable);
|
connect(inst_creation_task.get(), &Task::abortStatusChanged, this, &Task::setAbortable);
|
||||||
|
|
||||||
connect(inst_creation_task.get(), &Task::warningLogged, this, [this](const QString& line) { m_Warnings.append(line); });
|
connect(inst_creation_task.get(), &Task::warningLogged, this, [this](const QString& line) { m_Warnings.append(line); });
|
||||||
|
@ -418,7 +418,7 @@ bool extractFile(QString fileCompressed, QString file, QString target)
|
|||||||
return extractRelFile(&zip, file, target);
|
return extractRelFile(&zip, file, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFunction excludeFilter)
|
bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFileFunction excludeFilter)
|
||||||
{
|
{
|
||||||
QDir rootDirectory(rootDir);
|
QDir rootDirectory(rootDir);
|
||||||
if (!rootDirectory.exists())
|
if (!rootDirectory.exists())
|
||||||
@ -443,8 +443,8 @@ bool collectFileListRecursively(const QString& rootDir, const QString& subDir, Q
|
|||||||
// collect files
|
// collect files
|
||||||
entries = directory.entryInfoList(QDir::Files);
|
entries = directory.entryInfoList(QDir::Files);
|
||||||
for (const auto& e : entries) {
|
for (const auto& e : entries) {
|
||||||
QString relativeFilePath = rootDirectory.relativeFilePath(e.absoluteFilePath());
|
if (excludeFilter && excludeFilter(e)) {
|
||||||
if (excludeFilter && excludeFilter(relativeFilePath)) {
|
QString relativeFilePath = rootDirectory.relativeFilePath(e.absoluteFilePath());
|
||||||
qDebug() << "Skipping file " << relativeFilePath;
|
qDebug() << "Skipping file " << relativeFilePath;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
|
|
||||||
namespace MMCZip {
|
namespace MMCZip {
|
||||||
using FilterFunction = std::function<bool(const QString&)>;
|
using FilterFunction = std::function<bool(const QString&)>;
|
||||||
|
using FilterFileFunction = std::function<bool(const QFileInfo&)>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merge two zip files, using a filter function
|
* Merge two zip files, using a filter function
|
||||||
@ -149,7 +150,7 @@ bool extractFile(QString fileCompressed, QString file, QString dir);
|
|||||||
* \param excludeFilter function to excludeFilter which files shouldn't be included (returning true means to excude)
|
* \param excludeFilter function to excludeFilter which files shouldn't be included (returning true means to excude)
|
||||||
* \return true for success or false for failure
|
* \return true for success or false for failure
|
||||||
*/
|
*/
|
||||||
bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFunction excludeFilter);
|
bool collectFileListRecursively(const QString& rootDir, const QString& subDir, QFileInfoList* files, FilterFileFunction excludeFilter);
|
||||||
|
|
||||||
#if defined(LAUNCHER_APPLICATION)
|
#if defined(LAUNCHER_APPLICATION)
|
||||||
class ExportToZipTask : public Task {
|
class ExportToZipTask : public Task {
|
||||||
|
@ -55,6 +55,7 @@ void ArchiveDownloadTask::executeTask()
|
|||||||
connect(download.get(), &Task::stepProgress, this, &ArchiveDownloadTask::propagateStepProgress);
|
connect(download.get(), &Task::stepProgress, this, &ArchiveDownloadTask::propagateStepProgress);
|
||||||
connect(download.get(), &Task::status, this, &ArchiveDownloadTask::setStatus);
|
connect(download.get(), &Task::status, this, &ArchiveDownloadTask::setStatus);
|
||||||
connect(download.get(), &Task::details, this, &ArchiveDownloadTask::setDetails);
|
connect(download.get(), &Task::details, this, &ArchiveDownloadTask::setDetails);
|
||||||
|
connect(download.get(), &Task::aborted, this, &ArchiveDownloadTask::emitAborted);
|
||||||
connect(download.get(), &Task::succeeded, [this, fullPath] {
|
connect(download.get(), &Task::succeeded, [this, fullPath] {
|
||||||
// This should do all of the extracting and creating folders
|
// This should do all of the extracting and creating folders
|
||||||
extractJava(fullPath);
|
extractJava(fullPath);
|
||||||
@ -135,7 +136,6 @@ bool ArchiveDownloadTask::abort()
|
|||||||
auto aborted = canAbort();
|
auto aborted = canAbort();
|
||||||
if (m_task)
|
if (m_task)
|
||||||
aborted = m_task->abort();
|
aborted = m_task->abort();
|
||||||
emitAborted();
|
|
||||||
return aborted;
|
return aborted;
|
||||||
};
|
};
|
||||||
} // namespace Java
|
} // namespace Java
|
@ -47,7 +47,7 @@ FlamePackExportTask::FlamePackExportTask(const QString& name,
|
|||||||
bool optionalFiles,
|
bool optionalFiles,
|
||||||
InstancePtr instance,
|
InstancePtr instance,
|
||||||
const QString& output,
|
const QString& output,
|
||||||
MMCZip::FilterFunction filter,
|
MMCZip::FilterFileFunction filter,
|
||||||
int recommendedRAM)
|
int recommendedRAM)
|
||||||
: name(name)
|
: name(name)
|
||||||
, version(version)
|
, version(version)
|
||||||
@ -72,7 +72,6 @@ bool FlamePackExportTask::abort()
|
|||||||
{
|
{
|
||||||
if (task) {
|
if (task) {
|
||||||
task->abort();
|
task->abort();
|
||||||
emitAborted();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -173,6 +172,7 @@ void FlamePackExportTask::collectHashes()
|
|||||||
progressStep->status = status;
|
progressStep->status = status;
|
||||||
stepProgress(*progressStep);
|
stepProgress(*progressStep);
|
||||||
});
|
});
|
||||||
|
connect(hashingTask.get(), &Task::aborted, this, &FlamePackExportTask::emitAborted);
|
||||||
hashingTask->start();
|
hashingTask->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,6 +248,7 @@ void FlamePackExportTask::makeApiRequest()
|
|||||||
getProjectsInfo();
|
getProjectsInfo();
|
||||||
});
|
});
|
||||||
connect(task.get(), &Task::failed, this, &FlamePackExportTask::getProjectsInfo);
|
connect(task.get(), &Task::failed, this, &FlamePackExportTask::getProjectsInfo);
|
||||||
|
connect(task.get(), &Task::aborted, this, &FlamePackExportTask::emitAborted);
|
||||||
task->start();
|
task->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,6 +327,7 @@ void FlamePackExportTask::getProjectsInfo()
|
|||||||
buildZip();
|
buildZip();
|
||||||
});
|
});
|
||||||
connect(projTask.get(), &Task::failed, this, &FlamePackExportTask::emitFailed);
|
connect(projTask.get(), &Task::failed, this, &FlamePackExportTask::emitFailed);
|
||||||
|
connect(task.get(), &Task::aborted, this, &FlamePackExportTask::emitAborted);
|
||||||
task.reset(projTask);
|
task.reset(projTask);
|
||||||
task->start();
|
task->start();
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class FlamePackExportTask : public Task {
|
|||||||
bool optionalFiles,
|
bool optionalFiles,
|
||||||
InstancePtr instance,
|
InstancePtr instance,
|
||||||
const QString& output,
|
const QString& output,
|
||||||
MMCZip::FilterFunction filter,
|
MMCZip::FilterFileFunction filter,
|
||||||
int recommendedRAM);
|
int recommendedRAM);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -52,7 +52,7 @@ class FlamePackExportTask : public Task {
|
|||||||
MinecraftInstance* mcInstance;
|
MinecraftInstance* mcInstance;
|
||||||
const QDir gameRoot;
|
const QDir gameRoot;
|
||||||
const QString output;
|
const QString output;
|
||||||
const MMCZip::FilterFunction filter;
|
const MMCZip::FilterFileFunction filter;
|
||||||
const int m_recommendedRAM;
|
const int m_recommendedRAM;
|
||||||
|
|
||||||
struct ResolvedFile {
|
struct ResolvedFile {
|
||||||
|
@ -40,7 +40,7 @@ ModrinthPackExportTask::ModrinthPackExportTask(const QString& name,
|
|||||||
bool optionalFiles,
|
bool optionalFiles,
|
||||||
InstancePtr instance,
|
InstancePtr instance,
|
||||||
const QString& output,
|
const QString& output,
|
||||||
MMCZip::FilterFunction filter)
|
MMCZip::FilterFileFunction filter)
|
||||||
: name(name)
|
: name(name)
|
||||||
, version(version)
|
, version(version)
|
||||||
, summary(summary)
|
, summary(summary)
|
||||||
@ -63,7 +63,6 @@ bool ModrinthPackExportTask::abort()
|
|||||||
{
|
{
|
||||||
if (task) {
|
if (task) {
|
||||||
task->abort();
|
task->abort();
|
||||||
emitAborted();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -158,6 +157,7 @@ void ModrinthPackExportTask::makeApiRequest()
|
|||||||
task = api.currentVersions(pendingHashes.values(), "sha512", response);
|
task = api.currentVersions(pendingHashes.values(), "sha512", response);
|
||||||
connect(task.get(), &Task::succeeded, [this, response]() { parseApiResponse(response); });
|
connect(task.get(), &Task::succeeded, [this, response]() { parseApiResponse(response); });
|
||||||
connect(task.get(), &Task::failed, this, &ModrinthPackExportTask::emitFailed);
|
connect(task.get(), &Task::failed, this, &ModrinthPackExportTask::emitFailed);
|
||||||
|
connect(task.get(), &Task::aborted, this, &ModrinthPackExportTask::emitAborted);
|
||||||
task->start();
|
task->start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ class ModrinthPackExportTask : public Task {
|
|||||||
bool optionalFiles,
|
bool optionalFiles,
|
||||||
InstancePtr instance,
|
InstancePtr instance,
|
||||||
const QString& output,
|
const QString& output,
|
||||||
MMCZip::FilterFunction filter);
|
MMCZip::FilterFileFunction filter);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void executeTask() override;
|
void executeTask() override;
|
||||||
@ -58,7 +58,7 @@ class ModrinthPackExportTask : public Task {
|
|||||||
MinecraftInstance* mcInstance;
|
MinecraftInstance* mcInstance;
|
||||||
const QDir gameRoot;
|
const QDir gameRoot;
|
||||||
const QString output;
|
const QString output;
|
||||||
const MMCZip::FilterFunction filter;
|
const MMCZip::FilterFileFunction filter;
|
||||||
|
|
||||||
ModrinthAPI api;
|
ModrinthAPI api;
|
||||||
QFileInfoList files;
|
QFileInfoList files;
|
||||||
|
Reference in New Issue
Block a user