"""The game's Windows manifest, as a .res the exe links in (nx2/build.py): UTF-8 as the process's code page. host/ and gpu/vk keep paths as UTF-8 char strings and call Windows' A functions (GetModuleFileNameA, CreateFileA, fopen ...) with them. Without a manifest those take and give the system's ANSI code page (1252 on a Western Windows), and a game folder whose name it cannot spell (Japanese on a Western Windows, an emoji anywhere) came back as "?": the game found neither image.bin nor its log's folder and closed with nothing on screen. activeCodePage UTF-8 (Windows 10 1903 and newer) makes every A function and the C runtime's narrow file functions UTF-8 for the whole process, its DLLs too (triforce_vk.dll, SDL2, FFmpeg). host/hos_main.c says so in a message box when the Windows is too old for it and the folder's name needs it. (Triforce) longPathAware: where Windows' own LongPathsEnabled is on (Windows 10 1607 and newer, a setting of the PC's), the A and W functions and the C runtime's file functions take paths of MAX_PATH (260) and more, for the files the game finds in a deep folder (the game's own nn::fs paths add the long-path prefix themselves, host/nn_fs.c fs_wide; host/hos_paths.h's and gpu/vk/vk_paths.h's probe too). Without that setting it changes nothing. python nx2/win_manifest.py [out.res] """ import os import struct import sys MANIFEST = b""" UTF-8 true """ RT_MANIFEST = 24 CREATEPROCESS_MANIFEST_RESOURCE_ID = 1 # (the one an exe's loader reads) def res_entry(kind, name, data, flags=0x1030, language=0x0409): """one resource of a .res file (the format nx2/make_icon.py writes too): sizes, numeric type and name, flags, language""" header = struct.pack(" 1 else os.path.join(os.getcwd(), "hookshot_manifest.res")))