aboutsummaryrefslogtreecommitdiff
path: root/libs/steam_appinfo_ffi/CMakeLists.txt
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-17 00:53:20 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-17 00:53:20 -0500
commit06c396fd27f55929b40161e587cb9b596b549f3f (patch)
tree40fdb465d2fe6e7d4487bbd237582868c8332459 /libs/steam_appinfo_ffi/CMakeLists.txt
parente583d6dda3cde9e8bccee313fe1ad69634593708 (diff)
Symlink saves, rank prefixes by Steam app type, ntsync safeguards
- Replace copy-in/copy-out save deployment with a direct symlink from the prefix's __MO_Saves to the profile's saves/. Writes land in the profile immediately; afterRun reverts the symlink + prefix INI so a vanilla launch outside MO2 uses the default Saves dir. - Parse Steam's binary appinfo.vdf (v41) via a new Rust FFI crate backed by steam-vdf-parser. Rank detected games by common.type so real Games beat Tools/Editors when multiple prefixes share a My Games folder name (fixes Creation Kit shadowing Skyrim SE). Top-ranked candidate overwrites stale symlinks from earlier runs. - Switch bundled Steam Linux Runtime downloader from sniper (steamrt3) to steamrt4 so Proton 11+ works out of the box. steamrt4 omits xrandr so we inject it from the Debian x11-xserver-utils .deb into a dedicated dir and prepend it to PATH via `env PATH=...` inside the pressure-vessel container (PATH env doesn't propagate). - Auto-kill stale wineboot/wineserver/pv-adverb processes still bound to the prefix before starting a new wineboot -u; match by /proc/<pid>/environ WINEPREFIX / STEAM_COMPAT_DATA_PATH since Wine cmdlines are Windows-style. Same sweep runs in destroyPrefix so a delete actually frees file handles. - Blacklist Proton 11 (Steam-bundled) — its current Wine tree deadlocks during wineboot -u on modern kernels via ntsync / futex_wait_multiple races. Use "waitforexitandrun" (not "run") for prefix init so use_sessions=1 Protons don't fork into a persistent session manager. - Drop WINEDEBUG=-all during prefix init so wineboot progress is visible. Suppress focus-stealing by setting WA_ShowWithoutActivating on the PrefixSetupDialog and SLR download progress dialogs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs/steam_appinfo_ffi/CMakeLists.txt')
-rw-r--r--libs/steam_appinfo_ffi/CMakeLists.txt35
1 files changed, 35 insertions, 0 deletions
diff --git a/libs/steam_appinfo_ffi/CMakeLists.txt b/libs/steam_appinfo_ffi/CMakeLists.txt
new file mode 100644
index 0000000..46d117e
--- /dev/null
+++ b/libs/steam_appinfo_ffi/CMakeLists.txt
@@ -0,0 +1,35 @@
+cmake_minimum_required(VERSION 3.16)
+project(steam_appinfo_ffi)
+
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(CARGO_BUILD_TYPE "debug")
+ set(CARGO_BUILD_FLAGS "")
+else()
+ set(CARGO_BUILD_TYPE "release")
+ set(CARGO_BUILD_FLAGS "--release")
+endif()
+
+set(SAI_FFI_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+set(SAI_FFI_LIB ${SAI_FFI_DIR}/target/${CARGO_BUILD_TYPE}/libsteam_appinfo_ffi.so)
+
+add_custom_command(
+ OUTPUT ${SAI_FFI_LIB}
+ COMMAND cargo build ${CARGO_BUILD_FLAGS}
+ WORKING_DIRECTORY ${SAI_FFI_DIR}
+ COMMENT "Building Steam appinfo FFI library (Rust)"
+ DEPENDS
+ ${SAI_FFI_DIR}/Cargo.toml
+ ${SAI_FFI_DIR}/src/lib.rs
+ ${SAI_FFI_DIR}/vendor/steam-vdf-parser/src/binary/parser.rs
+)
+
+add_custom_target(steam_appinfo_ffi_build DEPENDS ${SAI_FFI_LIB})
+
+add_library(steam_appinfo_ffi_wrapper INTERFACE)
+target_link_libraries(steam_appinfo_ffi_wrapper INTERFACE ${SAI_FFI_LIB})
+target_include_directories(steam_appinfo_ffi_wrapper INTERFACE ${SAI_FFI_DIR}/include)
+add_dependencies(steam_appinfo_ffi_wrapper steam_appinfo_ffi_build)
+add_library(mo2::steam_appinfo_ffi ALIAS steam_appinfo_ffi_wrapper)
+
+install(FILES ${SAI_FFI_LIB} DESTINATION lib)
+install(DIRECTORY ${SAI_FFI_DIR}/include/ DESTINATION include)