Conversation
下游脚本此前需要用猴子补丁改写 start_device 才能给游戏传启动参数 (例:longer-sausage/OK-AzurPromilia#13),改为框架原生支持: - 新增 _build_launch_arguments(),合并全局 Launch with DX11 开关与项目 配置 config['windows']['args'],原 DX11 逻辑保持不变 - args 支持列表(['-start=launcher'])或字符串写法,空值不产生多余空格 - 仅在启动 Windows 客户端时附加,启动模拟器时不附加,避免参数误传给模拟器 - 补充 5 个单元测试,并更新中英文快速开始文档
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



背景
下游脚本需要给游戏传启动参数时,目前只能靠猴子补丁改写
StartController.start_device(例如 longer-sausage/OK-AzurPromilia#13 的做法)。本 PR 把该能力下沉到框架,脚本侧只需要在
config.py里声明,不再需要打补丁:改动
ok/core/start_controller.py_build_launch_arguments():合并全局Launch with DX11开关与项目配置config['windows']['args']。原有 DX11 判断逻辑一字未改,只是从start_device内联抽成方法。_normalize_launch_args():兼容列表(['-start=launcher'])与字符串(
'-start=launcher -popupwindow')两种写法,空值收敛为None,不会在命令行尾部产生多余空格。device['device'] == 'windows')。start_device启动模拟器 exe 走的是同一条路径,若像原补丁那样无条件附加,会把游戏参数误传给模拟器可执行文件。
文档:
docs/quick_start/README.md、docs/en/quick_start.md补充args说明。测试
tests/test_start_controller.py新增 5 个用例:-dx11 -d3d11 -force-d3d11 -start=launcherargs不改变原有启动命令(仍为arguments=None)pytest tests/test_start_controller.py全绿(12 passed)。完整套件392 passed, 8 failed,8 个失败全部位于
test_web_server.py,原因是本地环境缺少fastapi/uvicorn,与本改动无关。AI 使用声明
本改动由 AI 辅助生成(WorkBuddy),已人工复核逻辑与测试。