Add RED4ext logging shim

This commit is contained in:
2026-06-19 21:44:46 -05:00
parent e3c6087738
commit 1de2f4ab46
11 changed files with 219 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
plugin_dir="$repo_root/red4ext/EdgeWeightGPS"
build_dir="$repo_root/build/red4ext/EdgeWeightGPS-mingw64"
sdk_dir="$repo_root/vendor/RED4ext.SDK"
if [[ ! -f "$sdk_dir/include/RED4ext/Api/v1/PluginInfo.hpp" ]]; then
mkdir -p "$repo_root/vendor"
git clone --depth 1 https://github.com/WopsS/RED4ext.SDK.git "$sdk_dir"
fi
cmake -S "$plugin_dir" -B "$build_dir" \
-DCMAKE_TOOLCHAIN_FILE="$plugin_dir/cmake/mingw64-toolchain.cmake" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build "$build_dir" --parallel
printf '%s\n' "$build_dir/EdgeWeightGPS.dll"
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
game_dir="${CYBERPUNK2077_GAME_DIR:-/var/home/salt/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Cyberpunk 2077}"
plugin_out="$game_dir/red4ext/plugins/EdgeWeightGPS"
dll_path="$("$repo_root/tools/build_red4ext_shim.sh" | tail -n 1)"
mkdir -p "$plugin_out"
install -m 0644 "$dll_path" "$plugin_out/EdgeWeightGPS.dll"
printf 'Installed %s\n' "$plugin_out/EdgeWeightGPS.dll"