aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-07-18 23:48:02 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-07-18 23:48:02 +0300
commit477b72ad33c29de097585ed415e1940cc25e2b34 (patch)
treee67b296ecbfdca5a0b5a1cec1062f02add0afd58
parent5162203c7d31ad58fbd8eac838f48466151af389 (diff)
parent3728cbb62abf1027f6d7daaa7b3c08f15e1e8c79 (diff)
downloadPrismLauncher-477b72ad33c29de097585ed415e1940cc25e2b34.tar.gz
PrismLauncher-477b72ad33c29de097585ed415e1940cc25e2b34.tar.bz2
PrismLauncher-477b72ad33c29de097585ed415e1940cc25e2b34.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into prism_export2
-rw-r--r--.github/workflows/backport.yml32
-rw-r--r--.github/workflows/build.yml10
-rw-r--r--.gitmodules3
-rw-r--r--CMakeLists.txt2
-rw-r--r--CONTRIBUTING.md7
-rw-r--r--buildconfig/BuildConfig.cpp.in2
-rw-r--r--buildconfig/BuildConfig.h2
-rw-r--r--flatpak/libdecor.json22
-rw-r--r--flatpak/org.prismlauncher.PrismLauncher.yml115
-rw-r--r--flatpak/patches/0003-Don-t-crash-on-calls-to-focus-or-icon.patch24
-rw-r--r--flatpak/patches/0005-Add-warning-about-being-an-unofficial-patch.patch17
-rw-r--r--flatpak/patches/0007-Platform-Prefer-Wayland-over-X11.patch20
-rw-r--r--flatpak/patches/weird_libdecor.patch40
-rw-r--r--flatpak/prismlauncher4
m---------flatpak/shared-modules0
-rw-r--r--launcher/Application.cpp7
-rw-r--r--launcher/Application.h2
-rw-r--r--launcher/BaseVersion.h19
-rw-r--r--launcher/LaunchController.cpp5
-rw-r--r--launcher/java/JavaInstall.cpp51
-rw-r--r--launcher/java/JavaInstall.h57
-rw-r--r--launcher/minecraft/MinecraftInstance.cpp11
-rw-r--r--launcher/minecraft/auth/AuthSession.cpp1
-rw-r--r--launcher/ui/instanceview/VisualGroup.cpp232
-rw-r--r--launcher/ui/instanceview/VisualGroup.h48
-rw-r--r--launcher/ui/pages/global/AccountListPage.cpp13
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp2
-rw-r--r--launcher/ui/pages/global/MinecraftPage.cpp6
-rw-r--r--launcher/ui/pages/global/MinecraftPage.ui19
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.cpp15
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.ui25
-rw-r--r--launcher/ui/setupwizard/ThemeWizardPage.cpp2
-rw-r--r--launcher/ui/setupwizard/ThemeWizardPage.h2
-rw-r--r--launcher/ui/themes/CustomTheme.cpp2
-rw-r--r--launcher/ui/themes/CustomTheme.h2
-rw-r--r--launcher/ui/themes/ITheme.cpp2
-rw-r--r--launcher/ui/themes/ITheme.h2
-rw-r--r--launcher/ui/themes/SystemTheme.cpp2
-rw-r--r--launcher/ui/themes/SystemTheme.h2
-rw-r--r--launcher/ui/themes/ThemeManager.cpp2
-rw-r--r--launcher/ui/themes/ThemeManager.h2
-rw-r--r--launcher/ui/widgets/ThemeCustomizationWidget.cpp2
-rw-r--r--launcher/ui/widgets/ThemeCustomizationWidget.h2
43 files changed, 551 insertions, 286 deletions
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
new file mode 100644
index 00000000..77c1a880
--- /dev/null
+++ b/.github/workflows/backport.yml
@@ -0,0 +1,32 @@
+name: Backport
+on:
+ pull_request_target:
+ types: [closed, labeled]
+
+# WARNING:
+# When extending this action, be aware that $GITHUB_TOKEN allows write access to
+# the GitHub repository. This means that it should not evaluate user input in a
+# way that allows code injection.
+
+permissions:
+ contents: read
+
+jobs:
+ backport:
+ permissions:
+ contents: write # for korthout/backport-action to create branch
+ pull-requests: write # for korthout/backport-action to create PR to backport
+ name: Backport Pull Request
+ if: github.repository_owner == 'PrismLauncher' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name))
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ - name: Create backport PRs
+ uses: korthout/backport-action@v1.3.1
+ with:
+ # Config README: https://github.com/korthout/backport-action#backport-action
+ pull_description: |-
+ Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}.
+
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c2966abe..bbfe4ab4 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -264,23 +264,23 @@ jobs:
- name: Configure CMake (macOS)
if: runner.os == 'macOS' && matrix.qt_ver == 6
run: |
- cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -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 -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_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 }} -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -G Ninja
- name: Configure CMake (macOS-Legacy)
if: runner.os == 'macOS' && matrix.qt_ver == 5
run: |
- cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DMACOSX_SPARKLE_UPDATE_PUBLIC_KEY="" -DMACOSX_SPARKLE_UPDATE_FEED_URL="" -G Ninja
+ cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_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 }} -DMACOSX_SPARKLE_UPDATE_PUBLIC_KEY="" -DMACOSX_SPARKLE_UPDATE_FEED_URL="" -G Ninja
- name: Configure CMake (Windows MinGW-w64)
if: runner.os == 'Windows' && matrix.msystem != ''
shell: msys2 {0}
run: |
- cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -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 -G Ninja
+ cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_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=6 -DCMAKE_OBJDUMP=/mingw64/bin/objdump.exe -G Ninja
- name: Configure CMake (Windows MSVC)
if: runner.os == 'Windows' && matrix.msystem == ''
run: |
- cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" -A${{ matrix.architecture}} -DLauncher_FORCE_BUNDLED_LIBS=ON
+ cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=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
# https://github.com/ccache/ccache/wiki/MS-Visual-Studio (I coudn't figure out the compiler prefix)
if ("${{ env.CCACHE_VAR }}")
{
@@ -295,7 +295,7 @@ jobs:
- 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_BUILD_PLATFORM=Linux -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -G Ninja
+ cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -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 }} -G Ninja
##
# BUILD
diff --git a/.gitmodules b/.gitmodules
index 87703fee..0f437d27 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -19,3 +19,6 @@
[submodule "libraries/cmark"]
path = libraries/cmark
url = https://github.com/commonmark/cmark.git
+[submodule "flatpak/shared-modules"]
+ path = flatpak/shared-modules
+ url = https://github.com/flathub/shared-modules.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c238086e..41634f68 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -178,7 +178,7 @@ set(Launcher_VERSION_NAME4 "${Launcher_VERSION_MAJOR}.${Launcher_VERSION_MINOR}.
set(Launcher_VERSION_NAME4_COMMA "${Launcher_VERSION_MAJOR},${Launcher_VERSION_MINOR},0,0")
# Build platform.
-set(Launcher_BUILD_PLATFORM "" CACHE STRING "A short string identifying the platform that this build was built for. Only used to display in the about dialog.")
+set(Launcher_BUILD_PLATFORM "unknown" CACHE STRING "A short string identifying the platform that this build was built for. Only used to display in the about dialog.")
# Channel list URL
set(Launcher_UPDATER_BASE "" CACHE STRING "Base URL for the updater.")
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 4bca126f..b2795ce4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -61,3 +61,10 @@ As a bonus, you can also [cryptographically sign your commits][gh-signing-commit
[gh-signing-commits]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
[gh-vigilant-mode]: https://docs.github.com/en/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits
+
+
+## Backporting to Release Branches
+
+We use [automated backports](https://github.com/PrismLauncher/PrismLauncher/blob/develop/.github/workflows/backport.yml) to merge specific contributions from develop into `release` branches.
+
+This is done when pull requests are merged and have labels such as `backport release-7.x` - which should be added along with the milestone for the release.
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 8a412b7f..140731fe 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -65,7 +65,7 @@ Config::Config()
MAC_SPARKLE_PUB_KEY = "@MACOSX_SPARKLE_UPDATE_PUBLIC_KEY@";
MAC_SPARKLE_APPCAST_URL = "@MACOSX_SPARKLE_UPDATE_FEED_URL@";
- if (BUILD_PLATFORM == "macOS" && !MAC_SPARKLE_PUB_KEY.isEmpty() && !MAC_SPARKLE_APPCAST_URL.isEmpty())
+ if (!MAC_SPARKLE_PUB_KEY.isEmpty() && !MAC_SPARKLE_APPCAST_URL.isEmpty())
{
UPDATER_ENABLED = true;
}
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index 8543d724..11773d88 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -68,7 +68,7 @@ class Config {
bool UPDATER_ENABLED = false;
- /// A short string identifying this build's platform. For example, "lin64" or "win32".
+ /// A short string identifying this build's platform or distribution.
QString BUILD_PLATFORM;
/// A string containing the build timestamp
diff --git a/flatpak/libdecor.json b/flatpak/libdecor.json
new file mode 100644
index 00000000..12afad69
--- /dev/null
+++ b/flatpak/libdecor.json
@@ -0,0 +1,22 @@
+{
+ "name": "libdecor",
+ "buildsystem": "meson",
+ "config-opts": [
+ "-Ddemo=false"
+ ],
+ "sources": [
+ {
+ "type": "git",
+ "url": "https://gitlab.freedesktop.org/libdecor/libdecor.git",
+ "commit": "73260393a97291c887e1074ab7f318e031be0ac6"
+ },
+ {
+ "type": "patch",
+ "path": "patches/weird_libdecor.patch"
+ }
+ ],
+ "cleanup": [
+ "/include",
+ "/lib/pkgconfig"
+ ]
+}
diff --git a/flatpak/org.prismlauncher.PrismLauncher.yml b/flatpak/org.prismlauncher.PrismLauncher.yml
index 0524946f..a9b9762f 100644
--- a/flatpak/org.prismlauncher.PrismLauncher.yml
+++ b/flatpak/org.prismlauncher.PrismLauncher.yml
@@ -5,13 +5,6 @@ sdk: org.kde.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.openjdk17
- org.freedesktop.Sdk.Extension.openjdk8
-add-extensions:
- com.valvesoftware.Steam.Utility.gamescope:
- version: stable
- add-ld-path: lib
- no-autodownload: true
- autodelete: false
- directory: utils/gamescope
command: prismlauncher
finish-args:
@@ -26,21 +19,31 @@ finish-args:
# Mod drag&drop
- --filesystem=xdg-download:ro
+cleanup:
+ - /lib/libGLU*
+
modules:
+ # Might be needed by some Controller mods (see https://github.com/isXander/Controlify/issues/31)
+ - shared-modules/libusb/libusb.json
+
+ # Needed for proper Wayland support
+ - libdecor.json
+
- name: prismlauncher
buildsystem: cmake-ninja
+ builddir: true
config-opts:
- -DLauncher_BUILD_PLATFORM=flatpak
- - -DCMAKE_BUILD_TYPE=Debug
+ - -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DLauncher_QT_VERSION_MAJOR=5
build-options:
env:
JAVA_HOME: /usr/lib/sdk/openjdk17/jvm/openjdk-17
JAVA_COMPILER: /usr/lib/sdk/openjdk17/jvm/openjdk-17/bin/javac
sources:
- - type: dir
- path: ../
- builddir: true
+ - type: dir
+ path: ../
+
- name: openjdk
buildsystem: simple
build-commands:
@@ -49,14 +52,45 @@ modules:
- mv /app/jre /app/jdk/17
- /usr/lib/sdk/openjdk8/install.sh
- mv /app/jre /app/jdk/8
- cleanup: [/jre]
+ cleanup:
+ - /jre
+
+ - name: glfw
+ buildsystem: cmake-ninja
+ config-opts:
+ - -DCMAKE_BUILD_TYPE=RelWithDebInfo
+ - -DBUILD_SHARED_LIBS:BOOL=ON
+ - -DGLFW_USE_WAYLAND=ON
+ sources:
+ - type: git
+ url: https://github.com/glfw/glfw.git
+ commit: 3fa2360720eeba1964df3c0ecf4b5df8648a8e52
+ - type: patch
+ path: patches/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
+ - type: patch
+ path: patches/0005-Add-warning-about-being-an-unofficial-patch.patch
+ - type: patch
+ path: patches/0007-Platform-Prefer-Wayland-over-X11.patch
+ cleanup:
+ - /include
+ - /lib/cmake
+ - /lib/pkgconfig
+
- name: xrandr
buildsystem: autotools
sources:
- type: archive
- url: https://xorg.freedesktop.org/archive/individual/app/xrandr-1.5.1.tar.xz
- sha256: 7bc76daf9d72f8aff885efad04ce06b90488a1a169d118dea8a2b661832e8762
- cleanup: [/share/man, /bin/xkeystone]
+ url: https://xorg.freedesktop.org/archive/individual/app/xrandr-1.5.2.tar.xz
+ sha256: c8bee4790d9058bacc4b6246456c58021db58a87ddda1a9d0139bf5f18f1f240
+ x-checker-data:
+ type: anitya
+ project-id: 14957
+ stable-only: true
+ url-template: https://xorg.freedesktop.org/archive/individual/app/xrandr-$version.tar.xz
+ cleanup:
+ - /share/man
+ - /bin/xkeystone
+
- name: gamemode
buildsystem: meson
config-opts:
@@ -67,19 +101,56 @@ modules:
# post-install is running inside the build dir, we need it from the source though
- install -Dm755 ../data/gamemoderun -t /app/bin
sources:
- - type: git
- url: https://github.com/FeralInteractive/gamemode
- tag: "1.7"
- commit: 4dc99dff76218718763a6b07fc1900fa6d1dafd9
+ - type: archive
+ archive-type: tar-gzip
+ url: https://api.github.com/repos/FeralInteractive/gamemode/tarball/1.7
+ sha256: 57ce73ba605d1cf12f8d13725006a895182308d93eba0f69f285648449641803
+ x-checker-data:
+ type: json
+ url: https://api.github.com/repos/FeralInteractive/gamemode/releases/latest
+ version-query: .tag_name
+ url-query: .tarball_url
+ timestamp-query: .published_at
+ cleanup:
+ - /include
+ - /lib/pkgconfig
+ - /lib/libgamemodeauto.a
+
+ - name: glxinfo
+ buildsystem: meson
+ config-opts:
+ - --bindir=/app/mesa-demos
+ - -Degl=disabled
+ - -Dglut=disabled
+ - -Dosmesa=disabled
+ - -Dvulkan=disabled
+ - -Dwayland=disabled
+ post-install:
+ - mv -v /app/mesa-demos/glxinfo /app/bin
+ sources:
+ - type: archive
+ url: https://archive.mesa3d.org/demos/mesa-demos-9.0.0.tar.xz
+ sha256: 3046a3d26a7b051af7ebdd257a5f23bfeb160cad6ed952329cdff1e9f1ed496b
+ x-checker-data:
+ type: anitya
+ project-id: 16781
+ stable-only: true
+ url-template: https://archive.mesa3d.org/demos/mesa-demos-$version.tar.xz
+ cleanup:
+ - /include
+ - /mesa-demos
+ - /share
+ modules:
+ - shared-modules/glu/glu-9.json
+
- name: enhance
buildsystem: simple
build-commands:
- - mkdir -p /app/utils/gamescope
- install -Dm755 prime-run /app/bin/prime-run
- mv /app/bin/prismlauncher /app/bin/prismrun
- install -Dm755 prismlauncher /app/bin/prismlauncher
sources:
- type: file
- path: ../flatpak/prime-run
+ path: prime-run
- type: file
- path: ../flatpak/prismlauncher
+ path: prismlauncher
diff --git a/flatpak/patches/0003-Don-t-crash-on-calls-to-focus-or-icon.patch b/flatpak/patches/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
new file mode 100644
index 00000000..9130e856
--- /dev/null
+++ b/flatpak/patches/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
@@ -0,0 +1,24 @@
+diff --git a/src/wl_window.c b/src/wl_window.c
+index 52d3b9eb..4ac4eb5d 100644
+--- a/src/wl_window.c
++++ b/src/wl_window.c
+@@ -2117,8 +2117,7 @@ void _glfwSetWindowTitleWayland(_GLFWwindow* window, const char* title)
+ void _glfwSetWindowIconWayland(_GLFWwindow* window,
+ int count, const GLFWimage* images)
+ {
+- _glfwInputError(GLFW_FEATURE_UNAVAILABLE,
+- "Wayland: The platform does not support setting the window icon");
++ fprintf(stderr, "!!! Ignoring Error: Wayland: The platform does not support setting the window icon\n");
+ }
+
+ void _glfwGetWindowPosWayland(_GLFWwindow* window, int* xpos, int* ypos)
+@@ -2361,8 +2360,7 @@ void _glfwRequestWindowAttentionWayland(_GLFWwindow* window)
+
+ void _glfwFocusWindowWayland(_GLFWwindow* window)
+ {
+- _glfwInputError(GLFW_FEATURE_UNAVAILABLE,
+- "Wayland: The platform does not support setting the input focus");
++ fprintf(stderr, "!!! Ignoring Error: Wayland: The platform does not support setting the input focus\n");
+ }
+
+ void _glfwSetWindowMonitorWayland(_GLFWwindow* window,
diff --git a/flatpak/patches/0005-Add-warning-about-being-an-unofficial-patch.patch b/flatpak/patches/0005-Add-warning-about-being-an-unofficial-patch.patch
new file mode 100644
index 00000000..b031d739
--- /dev/null
+++ b/flatpak/patches/0005-Add-warning-about-being-an-unofficial-patch.patch
@@ -0,0 +1,17 @@
+diff --git a/src/init.c b/src/init.c
+index 06dbb3f2..a7c6da86 100644
+--- a/src/init.c
++++ b/src/init.c
+@@ -449,6 +449,12 @@ GLFWAPI int glfwInit(void)
+ _glfw.initialized = GLFW_TRUE;
+
+ glfwDefaultWindowHints();
++
++ fprintf(stderr, "!!! Patched GLFW from https://github.com/Admicos/minecraft-wayland\n"
++ "!!! If any issues with the window, or some issues with rendering, occur, "
++ "first try with the built-in GLFW, and if that solves the issue, report there first.\n"
++ "!!! Use outside Minecraft is untested, and things might break.\n");
++
+ return GLFW_TRUE;
+ }
+
diff --git a/flatpak/patches/0007-Platform-Prefer-Wayland-over-X11.patch b/flatpak/patches/0007-Platform-Prefer-Wayland-over-X11.patch
new file mode 100644
index 00000000..4eeb8130
--- /dev/null
+++ b/flatpak/patches/0007-Platform-Prefer-Wayland-over-X11.patch
@@ -0,0 +1,20 @@
+diff --git a/src/platform.c b/src/platform.c
+index c5966ae7..3e7442f9 100644
+--- a/src/platform.c
++++ b/src/platform.c
+@@ -49,12 +49,12 @@ static const struct
+ #if defined(_GLFW_COCOA)
+ { GLFW_PLATFORM_COCOA, _glfwConnectCocoa },
+ #endif
+-#if defined(_GLFW_X11)
+- { GLFW_PLATFORM_X11, _glfwConnectX11 },
+-#endif
+ #if defined(_GLFW_WAYLAND)
+ { GLFW_PLATFORM_WAYLAND, _glfwConnectWayland },
+ #endif
++#if defined(_GLFW_X11)
++ { GLFW_PLATFORM_X11, _glfwConnectX11 },
++#endif
+ };
+
+ GLFWbool _glfwSelectPlatform(int desiredID, _GLFWplatform* platform)
diff --git a/flatpak/patches/weird_libdecor.patch b/flatpak/patches/weird_libdecor.patch
new file mode 100644
index 00000000..3a400b82
--- /dev/null
+++ b/flatpak/patches/weird_libdecor.patch
@@ -0,0 +1,40 @@
+diff --git a/src/libdecor.c b/src/libdecor.c
+index a9c1106..1aa38b3 100644
+--- a/src/libdecor.c
++++ b/src/libdecor.c
+@@ -1391,22 +1391,32 @@ calculate_priority(const struct libdecor_plugin_description *plugin_description)
+ static bool
+ check_symbol_conflicts(const struct libdecor_plugin_description *plugin_description)
+ {
++ bool ret = true;
+ char * const *symbol;
++ void* main_prog = dlopen(NULL, RTLD_LAZY);
++ if (!main_prog) {
++ fprintf(stderr, "Plugin \"%s\" couldn't check conflicting symbols: \"%s\".\n",
++ plugin_description->description, dlerror());
++ return false;
++ }
++
+
+ symbol = plugin_description->conflicting_symbols;
+ while (*symbol) {
+ dlerror();
+- dlsym (RTLD_DEFAULT, *symbol);
++ dlsym (main_prog, *symbol);
+ if (!dlerror()) {
+ fprintf(stderr, "Plugin \"%s\" uses conflicting symbol \"%s\".\n",
+ plugin_description->description, *symbol);
+- return false;
++ ret = false;
++ break;
+ }
+
+ symbol++;
+ }
+
+- return true;
++ dlclose(main_prog);
++ return ret;
+ }
+
+ static struct plugin_loader *
diff --git a/flatpak/prismlauncher b/flatpak/prismlauncher
index bb876711..039d890d 100644
--- a/flatpak/prismlauncher
+++ b/flatpak/prismlauncher
@@ -5,7 +5,7 @@ for i in {0..9}; do
test -S "$XDG_RUNTIME_DIR"/discord-ipc-"$i" || ln -sf {app/com.discordapp.Discord,"$XDG_RUNTIME_DIR"}/discord-ipc-"$i";
done
-export PATH="${PATH}${PATH:+:}/app/utils/gamescope/bin:/usr/lib/extensions/vulkan/MangoHud/bin"
-export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/lib/extensions/vulkan/MangoHud/\$LIB/"
+export PATH="${PATH}${PATH:+:}/usr/lib/extensions/vulkan/gamescope/bin:/usr/lib/extensions/vulkan/MangoHud/bin"
+export VK_LAYER_PATH="/usr/lib/extensions/vulkan/share/vulkan/implicit_layer.d/"
exec /app/bin/prismrun "$@"
diff --git a/flatpak/shared-modules b/flatpak/shared-modules
new file mode 160000
+Subproject 45094ca570be383d06df729b6972830ec63bd3d
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index e6070006..d6c135de 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -6,9 +6,10 @@
* Prism Launcher - Minecraft Launcher
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
* Copyright (C) 2022 Lenny McLennington <lenny@sneed.church>
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
* Copyright (C) 2023 TheKodeToad <TheKodeToad@proton.me>
* Copyright (C) 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
+ * Copyright (C) 2023 seth <getchoo at tuta dot io>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -475,6 +476,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
qDebug() << BuildConfig.LAUNCHER_DISPLAYNAME << ", (c) 2013-2021 " << BuildConfig.LAUNCHER_COPYRIGHT;
qDebug() << "Version : " << BuildConfig.printableVersionString();
+ qDebug() << "Platform : " << BuildConfig.BUILD_PLATFORM;
qDebug() << "Git commit : " << BuildConfig.GIT_COMMIT;
qDebug() << "Git refspec : " << BuildConfig.GIT_REFSPEC;
if (adjustedBy.size())
@@ -609,6 +611,9 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_settings->registerSetting("IgnoreJavaCompatibility", false);
m_settings->registerSetting("IgnoreJavaWizard", false);
+ // Mod loader settings
+ m_settings->registerSetting("DisableQuiltBeacon", false);
+
// Native library workarounds
m_settings->registerSetting("UseNativeOpenAL", false);
m_settings->registerSetting("UseNativeGLFW", false);
diff --git a/launcher/Application.h b/launcher/Application.h
index ced0af17..527c536b 100644
--- a/launcher/Application.h
+++ b/launcher/Application.h
@@ -2,7 +2,7 @@
/*
* Prism Launcher - Minecraft Launcher
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
- * Copyright (C) 2022 Tayou <tayou@gmx.net>
+ * Copyright (C) 2022 Tayou <git@tayou.org>
* Copyright (C) 2023 TheKodeToad <TheKodeToad@proton.me>
*
* This program is free software: you can redistribute it and/or modify
diff --git a/launcher/BaseVersion.h b/launcher/BaseVersion.h
index ca0e4502..c7cedbe1 100644
--- a/launcher/BaseVersion.h
+++ b/launcher/BaseVersion.h
@@ -15,16 +15,15 @@
#pragma once
-#include <memory>
-#include <QString>
#include <QMetaType>
+#include <QString>
+#include <memory>
/*!
* An abstract base class for versions.
*/
-class BaseVersion
-{
-public:
+class BaseVersion {
+ public:
using Ptr = std::shared_ptr<BaseVersion>;
virtual ~BaseVersion() {}
/*!
@@ -45,14 +44,8 @@ public:
*/
virtual QString typeString() const = 0;
- virtual bool operator<(BaseVersion &a)
- {
- return name() < a.name();
- };
- virtual bool operator>(BaseVersion &a)
- {
- return name() > a.name();
- };
+ virtual bool operator<(BaseVersion& a) { return name() < a.name(); };
+ virtual bool operator>(BaseVersion& a) { return name() > a.name(); };
};
Q_DECLARE_METATYPE(BaseVersion::Ptr)
diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp
index 5d84b3bf..2b52cac0 100644
--- a/launcher/LaunchController.cpp
+++ b/launcher/LaunchController.cpp
@@ -390,7 +390,10 @@ void LaunchController::launchInstance()
m_launcher->prependStep(makeShared<TextPrint>(m_launcher.get(), "Launched instance in " + online_mode + " mode\n", MessageLevel::Launcher));
// Prepend Version
- m_launcher->prependStep(makeShared<TextPrint>(m_launcher