mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 08:39:57 -04:00
Ship NVIDIA's DLSS library in the setup and the build kit, and put it beside the game.
The release carried AMD's FSR 3.1 library but not nvngx_dlss.dll, so DLSS ran only where the NVIDIA driver supplied the model itself; elsewhere players had to fetch the DLL by hand. tools/make_launcher.py and tools/make_kit.py now download NVIDIA's own build from the DLSS SDK repository at a pinned tag (tools/dlss_pin.py: 310.9.1, checked against its size and SHA-256, cached), and put it in the release's bin/ with a notice naming the NVIDIA RTX SDKs License that covers it. --dlss FILE takes a copy on disk instead, --no-dlss leaves it out. tools/make_game.py copies the DLL and its notice beside the game. A different nvngx_dlss.dll the player put there is kept; the one an earlier build placed (named by the notice's sha256 line) is replaced, so a newer release can bring a newer DLSS. The compile step's key covers make_game.py and the kit version, so existing installs get the DLL with their next update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Build a release of the NX2navi launcher (docs/launcher.md, "Releases").
|
||||
|
||||
python tools/make_launcher.py --xlate build/xlate [--ffx amd_fidelityfx_vk.dll] [--out build/launcher-release]
|
||||
python tools/make_launcher.py --xlate build/xlate [--ffx amd_fidelityfx_vk.dll] [--dlss nvngx_dlss.dll | --no-dlss]
|
||||
[--out build/launcher-release]
|
||||
[--feed owner/name]
|
||||
[--notes notes.md] [--publish]
|
||||
|
||||
@@ -17,6 +18,9 @@ The release folder (--out) holds:
|
||||
the packages of tools/requirements-launcher.txt, runtime-id.txt
|
||||
app/current.txt, app/<version>/ launcher/ (without native/), runtime/, recomp/, the tools make_game.py uses,
|
||||
bin/nx2navi_xlate.exe and .id (and amd_fidelityfx_vk.dll with --ffx),
|
||||
bin/nvngx_dlss.dll and its notice (NVIDIA DLSS at the version tools/dlss_pin.py
|
||||
pins, downloaded from NVIDIA's DLSS SDK repository and checked, or --dlss; not with
|
||||
--no-dlss),
|
||||
lib/libnx2navirt.a (the runtime, prebuilt with the release's compiler),
|
||||
toolchain.lock.json (the MSYS2 packages of today, pinned), feed.json, VERSION, the
|
||||
licence files
|
||||
@@ -44,6 +48,7 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT))
|
||||
sys.path.insert(0, str(ROOT / 'tools'))
|
||||
import check_content # noqa: E402
|
||||
import dlss_pin # noqa: E402
|
||||
from launcher import toolchain # noqa: E402
|
||||
from launcher.paths import Layout # noqa: E402
|
||||
|
||||
@@ -158,7 +163,7 @@ def build_python(py):
|
||||
|
||||
# ---------------------------------------------------------------- app/<version>/
|
||||
|
||||
def build_app(app, ver, xlate, feed_repo, lock, ffx=None):
|
||||
def build_app(app, ver, xlate, feed_repo, lock, ffx=None, dlss=None):
|
||||
copy_tree(ROOT / 'launcher', app / 'launcher')
|
||||
for d in ('runtime', 'recomp'):
|
||||
copy_tree(ROOT / d, app / d)
|
||||
@@ -176,6 +181,8 @@ def build_app(app, ver, xlate, feed_repo, lock, ffx=None):
|
||||
shutil.copy2(xlate / n, app / 'bin' / n)
|
||||
if ffx: # FSR 3.1 loads it from beside the game (runtime/vk_ffx.cpp); make_game.py copies it there
|
||||
shutil.copy2(ffx, app / 'bin' / 'amd_fidelityfx_vk.dll')
|
||||
if dlss: # DLSS: NGX loads it from beside the game (runtime/vk_dlaa.c); make_game.py copies it there
|
||||
dlss_pin.place(dlss, app / 'bin')
|
||||
(app / 'toolchain.lock.json').write_text(json.dumps(lock, indent=1), encoding='utf-8')
|
||||
(app / 'feed.json').write_text(json.dumps({'type': 'github', 'repo': feed_repo}, indent=1), encoding='utf-8')
|
||||
|
||||
@@ -285,6 +292,9 @@ def main():
|
||||
ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
||||
ap.add_argument('--xlate', type=Path, required=True, help='folder with nx2navi_xlate.exe and nx2navi_xlate.id')
|
||||
ap.add_argument('--ffx', type=Path, help="AMD's signed amd_fidelityfx_vk.dll (FidelityFX SDK 1.1.4, MIT) for FSR 3.1")
|
||||
ap.add_argument('--dlss', type=Path, help=f"NVIDIA's nvngx_dlss.dll (DLSS {dlss_pin.VERSION}) from disk instead of "
|
||||
"downloading it from NVIDIA's DLSS SDK repository")
|
||||
ap.add_argument('--no-dlss', action='store_true', help='leave NVIDIA DLSS out of the release')
|
||||
ap.add_argument('--out', type=Path, default=MAIN_ROOT / 'build' / 'launcher-release')
|
||||
ap.add_argument('--feed', default=DEFAULT_FEED, help='the GitHub repository the launcher looks for releases in')
|
||||
ap.add_argument('--notes', type=Path, help='release notes (markdown) for the manifest and the GitHub release')
|
||||
@@ -308,7 +318,9 @@ def main():
|
||||
else toolchain.make_lock(fast_repo=toolchain.FAST_REPO))
|
||||
say(f'release {build}: toolchain lock with {len(lock["packages"])} packages'
|
||||
+ (f' (CLANG64 clang left out: {lock["fast_skipped"]})' if lock.get('fast_skipped') else ''))
|
||||
build_app(folder / 'app' / ver, ver, a.xlate, a.feed, lock, a.ffx)
|
||||
dlss = None if a.no_dlss else dlss_pin.resolve(a.dlss, DL)
|
||||
say(f'NVIDIA DLSS {dlss_pin.VERSION}: {dlss}' if dlss else 'NVIDIA DLSS left out (--no-dlss)')
|
||||
build_app(folder / 'app' / ver, ver, a.xlate, a.feed, lock, a.ffx, dlss)
|
||||
(folder / 'app' / 'current.txt').write_text(ver + '\n', encoding='utf-8')
|
||||
build_python(folder / 'python')
|
||||
cc, windres = native_compiler(lock)
|
||||
|
||||
Reference in New Issue
Block a user