some update

This commit is contained in:
沈瑗杰 2023-01-24 09:59:38 +08:00
parent 3d5201b35e
commit d064bd8546
4 changed files with 8 additions and 12 deletions

2
.gitignore vendored
View File

@ -29,7 +29,7 @@ __pycache__/
*$py.class *$py.class
# Mac files # Mac files
*/*.DS_Store .DS_Store
# C extensions # C extensions
*.so *.so

View File

@ -74,7 +74,7 @@ class _DR_option(Options):
test_call(self) test_call(self)
self.DR_rust_available = True self.DR_rust_available = True
except ImportError: except ImportError:
if __name__ == '__main__': if not __name__ == '__main__':
traceback.print_exc() traceback.print_exc()
self.DR_rust_available = False self.DR_rust_available = False
self.flush_option() self.flush_option()

View File

@ -1,7 +1,7 @@
$start_time = Get-Uptime $start_time = Get-Uptime
Write-Output $start_time 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")) if (-Not (Test-Path -Path "./.github/workflows/env.ps1"))
{ {
@ -13,16 +13,14 @@ if (-Not (Test-Path -Path "./.github/workflows/env.ps1"))
$arg = @() $arg = @()
# 输出配置 # 输出配置
$arg += @("--standalone") $arg += @("--standalone")
$arg += @("--output-dir=build/nuitka") $arg += @("--output-dir=build/nuitka-mac")
$arg += @("--company-name=tool-shenjack-workshop") $arg += @("--company-name=tool-shenjack-workshop")
$arg += @("--product-name=Difficult-Rocket") $arg += @("--product-name=Difficult-Rocket")
$arg += @("--product-version=$env:DR_version") $arg += @("--product-version=$env:DR_version")
$arg += @("--file-version=$env:Build_version") $arg += @("--file-version=$env:Build_version")
$arg += @("--file-description=Difficult-Rocket!") $arg += @("--file-description=Difficult-Rocket!")
$arg += @("--windows-icon-from-ico=textures/icon.png")
$arg += @("--macos-app-icon=textures/icon.png") $arg += @("--macos-app-icon=textures/icon.png")
# 编译器配置 # 编译器配置
$arg += @("--mingw64")
$arg += @("--clang") $arg += @("--clang")
$arg += @("--lto=no") $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=./textures=./textures")
$arg += @("--include-data-dir=./configs=./configs") $arg += @("--include-data-dir=./configs=./configs")
# 编译配置 # 编译配置
$arg += @("--jobs=24")
$arg += @("--show-memory") $arg += @("--show-memory")
$arg += @("--show-progress") $arg += @("--show-progress")
$arg += @("--assume-yes-for-download") #$arg += @("--assume-yes-for-download")
python3.8.exe -m nuitka $arg $args DR.py python3.8 -m nuitka $arg $args DR.py
$end_time = Get-Uptime $end_time = Get-Uptime
$out = $end_time.TotalMilliseconds - $start_time.TotalMilliseconds $out = $end_time.TotalMilliseconds - $start_time.TotalMilliseconds
Write-Output $end_time.TotalSeconds $start_time.TotalSeconds $out s Write-Output $end_time.TotalSeconds $start_time.TotalSeconds $out s
Write-Output $start_time $end_time 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 # --include-data-dir=./libs/pyglet=./pyglet
# --run # --run
# --disable-ccache # --disable-ccache

View File

@ -13,7 +13,7 @@ if (-Not (Test-Path -Path "./.github/workflows/env.ps1"))
$arg = @() $arg = @()
# 输出配置 # 输出配置
$arg += @("--standalone") $arg += @("--standalone")
$arg += @("--output-dir=build/nuitka1") $arg += @("--output-dir=build/nuitka-win")
$arg += @("--company-name=tool-shenjack-workshop") $arg += @("--company-name=tool-shenjack-workshop")
$arg += @("--product-name=Difficult-Rocket") $arg += @("--product-name=Difficult-Rocket")
$arg += @("--product-version=$env:DR_version") $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=./textures=./textures")
$arg += @("--include-data-dir=./configs=./configs") $arg += @("--include-data-dir=./configs=./configs")
# 编译配置 # 编译配置
$arg += @("--jobs=24")
$arg += @("--show-memory") $arg += @("--show-memory")
$arg += @("--show-progress") $arg += @("--show-progress")
$arg += @("--assume-yes-for-download") $arg += @("--assume-yes-for-download")