update title

This commit is contained in:
shenjack 2023-01-26 23:15:32 +08:00
parent 0107fd26de
commit 60c09fd37f
4 changed files with 11 additions and 6 deletions

View File

@ -113,9 +113,15 @@ class Options:
return values return values
def format(self, text: str) -> str: def format(self, text: str) -> str:
"""
使用自己的选项给输入的字符串替换内容
:param text: 想替换的内容
:return: 替换之后的内容
"""
cache_option = self.flush_option() cache_option = self.flush_option()
for option, value in cache_option.items(): for option, value in cache_option.items():
text.replace(f'{{{option}}}', value) text = text.replace(f'{{{option}}}', str(value))
return text
def flush_option(self) -> Dict[str, Any]: def flush_option(self) -> Dict[str, Any]:
""" """

View File

@ -71,8 +71,7 @@ class Client:
self.process_name = 'Client process' self.process_name = 'Client process'
self.process_pid = os.getpid() self.process_pid = os.getpid()
self.net_mode = net_mode self.net_mode = net_mode
self.caption = tools.name_handler(self.config['window']['caption'], self.caption = DR_runtime.format(self.config['window']['caption'])
{'version': self.config['runtime']['version']})
file_drop = True file_drop = True
if pyglet.compat_platform == 'darwin' and not DR_option.pyglet_macosx_dev_test: if pyglet.compat_platform == 'darwin' and not DR_option.pyglet_macosx_dev_test:
file_drop = False file_drop = False

View File

@ -12,7 +12,7 @@ width = 2336
height = 1621 height = 1621
visible = true visible = true
gui_scale = 1 gui_scale = 1
caption = "Difficult Rocket {version}" caption = "Difficult Rocket v{DR_version} DR_rs v{DR_Rust_get_version}"
resizable = true resizable = true
full_screen = false full_screen = false

View File

@ -30,7 +30,7 @@ $arg += @("--windows-icon-from-ico=textures/icon.png")
$arg += @("--macos-app-icon=textures/icon.png") $arg += @("--macos-app-icon=textures/icon.png")
# 编译器配置 # 编译器配置
# $arg += @("--msvc=latest") # $arg += @("--msvc=latest")
$atg += @("--mingw64") # $atg += @("--mingw64")
$arg += @("--clang") $arg += @("--clang")
$arg += @("--lto=no") $arg += @("--lto=no")
# 包配置 # 包配置
@ -50,7 +50,7 @@ $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 --msvc=latest --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