From 5ac3e5c95890c60765fa4ee4e40e7a2ac2dc4768 Mon Sep 17 00:00:00 2001 From: Kenneth Chew Date: Sun, 12 Mar 2023 18:31:38 -0400 Subject: [PATCH 1/4] Update `tomlplusplus` library Fix build on MinGW g++ 10 Signed-off-by: Kenneth Chew --- libraries/tomlplusplus | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/tomlplusplus b/libraries/tomlplusplus index 0a90913ab..7eb2ffcc0 160000 --- a/libraries/tomlplusplus +++ b/libraries/tomlplusplus @@ -1 +1 @@ -Subproject commit 0a90913abf9390b9e08ab6d3b40ac11634553f38 +Subproject commit 7eb2ffcc09f8e9890dc0b77ff8ab00fc53b1f2b8 From 430369feb8712b314b0c31deef43435fe94a4f45 Mon Sep 17 00:00:00 2001 From: Kenneth Chew Date: Sun, 12 Mar 2023 18:32:42 -0400 Subject: [PATCH 2/4] fix: explicit conversion to C string to fix MinGW g++ 10 build Signed-off-by: Kenneth Chew --- launcher/modplatform/helpers/HashUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/modplatform/helpers/HashUtils.cpp b/launcher/modplatform/helpers/HashUtils.cpp index 2177ddadc..81c94e1b5 100644 --- a/launcher/modplatform/helpers/HashUtils.cpp +++ b/launcher/modplatform/helpers/HashUtils.cpp @@ -79,7 +79,7 @@ void FlameHasher::executeTask() // CF-specific auto should_filter_out = [](char c) { return (c == 9 || c == 10 || c == 13 || c == 32); }; - std::ifstream file_stream(StringUtils::toStdString(m_path), std::ifstream::binary); + std::ifstream file_stream(StringUtils::toStdString(m_path).c_str(), std::ifstream::binary); // TODO: This is very heavy work, but apparently QtConcurrent can't use move semantics, so we can't boop this to another thread. // How do we make this non-blocking then? m_hash = QString::number(MurmurHash2(std::move(file_stream), 4 * MiB, should_filter_out)); From 20525bec295042bb93a6aa256a3f4394eeda3613 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Mar 2023 10:50:27 +0000 Subject: [PATCH 3/4] chore(deps): update actions/cache action to v3.3.1 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a71d1c98..1c27a8c34 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,7 +158,7 @@ jobs: - name: Retrieve ccache cache (Windows MinGW-w64) if: runner.os == 'Windows' && matrix.msystem != '' && inputs.build_type == 'Debug' - uses: actions/cache@v3.3.0 + uses: actions/cache@v3.3.1 with: path: '${{ github.workspace }}\.ccache' key: ${{ matrix.os }}-mingw-w64-ccache-${{ github.run_id }} From 4b36d1e3ead7af49fa176419249b65616853413c Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 13 Mar 2023 15:33:23 +0100 Subject: [PATCH 4/4] chore: drop Snap packaging We do not have a lot of expertise dealing with Snap and as it is currently breaking our CI, it might be good to drop support for it. This does not mean that it won't come back in the future, but as it stands, it was effectively unmaintained and was only used for nightly builds anyway. Signed-off-by: Sefa Eyeoglu --- .github/workflows/build.yml | 25 ----------------- snap/snapcraft.yaml | 56 ------------------------------------- 2 files changed, 81 deletions(-) delete mode 100644 snap/snapcraft.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a71d1c98..ac522e2c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -550,31 +550,6 @@ jobs: run: | ccache -s - snap: - runs-on: ubuntu-20.04 - steps: - - name: Checkout - if: inputs.build_type == 'Debug' - uses: actions/checkout@v3 - with: - submodules: 'true' - - name: Set short version - shell: bash - if: inputs.build_type == 'Debug' - run: | - ver_short=`git rev-parse --short HEAD` - echo "VERSION=$ver_short" >> $GITHUB_ENV - - name: Package Snap (Linux) - id: snapcraft - if: inputs.build_type == 'Debug' - uses: snapcore/action-build@v1 - - name: Upload Snap (Linux) - if: inputs.build_type == 'Debug' - uses: actions/upload-artifact@v3 - with: - name: prismlauncher_${{ env.VERSION }}_amd64.snap - path: ${{ steps.snapcraft.outputs.snap }} - flatpak: runs-on: ubuntu-latest container: diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml deleted file mode 100644 index d4eb646c5..000000000 --- a/snap/snapcraft.yaml +++ /dev/null @@ -1,56 +0,0 @@ -name: prismlauncher -license: GPL-3.0-only -base: core20 -website: https://prismlauncher.org/ -source-code: https://github.com/PrismLauncher/PrismLauncher -issues: https://github.com/PrismLauncher/PrismLauncher/issues -donation: https://opencollective.com/prismlauncher -contact: https://discord.gg/prismlauncher -summary: A custom Minecraft launcher with modpack support -adopt-info: prismlauncher - -grade: devel -confinement: strict - -architectures: - - build-on: amd64 - - build-on: arm64 - -parts: - prismlauncher: - parse-info: - - usr/share/metainfo/org.prismlauncher.PrismLauncher.metainfo.xml - plugin: cmake - build-packages: - - default-jdk-headless - stage-packages: - - openjdk-17-jre - - openjdk-8-jre - source: . - override-pull: | - snapcraftctl pull - # Fix the icon reference in the desktop file - sed -i.bak -e 's|Icon=org.prismlauncher.PrismLauncher|Icon=/usr/share/icons/hicolor/scalable/apps/org.prismlauncher.PrismLauncher.svg|g' program_info/org.prismlauncher.PrismLauncher.desktop.in - # Remove the build directory so that local development doesn't interfere with Snap compilation - rm -rf build - cmake-generator: Ninja - cmake-parameters: - - "-DCMAKE_INSTALL_PREFIX=/usr" - - "-DCMAKE_BUILD_TYPE=RelWithDebInfo" - - "-DENABLE_LTO=ON" - - "-DLauncher_BUILD_PLATFORM=snap" - - "-DLauncher_QT_VERSION_MAJOR=5" - -apps: - prismlauncher: - common-id: org.prismlauncher.PrismLauncher - desktop: usr/share/applications/org.prismlauncher.PrismLauncher.desktop - command: usr/bin/prismlauncher - extensions: - - kde-neon - plugs: - - home - - opengl - - network - - network-bind - - audio-playback