Files
kinect/tracker-native/build_win.sh
T
kinect-bot b2513c5722
ci / Linux C++ core (cmake + ctest) (push) Canceled after 0s
ci / Python root tests (pytest, no tracker deps) (push) Canceled after 0s
ci / Python tracker (pytest, tracker/.venv) (push) Canceled after 0s
feat(tracker-native): kinect_tracker.log diagnostics for playtest
Adds a ShimLog-style trace log next to the exe (startup, camera enumeration,
negotiated capture format + MF_MT_DEFAULT_STRIDE, per-N-frame presence/tracked,
shm CreateFileMapping result, errors) so the first real-hardware run is
diagnosable instead of blind - mirrors how kinect_shim.log drove the shim fixes.
Logs the camera stride so a top-down/bottom-up RGB32 image-flip is immediately
visible.
2026-11-25 19:04:20 -05:00

34 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CORE="${HERE}/../core"
ORTW="${HERE}/third_party/onnxruntime-win-x64"
export PATH="${MINGW_BIN:-$HOME/.local/mingw-root/usr/bin}:${PATH}"
CXX="${CXX_WIN:-x86_64-w64-mingw32-g++-win32}"
MODEL="${HERE}/models/pose_landmarks_detector.onnx"
if [ ! -f "${MODEL}" ]; then
echo "missing ${MODEL} - run scripts/setup_models.sh first" >&2
exit 1
fi
mkdir -p "${HERE}/build/dist"
"${CXX}" -std=c++17 -O2 -Wall -Wextra -D_stdcall=__stdcall -municode \
-static -static-libgcc -static-libstdc++ \
-I "${ORTW}/include" -I "${HERE}/src" -I "${CORE}" \
"${HERE}/src/win_main.cpp" "${HERE}/src/win_camera.cpp" \
"${HERE}/src/trace_log.cpp" \
"${HERE}/src/pose_estimator.cpp" "${HERE}/src/shm_publisher.cpp" \
"${HERE}/src/frame_pipeline.cpp" \
"${CORE}/mapping/mapping.cpp" "${CORE}/synth/synth.cpp" \
"${CORE}/synth/mask_stabilizer.cpp" "${CORE}/contract/contract.cpp" \
"${ORTW}/lib/onnxruntime.lib" \
-lmfplat -lmf -lmfreadwrite -lmfuuid -lole32 -loleaut32 -lgdi32 -luser32 \
-mwindows -o "${HERE}/build/dist/kinect-tracker.exe"
cp -f "${ORTW}/lib/onnxruntime.dll" "${HERE}/build/dist/"
cp -f "${MODEL}" "${HERE}/build/dist/"
echo "dist ready: ${HERE}/build/dist"
ls -la "${HERE}/build/dist"