Build self-contained macOS client and verify native beta path
This commit is contained in:
@@ -45,6 +45,13 @@ var _owns_app := false
|
||||
func run_app() -> String:
|
||||
if not AssetRoot.pack_ready():
|
||||
return "no 40250 Client/pack at %s" % AssetRoot.client_path()
|
||||
# The exported Godot executable starts in Contents/Resources. 40250 writes mouse.cfg,
|
||||
# metin2.cfg and other player settings relative to CWD, so move those writes to user://.
|
||||
var data_dir := OS.get_user_data_dir()
|
||||
if DirAccess.make_dir_recursive_absolute(data_dir) != OK:
|
||||
return "cannot create user data directory at %s" % data_dir
|
||||
OS.set_environment("MT_40250_CLIENT", AssetRoot.client_path())
|
||||
OS.set_environment("MT_40250_USER_DATA_DIR", data_dir)
|
||||
var err: String = Metin2PythonHost.start("")
|
||||
if err != "":
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user