update builder

This commit is contained in:
shenjack 2023-08-19 20:15:35 +08:00
parent 05ac9871da
commit cc5dec9122
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 5 additions and 2 deletions

View File

@ -45,6 +45,7 @@ class CompilerHelper(Options):
show_progress: bool = True # --show-progress
show_memory: bool = False # --show-memory
remove_output: bool = True # --remove-output
save_xml: bool = False # --xml
xml_path: Path = Path('build/compile_data.xml')
@ -147,6 +148,7 @@ class CompilerHelper(Options):
_add_cmd(cmd_list, '--disable-ccache' if not self.use_ccache else None)
_add_cmd(cmd_list, '--show-progress' if self.show_progress else None)
_add_cmd(cmd_list, '--show-memory' if self.show_memory else None)
_add_cmd(cmd_list, '--remove-output' if self.remove_output else None)
_add_cmd(cmd_list, '--assume-yes-for-download' if self.download_confirm else None)
_add_cmd(cmd_list, '--run' if self.run_after_build else None)
_add_cmd(cmd_list, '--enable-console' if self.enable_console else '--disable-console')

View File

@ -46,9 +46,10 @@ if __name__ == '__main__':
# 检测 --output xx 参数
if '--output' in sys.argv:
# 输入的是输出目录
compiler.output_path = sys.argv[sys.argv.index('--output') + 1]
out_path = sys.argv[sys.argv.index('--output') + 1]
compiler.output_path = Path(out_path)
sys.argv.remove('--output')
sys.argv.remove(compiler.output_path)
sys.argv.remove(out_path)
# 检测 --no-pyglet-opt 参数
pyglet_optimizations = True