Checkpoint 4: harden native paths, authoring workflows and Player lifecycle

This commit is contained in:
Emil
2026-09-18 05:14:50 +03:00
parent 5ac4db438d
commit 45bc352d46
88 changed files with 12606 additions and 504 deletions
+9
View File
@@ -4,6 +4,15 @@ if(TARGET faset_ui AND TARGET faset_editor_session AND TARGET faset_scene_view)
add_library(faset_project_launcher STATIC ${PROJECT_SOURCE_DIR}/apps/project_launcher.cpp)
target_link_libraries(faset_project_launcher PUBLIC faset_ui faset_render)
if(BUILD_TESTING)
add_executable(faset_editor_import_conflicts_ui_tests ${PROJECT_SOURCE_DIR}/tests/editor_ui_import_conflicts.cpp)
target_link_libraries(faset_editor_import_conflicts_ui_tests PRIVATE faset_editor_ui)
target_compile_definitions(faset_editor_import_conflicts_ui_tests PRIVATE FASET_TEST_ENGINE="${PROJECT_SOURCE_DIR}")
add_test(NAME editor_ui_import_conflicts COMMAND faset_editor_import_conflicts_ui_tests)
set_tests_properties(editor_ui_import_conflicts PROPERTIES LABELS "gpu")
# Invoked by verify_blender_roundtrip.py after real Blender generates its fixture.
add_executable(faset_blender_editor_probe ${PROJECT_SOURCE_DIR}/tests/editor_blender_reimport_probe.cpp)
target_link_libraries(faset_blender_editor_probe PRIVATE faset_editor_ui)
target_compile_definitions(faset_blender_editor_probe PRIVATE FASET_TEST_ENGINE="${PROJECT_SOURCE_DIR}")
add_executable(faset_editor_project_settings_ui_tests ${PROJECT_SOURCE_DIR}/tests/editor_ui_project_settings.cpp)
target_link_libraries(faset_editor_project_settings_ui_tests PRIVATE faset_editor_ui)
target_compile_definitions(faset_editor_project_settings_ui_tests PRIVATE FASET_TEST_ENGINE="${PROJECT_SOURCE_DIR}")
+14
View File
@@ -20,5 +20,19 @@ if(TARGET faset_runtime AND TARGET faset_render AND TARGET faset_assets)
add_executable(faset_player_tests ${PROJECT_SOURCE_DIR}/tests/runtime_player_tests.cpp)
target_link_libraries(faset_player_tests PRIVATE faset_scene_view faset_runtime faset_assets)
add_test(NAME player_scene_contracts COMMAND faset_player_tests)
# Exercise the production Player entry with an isolated throwing module.
# No test-only switches or behaviors are added to the shipping Player.
add_executable(faset_player_diagnostics
${PROJECT_SOURCE_DIR}/apps/player_main.cpp
${PROJECT_SOURCE_DIR}/tests/player_diagnostics/Gameplay.cpp)
target_include_directories(faset_player_diagnostics PRIVATE
${PROJECT_SOURCE_DIR}/tests/player_diagnostics)
target_link_libraries(faset_player_diagnostics PRIVATE faset_scene_view faset_runtime)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
add_test(NAME player_shutdown_diagnostics COMMAND ${Python3_EXECUTABLE}
${PROJECT_SOURCE_DIR}/tests/player_diagnostics_test.py
$<TARGET_FILE:faset_player_diagnostics>)
set_tests_properties(player_shutdown_diagnostics PROPERTIES LABELS "gpu" TIMEOUT 60)
endif()
endif()
+8
View File
@@ -35,6 +35,10 @@ if(BUILD_TESTING)
add_test(NAME render_graph COMMAND faset_render_tests --unit)
add_test(NAME render_offscreen COMMAND faset_render_tests --gpu "${CMAKE_BINARY_DIR}/render-test.ppm")
set_tests_properties(render_offscreen PROPERTIES LABELS "gpu")
add_executable(faset_render_sprite_tests "${PROJECT_SOURCE_DIR}/tests/render_sprite_tests.cpp")
target_link_libraries(faset_render_sprite_tests PRIVATE faset_render)
add_test(NAME render_sprite_alpha COMMAND faset_render_sprite_tests)
set_tests_properties(render_sprite_alpha PROPERTIES LABELS "gpu")
add_executable(faset_render_reload_tests "${PROJECT_SOURCE_DIR}/tests/render_reload_tests.cpp")
target_link_libraries(faset_render_reload_tests PRIVATE faset_render faset_core)
target_compile_definitions(faset_render_reload_tests PRIVATE
@@ -45,5 +49,9 @@ if(BUILD_TESTING)
FASET_PYTHON_EXECUTABLE="${Python3_EXECUTABLE}")
add_test(NAME render_shader_reload COMMAND faset_render_reload_tests)
set_tests_properties(render_shader_reload PROPERTIES LABELS "gpu")
add_executable(faset_render_window_tests "${PROJECT_SOURCE_DIR}/tests/render_window_tests.cpp")
target_link_libraries(faset_render_window_tests PRIVATE faset_render SDL3::SDL3)
add_test(NAME render_window_lifecycle COMMAND faset_render_window_tests "${CMAKE_BINARY_DIR}/window-test")
set_tests_properties(render_window_lifecycle PROPERTIES LABELS "gpu;window" TIMEOUT 40 SKIP_RETURN_CODE 77)
endif()
install(FILES ${FASET_SHADER_OUTPUTS} DESTINATION shaders)
+12
View File
@@ -0,0 +1,12 @@
# Include after the Faset targets have been declared. A source manifest is merged
# with CMake's generated application manifest by its MSVC/Ninja linker wrapper.
# External build tools have their own manifests and still need a compatible host.
if(WIN32)
get_property(_faset_targets DIRECTORY "${PROJECT_SOURCE_DIR}" PROPERTY BUILDSYSTEM_TARGETS)
foreach(_faset_target IN LISTS _faset_targets)
get_target_property(_faset_type "${_faset_target}" TYPE)
if(_faset_type STREQUAL "EXECUTABLE" AND _faset_target MATCHES "^faset_")
target_sources("${_faset_target}" PRIVATE "${PROJECT_SOURCE_DIR}/cmake/windows.manifest")
endif()
endforeach()
endif()
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
</assembly>