feat: try icon

This commit is contained in:
shenjack 2023-01-03 15:34:06 +08:00
parent 5acc17bfa4
commit 101e4dfdd7
5 changed files with 19 additions and 8 deletions

View File

@ -9,9 +9,11 @@ import sys
import rtoml
sys.path.append(os.path.abspath(os.curdir))
if '-env' not in sys.argv:
args = ['-env', '']
if not any([x in sys.argv for x in args]): # 没有输入参数,直接输出默认信息并输出
print(sys.version)
print(os.getenv('env:GITHUB_SHA'))
from Difficult_Rocket.utils import tools
# 重置窗口信息
config_file = tools.load_file('./configs/main.toml')
@ -19,11 +21,12 @@ if '-env' not in sys.argv:
config_file['window']['height'] = 768
rtoml.dump(config_file, open('./configs/main.toml', 'w'))
if os.path.abspath(os.curdir) in sys.path:
if os.path.abspath(os.curdir) in sys.path and '-env' in sys.argv:
from Difficult_Rocket import DR_runtime
print(f'DR_version={DR_runtime.DR_version}')
print(f'DR_language={DR_runtime.language}')
print(f'DR_long_version={DR_runtime.DR_long_version}')
print(f'Build_version={DR_runtime.Build_version}')
# os.system(f'echo "DR_version={DR_runtime.DR_version}" >> $GITHUB_OUTPUT')

View File

@ -55,7 +55,7 @@ jobs:
- name: Install env
run: |
pip install -r requirement.txt
pip install nuitka ordered-set
pip install nuitka ordered-set imageio
# 提取 DR 版本和其他信息
- name: Display Difficult-Rocket info
@ -78,8 +78,10 @@ jobs:
$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 += @("--file-version=0.0.0.1")
$arg += @("--windows-icon-from-ico=textures/icon.png")
$arg += @("--macos-app-icon=textures/icon.png")
# 编译器配置
$arg += @("--msvc=latest")
$arg += @("--clang")
@ -109,8 +111,10 @@ jobs:
$arg += @("--company-name=tool-shenjack-workshop")
$arg += @("--product-name=Difficult-Rocket")
$arg += @("--product-version=$env:DR_version")
$arg += @("--file-version=0.0.0.1")
$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 += @("--clang")
$arg += @("--lto=no")

View File

@ -10,6 +10,8 @@ $arg += @("--product-name=Difficult-Rocket")
$arg += @("--product-version=0.6.4")
$arg += @("--file-version=0.0.0.1")
$arg += @("--file-description=Difficult-Rocket!")
$arg += @("--windows-icon-from-ico=textures/icon.png")
$arg += @("--macos-app-icon=textures/icon.png")
# 编译器配置
$arg += @("--mingw64")
$arg += @("--clang")

View File

@ -10,6 +10,8 @@ $arg += @("--product-name=Difficult-Rocket")
$arg += @("--product-version=0.6.4")
$arg += @("--file-version=0.0.0.1")
$arg += @("--file-description=Difficult-Rocket!")
$arg += @("--windows-icon-from-ico=textures/icon.png")
$arg += @("--macos-app-icon=textures/icon.png")
# 编译器配置
$arg += @("--msvc=latest")
$arg += @("--clang")

View File

@ -22,5 +22,5 @@ defusedxml = "*"
[build-system]
requires = ["setuptools"]
build-backend = "poetry.core.masonry.api"
requires = ["setuptools>=42", "wheel", "nuitka", "toml", "imageio"]
build-backend = "nuitka.distutils.Build"