From 9ca58e63971f75de94bed2e117f25f5bc6889fd4 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Fri, 9 Jun 2023 17:03:35 +0800 Subject: [PATCH] add more implment --- libs/utils/nuitka.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libs/utils/nuitka.py b/libs/utils/nuitka.py index 573c33c..777f198 100644 --- a/libs/utils/nuitka.py +++ b/libs/utils/nuitka.py @@ -27,10 +27,13 @@ class Status(Options): use_msvc: bool = True # --msvc=latest use_mingw: bool = False # --mingw64 standalone: bool = True # --standalone + use_ccache: bool = True # not --disable-ccache show_progress: bool = True # --show-progress show_memory: bool = False # --show-memory + download_confirm: bool = True # --assume-yes-for-download + company_name: str = 'tool-shenjack-workshop' product_name: str = 'Difficult-Rocket' product_version: Version @@ -41,9 +44,9 @@ class Status(Options): follow_import: List[str] = ['pyglet'] no_follow_import: List[str] = ['objprint', 'pillow', 'PIL', 'cffi', 'pydoc', 'numpy'] - include_data_dir: List[Tuple[Path, Path]] = [(Path('./libs/fonts'), Path('./libs/fonts')), - (Path('./textures'), Path('./textures')), - (Path('./configs'), Path('./configs'))] + include_data_dir: List[Tuple[str, str]] = [('./libs/fonts', './libs/fonts'), + ('./textures', './textures'), + ('./configs', './configs')] include_packages: List[str] = ['Difficult_Rocket.api'] def init(self, **kwargs) -> None: @@ -86,16 +89,21 @@ class Status(Options): cmd_list.append('--lto=yes') else: cmd_list.append('--lto=no') + if self.use_clang: cmd_list.append('--clang') if self.use_msvc: cmd_list.append('--msvc=latest') if self.standalone: cmd_list.append('--standalone') + if not self.use_ccache: + cmd_list.append('--disable-ccache') if self.show_progress: cmd_list.append('--show-progress') if self.show_memory: cmd_list.append('--show-memory') + if self.download_confirm: + cmd_list.append('--assume-yes-for-download') cmd_list.append(f"--output-dir={self.output_path.absolute()}") @@ -114,5 +122,3 @@ class Status(Options): cmd_list.append(f"{self.src_file}") return cmd_list - -