Linux port, launcher building and other changes comming #83

Closed
gab9281 wants to merge 26 commits from linux-port into main
gab9281 commented 2026-11-07 09:34:27 +00:00 (Migrated from github.com)

Hey, i've wanted to try this on linux, so i am working on it a bit. took the liberty to split so that you can rebuild just with a launcher (same way as ship or harkanian). - more info in comment

Hey, i've wanted to try this on linux, so i am working on it a bit. took the liberty to split so that you can rebuild just with a launcher (same way as ship or harkanian). - more info in comment
gab9281 commented 2026-11-07 13:52:34 +00:00 (Migrated from github.com)

@NotRexed : It can be technically ready. I have difficulties with how to handle the merger due to the speed of change. And since there's a lot of stubs to do, its kinda hard to follow. I might need a test from a Windows user on the distribution type.

Here's all whats this branch integrates

Native Linux port

Feature Commits Tested
Linux runtime: the system layer (host/) and the Vulkan renderer on Linux, with Win32 over POSIX in host/linux 07c9af0 Played in a window: title movie, gameplay from a save, sound, controller, menu
SDL3 for the window, keyboard, mouse, audio and controllers (Wayland first, X11 otherwise), on Windows too for controllers 75ef215 Window on Wayland, audio shown as "Hookshot" in the mixer, DualSense
The title movie plays (AV1 by libdav1d; host objects keyed on the FFmpeg they were built against) 6d43059 Seen by the user
No fatal at boot when the rumble timer is waited on before it starts 595255f Boots repeatedly
Controllers polled on the window's thread (no crash with a DualSense attached) 450e2c5 Seen by the user
The Insert menu no longer crashes on opening b122452 Seen by the user
Upstream's newer features on Linux: the Fullscreen row and F11, the renderer wait, the pipeline guards bf48d07 Fullscreen and F11 seen by the user
Builds on older glibc (TRAP_PERF fallback) f1e9222 Built on Ubuntu 22.04

Building on the player's PC

Feature Commits Tested
Split build: the runtime is built once and shipped, the game module is built from the player's .nup 30027a7 Direct game builds for Linux
Launcher (hookshot / hookshot.exe): builds the game the first time and when the runtime changes, then starts it. Windows window; Linux GTK window or terminal status line 53299c7, c9833a8 Windows window under Wine; Linux terminal UI in a bare Debian 12 (full build: item 5, running)
"Preparing shaders" after the build, which can be skipped (hookshot_rt --prepare-shaders) 3d3d9ee, cb446f0 Run on its own; its programs compared with the game's
Self-contained release folders: Linux built on Ubuntu 22.04 (runs on Debian 12 and later) with SDL3 and FFmpeg bundled and libc++ linked in; Windows with SDL3.dll f5d1c70, 06278e9 Linux: every release check passes in a bare Debian 12; the game runs from it. Windows: imports checked
HOOKSHOT_JOBS: fewer compile jobs for a PC short of memory 3ae6055 Used by the item 5 build

Game and menu

