2V0-f: run the real system.py app loop in Godot

- system.py runs app.Loop() on the script fiber; each UIUpdate is one
  CPythonApplication::Process(). Logo -> Login, popup ESC/click and
  app.Exit teardown (launcher cleared first, as in 40250 Main) work.
- Image commands are base-texture quads with UVs (a .sub shares its parent
  texture); ImageInstance/ExpandedImageInstance OnRender and SetRenderingRect
  ported verbatim, so scale/rotation/rendering rect are drawn.
- CGraphicBase::GetColor / grp.GenerateColor ported (ThinBoard background).
- port.app_loop test, python_host_test app-loop checks, MT_TEST_MODE=python_ui.
- TODO: .fnt/CGraphicText font pipeline, ExpandedImage blend modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-23 13:38:13 +09:00
co-authored by Claude Opus 5.5
parent 5590714b16
commit 141206cb69
20 changed files with 916 additions and 57 deletions
+8
View File
@@ -181,6 +181,14 @@ if(BUILD_TESTING AND CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
COMMAND $<TARGET_FILE:port_window_tree_test> ${MT_PYTHON_STDLIB_ZIP})
set_tests_properties(port.window_tree PROPERTIES SKIP_RETURN_CODE 77)
# 批次 2V0-f: the real system.py through app.Loop() on PythonBoot's script thread; needs the pack.
add_executable(port_app_loop_test ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/port_app_loop_test.cpp)
target_link_libraries(port_app_loop_test PRIVATE port_platform)
add_dependencies(port_app_loop_test mtpython_stdlib)
add_test(NAME port.app_loop
COMMAND $<TARGET_FILE:port_app_loop_test> ${MT_40250_CLIENT} ${MT_PYTHON_STDLIB_ZIP})
set_tests_properties(port.app_loop PROPERTIES SKIP_RETURN_CODE 77)
add_executable(port_python_ui_modules_test ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/port_python_ui_modules_test.cpp)
target_link_libraries(port_python_ui_modules_test PRIVATE port_platform)
add_dependencies(port_python_ui_modules_test mtpython_stdlib)