diff --git a/.gitignore b/.gitignore index 9d9c012..e9f4366 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,7 @@ __pycache__/ *$py.class # Mac files -*/*.DS_Store +.DS_Store # C extensions *.so diff --git a/Difficult_Rocket/__init__.py b/Difficult_Rocket/__init__.py index c2d4b20..59ee880 100644 --- a/Difficult_Rocket/__init__.py +++ b/Difficult_Rocket/__init__.py @@ -74,7 +74,7 @@ class _DR_option(Options): test_call(self) self.DR_rust_available = True except ImportError: - if __name__ == '__main__': + if not __name__ == '__main__': traceback.print_exc() self.DR_rust_available = False self.flush_option() diff --git a/nuitka1-complie.ps1 b/nuitka-mac.ps1 similarity index 80% rename from nuitka1-complie.ps1 rename to nuitka-mac.ps1 index b95c636..3507d38 100644 --- a/nuitka1-complie.ps1 +++ b/nuitka-mac.ps1 @@ -1,7 +1,7 @@ $start_time = Get-Uptime Write-Output $start_time -python .\.github\workflows\get_info.py -env +python3 .github/workflows/get_info.py -env if (-Not (Test-Path -Path "./.github/workflows/env.ps1")) { @@ -13,16 +13,14 @@ if (-Not (Test-Path -Path "./.github/workflows/env.ps1")) $arg = @() # 输出配置 $arg += @("--standalone") -$arg += @("--output-dir=build/nuitka") +$arg += @("--output-dir=build/nuitka-mac") $arg += @("--company-name=tool-shenjack-workshop") $arg += @("--product-name=Difficult-Rocket") $arg += @("--product-version=$env:DR_version") $arg += @("--file-version=$env:Build_version") $arg += @("--file-description=Difficult-Rocket!") -$arg += @("--windows-icon-from-ico=textures/icon.png") $arg += @("--macos-app-icon=textures/icon.png") # 编译器配置 -$arg += @("--mingw64") $arg += @("--clang") $arg += @("--lto=no") # 包配置 @@ -34,17 +32,16 @@ $arg += @("--include-data-dir=./libs/Difficult_Rocket_rs=./libs/Difficult_Rocket $arg += @("--include-data-dir=./textures=./textures") $arg += @("--include-data-dir=./configs=./configs") # 编译配置 -$arg += @("--jobs=24") $arg += @("--show-memory") $arg += @("--show-progress") -$arg += @("--assume-yes-for-download") -python3.8.exe -m nuitka $arg $args DR.py +#$arg += @("--assume-yes-for-download") +python3.8 -m nuitka $arg $args DR.py $end_time = Get-Uptime $out = $end_time.TotalMilliseconds - $start_time.TotalMilliseconds Write-Output $end_time.TotalSeconds $start_time.TotalSeconds $out s Write-Output $start_time $end_time -Write-Output "--jobs=24 --clang --mingw64 --lto=no and ($args)" +Write-Output "--clang --lto=no and ($args)" # --include-data-dir=./libs/pyglet=./pyglet # --run # --disable-ccache diff --git a/nuitka3-complie.ps1 b/nuitka-win.ps1 similarity index 96% rename from nuitka3-complie.ps1 rename to nuitka-win.ps1 index 683e5c5..1525802 100644 --- a/nuitka3-complie.ps1 +++ b/nuitka-win.ps1 @@ -13,7 +13,7 @@ if (-Not (Test-Path -Path "./.github/workflows/env.ps1")) $arg = @() # 输出配置 $arg += @("--standalone") -$arg += @("--output-dir=build/nuitka1") +$arg += @("--output-dir=build/nuitka-win") $arg += @("--company-name=tool-shenjack-workshop") $arg += @("--product-name=Difficult-Rocket") $arg += @("--product-version=$env:DR_version") @@ -34,7 +34,6 @@ $arg += @("--include-data-dir=./libs/Difficult_Rocket_rs=./libs/Difficult_Rocket $arg += @("--include-data-dir=./textures=./textures") $arg += @("--include-data-dir=./configs=./configs") # 编译配置 -$arg += @("--jobs=24") $arg += @("--show-memory") $arg += @("--show-progress") $arg += @("--assume-yes-for-download")