diff --git a/libs/utils/nuitka.py b/libs/utils/nuitka.py index d1cfa81..12c2ee6 100644 --- a/libs/utils/nuitka.py +++ b/libs/utils/nuitka.py @@ -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') diff --git a/nuitka_build.py b/nuitka_build.py index 515ea85..6d26431 100644 --- a/nuitka_build.py +++ b/nuitka_build.py @@ -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