Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

build(packaging): drop the dead showhudoverlay refusals

Olcay Seygand049cd50366f
diff --git a/GeneralsMD/Code/BuildFingerprint.manifest b/GeneralsMD/Code/BuildFingerprint.manifest
index b685fbd0a..5f69e210e 100644
--- a/GeneralsMD/Code/BuildFingerprint.manifest
+++ b/GeneralsMD/Code/BuildFingerprint.manifest
@@ -2980,7 +2980,6 @@ Tests/test_sdl_program_cache.cpp
Tests/test_selection_priority.inc
Tests/test_shader_sdl.cpp
Tests/test_smooth_motion.cpp
-Tests/test_stage_overlay_hud.sh
Tests/test_supply_center_save.inc
Tests/test_support.cpp
Tests/test_terrain_golden.cpp
diff --git a/GeneralsMD/Code/CMakeLists.txt b/GeneralsMD/Code/CMakeLists.txt
index e0bf6eab5..ad6bb746e 100644
--- a/GeneralsMD/Code/CMakeLists.txt
+++ b/GeneralsMD/Code/CMakeLists.txt
@@ -2035,9 +2035,6 @@ if(ZH_PLATFORM_POSIX)
endif()
# Their install check (Tools/install-guard.sh) on a made-up install: a change, and a check that could not
# be made, are told apart. No game data.
- # The stager keeps the HUD overlay's default the build's (off in Release): it refuses a staged ShowHudOverlay =
- # Yes, loose or in an archive.
- add_test(NAME stage_overlay_hud_check COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Tests/test_stage_overlay_hud.sh)
add_test(NAME install_guard_check COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Tests/test_install_guard.sh)
# Every harness stops when its work folder cannot be made, instead of going on with the name empty
# (Tests/test_workfolder_guard.sh): a lint of every tracked script, and the farm harnesses run with
diff --git a/GeneralsMD/Code/Tests/test_linux_portable.sh b/GeneralsMD/Code/Tests/test_linux_portable.sh
index 8be212e31..d443aef41 100755
--- a/GeneralsMD/Code/Tests/test_linux_portable.sh
+++ b/GeneralsMD/Code/Tests/test_linux_portable.sh
@@ -21,8 +21,8 @@
# 1. the folder (no art, no archive): the launcher, generals stripped with its debuglink, the debug file,
# the overlay, the licences, the icon (a 48 px PNG), the .desktop file, README.txt, and VERSION naming
# this commit; generals needs nothing newer than GLIBC_2.31 and no libstdc++ symbol;
-# 2. armed controls, from the same build without rebuilding: an overlay file that forces the HUD overlay
-# on (off by default in Release), and a static library on the link line that macos-app-licenses.txt does not name, are each refused;
+# 2. an armed control, from the same build without rebuilding: a static library on the link line that
+# macos-app-licenses.txt does not name is refused;
# 3. with ZH_DATA_DIR and the platform image: E1 through the packaged launcher (replay-check.sh --package),
# inside the platform image, no network - the recording, its playback and a second run agree.
#
@@ -81,16 +81,12 @@ glibc="$(objdump -T "$OUT/bin/generals" | grep -o 'GLIBC_[0-9.]*' | sort -uV | t
check '[ "$(printf "%s\n%s\n" "$glibc" GLIBC_2.31 | sort -V | tail -1)" = GLIBC_2.31 ] && ! objdump -T "$OUT/bin/generals" | grep -qE "GLIBCXX_|CXXABI_"' \
"generals needs $glibc at most GLIBC_2.31, and no libstdc++ symbol"
-# 2. armed controls: the same build, one thing wrong, --no-build
+# 2. an armed control: the same build, one thing wrong, --no-build
fake="$T/fake-build"
mkdir -p "$fake"
for f in generals generated ffmpeg; do ln -s "$PB/$f" "$fake/$f"; done
-cp -R -L "$PB/overlay" "$fake/overlay" && printf 'ShowHudOverlay = Yes\n' > "$fake/overlay/HudOn.ini"
+cp -R -L "$PB/overlay" "$fake/overlay"
cp "$PB/build.ninja" "$fake/build.ninja"
-out="$(bash "$CODE/Tools/linux-portable.sh" --build "$fake" --out "$T/hud-on" --no-build --no-art --no-tar 2>&1)"; status=$?
-check '[ $status -ne 0 ] && printf "%s" "$out" | grep -q "may force the HUD overlay on" && [ ! -e "$T/hud-on" ]' \
- "armed: an overlay forcing the HUD on is refused, and no folder is left"
-rm -f "$fake/overlay/HudOn.ini"
sed -i 's#libwwlib\.a#libwwlib.a libnotlicensed.a#' "$fake/build.ninja"
out="$(bash "$CODE/Tools/linux-portable.sh" --build "$fake" --out "$T/unlicensed" --no-build --no-art --no-tar 2>&1)"; status=$?
check '[ $status -ne 0 ] && printf "%s" "$out" | grep -q "does not cover: notlicensed"' \
diff --git a/GeneralsMD/Code/Tests/test_macos_app.sh b/GeneralsMD/Code/Tests/test_macos_app.sh
index 98a630362..404d149a8 100755
--- a/GeneralsMD/Code/Tests/test_macos_app.sh
+++ b/GeneralsMD/Code/Tests/test_macos_app.sh
@@ -20,22 +20,19 @@
# 1. it builds, and the bundle holds what P1 specifies: Info.plist (lints; the executable, the
# id, this build's version, the executable's minimum macOS, high resolution, the category), PkgInfo,
# a stripped arm64/x86_64 executable with its dSYM beside the bundle, the icon, the overlay, one
-# licence file per entry the link line needs; its ad-hoc signature verifies --deep --strict; and no
-# file in it forces the HUD overlay on (off by default in Release; so neither does the real staged overlay);
-# 2. the HUD rule's control: the same overlay with one INI line "ShowHudOverlay = Yes" planted in a
-# copy is refused, naming the file, and leaves no bundle;
-# 3. the licence check's control: a link line with a library the table does not cover is refused,
+# licence file per entry the link line needs; its ad-hoc signature verifies --deep --strict;
+# 2. the licence check's control: a link line with a library the table does not cover is refused,
# naming it, and leaves no bundle;
-# 4. the seal's control: a file written into the signed bundle makes codesign --verify --deep --strict
+# 3. the seal's control: a file written into the signed bundle makes codesign --verify --deep --strict
# fail, so a pass after a run means nothing was written;
-# 5. the oldest macOS (P2): the bundle's LSMinimumSystemVersion is the build's deployment target, and
+# 4. the oldest macOS (P2): the bundle's LSMinimumSystemVersion is the build's deployment target, and
# every object it ships is built for no newer one. Two controls: a lower --min-macos than the
# build's is refused, naming libraries; a Mach-O built for a newer macOS planted in the overlay is
# refused by the bundle-side check, naming it;
-# 6. universal2 (option A's path, tested with tiny stand-ins, no second build): an x86_64 executable
+# 5. universal2 (option A's path, tested with tiny stand-ins, no second build): an x86_64 executable
# for the target lipo'd in makes a bundle whose executable holds both slices and still verifies;
# one built for a newer macOS is refused, and so is an arm64 file passed as the x86_64 one;
-# 7. the art, never bundled (a project rule: the app carries none): a fresh bundle built without --no-art
+# 6. the art, never bundled (a project rule: the app carries none): a fresh bundle built without --no-art
# holds no Reforged*.big, whatever the staged overlay links; and the bundle's game, started headless on an
# empty root with a ReforgedArt folder in its user data, reads that folder as an overlay and writes
# nothing into the bundle (its seal still verifies).
@@ -90,22 +87,12 @@ check '[ "$nlic" -ge 13 ] && [ -f "$APP/Contents/Resources/Licenses/Zero-Hour-Re
check 'grep -q "this notice may not be removed or altered" "$APP/Contents/Resources/Licenses/LZH-Light-LICENSE.txt" && grep -q "GNU GPL option, version 2 or later" "$APP/Contents/Resources/Licenses/FreeType-OPTION.txt" && [ -f "$APP/Contents/Resources/Licenses/FreeType-GPLv2.txt" ]' \
"LZH-Light's notice, and FreeType's GPLv2-or-later option with its GPLv2 text"
check 'codesign --verify --deep --strict "$APP" 2>/dev/null && codesign -dv "$APP" 2>&1 | grep -q "Signature=adhoc"' "signed ad hoc, and it verifies --deep --strict"
-check '[ -z "$(find -L "$APP" -type f -exec grep -a -i -l -E "^[[:space:]]*ShowHudOverlay[[:space:]]*=[[:space:]]*(yes|true|1)([^[:alnum:]]|$)" -- {} + 2>/dev/null)" ]' \
- "and nothing in it forces the HUD overlay on"
-# 4. the seal's control, on that bundle
+# 3. the seal's control, on that bundle
touch "$APP/Contents/Resources/written-after-signing"
check '! codesign --verify --deep --strict "$APP" 2>/dev/null' "a file written after signing breaks the seal (so a clean verify after a run means nothing was written)"
-# 2. the HUD rule's control
-mkdir -p "$T/overlay"
-for e in "$OVERLAY"/*; do case "$e" in *.big) ;; *) cp -R -L "$e" "$T/overlay/";; esac; done
-printf '\nGameData\n ShowHudOverlay = Yes\nEnd\n' > "$T/overlay/Data/INI/HudOn.ini"
-out="$(bash "$SCRIPT" --generals "$GENERALS" --overlay "$T/overlay" --build "$BUILD" --out "$T/two/Zero Hour Reforged.app" --bundle-id "$ID" --min-macos "$TARGET" --no-art 2>&1)"; status=$?
-check '[ $status -eq 1 ] && printf "%s" "$out" | grep -q "may force the HUD overlay on" && printf "%s" "$out" | grep -q "HudOn.ini" && [ ! -e "$T/two/Zero Hour Reforged.app" ]' \
- "an overlay forcing the HUD on is refused, naming the file, and leaves no bundle (exit $status)"
-
-# 3. the licence check's control
+# 2. the licence check's control
python3 - "$BUILD/build.ninja" "$T/build.ninja" <<'NINJA_EOF'
import re, sys
text = open(sys.argv[1]).read()
@@ -116,15 +103,16 @@ out="$(bash "$SCRIPT" --generals "$GENERALS" --overlay "$OVERLAY" --build "$BUIL
check '[ $status -eq 1 ] && printf "%s" "$out" | grep -q "does not cover: nolicence" && [ ! -e "$T/three/Zero Hour Reforged.app" ]' \
"a linked library without a licence entry is refused, naming it, and leaves no bundle (exit $status)"
-# 5. the oldest macOS
+# 4. the oldest macOS
check 'otool -l "$APP/Contents/MacOS/generals" | awk "/LC_BUILD_VERSION/ {f=1} f && \$1 == \"minos\" {print \$2; exit}" | grep -qx "$TARGET"' \
"the executable is stamped for $TARGET"
out="$(bash "$SCRIPT" --generals "$GENERALS" --overlay "$OVERLAY" --build "$BUILD" --out "$T/four/Zero Hour Reforged.app" --bundle-id "$ID" --min-macos 11.0 --no-art 2>&1)"; status=$?
check '[ $status -eq 1 ] && printf "%s" "$out" | grep -q "linked libraries built for a newer macOS than 11.0" && printf "%s" "$out" | grep -q "libgameengine.a: minimum macOS $TARGET" && [ ! -e "$T/four/Zero Hour Reforged.app" ]' \
"a minimum below the build's is refused, naming the libraries, and leaves no bundle (exit $status)"
printf 'int main(void) { return 0; }\n' > "$T/newer.c"
+mkdir -p "$T/overlay"
+for e in "$OVERLAY"/*; do case "$e" in *.big) ;; *) cp -R -L "$e" "$T/overlay/";; esac; done
if cc -mmacosx-version-min=26.0 -o "$T/overlay/newer-tool" "$T/newer.c" 2>/dev/null; then
- rm -f "$T/overlay/Data/INI/HudOn.ini"
out="$(bash "$SCRIPT" --generals "$GENERALS" --overlay "$T/overlay" --build "$BUILD" --out "$T/five/Zero Hour Reforged.app" --bundle-id "$ID" --min-macos "$TARGET" --no-art 2>&1)"; status=$?
check '[ $status -eq 1 ] && printf "%s" "$out" | grep -q "the bundle.s executables built for a newer macOS" && printf "%s" "$out" | grep -q "newer-tool: minimum macOS 26.0" && [ ! -e "$T/five/Zero Hour Reforged.app" ]' \
"a Mach-O for a newer macOS inside the bundle is refused, naming it (exit $status)"
@@ -132,7 +120,7 @@ else
check 'false' "cc could not build the control's newer-macOS Mach-O"
fi
-# 6. universal2
+# 5. universal2
printf 'int main(void) { return 0; }\n' > "$T/x86.c"
cc -arch x86_64 -mmacosx-version-min="$TARGET" -o "$T/x86-ok" "$T/x86.c" 2>/dev/null
cc -arch x86_64 -mmacosx-version-min=26.0 -o "$T/x86-newer" "$T/x86.c" 2>/dev/null
@@ -150,7 +138,7 @@ check '[ $status -eq 1 ] && printf "%s" "$out" | grep -q "the x86_64 executable
out="$(bash "$SCRIPT" --generals "$GENERALS" --overlay "$OVERLAY" --build "$BUILD" --out "$T/eight/Zero Hour Reforged.app" --bundle-id "$ID" --min-macos "$TARGET" --no-art --x86-64-generals "$T/not-x86" 2>&1)"; status=$?
check '[ $status -eq 1 ] && printf "%s" "$out" | grep -q "is not an x86_64 executable"' "an arm64 file passed as the x86_64 slice is refused (exit $status)"
-# 7. the art, never bundled, read from the user data folder
+# 6. the art, never bundled, read from the user data folder
N="$T/nine/Zero Hour Reforged.app"
out="$(bash "$SCRIPT" --generals "$GENERALS" --overlay "$OVERLAY" --build "$BUILD" --out "$N" --bundle-id "$ID" --min-macos "$TARGET" 2>&1)"; status=$?
check '[ $status -eq 0 ] && [ -z "$(find "$N" -name "Reforged*.big")" ]' \
diff --git a/GeneralsMD/Code/Tests/test_stage_overlay_hud.sh b/GeneralsMD/Code/Tests/test_stage_overlay_hud.sh
deleted file mode 100755
index 7b452dd84..000000000
--- a/GeneralsMD/Code/Tests/test_stage_overlay_hud.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2026 İlyas Akın
-# Additional terms under GNU GPL section 7 apply: see LICENSE.md.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Tools/stage-overlay.sh keeps the HUD overlay's default a build's own (off in Release, on in Debug: a
-# project rule, 2026-09-29): staging refuses a GameData.ini line that forces ShowHudOverlay on, loose or
-# inside an archive the overlay links, and stages everything else. Made-up Code/Data and Run folders; no
-# game data.
-# 1. ShowHudOverlay = No, and a commented-out Yes -> staged
-# 2. a loose Data/INI/GameData.ini with "ShowHudOverlay = Yes" -> refused, exit 1, nothing left behind
-# 3. the same line in a Reforged*.big the overlay links -> refused
-# 4. "ShowHudOverlay = 1" and "= true", in any case -> refused
-set -u
-STAGE="$(cd "$(dirname "$0")/../Tools" && pwd)/stage-overlay.sh"
-WORK="$(mktemp -d "${TMPDIR:-/tmp}/test_stage_overlay_hud.XXXXXX")" || WORK=""
-if [ -z "$WORK" ] || [ ! -d "$WORK" ]; then
- echo "test_stage_overlay_hud: cannot make a work folder under ${TMPDIR:-/tmp}" >&2
- exit 2
-fi
-trap 'rm -rf -- "${WORK:?}"' EXIT
-failed=0
-check() { if eval "$1"; then echo "ok: $2"; else echo "FAIL: $2"; failed=1; fi; }
-
-data() { # data <folder> <GameData.ini text>: a made-up Code/Data
- mkdir -p "$1/INI"
- printf '%s\n' "$2" > "$1/INI/GameData.ini"
- printf 'Patch\n' > "$1/Patch.str"
-}
-
-data "$WORK/off" $'GameData\n ShowHudOverlay = No\n ;ShowHudOverlay = Yes\nEnd'
-"$STAGE" "$WORK/off" "" "$WORK/out1" 2> "$WORK/err1"; status=$?
-check '[ $status -eq 0 ] && [ -f "$WORK/out1/Data/INI/GameData.ini" ] && [ -f "$WORK/out1.staged" ]' "No, and a commented-out Yes: staged (exit $status)"
-
-data "$WORK/on" $'GameData\n ShowHudOverlay = Yes\nEnd'
-"$STAGE" "$WORK/on" "" "$WORK/out2" 2> "$WORK/err2"; status=$?
-check '[ $status -eq 1 ] && grep -q "forces the HUD overlay on" "$WORK/err2" && [ ! -e "$WORK/out2" ] && [ ! -e "$WORK/out2.staged" ]' \
- "a loose ShowHudOverlay = Yes: refused, nothing left (exit $status)"
-
-mkdir -p "$WORK/run"
-printf 'BIGF....\0\0Data\\INI\\GameData.ini\0GameData\r\n ShowHudOverlay = Yes\r\nEnd\r\n' > "$WORK/run/ReforgedTest.big"
-"$STAGE" "$WORK/off" "$WORK/run" "$WORK/out3" 2> "$WORK/err3"; status=$?
-check '[ $status -eq 1 ] && grep -q "ReforgedTest.big" "$WORK/err3"' "the line inside a linked Reforged*.big: refused (exit $status)"
-
-for value in 1 TRUE; do
- data "$WORK/v$value" " showhudoverlay=$value"
- "$STAGE" "$WORK/v$value" "" "$WORK/out_$value" 2> /dev/null; status=$?
- check '[ $status -eq 1 ]' "ShowHudOverlay = $value, in another case: refused (exit $status)"
-done
-
-exit $failed
diff --git a/GeneralsMD/Code/Tools/linux-portable.sh b/GeneralsMD/Code/Tools/linux-portable.sh
index 94f9c2632..db77a7f0e 100755
--- a/GeneralsMD/Code/Tools/linux-portable.sh
+++ b/GeneralsMD/Code/Tools/linux-portable.sh
@@ -39,8 +39,7 @@
# - generals needing a glibc symbol newer than GLIBC_2.31, or any libstdc++ symbol (GLIBCXX_, CXXABI_);
# - generals needing a shared library outside the ones every SteamOS and desktop Linux has (glibc's own,
# and fontconfig); everything else is static or loaded at run time by SDL and miniaudio;
-# - a static library on generals' link line that macos-app-licenses.txt does not name;
-# - a file in the folder that forces the HUD overlay on (off by default in Release: a project rule).
+# - a static library on generals' link line that macos-app-licenses.txt does not name.
#
# Usage: linux-portable.sh --build <folder> --out <folder> --cmake <cmake>
# [--image <sdk image>] [--jobs <n>] [--no-art] [--no-tar] [--no-build]
@@ -131,10 +130,6 @@ if [ "$ART" -eq 1 ] && ! ls "$BUILD/overlay"/Reforged*.big >/dev/null 2>&1; then
fail "the staged overlay holds no Reforged*.big art: put the archives in GeneralsMD/Run and build again, or pass --no-art"
fi
-# ---- the HUD rule, over the overlay that will be copied in ------------------------------------------
-found="$(hud_check_files "$BUILD/overlay")"
-[ -z "$found" ] || fail "refused: nothing shipped may force the HUD overlay on (ShowHudOverlay = Yes in: $(printf '%s ' $found))"
-
# ---- what generals needs of the system ---------------------------------------------------------------------
needs="$(in_sdk "readelf -d '$GENERALS' | sed -n 's/.*(NEEDED).*\[\(.*\)\]/\1/p'; echo '--'; objdump -T '$GENERALS'")" \
|| fail "cannot read generals' dynamic section"
@@ -308,10 +303,6 @@ UNINSTALL
Hour Data until you delete them too.
README_EOF
-# the HUD rule once more, over the finished folder
-found="$(hud_check_files "$OUT")"
-[ -z "$found" ] || fail "refused: nothing shipped may force the HUD overlay on (ShowHudOverlay = Yes in: $(printf '%s ' $found))"
-
size="$(du -sh "$OUT" | cut -f1)"
if [ "$TAR" -eq 1 ]; then
tar -C "$(dirname "$OUT")" -I 'zstd -T0 -10' -cf "$OUT.tar.zst" "$(basename "$OUT")" || fail "cannot pack $OUT.tar.zst"
diff --git a/GeneralsMD/Code/Tools/make-macos-app.sh b/GeneralsMD/Code/Tools/make-macos-app.sh
index 0a43bcd7a..e95765aba 100755
--- a/GeneralsMD/Code/Tools/make-macos-app.sh
+++ b/GeneralsMD/Code/Tools/make-macos-app.sh
@@ -26,8 +26,6 @@
#
# Refused, before anything is written:
# - a static library on generals' link line (build.ninja) that macos-app-licenses.txt does not name;
-# - a file in the overlay that forces the HUD overlay on (ShowHudOverlay = Yes: off by default in Release,
-# a project rule, as Tools/stage-overlay.sh enforces), checked again over the finished bundle;
# - an object in any static library on the link line, or a Mach-O in the bundle, built for a newer
# macOS than --min-macos (P2): the final executable's own stamp would hide a vendored library built
# for the build machine's version, and the player's Mac would find it at the first call.
@@ -77,21 +75,13 @@ REPO="$(cd "$CODE/../.." && pwd)"
TABLE="$CODE/Tools/macos-app-licenses.txt"
# ---- the link line against the licence table ----------------------------------------------------------
-. "$CODE/Tools/package-common.sh" # the link-line reader, the licence entries and the HUD check, shared with P3
+. "$CODE/Tools/package-common.sh" # the link-line reader and the licence entries, shared with P3
LIBPATHS="$(mktemp "${TMPDIR:-/tmp}/zh-link-libs.XXXXXX")"
trap 'rm -f -- "$LIBPATHS"' EXIT
linked="$(package_link_libraries "$NINJA" "$LIBPATHS")" || fail "cannot read generals' link line from $NINJA"
[ -n "$linked" ] || fail "generals' link line in $NINJA names no static library"
ENTRIES="$(package_license_entries "$TABLE" $linked)" || fail "refused: generals links libraries macos-app-licenses.txt does not cover:$ENTRIES"
-# ---- the HUD rule, over what will be staged in -------------------------------------------------------------
-hud_check() { # hud_check <dir>: fails naming the files that force the HUD overlay on
- local found
- found="$(hud_check_files "$1")"
- [ -z "$found" ] || fail "refused: nothing shipped may force the HUD overlay on (ShowHudOverlay = Yes in: $(printf '%s ' $found))"
-}
-hud_check "$OVERLAY"
-
# ---- the oldest macOS, over everything that ships ----------------------------------------------------------
minos_check() { # minos_check <what> <files...>: fails naming every object built for a newer macOS than MIN_MACOS
local what="$1"; shift
@@ -234,9 +224,7 @@ for e in $ENTRIES; do
license_entry "$e" "$L" || fail "cannot write the licence entry '$e'"
done
-# the directive once more, over the finished contents (the clones included)
-hud_check "$C"
-# and the oldest macOS, over every Mach-O the bundle holds
+# the oldest macOS, over every Mach-O the bundle holds
machos=()
while IFS= read -r f; do machos+=("$f"); done < <(find "$C" -type f -exec sh -c 'file -b "$1" | grep -q "^Mach-O" && echo "$1"' _ {} \;)
[ "${#machos[@]}" -gt 0 ] || fail "no Mach-O in the bundle"
diff --git a/GeneralsMD/Code/Tools/package-common.sh b/GeneralsMD/Code/Tools/package-common.sh
index f6a27ed38..81f8780db 100644
--- a/GeneralsMD/Code/Tools/package-common.sh
+++ b/GeneralsMD/Code/Tools/package-common.sh
@@ -22,8 +22,6 @@
# package_license_entries <table> <names...>
# the licence entries those libraries need, with the table's "+" lines; status 1, printing the
# libraries the table does not name, when any is missing
-# hud_check_files <dir>
-# the files under <dir> that force the HUD overlay on (a project rule: off by default in Release), if any
# license_entry <entry> <folder>
# copies that entry's files into <folder>; CODE, REPO and BUILD are the caller's
@@ -54,13 +52,6 @@ package_license_entries() {
{ for lib in "$@"; do awk -v l="$lib" '$1 == l { print $2 }' "$table"; done; awk '$1 == "+" { print $2 }' "$table"; } | sort -u
}
-hud_on='^[[:space:]]*ShowHudOverlay[[:space:]]*=[[:space:]]*(yes|true|1)([^[:alnum:]]|$)'
-hud_check_files() {
- # find -L walks every file, symbolic links followed (the staged overlay links its art): a recursive
- # grep may not follow them, and which grep is first in PATH varies (ugrep's -r does not)
- find -L "$1" -type f -exec grep -a -i -l -E "$hud_on" -- {} + 2>/dev/null
-}
-
license_entry() {
local L="$2" s="$CODE/Libraries/Source"
case "$1" in
diff --git a/GeneralsMD/Code/Tools/stage-overlay.sh b/GeneralsMD/Code/Tools/stage-overlay.sh
index e5dcf381a..5f47f7d90 100755
--- a/GeneralsMD/Code/Tools/stage-overlay.sh
+++ b/GeneralsMD/Code/Tools/stage-overlay.sh
@@ -84,19 +84,4 @@ else
done
fi
fi
-# The corner readout (InGameUI::drawHudOverlay) is off by default in Release and on in Debug, a project
-# rule (2026-09-29): a player turns it on in GameData.ini, and a harness whose pictures must show it passes
-# -showHudOverlay. Nothing staged may force it on for every player: a GameData.ini line setting it Yes,
-# True or 1, loose or inside an archive the overlay carries, stops the staging here.
-# grep -a reads the archives' INI text as it is stored (0.4 s over the 1.6 GB of art).
-hud_on='^[[:space:]]*ShowHudOverlay[[:space:]]*=[[:space:]]*(yes|true|1)([^[:alnum:]]|$)'
-if found="$(grep -r -a -i -l -E "$hud_on" -- "$out" 2>/dev/null)" || \
- found="$(find "$out" -maxdepth 1 -name '*.big' -exec grep -a -i -l -E "$hud_on" -- {} + 2>/dev/null)"; then
- if [ -n "$found" ]; then
- echo "stage-overlay: refused: a staged file forces the HUD overlay on (ShowHudOverlay = Yes):" >&2
- printf '%s\n' "$found" | sed 's/^/ /' >&2
- rm -rf -- "$out"
- exit 1
- fi
-fi
touch "$out.staged" # beside, not inside: the game would see a file inside as a loose file
diff --git a/PORTING.md b/PORTING.md
index d09533db5..a84089105 100644
--- a/PORTING.md
+++ b/PORTING.md
@@ -170,8 +170,7 @@ instead.
The top right info strip (the clock, the frame rates and the connection) is the player's own `ShowNetBox` option,
on by default in every build. Upstream's `ShowHudOverlay` decides nothing here: the GameData.ini key is read and
-ignored so an old file still loads, and `-showHudOverlay` is gone. The staged overlay and the packages still refuse
-a `ShowHudOverlay = Yes`, a check left from when the key turned the readout on.
+ignored so an old file still loads, and `-showHudOverlay` is gone.
**Menu Layout** (Options, Display) chooses how the 800x600 menu layouts meet a wider screen. **Fit**, the default
on macOS and Linux, draws them at one scale, centred, so panels, logos and the map preview keep their shape;
diff --git a/docs/porting/windows-impact.md b/docs/porting/windows-impact.md
index ccb9868ee..41d429e33 100644
--- a/docs/porting/windows-impact.md
+++ b/docs/porting/windows-impact.md
@@ -428,6 +428,7 @@ Three things the checks found:
| 2026-10-02 | Windows ARM64 loads its textures: the port's own D3DX | `WW3D2/d3dx9runtime.cpp`/`.h`, new `WW3D2/d3dx9portable_texture.cpp`/`.h` and `WW3D2/d3dx9texturerules.h`, `WW3D2/d3dx9posix_texture.cpp`; `PosixDevice/Render/PosixImage.cpp`/`.h` (moved out of `PosixResources9`), `PosixImageOps.h`, `PosixPixelCodec.h`; `W3DDevice/GameClient/W3DDisplay.cpp` (one log line); `CMakeLists.txt`; `Tests/test_d3dx9portable_oracle.cpp`; `tree-check.ps1`; `PORTING.md`, `README.md`, `CHANGELOG.md` | Without `d3dx9_43.dll` (ARM64 always, x64 with `ZH_D3DX_PORTABLE=1`), `Bind_D3DX9_Runtime` binds the port's own bodies and returns true: D3DXCreateTexture with D3DX's sizes and format substitution, D3DXLoadSurfaceFromSurface and D3DXFilterTexture through PosixImageOps (the macOS and Linux surface code) over the real device, reading a surface that will not lock through GetRenderTargetData and writing one through UpdateSurface, and the assembler, compiler and disassembler from `d3dcompiler_47.dll`'s D3DAssemble, D3DCompile and D3DDisassemble. The log says which: `W3DDisplay::init - D3DX: d3dx9_43.dll` or `the port's own, shaders by d3dcompiler_47.dll`. D3DX_DEFAULT as a texture dimension is 256 now, on macOS and Linux too, as the DLL makes it. `tree-check.ps1` takes `-NewEnv` and `-Extra`, uses a user data folder of its own and ends only the game it started: it took another checkout's screenshot once, and ended other checkouts' games by name. | x64 without the variable binds the DLL exactly as before (the `#else` side of the old ARM64 branch is the same code). With it, a texture can differ from the DLL's by one step of its narrowest channel, two down a 5-bit mip chain; the cases where the port and the DLL part further (luminance destinations, D3DX_FILTER_TRIANGLE, a box over more than 2:1, DXT3/5 blocks with c0 <= c1 decoded on the CPU, image files) are paths no game call takes. | low | **Windows: PARTLY VERIFIED** (x64, 2026-10-02: `build.bat Release test` 58/58, 0 C4311/C4312, `replay-check.ps1` seeds 0 and 1 the same at frame 6000; `test_d3dx9portable_oracle` on the real device: 55 results, 28 byte-identical, the rest within one step, two on R5G6B5 mip level 3, shader tokens equal; `tree-check.ps1 -NewEnv ZH_D3DX_PORTABLE=1` against the same exe on the DLL, Direct3D 11: all 8 views within their limits on the third run (worst 1.13% of 1.2%), the two runs before each had one view over, a shot taken 9 or 10 frames apart under another checkout's games' load; `-Extra -d3d9`: all 8 within, worst 0.6%; the logs confirm the renderer and the binding of each side.) Left: an ARM64 build and run; this machine has no ARM64 toolset or hardware. |
| 2026-10-08 | The bridge decks' slope bias spelled without DWORD | `W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp` | 9cc0c0b0 passed the bias's bits as `*(const DWORD *)&bridgeSlopeBias`, and DWORD is not a type off Windows (bittype.h removed it on purpose), so every macOS and Linux build stopped there. It is now `*(const uint32 *)`, as `dx8wrapper.h`'s fog states are. | None: DWORD and uint32 are both 32-bit unsigned under MSVC, so the call takes the same value. | low | **Windows: OPEN** (a Windows build; nothing else can differ.) |
| 2026-10-13 | `-showHudOverlay` and `m_showHudOverlay` removed | `Common/GlobalData.cpp`/`.h`, `Common/CommandLine.cpp`, `Tests/test_gameengine.cpp`, `dx11-check.ps1`, `shadow-check.ps1`, `Tools/linux-packages-check.sh` | Since 8b859d61 the info strip is drawn by `ShowNetBox` alone, so the field, its default and the switch decided nothing. `ShowHudOverlay` stays in GameData's field table as an ignored key, because an unknown key throws. The 2026-09-29 row's packaging refusals are left in. | None: no reader of the field was left. | low | **Windows: checked** (`build.bat Release test`.) |
+| 2026-10-13 | The packaging's `ShowHudOverlay = Yes` refusal removed | `Tools/stage-overlay.sh`, `Tools/package-common.sh`, `Tools/make-macos-app.sh`, `Tools/linux-portable.sh`, `Tests/test_macos_app.sh`, `Tests/test_linux_portable.sh`, `Tests/test_stage_overlay_hud.sh` (removed), `CMakeLists.txt` (`stage_overlay_hud_check`), `BuildFingerprint.manifest`, `PORTING.md` | The key is ignored since the row above, so a staged or shipped `ShowHudOverlay = Yes` changes nothing and the stager and both packagers stop looking for it. `hud_check_files` is gone from `package-common.sh`, and the two package tests lose their HUD controls. | none on Windows: the scripts are not run there, and the ctest removed was inside the POSIX block | none | **Windows: checked** (`bash -n` on every touched script, `fingerprint-manifest.sh --check`, `build.bat Release test`.) |
## Standing items