Build self-contained macOS client and verify native beta path
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
|
||||
#include <condition_variable>
|
||||
#include <cstdlib>
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <pthread.h>
|
||||
@@ -346,8 +347,18 @@ bool Start(const char* stdlib_path, std::string* error)
|
||||
return true;
|
||||
|
||||
// 40250 Main (UserInterface.cpp:410): if (LocaleService_LoadGlobal(hInstance)) SetDefaultCodePage(...).
|
||||
LocaleService_LoadConfig("locale.cfg");
|
||||
std::string locale_config = "locale.cfg";
|
||||
if (const char* client = std::getenv("MT_40250_CLIENT"))
|
||||
locale_config = (std::filesystem::path(client) / "locale.cfg").string();
|
||||
LocaleService_LoadConfig(locale_config.c_str());
|
||||
SetDefaultCodePage(LocaleService_GetCodePage());
|
||||
if (const char* data_dir = std::getenv("MT_40250_USER_DATA_DIR"))
|
||||
{
|
||||
std::error_code ec;
|
||||
std::filesystem::current_path(data_dir, ec);
|
||||
if (ec)
|
||||
return fail(error, "cannot use player settings directory: " + ec.message());
|
||||
}
|
||||
|
||||
const std::string stdlib = (stdlib_path && *stdlib_path) ? stdlib_path : PythonHost::DefaultStdLibPath();
|
||||
if (stdlib.empty())
|
||||
|
||||
Reference in New Issue
Block a user