mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-21 09:09:58 -04:00
Compare commits
1 Commits
v0.5.0
...
72793f2231
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72793f2231 |
@@ -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/zstd "$T/third_party/"
|
||||||
cp -a third_party/opus "$T/third_party/"
|
cp -a third_party/opus "$T/third_party/"
|
||||||
cp -a third_party/kenney_input "$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)
|
# (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"
|
mkdir -p "$T/scripts"
|
||||||
cp scripts/ngx_sdk.py "$T/scripts/"
|
cp scripts/ngx_sdk.py "$T/scripts/"
|
||||||
|
|||||||
@@ -36,6 +36,20 @@ echo "== AppRun --cli --help"
|
|||||||
in_image "$R/AppRun" --cli --help > "$TMP/help.txt"
|
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; }
|
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)"
|
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())
|
# (-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 \
|
(cd "$T" && in_image env OOT_WORK="$TMP/work" RX_RELEASE=1 A64_HOT_CHUNK=1 PYTHONIOENCODING=utf-8 \
|
||||||
|
|||||||
@@ -207,6 +207,23 @@ def fetch_one(url, digest, dst, opener=urllib.request.urlopen):
|
|||||||
return True
|
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):
|
def slangc(folder, platform):
|
||||||
return os.path.join(folder, "slang", *SLANG[platform][2].split("/"))
|
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:
|
for path, digest in FILES:
|
||||||
if fetch_one(BASE + "/" + path, digest, os.path.join(folder, "renodx", *path.split("/")), opener):
|
if fetch_one(BASE + "/" + path, digest, os.path.join(folder, "renodx", *path.split("/")), opener):
|
||||||
say("renodx: %s" % path)
|
say("renodx: %s" % path)
|
||||||
|
case_copies(folder, dict(FILES))
|
||||||
url, digest, _ = SLANG[platform]
|
url, digest, _ = SLANG[platform]
|
||||||
slang = os.path.join(folder, "slang")
|
slang = os.path.join(folder, "slang")
|
||||||
mark = os.path.join(slang, "archive.sha256")
|
mark = os.path.join(slang, "archive.sha256")
|
||||||
|
|||||||
Reference in New Issue
Block a user