diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:51:45 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:51:45 +0300 |
| commit | d3261e64152397db2dca4d691a990c6bc2a6f4dd (patch) | |
| tree | fac2f7be638651181a72453d714f0f96675c2b8b /archived/projt-launcher/flatpak | |
| parent | 31b9a8949ed0a288143e23bf739f2eb64fdc63be (diff) | |
| download | Project-Tick-d3261e64152397db2dca4d691a990c6bc2a6f4dd.tar.gz Project-Tick-d3261e64152397db2dca4d691a990c6bc2a6f4dd.zip | |
NOISSUE add archived projects
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'archived/projt-launcher/flatpak')
20 files changed, 831 insertions, 0 deletions
diff --git a/archived/projt-launcher/flatpak/.editorconfig b/archived/projt-launcher/flatpak/.editorconfig new file mode 100644 index 0000000000..d9e658587f --- /dev/null +++ b/archived/projt-launcher/flatpak/.editorconfig @@ -0,0 +1,21 @@ +# EditorConfig specs and documentation: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.yml] +indent_size = 2 + +[*.patch] +indent_style = unset +indent_size = unset +insert_final_newline = unset +trim_trailing_whitespace = unset diff --git a/archived/projt-launcher/flatpak/.gitignore b/archived/projt-launcher/flatpak/.gitignore new file mode 100644 index 0000000000..1e87d7e0e9 --- /dev/null +++ b/archived/projt-launcher/flatpak/.gitignore @@ -0,0 +1,5 @@ +# Flatpak +repo/ +build/ +builddir/ +.flatpak-builder/ diff --git a/archived/projt-launcher/flatpak/.gitmodules b/archived/projt-launcher/flatpak/.gitmodules new file mode 100644 index 0000000000..1e7a990914 --- /dev/null +++ b/archived/projt-launcher/flatpak/.gitmodules @@ -0,0 +1,3 @@ +[submodule "shared-modules"] + path = shared-modules + url = https://github.com/flathub/shared-modules.git diff --git a/archived/projt-launcher/flatpak/README.md b/archived/projt-launcher/flatpak/README.md new file mode 100644 index 0000000000..5313f9825c --- /dev/null +++ b/archived/projt-launcher/flatpak/README.md @@ -0,0 +1,36 @@ +# ProjT Launcher Flatpak Repository + +This is the repository used to publish nightly builds of the [launcher](https://projecttick.org) to our own Flatpak remote at `https://flatpak.projecttick.org`. + +## Usage + +Our repository can be added through its `.flatpakrepo` in most software centers using [this link](https://flatpak.projecttick.org/projtlauncher.flatpakrepo). A `nightly` branch of ProjT Launcher should then appear in search! + +You can also start using it through the CLI: + +```bash +$ flatpak remote-add --if-not-exists projtlauncher https://flatpak.projecttick.org/projtlauncher.flatpakrepo +$ flatpak install org.projecttick.ProjTLauncher//nightly +``` + +### Installing with the Stable Release + +Due to its isolation of apps by default, Flatpak has the nice advantage of allowing you to use the stable and nightly releases of ProjT at the same time! + +To switch between the two, you can use the `flatpak make-current` command: + +```bash +$ # Replace 'nightly' with 'stable' to switch back to the regular release +$ flatpak make-current org.projecttick.ProjTLauncher nightly +``` + +You can also specify which version to run with the `--branch` argument to `flatpak run`: + +```bash +$ flatpak run --branch=nightly org.projecttick.ProjTLauncher +``` + +## Special Thanks + +- [Flatpak's official documentation](https://docs.flatpak.org/en/latest/hosting-a-repository.html) +- [proletarius101's](https://gitlab.com/proletarius101) [GitLab CI template](https://gitlab.com/accessable-net/gitlab-ci-templates) diff --git a/archived/projt-launcher/flatpak/modules/flite.yml b/archived/projt-launcher/flatpak/modules/flite.yml new file mode 100644 index 0000000000..0816970fe6 --- /dev/null +++ b/archived/projt-launcher/flatpak/modules/flite.yml @@ -0,0 +1,15 @@ +name: flite +config-opts: + - --enable-shared + - --with-audio=pulseaudio +no-parallel-make: true +sources: + - type: git + url: https://github.com/festvox/flite.git + tag: v2.2 + commit: e9e2e37c329dbe98bfeb27a1828ef9a71fa84f88 + x-checker-data: + type: git + tag-pattern: ^v([\d.]+)$ + - type: patch + path: ../patches/0001-Ez-peazy.flite.patch diff --git a/archived/projt-launcher/flatpak/modules/glfw.yml b/archived/projt-launcher/flatpak/modules/glfw.yml new file mode 100644 index 0000000000..77453b458f --- /dev/null +++ b/archived/projt-launcher/flatpak/modules/glfw.yml @@ -0,0 +1,27 @@ +name: glfw +buildsystem: cmake-ninja +config-opts: + - -DCMAKE_BUILD_TYPE=RelWithDebInfo + - -DBUILD_SHARED_LIBS:BOOL=ON + - -DGLFW_BUILD_WAYLAND:BOOL=ON + - -DGLFW_BUILD_DOCS:BOOL=OFF +sources: + - type: archive + url: https://github.com/glfw/glfw/archive/3.4.tar.gz + sha256: c038d34200234d071fae9345bc455e4a8f2f544ab60150765d7704e08f3dac01 + x-checker-data: + type: anitya + project-id: 1180 + stable-only: true + url-template: https://github.com/glfw/glfw/archive/$version.tar.gz + + - type: patch + path: ../patches/0001-Wayland-Partially-implement-glfwSetCursorPos.patch + - type: patch + path: ../patches/0002-Wayland-Implement-glfwSetWindowIcon.patch + - type: patch + path: ../patches/0003-proceed-even-though-no-window-icon-support-on-waylan.patch +cleanup: + - /include + - /lib/cmake + - /lib/pkgconfig diff --git a/archived/projt-launcher/flatpak/modules/glxinfo.yml b/archived/projt-launcher/flatpak/modules/glxinfo.yml new file mode 100644 index 0000000000..0be9239ebf --- /dev/null +++ b/archived/projt-launcher/flatpak/modules/glxinfo.yml @@ -0,0 +1,26 @@ +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 diff --git a/archived/projt-launcher/flatpak/modules/inih.yml b/archived/projt-launcher/flatpak/modules/inih.yml new file mode 100644 index 0000000000..4f07097ce0 --- /dev/null +++ b/archived/projt-launcher/flatpak/modules/inih.yml @@ -0,0 +1,6 @@ +name: inih +buildsystem: meson +sources: + - type: git + url: https://github.com/benhoyt/inih + tag: r62 # r62: INIReader::ParseErrorMessage Changelog: https://github.com/benhoyt/inih/compare/r61...r62 diff --git a/archived/projt-launcher/flatpak/modules/xrandr.yml b/archived/projt-launcher/flatpak/modules/xrandr.yml new file mode 100644 index 0000000000..155c630b4f --- /dev/null +++ b/archived/projt-launcher/flatpak/modules/xrandr.yml @@ -0,0 +1,14 @@ +name: xrandr +buildsystem: autotools +sources: + - type: archive + url: https://xorg.freedesktop.org/archive/individual/app/xrandr-1.5.3.tar.xz + sha256: f8dd7566adb74147fab9964680b6bbadee87cf406a7fcff51718a5e6949b841c + 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 diff --git a/archived/projt-launcher/flatpak/org.projecttick.ProjTLauncher.yml b/archived/projt-launcher/flatpak/org.projecttick.ProjTLauncher.yml new file mode 100644 index 0000000000..4a1fd000d8 --- /dev/null +++ b/archived/projt-launcher/flatpak/org.projecttick.ProjTLauncher.yml @@ -0,0 +1,82 @@ +id: org.projecttick.ProjTLauncher +runtime: org.kde.Platform +runtime-version: '6.10' +sdk: org.kde.Sdk +sdk-extensions: + - org.freedesktop.Sdk.Extension.openjdk21 + +command: projtlauncher +finish-args: + - --share=ipc + - --socket=x11 + - --socket=wayland + - --device=all + - --share=network + - --socket=pulseaudio + # for Discord RPC mods + - --filesystem=xdg-run/app/com.discordapp.Discord:create + # Mod drag&drop + - --filesystem=xdg-download:ro + # FTBApp import + - --filesystem=~/.ftba:ro + # Userspace visibility for manual hugepages configuration + # Required for -XX:+UseLargePages + - --filesystem=/sys/kernel/mm/hugepages:ro + # Userspace visibility for transparent hugepages configuration + # Required for -XX:+UseTransparentHugePages + - --filesystem=/sys/kernel/mm/transparent_hugepage:ro + +modules: + # Text to Speech in the game + - modules/flite.yml + + # Required for GPU info + - modules/glxinfo.yml + + # Required for older Minecraft versions + - modules/xrandr.yml + + # Our patches improve native Wayland support + - modules/glfw.yml + + # Project Tick Maintained Gamemode version needs inih + - modules/inih.yml + + - name: projtlauncher + buildsystem: cmake-ninja + builddir: true + subdir: projt-launcher + config-opts: + - -DLauncher_BUILD_PLATFORM=flatpak + # This allows us to manage and update Java independently of this Flatpak + - -DLauncher_ENABLE_JAVA_DOWNLOADER=ON + - -DCMAKE_BUILD_TYPE=RelWithDebInfo + # Disable QtWebEngine + - -DLAUNCHER_USE_WEBENGINE=OFF + # Disable Chromium Embedded Framework because Flatpak builds does not support Project Tick Launcher Hub + - -DLAUNCHER_USE_CEF=OFF + # Disable Project Tick Launcher Hub + - -DLAUNCHER_DISABLE_HUB=ON + build-options: + env: + JAVA_HOME: /usr/lib/sdk/openjdk21/jvm/openjdk-21 + JAVA_COMPILER: /usr/lib/sdk/openjdk21/jvm/openjdk-21/bin/javac + run-tests: true + sources: + - type: git + url: https://github.com/Project-Tick/Project-Tick + branch: main + + - name: enhance + buildsystem: simple + build-commands: + - install -Dm755 prime-run /app/bin/prime-run + - mv /app/bin/projtlauncher /app/bin/projtrun + - install -Dm755 projtlauncher /app/bin/projtlauncher + sources: + # Script used to wrap instances and ensure they use dGPUs in hyprid configurations + - type: file + path: scripts/prime-run + # Sets up misc integrations with gamemode, mangohud, Discord RPC, etc. + - type: file + path: scripts/projtlauncher diff --git a/archived/projt-launcher/flatpak/patches/0001-Ez-peazy.flite.patch b/archived/projt-launcher/flatpak/patches/0001-Ez-peazy.flite.patch new file mode 100644 index 0000000000..60cfa411ce --- /dev/null +++ b/archived/projt-launcher/flatpak/patches/0001-Ez-peazy.flite.patch @@ -0,0 +1,25 @@ +From e4b5e40fe29e0fb972ab4abcaa6f0ed137f0fb92 Mon Sep 17 00:00:00 2001 +From: Babakinha <59146844+Babakinha@users.noreply.github.com> +Date: Sat, 3 Sep 2022 19:30:26 -0300 +Subject: [PATCH] Ez peazy + +--- + src/audio/au_alsa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/audio/au_alsa.c b/src/audio/au_alsa.c +index 93fc706..b8b7c7f 100644 +--- a/src/audio/au_alsa.c ++++ b/src/audio/au_alsa.c +@@ -54,7 +54,7 @@ + #include <alsa/asoundlib.h> + + /*static char *pcm_dev_name = "hw:0,0"; */ +-static const char *pcm_dev_name ="default"; ++static const char *pcm_dev_name ="pipewire"; + + static inline void print_pcm_state(snd_pcm_t *handle, char *msg) + { +-- +2.47.2 + diff --git a/archived/projt-launcher/flatpak/patches/0001-Wayland-Partially-implement-glfwSetCursorPos.patch b/archived/projt-launcher/flatpak/patches/0001-Wayland-Partially-implement-glfwSetCursorPos.patch new file mode 100644 index 0000000000..a3d44e86f0 --- /dev/null +++ b/archived/projt-launcher/flatpak/patches/0001-Wayland-Partially-implement-glfwSetCursorPos.patch @@ -0,0 +1,88 @@ +From 2bcc4749b1ab6819d6dfdb07cd1832ab5d3339bd Mon Sep 17 00:00:00 2001 +From: Friz64 <friz64@protonmail.com> +Date: Sun, 25 Feb 2024 00:51:49 +0100 +Subject: [PATCH 1/3] Wayland: Partially implement `glfwSetCursorPos` + +--- + src/wl_platform.h | 2 ++ + src/wl_window.c | 37 +++++++++++++++++++++++++++++++++++-- + 2 files changed, 37 insertions(+), 2 deletions(-) + +diff --git a/src/wl_platform.h b/src/wl_platform.h +index 149cd241..53b09eef 100644 +--- a/src/wl_platform.h ++++ b/src/wl_platform.h +@@ -371,6 +371,7 @@ typedef struct _GLFWwindowWayland + GLFWbool iconified; + GLFWbool activated; + GLFWbool fullscreen; ++ double cursorPosX, cursorPosY; + } pending; + + struct { +@@ -386,6 +387,7 @@ typedef struct _GLFWwindowWayland + + _GLFWcursor* currentCursor; + double cursorPosX, cursorPosY; ++ GLFWbool pendingCursorPos; + + char* appId; + +diff --git a/src/wl_window.c b/src/wl_window.c +index 5b491ffb..4283f88f 100644 +--- a/src/wl_window.c ++++ b/src/wl_window.c +@@ -2667,8 +2667,34 @@ void _glfwGetCursorPosWayland(_GLFWwindow* window, double* xpos, double* ypos) + + void _glfwSetCursorPosWayland(_GLFWwindow* window, double x, double y) + { +- _glfwInputError(GLFW_FEATURE_UNAVAILABLE, +- "Wayland: The platform does not support setting the cursor position"); ++ if (!_glfw.wl.pointerConstraints) ++ { ++ _glfwInputError(GLFW_FEATURE_UNAVAILABLE, ++ "Wayland: The compositor does not support setting the cursor position"); ++ return; ++ } ++ ++ if (window->wl.lockedPointer) { ++ zwp_locked_pointer_v1_set_cursor_position_hint(window->wl.lockedPointer, ++ wl_fixed_from_double(x), ++ wl_fixed_from_double(y)); ++ } else { ++ if (window->cursorMode != GLFW_CURSOR_DISABLED) { ++ _glfwInputError(GLFW_PLATFORM_ERROR, ++ "Wayland: Delaying the cursor position update until " ++ "the cursor mode is set to GLFW_CURSOR_DISABLED"); ++ } ++ ++ // The cursor is not currently locked, but it may be locked later. Either ++ // - the application has already set the cursor mode to GLFW_CURSOR_DISABLED, ++ // but the cursor is currently outside of the window, or ++ // - the application has not yet set the cursor mode to GLFW_CURSOR_DISABLED, ++ // but will do so soon. ++ // Defer setting the cursor position to _glfwSetCursorWayland. ++ window->wl.pending.cursorPosX = x; ++ window->wl.pending.cursorPosY = y; ++ window->wl.pendingCursorPos = GLFW_TRUE; ++ } + } + + void _glfwSetCursorModeWayland(_GLFWwindow* window, int mode) +@@ -3009,6 +3035,13 @@ void _glfwSetCursorWayland(_GLFWwindow* window, _GLFWcursor* cursor) + unconfinePointer(window); + if (!window->wl.lockedPointer) + lockPointer(window); ++ ++ if (window->wl.pendingCursorPos == GLFW_TRUE) { ++ zwp_locked_pointer_v1_set_cursor_position_hint(window->wl.lockedPointer, ++ wl_fixed_from_double(window->wl.pending.cursorPosX), ++ wl_fixed_from_double(window->wl.pending.cursorPosY)); ++ window->wl.pendingCursorPos = GLFW_FALSE; ++ } + } + else if (window->cursorMode == GLFW_CURSOR_CAPTURED) + { +-- +2.52.0 + diff --git a/archived/projt-launcher/flatpak/patches/0002-Wayland-Implement-glfwSetWindowIcon.patch b/archived/projt-launcher/flatpak/patches/0002-Wayland-Implement-glfwSetWindowIcon.patch new file mode 100644 index 0000000000..199880902a --- /dev/null +++ b/archived/projt-launcher/flatpak/patches/0002-Wayland-Implement-glfwSetWindowIcon.patch @@ -0,0 +1,386 @@ +From 823a4c7a61029fe16257615f55f42721fe850841 Mon Sep 17 00:00:00 2001 +From: JakobDev <jakobdev@gmx.de> +Date: Wed, 12 Feb 2025 19:24:19 +0100 +Subject: [PATCH 2/3] Wayland: Implement glfwSetWindowIcon + +--- + deps/wayland/xdg-toplevel-icon-v1.xml | 205 ++++++++++++++++++++++++++ + include/GLFW/glfw3.h | 6 +- + src/CMakeLists.txt | 1 + + src/wl_init.c | 14 ++ + src/wl_platform.h | 1 + + src/wl_window.c | 52 ++++++- + 6 files changed, 274 insertions(+), 5 deletions(-) + create mode 100644 deps/wayland/xdg-toplevel-icon-v1.xml + +diff --git a/deps/wayland/xdg-toplevel-icon-v1.xml b/deps/wayland/xdg-toplevel-icon-v1.xml +new file mode 100644 +index 00000000..fc409fef +--- /dev/null ++++ b/deps/wayland/xdg-toplevel-icon-v1.xml +@@ -0,0 +1,205 @@ ++<?xml version="1.0" encoding="UTF-8"?> ++<protocol name="xdg_toplevel_icon_v1"> ++ ++ <copyright> ++ Copyright © 2023-2024 Matthias Klumpp ++ Copyright © 2024 David Edmundson ++ ++ Permission is hereby granted, free of charge, to any person obtaining a ++ copy of this software and associated documentation files (the "Software"), ++ to deal in the Software without restriction, including without limitation ++ the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ and/or sell copies of the Software, and to permit persons to whom the ++ Software is furnished to do so, subject to the following conditions: ++ ++ The above copyright notice and this permission notice (including the next ++ paragraph) shall be included in all copies or substantial portions of the ++ Software. ++ ++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ DEALINGS IN THE SOFTWARE. ++ </copyright> ++ ++ <description summary="protocol to assign icons to toplevels"> ++ This protocol allows clients to set icons for their toplevel surfaces ++ either via the XDG icon stock (using an icon name), or from pixel data. ++ ++ A toplevel icon represents the individual toplevel (unlike the application ++ or launcher icon, which represents the application as a whole), and may be ++ shown in window switchers, window overviews and taskbars that list ++ individual windows. ++ ++ This document adheres to RFC 2119 when using words like "must", ++ "should", "may", etc. ++ ++ Warning! The protocol described in this file is currently in the testing ++ phase. Backward compatible changes may be added together with the ++ corresponding interface version bump. Backward incompatible changes can ++ only be done by creating a new major version of the extension. ++ </description> ++ ++ <interface name="xdg_toplevel_icon_manager_v1" version="1"> ++ <description summary="interface to manage toplevel icons"> ++ This interface allows clients to create toplevel window icons and set ++ them on toplevel windows to be displayed to the user. ++ </description> ++ ++ <request name="destroy" type="destructor"> ++ <description summary="destroy the toplevel icon manager"> ++ Destroy the toplevel icon manager. ++ This does not destroy objects created with the manager. ++ </description> ++ </request> ++ ++ <request name="create_icon"> ++ <description summary="create a new icon instance"> ++ Creates a new icon object. This icon can then be attached to a ++ xdg_toplevel via the 'set_icon' request. ++ </description> ++ <arg name="id" type="new_id" interface="xdg_toplevel_icon_v1"/> ++ </request> ++ ++ <request name="set_icon"> ++ <description summary="set an icon on a toplevel window"> ++ This request assigns the icon 'icon' to 'toplevel', or clears the ++ toplevel icon if 'icon' was null. ++ This state is double-buffered and is applied on the next ++ wl_surface.commit of the toplevel. ++ ++ After making this call, the xdg_toplevel_icon_v1 provided as 'icon' ++ can be destroyed by the client without 'toplevel' losing its icon. ++ The xdg_toplevel_icon_v1 is immutable from this point, and any ++ future attempts to change it must raise the ++ 'xdg_toplevel_icon_v1.immutable' protocol error. ++ ++ The compositor must set the toplevel icon from either the pixel data ++ the icon provides, or by loading a stock icon using the icon name. ++ See the description of 'xdg_toplevel_icon_v1' for details. ++ ++ If 'icon' is set to null, the icon of the respective toplevel is reset ++ to its default icon (usually the icon of the application, derived from ++ its desktop-entry file, or a placeholder icon). ++ If this request is passed an icon with no pixel buffers or icon name ++ assigned, the icon must be reset just like if 'icon' was null. ++ </description> ++ <arg name="toplevel" type="object" interface="xdg_toplevel" summary="the toplevel to act on"/> ++ <arg name="icon" type="object" interface="xdg_toplevel_icon_v1" allow-null="true"/> ++ </request> ++ ++ <event name="icon_size"> ++ <description summary="describes a supported & preferred icon size"> ++ This event indicates an icon size the compositor prefers to be ++ available if the client has scalable icons and can render to any size. ++ ++ When the 'xdg_toplevel_icon_manager_v1' object is created, the ++ compositor may send one or more 'icon_size' events to describe the list ++ of preferred icon sizes. If the compositor has no size preference, it ++ may not send any 'icon_size' event, and it is up to the client to ++ decide a suitable icon size. ++ ++ A sequence of 'icon_size' events must be finished with a 'done' event. ++ If the compositor has no size preferences, it must still send the ++ 'done' event, without any preceding 'icon_size' events. ++ </description> ++ <arg name="size" type="int" ++ summary="the edge size of the square icon in surface-local coordinates, e.g. 64"/> ++ </event> ++ ++ <event name="done"> ++ <description summary="all information has been sent"> ++ This event is sent after all 'icon_size' events have been sent. ++ </description> ++ </event> ++ </interface> ++ ++ <interface name="xdg_toplevel_icon_v1" version="1"> ++ <description summary="a toplevel window icon"> ++ This interface defines a toplevel icon. ++ An icon can have a name, and multiple buffers. ++ In order to be applied, the icon must have either a name, or at least ++ one buffer assigned. Applying an empty icon (with no buffer or name) to ++ a toplevel should reset its icon to the default icon. ++ ++ It is up to compositor policy whether to prefer using a buffer or loading ++ an icon via its name. See 'set_name' and 'add_buffer' for details. ++ </description> ++ ++ <enum name="error"> ++ <entry name="invalid_buffer" ++ summary="the provided buffer does not satisfy requirements" ++ value="1"/> ++ <entry name="immutable" ++ summary="the icon has already been assigned to a toplevel and must not be changed" ++ value="2"/> ++ <entry name="no_buffer" ++ summary="the provided buffer has been destroyed before the toplevel icon" ++ value="3"/> ++ </enum> ++ ++ <request name="destroy" type="destructor"> ++ <description summary="destroy the icon object"> ++ Destroys the 'xdg_toplevel_icon_v1' object. ++ The icon must still remain set on every toplevel it was assigned to, ++ until the toplevel icon is reset explicitly. ++ </description> ++ </request> ++ ++ <request name="set_name"> ++ <description summary="set an icon name"> ++ This request assigns an icon name to this icon. ++ Any previously set name is overridden. ++ ++ The compositor must resolve 'icon_name' according to the lookup rules ++ described in the XDG icon theme specification[1] using the ++ environment's current icon theme. ++ ++ If the compositor does not support icon names or cannot resolve ++ 'icon_name' according to the XDG icon theme specification it must ++ fall back to using pixel buffer data instead. ++ ++ If this request is made after the icon has been assigned to a toplevel ++ via 'set_icon', a 'immutable' error must be raised. ++ ++ [1]: https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html ++ </description> ++ <arg name="icon_name" type="string"/> ++ </request> ++ ++ <request name="add_buffer"> ++ <description summary="add icon data from a pixel buffer"> ++ This request adds pixel data supplied as wl_buffer to the icon. ++ ++ The client should add pixel data for all icon sizes and scales that ++ it can provide, or which are explicitly requested by the compositor ++ via 'icon_size' events on xdg_toplevel_icon_manager_v1. ++ ++ The wl_buffer supplying pixel data as 'buffer' must be backed by wl_shm ++ and must be a square (width and height being equal). ++ If any of these buffer requirements are not fulfilled, a 'invalid_buffer' ++ error must be raised. ++ ++ If this icon instance already has a buffer of the same size and scale ++ from a previous 'add_buffer' request, data from the last request ++ overrides the preexisting pixel data. ++ ++ The wl_buffer must be kept alive for as long as the xdg_toplevel_icon ++ it is associated with is not destroyed, otherwise a 'no_buffer' error ++ is raised. The buffer contents must not be modified after it was ++ assigned to the icon. As a result, the region of the wl_shm_pool's ++ backing storage used for the wl_buffer must not be modified after this ++ request is sent. The wl_buffer.release event is unused. ++ ++ If this request is made after the icon has been assigned to a toplevel ++ via 'set_icon', a 'immutable' error must be raised. ++ </description> ++ <arg name="buffer" type="object" interface="wl_buffer"/> ++ <arg name="scale" type="int" ++ summary="the scaling factor of the icon, e.g. 1"/> ++ </request> ++ </interface> ++</protocol> +diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h +index 9c55ac9d..c49839c2 100644 +--- a/include/GLFW/glfw3.h ++++ b/include/GLFW/glfw3.h +@@ -3398,9 +3398,9 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title); + * + * [bundle-guide]: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/ + * +- * @remark @wayland There is no existing protocol to change an icon, the +- * window will thus inherit the one defined in the application's desktop file. +- * This function will emit @ref GLFW_FEATURE_UNAVAILABLE. ++ * @remark @wayland This only works on compositors implementing the XDG toplevel icon protocol. ++ * This function will emit @ref GLFW_FEATURE_UNAVAILABLE if this protocol is not available. ++ * The icon must be square. Otherwise @ref GLFW_INVALID_VALUE will be emited. + * + * @thread_safety This function must only be called from the main thread. + * +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 1057a6f9..ba200275 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -104,6 +104,7 @@ if (GLFW_BUILD_WAYLAND) + generate_wayland_protocol("fractional-scale-v1.xml") + generate_wayland_protocol("xdg-activation-v1.xml") + generate_wayland_protocol("xdg-decoration-unstable-v1.xml") ++ generate_wayland_protocol("xdg-toplevel-icon-v1.xml") + endif() + + if (WIN32 AND GLFW_BUILD_SHARED_LIBRARY) +diff --git a/src/wl_init.c b/src/wl_init.c +index 3aff476d..064080c7 100644 +--- a/src/wl_init.c ++++ b/src/wl_init.c +@@ -49,6 +49,7 @@ + #include "fractional-scale-v1-client-protocol.h" + #include "xdg-activation-v1-client-protocol.h" + #include "idle-inhibit-unstable-v1-client-protocol.h" ++#include "xdg-toplevel-icon-v1-client-protocol.h" + + // NOTE: Versions of wayland-scanner prior to 1.17.91 named every global array of + // wl_interface pointers 'types', making it impossible to combine several unmodified +@@ -91,6 +92,10 @@ + #include "idle-inhibit-unstable-v1-client-protocol-code.h" + #undef types + ++#define types _glfw_toplevel_icon_types ++#include "xdg-toplevel-icon-v1-client-protocol-code.h" ++#undef types ++ + static void wmBaseHandlePing(void* userData, + struct xdg_wm_base* wmBase, + uint32_t serial) +@@ -201,6 +206,13 @@ static void registryHandleGlobal(void* userData, + &wp_fractional_scale_manager_v1_interface, + 1); + } ++ else if (strcmp(interface, xdg_toplevel_icon_manager_v1_interface.name) == 0) ++ { ++ _glfw.wl.toplevelIconManager = ++ wl_registry_bind(registry, name, ++ &xdg_toplevel_icon_manager_v1_interface, ++ 1); ++ } + } + + static void registryHandleGlobalRemove(void* userData, +@@ -983,6 +995,8 @@ void _glfwTerminateWayland(void) + xdg_activation_v1_destroy(_glfw.wl.activationManager); + if (_glfw.wl.fractionalScaleManager) + wp_fractional_scale_manager_v1_destroy(_glfw.wl.fractionalScaleManager); ++ if (_glfw.wl.toplevelIconManager) ++ xdg_toplevel_icon_manager_v1_destroy(_glfw.wl.toplevelIconManager); + if (_glfw.wl.registry) + wl_registry_destroy(_glfw.wl.registry); + if (_glfw.wl.display) +diff --git a/src/wl_platform.h b/src/wl_platform.h +index 53b09eef..347b20c8 100644 +--- a/src/wl_platform.h ++++ b/src/wl_platform.h +@@ -439,6 +439,7 @@ typedef struct _GLFWlibraryWayland + struct zwp_idle_inhibit_manager_v1* idleInhibitManager; + struct xdg_activation_v1* activationManager; + struct wp_fractional_scale_manager_v1* fractionalScaleManager; ++ struct xdg_toplevel_icon_manager_v1* toplevelIconManager; + + _GLFWofferWayland* offers; + unsigned int offerCount; +diff --git a/src/wl_window.c b/src/wl_window.c +index 4283f88f..0e67e5c5 100644 +--- a/src/wl_window.c ++++ b/src/wl_window.c +@@ -51,6 +51,7 @@ + #include "xdg-activation-v1-client-protocol.h" + #include "idle-inhibit-unstable-v1-client-protocol.h" + #include "fractional-scale-v1-client-protocol.h" ++#include "xdg-toplevel-icon-v1-client-protocol.h" + + #define GLFW_BORDER_SIZE 4 + #define GLFW_CAPTION_HEIGHT 24 +@@ -2227,8 +2228,55 @@ 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"); ++ if (!_glfw.wl.toplevelIconManager) ++ { ++ _glfwInputError(GLFW_FEATURE_UNAVAILABLE, ++ "Wayland: The platform does not support setting the window icon"); ++ return; ++ } ++ ++ if (!count) ++ { ++ if (window->wl.libdecor.frame) ++ xdg_toplevel_icon_manager_v1_set_icon(_glfw.wl.toplevelIconManager, ++ libdecor_frame_get_xdg_toplevel(window->wl.libdecor.frame), ++ NULL); ++ else if (window->wl.xdg.toplevel) ++ xdg_toplevel_icon_manager_v1_set_icon(_glfw.wl.toplevelIconManager, window->wl.xdg.toplevel, NULL); ++ return; ++ } ++ ++ for (int i = 0; i < count; i++) ++ { ++ if (images[i].width != images[i].height) ++ { ++ _glfwInputError(GLFW_INVALID_VALUE, ++ "Wayland: The icon must be a square"); ++ return; ++ } ++ } ++ ++ struct xdg_toplevel_icon_v1 *icon = xdg_toplevel_icon_manager_v1_create_icon(_glfw.wl.toplevelIconManager); ++ struct wl_buffer *bufferArr[count]; ++ ++ for (int i = 0; i < count; i++) ++ { ++ bufferArr[i] = createShmBuffer(&images[i]); ++ xdg_toplevel_icon_v1_add_buffer(icon, bufferArr[i], 1); ++ } ++ ++ if (window->wl.libdecor.frame) ++ xdg_toplevel_icon_manager_v1_set_icon(_glfw.wl.toplevelIconManager, ++ libdecor_frame_get_xdg_toplevel(window->wl.libdecor.frame), ++ icon); ++ else if (window->wl.xdg.toplevel) ++ xdg_toplevel_icon_manager_v1_set_icon(_glfw.wl.toplevelIconManager, window->wl.xdg.toplevel, icon); ++ xdg_toplevel_icon_v1_destroy(icon); ++ ++ for (int i = 0; i < count; i++) ++ { ++ wl_buffer_destroy(bufferArr[i]); ++ } + } + + void _glfwGetWindowPosWayland(_GLFWwindow* window, int* xpos, int* ypos) +-- +2.52.0 + diff --git a/archived/projt-launcher/flatpak/patches/0003-proceed-even-though-no-window-icon-support-on-waylan.patch b/archived/projt-launcher/flatpak/patches/0003-proceed-even-though-no-window-icon-support-on-waylan.patch new file mode 100644 index 0000000000..9fc21aaff8 --- /dev/null +++ b/archived/projt-launcher/flatpak/patches/0003-proceed-even-though-no-window-icon-support-on-waylan.patch @@ -0,0 +1,30 @@ +From 8f4a285cbf4f66b14f03b992979d7b8469b95069 Mon Sep 17 00:00:00 2001 +From: DioEgizio <83089242+DioEgizio@users.noreply.github.com> +Date: Mon, 5 Jan 2026 20:05:47 +0100 +Subject: [PATCH 3/3] proceed even though no window icon support on wayland + +hack needed for old versions of minecraft with our custom glfw and most compositors. Thanks to BoyOrigin/glfw-wayland for the original implementation + +Co-Authored-By: FayBoy <ahmadyasinfikri@gmail.com> +--- + src/wl_window.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/wl_window.c b/src/wl_window.c +index 0e67e5c5..cddcac44 100644 +--- a/src/wl_window.c ++++ b/src/wl_window.c +@@ -2230,8 +2230,8 @@ void _glfwSetWindowIconWayland(_GLFWwindow* window, + { + if (!_glfw.wl.toplevelIconManager) + { +- _glfwInputError(GLFW_FEATURE_UNAVAILABLE, +- "Wayland: The platform does not support setting the window icon"); ++ fprintf(stderr, ++ "[GLFW] Wayland: The compositor does not support setting the window icon"); + return; + } + +-- +2.52.0 + diff --git a/archived/projt-launcher/flatpak/pubkey.asc b/archived/projt-launcher/flatpak/pubkey.asc new file mode 100644 index 0000000000..db811e3d8a --- /dev/null +++ b/archived/projt-launcher/flatpak/pubkey.asc @@ -0,0 +1,13 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mDMEaSC/1BYJKwYBBAHaRw8BAQdABmQgHkYFfgFfY+6aOYz0aiuEMFK74p1YbJtT +xuiwrKa0IllvbmcgRG8tSHl1biA8ZnJvc3RlcjEyQG5hdmVyLmNvbT6ImQQTFgoA +QRYhBPtWUnLVrotXRj2pZeSbU8kYwzmmBQJpIL/UAhsDBQkFpFY8BQsJCAcCAiIC +BhUKCQgLAgQWAgMBAh4HAheAAAoJEOSbU8kYwzmmZigA/1LV5AF9IijBArMtaHBX +G2gXiiemythoQYeB1B56KICSAP9eSK3L9BlImSbeyrB4fTJ+zNAH2O54lVN+1nYt +ZFlmBrg4BGkgv9QSCisGAQQBl1UBBQEBB0CqNxm5eYMxtysVyW4DZTGNQSEPN2oh +T9crxVEBPqF/AwMBCAeIfgQYFgoAJhYhBPtWUnLVrotXRj2pZeSbU8kYwzmmBQJp +IL/UAhsMBQkFpFY8AAoJEOSbU8kYwzmmleEBAIf3BcYpa4nIcll3HiVjIbPAfmfa +pH55zn1HpyRyokl3AP9FJrUx9IMc8ktHkqHgylVIma9KdbNuFjh+odOwFkZDDw== +=FxU6 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/archived/projt-launcher/flatpak/scripts/prime-run b/archived/projt-launcher/flatpak/scripts/prime-run new file mode 100644 index 0000000000..946c28dd59 --- /dev/null +++ b/archived/projt-launcher/flatpak/scripts/prime-run @@ -0,0 +1,4 @@ +#!/bin/sh + +export __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia +exec "$@" diff --git a/archived/projt-launcher/flatpak/scripts/projtlauncher b/archived/projt-launcher/flatpak/scripts/projtlauncher new file mode 100644 index 0000000000..90ea33e4e4 --- /dev/null +++ b/archived/projt-launcher/flatpak/scripts/projtlauncher @@ -0,0 +1,11 @@ +#!/bin/bash + +# discord RPC +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:+:}/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/projtrun "$@" diff --git a/archived/projt-launcher/flatpak/static/index.html b/archived/projt-launcher/flatpak/static/index.html new file mode 100644 index 0000000000..da88be7be4 --- /dev/null +++ b/archived/projt-launcher/flatpak/static/index.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <!-- Quick and dirty CSS sourced from the main site! --> + <style> + :root { font-family: system-ui, sans-serif; } + body { background-color: #15181c; } + a { color: hsl(214, 46%, 52%); } + h1, p { color: #ffffff; } + </style> + + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>ProjT Launcher Flatpak Repository</title> +</head> +<body> + <h1>ProjT Launcher Flatpak Repository</h1> + <p> + You probably don't want to be on this page. + Check out our website at <a href="https://projecttick.org">projecttick.org</a>! + </p> +</body> +</html> diff --git a/archived/projt-launcher/flatpak/static/projtlauncher-nightly.flatpakref b/archived/projt-launcher/flatpak/static/projtlauncher-nightly.flatpakref new file mode 100644 index 0000000000..0d448a4e61 --- /dev/null +++ b/archived/projt-launcher/flatpak/static/projtlauncher-nightly.flatpakref @@ -0,0 +1,8 @@ +[Flatpak Ref] +Name=org.projecttick.ProjTLauncher +Branch=nightly +Title=org.projecttick.ProjTLauncher from the official nightly repository +Url=https://flatpak.projecttick.org/ +RuntimeRepo=https://dl.flathub.org/repo/flathub.flatpakrepo +IsRuntime=false +GPGKey=mDMEaSC/1BYJKwYBBAHaRw8BAQdABmQgHkYFfgFfY+6aOYz0aiuEMFK74p1YbJtTxuiwrKa0IllvbmcgRG8tSHl1biA8ZnJvc3RlcjEyQG5hdmVyLmNvbT6ImQQTFgoAQRYhBPtWUnLVrotXRj2pZeSbU8kYwzmmBQJpIL/UAhsDBQkFpFY8BQsJCAcCAiICBhUKCQgLAgQWAgMBAh4HAheAAAoJEOSbU8kYwzmmZigA/1LV5AF9IijBArMtaHBXG2gXiiemythoQYeB1B56KICSAP9eSK3L9BlImSbeyrB4fTJ+zNAH2O54lVN+1nYtZFlmBrg4BGkgv9QSCisGAQQBl1UBBQEBB0CqNxm5eYMxtysVyW4DZTGNQSEPN2ohT9crxVEBPqF/AwMBCAeIfgQYFgoAJhYhBPtWUnLVrotXRj2pZeSbU8kYwzmmBQJpIL/UAhsMBQkFpFY8AAoJEOSbU8kYwzmmleEBAIf3BcYpa4nIcll3HiVjIbPAfmfapH55zn1HpyRyokl3AP9FJrUx9IMc8ktHkqHgylVIma9KdbNuFjh+odOwFkZDDw== diff --git a/archived/projt-launcher/flatpak/static/projtlauncher.flatpakrepo b/archived/projt-launcher/flatpak/static/projtlauncher.flatpakrepo new file mode 100644 index 0000000000..75a68535a5 --- /dev/null +++ b/archived/projt-launcher/flatpak/static/projtlauncher.flatpakrepo @@ -0,0 +1,8 @@ +[Flatpak Repo] +Title=ProjT Launcher +Url=https://flatpak.projecttick.org/ +Homepage=https://projecttick.org/ +Comment=Official repository for nightly builds of ProjT Launcher +Description=Official repository for nightly builds of ProjT Launcher +Icon=https://projecttick.org/img/logo.svg +GPGKey=mDMEaSC/1BYJKwYBBAHaRw8BAQdABmQgHkYFfgFfY+6aOYz0aiuEMFK74p1YbJtTxuiwrKa0IllvbmcgRG8tSHl1biA8ZnJvc3RlcjEyQG5hdmVyLmNvbT6ImQQTFgoAQRYhBPtWUnLVrotXRj2pZeSbU8kYwzmmBQJpIL/UAhsDBQkFpFY8BQsJCAcCAiICBhUKCQgLAgQWAgMBAh4HAheAAAoJEOSbU8kYwzmmZigA/1LV5AF9IijBArMtaHBXG2gXiiemythoQYeB1B56KICSAP9eSK3L9BlImSbeyrB4fTJ+zNAH2O54lVN+1nYtZFlmBrg4BGkgv9QSCisGAQQBl1UBBQEBB0CqNxm5eYMxtysVyW4DZTGNQSEPN2ohT9crxVEBPqF/AwMBCAeIfgQYFgoAJhYhBPtWUnLVrotXRj2pZeSbU8kYwzmmBQJpIL/UAhsMBQkFpFY8AAoJEOSbU8kYwzmmleEBAIf3BcYpa4nIcll3HiVjIbPAfmfapH55zn1HpyRyokl3AP9FJrUx9IMc8ktHkqHgylVIma9KdbNuFjh+odOwFkZDDw==
\ No newline at end of file |
