mirror of
https://github.com/Toastconcern/FrameStudio.git
synced 2026-10-28 16:02:39 +01:00
Frame Home release builds keep libdeflate and load only what SteamOS has; Studio builds without a payload outside CI
- CI installs libdeflate-dev and CMake prefers its static library: APK homes unpack as fast as with the headset-built programs, with no new dependency. - build-frame-home.sh --ci fails when a headset program needs a library beyond libc/libm/libdl/libpthread/libstdc++/libgcc_s. - Studio's CMake requires a complete payload only in CI (or with FRAME_HOME_REQUIRE_PAYLOAD); a developer build without one warns, leaves out frame/, and Install on Steam Frame says the headset files are missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8956441618
commit
91d9be5194
4 files changed
+30
-6
No files matched your search
@@ -197,7 +197,7 @@ jobs:
|
||||
sudo mkdir -p "$APT_CACHE_DIR/archives/partial"
|
||||
sudo chown _apt:root "$APT_CACHE_DIR/archives/partial"
|
||||
sudo apt-get update
|
||||
sudo apt-get -o Dir::Cache::archives="$APT_CACHE_DIR/archives" install -y ccache cmake ninja-build gcc-13 g++-13 glslc zip
|
||||
sudo apt-get -o Dir::Cache::archives="$APT_CACHE_DIR/archives" install -y ccache cmake ninja-build gcc-13 g++-13 glslc zip libdeflate-dev
|
||||
sudo chown -R "$(id -u):$(id -g)" "$APT_CACHE_DIR/archives"
|
||||
- name: Build payload and installer
|
||||
run: sh scripts/build-frame-home.sh --ci
|
||||
|
||||
+3
-2
@@ -94,8 +94,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set_source_files_properties("${TP}/qhe/cook/hzanim_acl.cpp" PROPERTIES COMPILE_OPTIONS "-flax-vector-conversions")
|
||||
endif()
|
||||
target_link_libraries(frame-scene PUBLIC miniz lzma smolv ${ASTCENC_LIB} pthread)
|
||||
# libdeflate when the system has it (the Frame): APK scene.zips inflate several times faster than with miniz.
|
||||
find_library(LIBDEFLATE_LIB deflate)
|
||||
# libdeflate when the system has it (the Frame, CI): APK scene.zips inflate several times faster than with miniz. Its
|
||||
# static library first, so a release build doesn't need it installed on the headset.
|
||||
find_library(LIBDEFLATE_LIB NAMES libdeflate.a deflate)
|
||||
find_path(LIBDEFLATE_INC libdeflate.h)
|
||||
if(LIBDEFLATE_LIB AND LIBDEFLATE_INC)
|
||||
target_compile_definitions(frame-scene PUBLIC QHE_HAVE_LIBDEFLATE)
|
||||
|
||||
@@ -66,6 +66,15 @@ for binary in "$PAYLOAD/bin/"* "$PAYLOAD/layer/libframe_home_layer.so"; do
|
||||
echo "$binary requires $highest, newer than the glibc 2.39 baseline" >&2
|
||||
exit 1
|
||||
fi
|
||||
# Release builds load only what every SteamOS has (OpenVR and Vulkan are found at run time, libdeflate is linked in).
|
||||
if [ "$MODE" = ci ]; then
|
||||
extra=$(readelf -d "$binary" | sed -n 's/.*(NEEDED).*\[\(.*\)\]/\1/p' |
|
||||
grep -vxE 'libc\.so\.6|libm\.so\.6|libdl\.so\.2|libpthread\.so\.0|libstdc\+\+\.so\.6|libgcc_s\.so\.1|ld-linux-aarch64\.so\.1' || true)
|
||||
if [ -n "$extra" ]; then
|
||||
echo "$binary needs libraries a headset may not have: $(echo $extra)" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
{
|
||||
|
||||
+17
-3
@@ -22,11 +22,23 @@ set(FRAME_HOME_PAYLOAD_DIR "$ENV{FRAME_HOME_PAYLOAD_DIR}" CACHE PATH "Built Fram
|
||||
if(NOT FRAME_HOME_PAYLOAD_DIR)
|
||||
set(FRAME_HOME_PAYLOAD_DIR "${ROOT}/frame/payload")
|
||||
endif()
|
||||
# A release must carry it (CI: GitHub sets CI); a developer's build without one still builds, and its Install on Steam
|
||||
# Frame says the headset files are missing.
|
||||
option(FRAME_HOME_REQUIRE_PAYLOAD "Fail when the Frame Home payload is incomplete" "$ENV{CI}")
|
||||
set(FRAME_HOME_PAYLOAD_COMPLETE ON)
|
||||
foreach(FRAME_HOME_FILE install.sh bin/frame-home bin/frame-switcher bin/fenv-tool layer/libframe_home_layer.so layer/env_ps.spv)
|
||||
if(NOT EXISTS "${FRAME_HOME_PAYLOAD_DIR}/${FRAME_HOME_FILE}")
|
||||
message(FATAL_ERROR "Frame Home payload is incomplete; build or download it and set FRAME_HOME_PAYLOAD_DIR (${FRAME_HOME_FILE} missing)")
|
||||
set(FRAME_HOME_PAYLOAD_COMPLETE OFF)
|
||||
set(FRAME_HOME_MISSING "${FRAME_HOME_FILE}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT FRAME_HOME_PAYLOAD_COMPLETE)
|
||||
set(FRAME_HOME_PAYLOAD_HELP "build or download it and set FRAME_HOME_PAYLOAD_DIR (${FRAME_HOME_MISSING} missing)")
|
||||
if(FRAME_HOME_REQUIRE_PAYLOAD)
|
||||
message(FATAL_ERROR "Frame Home payload is incomplete; ${FRAME_HOME_PAYLOAD_HELP}")
|
||||
endif()
|
||||
message(WARNING "Frame Home payload is incomplete, so this Studio can't install Frame Home; ${FRAME_HOME_PAYLOAD_HELP}")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
add_compile_definitions(NOMINMAX WIN32_LEAN_AND_MEAN _CRT_SECURE_NO_WARNINGS VK_USE_PLATFORM_WIN32_KHR)
|
||||
@@ -166,8 +178,10 @@ if(APPLE)
|
||||
set_target_properties(frame-studio PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Frame Studio" MACOSX_BUNDLE_GUI_IDENTIFIER "com.framestudio.app")
|
||||
endif()
|
||||
# Frame Home's headset side (arm64 binaries + install.sh) ships beside the exe, in frame\: Frame > Install on Steam Frame.
|
||||
add_custom_command(TARGET frame-studio POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${FRAME_HOME_PAYLOAD_DIR}" "$<TARGET_FILE_DIR:frame-studio>/frame")
|
||||
if(FRAME_HOME_PAYLOAD_COMPLETE)
|
||||
add_custom_command(TARGET frame-studio POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${FRAME_HOME_PAYLOAD_DIR}" "$<TARGET_FILE_DIR:frame-studio>/frame")
|
||||
endif()
|
||||
if(MINGW) # MinGW builds (x64, x86 and ARM64): wWinMain entry point, no runtime DLLs to ship
|
||||
target_link_options(frame-studio PRIVATE -municode -static)
|
||||
endif()
|
||||
|
||||
Reference in new issue
Block a user