Build self-contained macOS client and verify native beta path
This commit is contained in:
@@ -47,11 +47,16 @@ static func available() -> bool:
|
||||
return DirAccess.dir_exists_absolute(path())
|
||||
|
||||
# --- 40250 client (pack/Index + .eix/.epk), docs/PORT-PLAN.md 2R item 6 / 2D ---
|
||||
# 解析顺序:环境变量 MT_40250_CLIENT;开发树 res://../../40250/Server Client TMP4/Client。
|
||||
# 解析顺序:显式覆盖、macOS .app 内的自包含资源、开发树。
|
||||
static func client_path() -> String:
|
||||
var env := OS.get_environment("MT_40250_CLIENT")
|
||||
if env != "":
|
||||
return env
|
||||
var exe := OS.get_executable_path()
|
||||
if exe != "":
|
||||
var bundled := exe.get_base_dir().path_join("../Resources/40250/Client").simplify_path()
|
||||
if FileAccess.file_exists(bundled.path_join("pack/Index")):
|
||||
return bundled
|
||||
return ProjectSettings.globalize_path("res://../../40250/Server Client TMP4/Client").simplify_path()
|
||||
|
||||
# 按 40250 PackInitialize("pack") 注册 <client>/pack;只注册一次,之后返回首次结果。
|
||||
|
||||
Reference in New Issue
Block a user