From 72793f22313629ab4b7f3b8dae712b3f35212ee1 Mon Sep 17 00:00:00 2001 From: ruckus7382sfgsgdf <355121112+ruckus7382sfgsgdf@users.noreply.github.com> Date: Tue, 17 Nov 2026 23:55:59 -0600 Subject: [PATCH] Linux: v0.5.0 AppImage fix The AppImage carries third_party/smaa (the first v0.5.0 Linux file stopped every build at vk_aa.cpp), its check finds any relative include missing from the image, and RenoDX DICE.hlsl is also written as the dice.hlsl its sources include. The v0.5.0 release Linux file was rebuilt from this commit. --- scripts/linux/appimage.sh | 3 +++ scripts/linux/check_player_build.sh | 14 ++++++++++++++ scripts/renodx_shaders.py | 18 ++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/scripts/linux/appimage.sh b/scripts/linux/appimage.sh index 4af2dfb..0390c97 100755 --- a/scripts/linux/appimage.sh +++ b/scripts/linux/appimage.sh @@ -55,6 +55,9 @@ for h in $(grep -rhoE 'gpu/vk/[A-Za-z0-9_]+[.]h' host | sort -u); do if [ -f "$h cp -a third_party/zstd "$T/third_party/" cp -a third_party/opus "$T/third_party/" cp -a third_party/kenney_input "$T/third_party/" +# ((Triforce) v0.5.0: SMAA's lookup textures, which gpu/vk/vk_aa.cpp includes: left out of v0.5.0's first AppImage, and every +# Linux build stopped at vk_aa.cpp. scripts/linux/check_player_build.sh now checks every relative include of the image's sources) +cp -a third_party/smaa "$T/third_party/" # (NVIDIA DLSS, when ticked in the builder: scripts/ngx_sdk.py and the Vulkan back end's sources, compiled with HOOKSHOT_NGX_SDK) mkdir -p "$T/scripts" cp scripts/ngx_sdk.py "$T/scripts/" diff --git a/scripts/linux/check_player_build.sh b/scripts/linux/check_player_build.sh index c889c6c..0c2a102 100755 --- a/scripts/linux/check_player_build.sh +++ b/scripts/linux/check_player_build.sh @@ -36,6 +36,20 @@ echo "== AppRun --cli --help" in_image "$R/AppRun" --cli --help > "$TMP/help.txt" grep -q -- "--nup" "$TMP/help.txt" || { cat "$TMP/help.txt"; echo "nx2/make_game.py did not start"; exit 1; } +# ((Triforce) v0.5.0: the dry run stops before the compile, so a header the compile includes went unseen: v0.5.0's first +# AppImage had no third_party/smaa and every Linux build stopped at gpu/vk/vk_aa.cpp. Each "../" include of the sources the +# image compiles must be in the image) +echo "== the sources' relative includes" +missing=0 +while IFS= read -r src; do + d=$(dirname "$src") + for inc in $(grep -hoE '^[[:space:]]*#[[:space:]]*include[[:space:]]*"\.\./[^"]+"' "$src" | sed -E 's/.*"(.*)"/\1/'); do + [ -f "$d/$inc" ] || { echo "missing: $inc (included by ${src#"$T"/})"; missing=1; } + done +done < <(find "$T/host" "$T/gpu" -type f \( -name "*.c" -o -name "*.cpp" -o -name "*.h" \)) +[ "$missing" = 0 ] || exit 1 +echo "every relative include of the image's sources is in it" + echo "== nx2/build.py --standalone --dry-run (as nx2/make_game.py runs it, with no game)" # (-B: no __pycache__ written into the image's tree. make_game.py's other settings: nx2/make_game.py, the compile's run()) (cd "$T" && in_image env OOT_WORK="$TMP/work" RX_RELEASE=1 A64_HOT_CHUNK=1 PYTHONIOENCODING=utf-8 \ diff --git a/scripts/renodx_shaders.py b/scripts/renodx_shaders.py index a7c7079..92dfa2f 100644 --- a/scripts/renodx_shaders.py +++ b/scripts/renodx_shaders.py @@ -207,6 +207,23 @@ def fetch_one(url, digest, dst, opener=urllib.request.urlopen): return True +# ((Triforce) v0.5.0) Files RenoDX's sources include under another case than the repository names them: src/shaders/tonemap.hlsl +# includes "./tonemap/dice.hlsl", the file is DICE.hlsl. Windows' file names ignore case; on Linux every RenoDX build failed +# there (output_0x92D6F81D.frag.slang, "failed to find include file") and was made without RenoDX's HDR. The fetched file is +# also written under the name included, unchanged; where names ignore case it is already there +CASE_COPIES = {"src/shaders/tonemap/DICE.hlsl": "src/shaders/tonemap/dice.hlsl"} + + +def case_copies(folder, digests): + for path, name in CASE_COPIES.items(): + src = os.path.join(folder, "renodx", *path.split("/")) + dst = os.path.join(folder, "renodx", *name.split("/")) + if not os.path.isfile(src) or (os.path.exists(dst) and os.path.samefile(src, dst)): + continue + if not (os.path.isfile(dst) and sha256(dst) == digests[path]): + shutil.copyfile(src, dst) + + def slangc(folder, platform): return os.path.join(folder, "slang", *SLANG[platform][2].split("/")) @@ -217,6 +234,7 @@ def fetch(folder, platform, opener=urllib.request.urlopen, say=print): for path, digest in FILES: if fetch_one(BASE + "/" + path, digest, os.path.join(folder, "renodx", *path.split("/")), opener): say("renodx: %s" % path) + case_copies(folder, dict(FILES)) url, digest, _ = SLANG[platform] slang = os.path.join(folder, "slang") mark = os.path.join(slang, "archive.sha256")