Feature Commits Tested
Controls page in the Insert menu: each Switch button bound to a controller input and up to two keys; Delete clears, Reset restores; saved in hookshot_options.ini aa00b2c Seen by the user ("perfect")
The menu from a controller: Home or Select + Start opens it, the D-pad and face buttons move through it aa00b2c Seen by the user
No white or black screen on the first run after the shader preparation (prepared shaders made for the game's depth mode). Likely in upstream's Windows releases too dbd4561 Prepared programs identical to the game's own (358 differed before); seen by the user
Feature Tested
Saves in the system's place: Windows Documents\My Games\Hookshot, Linux $XDG_DATA_HOME/hookshot (~/.local/share/hookshot); an old user/ beside the game moved there once Waits for the runtime build
Linux window icon (hookshot.png in the release folder) Waits for the runtime build
Linux desktop entry written by the launcher (io.github.gab9281.Hookshot.desktop, the window's app id) Tested with a stand-in game: valid, not rewritten
Windows icon on hookshot_rt.exe and the launcher in CI builds (work/hookshot.res from nx2/make_icon.py) Made locally; the cross build is next

CI, tools and docs

Feature Commits
Release workflow for both systems, inactive: builds the folders and tests them in bare systems e43f132
Cross-compilation example, inactive: the Windows folder built on Linux (xwin, behind a licence input) 9c848cf
Profile scripts read the split build's modules and Linux maps 905d368
Docs: native Linux, the release folders, the Controls page, test variables e68f8f3, 1453e08

If you could just validate that i didn't broke it for you, it will help.
I am currently testing the building with the launcher without build tools on linux, you will have news from me when i am done

@NotRexed : It can be technically ready. I have difficulties with how to handle the merger due to the speed of change. And since there's a lot of stubs to do, its kinda hard to follow. I might need a test from a Windows user on the distribution type. Here's all whats this branch integrates ## Native Linux port | Feature | Commits | Tested | |---|---|---| | Linux runtime: the system layer (`host/`) and the Vulkan renderer on Linux, with Win32 over POSIX in `host/linux` | 07c9af0 | Played in a window: title movie, gameplay from a save, sound, controller, menu | | SDL3 for the window, keyboard, mouse, audio and controllers (Wayland first, X11 otherwise), on Windows too for controllers | 75ef215 | Window on Wayland, audio shown as "Hookshot" in the mixer, DualSense | | The title movie plays (AV1 by libdav1d; host objects keyed on the FFmpeg they were built against) | 6d43059 | Seen by the user | | No fatal at boot when the rumble timer is waited on before it starts | 595255f | Boots repeatedly | | Controllers polled on the window's thread (no crash with a DualSense attached) | 450e2c5 | Seen by the user | | The Insert menu no longer crashes on opening | b122452 | Seen by the user | | Upstream's newer features on Linux: the Fullscreen row and F11, the renderer wait, the pipeline guards | bf48d07 | Fullscreen and F11 seen by the user | | Builds on older glibc (`TRAP_PERF` fallback) | f1e9222 | Built on Ubuntu 22.04 | ## Building on the player's PC | Feature | Commits | Tested | |---|---|---| | Split build: the runtime is built once and shipped, the game module is built from the player's `.nup` | 30027a7 | Direct game builds for Linux | | Launcher (`hookshot` / `hookshot.exe`): builds the game the first time and when the runtime changes, then starts it. Windows window; Linux GTK window or terminal status line | 53299c7, c9833a8 | Windows window under Wine; Linux terminal UI in a bare Debian 12 (full build: item 5, running) | | "Preparing shaders" after the build, which can be skipped (`hookshot_rt --prepare-shaders`) | 3d3d9ee, cb446f0 | Run on its own; its programs compared with the game's | | Self-contained release folders: Linux built on Ubuntu 22.04 (runs on Debian 12 and later) with SDL3 and FFmpeg bundled and libc++ linked in; Windows with `SDL3.dll` | f5d1c70, 06278e9 | Linux: every release check passes in a bare Debian 12; the game runs from it. Windows: imports checked | | `HOOKSHOT_JOBS`: fewer compile jobs for a PC short of memory | 3ae6055 | Used by the item 5 build | ## Game and menu | Feature | Commits | Tested | |---|---|---| | Controls page in the Insert menu: each Switch button bound to a controller input and up to two keys; Delete clears, Reset restores; saved in `hookshot_options.ini` | aa00b2c | Seen by the user ("perfect") | | The menu from a controller: Home or Select + Start opens it, the D-pad and face buttons move through it | aa00b2c | Seen by the user | | No white or black screen on the first run after the shader preparation (prepared shaders made for the game's depth mode). Likely in upstream's Windows releases too | dbd4561 | Prepared programs identical to the game's own (358 differed before); seen by the user | | Feature | Tested | |---|---| | Saves in the system's place: Windows `Documents\My Games\Hookshot`, Linux `$XDG_DATA_HOME/hookshot` (`~/.local/share/hookshot`); an old `user/` beside the game moved there once | Waits for the runtime build | | Linux window icon (`hookshot.png` in the release folder) | Waits for the runtime build | | Linux desktop entry written by the launcher (`io.github.gab9281.Hookshot.desktop`, the window's app id) | Tested with a stand-in game: valid, not rewritten | | Windows icon on `hookshot_rt.exe` and the launcher in CI builds (`work/hookshot.res` from `nx2/make_icon.py`) | Made locally; the cross build is next | ## CI, tools and docs | Feature | Commits | |---|---| | Release workflow for both systems, inactive: builds the folders and tests them in bare systems | e43f132 | | Cross-compilation example, inactive: the Windows folder built on Linux (xwin, behind a licence input) | 9c848cf | | Profile scripts read the split build's modules and Linux maps | 905d368 | | Docs: native Linux, the release folders, the Controls page, test variables | e68f8f3, 1453e08 | If you could just validate that i didn't broke it for you, it will help. I am currently testing the building with the launcher without build tools on linux, you will have news from me when i am done
gab9281 commented 2026-11-07 13:58:48 +00:00 (Migrated from github.com)

fixed the app id to you (it slipped)

fixed the app id to you (it slipped)
gab9281 commented 2026-11-07 14:17:31 +00:00 (Migrated from github.com)

Is there something I have to do on that @shayderrr ?

Is there something I have to do on that @shayderrr ?
shayderrr commented 2026-11-07 14:27:15 +00:00 (Migrated from github.com)

There are multiple linux ports, i'm not really too sure which one is the best at this moment so i'm considering hand merging it with credits.

There are multiple linux ports, i'm not really too sure which one is the best at this moment so i'm considering hand merging it with credits.
gab9281 commented 2026-11-07 14:29:03 +00:00 (Migrated from github.com)

No problem. You'll have a lot to cherry pick through here. Thx for the feedback

No problem. You'll have a lot to cherry pick through here. Thx for the feedback
gab9281 commented 2026-11-07 18:46:54 +00:00 (Migrated from github.com)

I saw that you added a linux port already, want me to split the content into multiple prs for the rest ? ( with stacked pr for dependent codes) ?

I saw that you added a linux port already, want me to split the content into multiple prs for the rest ? ( with stacked pr for dependent codes) ?
NotRexed commented 2026-11-07 23:07:49 +00:00 (Migrated from github.com)

Closing this one since it has been split into the smaller PRs (318, 320, 324, 328, 333, 335, 343, 350, 357), which are being merged one by one. Thanks for the big push on Linux.

Closing this one since it has been split into the smaller PRs (318, 320, 324, 328, 333, 335, 343, 350, 357), which are being merged one by one. Thanks for the big push on Linux.
Commenting is not possible because the repository is archived.
No description provided.