@@ -62,32 +62,30 @@ jobs:
6262
6363 - name : Configure + build (WinXP)
6464 run : |
65- set -euo pipefail
65+ set -euxo pipefail
6666
6767 export PATH="$GITHUB_WORKSPACE/mxe/usr/bin:$PATH"
6868 export MXE_PREFIX="$GITHUB_WORKSPACE/mxe/usr/i686-w64-mingw32.static"
6969
70- # Make sure CMake/pkg-config find MXE (not host)
71- export CMAKE_PREFIX_PATH="$MXE_PREFIX"
70+ # Make pkg-config resolve MXE packages (not host)
7271 export PKG_CONFIG_PATH="$MXE_PREFIX/lib/pkgconfig"
72+ export PKG_CONFIG_LIBDIR="$MXE_PREFIX/lib/pkgconfig"
7373
74- echo "=== DEBUG: where SDL_net headers are ==="
75- ls -la "$MXE_PREFIX/include/SDL/SDL_net.h" || true
74+ echo "=== DEBUG: MXE_PREFIX ==="
75+ echo "$MXE_PREFIX"
76+
77+ echo "=== DEBUG: SDL_net headers (try common locations) ==="
7678 ls -la "$MXE_PREFIX/include/SDL_net.h" || true
79+ ls -la "$MXE_PREFIX/include/SDL/SDL_net.h" || true
80+ ls -la "$MXE_PREFIX/include/SDL_net/SDL_net.h" || true
7781
78- # ---- FIX #1: Provide SDL_net.h shim so source '#include <SDL_net.h>' works
79- mkdir -p "$GITHUB_WORKSPACE/_shim_includes"
80- cat > "$GITHUB_WORKSPACE/_shim_includes/SDL_net.h" <<'EOF'
81- #pragma once
82- #include <SDL/SDL_net.h>
83- EOF
82+ echo "=== DEBUG: jsoncpp headers (try common locations) ==="
83+ ls -la "$MXE_PREFIX/include/json/json.h" || true
84+ ls -la "$MXE_PREFIX/include/jsoncpp/json/json.h" || true
8485
85- # Put shim FIRST, then MXE includes.
86- export CPPFLAGS="-I$GITHUB_WORKSPACE/_shim_includes -I$MXE_PREFIX/include -I$MXE_PREFIX/include/SDL"
87- export CFLAGS="$CPPFLAGS"
88- export CXXFLAGS="$CPPFLAGS"
86+ echo "=== DEBUG: key libs present in MXE_PREFIX/lib ==="
87+ ls -la "$MXE_PREFIX/lib" | grep -Ei "json|sdl|jpeg|png|webp|smpeg|modplug|vorbis|ogg|ws2|iphlp|winmm|dxguid" || true
8988
90- # Clean build dir to avoid stale CMake cache confusing includes
9189 rm -rf build
9290 mkdir -p build
9391 cd build
@@ -96,44 +94,22 @@ jobs:
9694 -DCMAKE_BUILD_TYPE=Release \
9795 -DDEV_BUILD=OFF \
9896 -DBUILD_PACKAGE=OFF \
99- -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
100- -DCMAKE_C_FLAGS="$CFLAGS" \
101- -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
97+ -DCMAKE_PREFIX_PATH="$MXE_PREFIX" \
98+ -DDEPS_DIR= \
10299 "$GITHUB_WORKSPACE"
103100
104- # Build verbose so link.txt/linklibs.rsp are produced and visible
105101 make -j"$(nproc)" VERBOSE=1
106102
107- - name : Collect link scripts (even on failure)
108- if : always()
109- run : |
110- set -euo pipefail
111- mkdir -p artifacts
112-
113- # These are created by CMake during link step (if it reaches that far)
114- if [ -f build/src/CMakeFiles/openxcom.dir/link.txt ]; then
115- cp -v build/src/CMakeFiles/openxcom.dir/link.txt artifacts/link.txt
116- fi
117- if [ -f build/src/CMakeFiles/openxcom.dir/linklibs.rsp ]; then
118- cp -v build/src/CMakeFiles/openxcom.dir/linklibs.rsp artifacts/linklibs.rsp
119- fi
120-
121- # Also keep CMake logs when diagnosing
122- if [ -f build/CMakeFiles/CMakeOutput.log ]; then
123- cp -v build/CMakeFiles/CMakeOutput.log artifacts/CMakeOutput.log
124- fi
125- if [ -f build/CMakeFiles/CMakeError.log ]; then
126- cp -v build/CMakeFiles/CMakeError.log artifacts/CMakeError.log
127- fi
128-
129- ls -la artifacts || true
130-
131- - name : Upload link scripts artifact
103+ # Always upload link scripts (even if build fails)
104+ - name : Upload link scripts (link.txt + linklibs.rsp)
132105 if : always()
133106 uses : actions/upload-artifact@v4
134107 with :
135108 name : winxp-link-scripts-${{ env.SAFE_REF }}
136- path : artifacts/
109+ path : |
110+ build/src/CMakeFiles/openxcom.dir/link.txt
111+ build/src/CMakeFiles/openxcom.dir/linklibs.rsp
112+ build/CMakeFiles/CMakeOutput.log
137113
138114 - name : Package zip
139115 if : success()
@@ -142,7 +118,7 @@ jobs:
142118 rm -f libopenxcom.dll.a || true
143119 zip -r "../../openxcom-winxp-${{ env.SAFE_REF }}.zip" .
144120
145- - name : Upload build artifact
121+ - name : Upload artifact
146122 if : success()
147123 uses : actions/upload-artifact@v4
148124 with :
0 commit comments