35 lines
1.3 KiB
Bash
Executable File
35 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 \
|
|
-lwindowscodecs -lcomdlg32 -luuid \
|
|
-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"
|