build(macos): include sound assets in bundle, add diagnostic signal handler and update audio driver
This commit is contained in:
@@ -70,6 +70,7 @@ mkdir -p "$BUNDLE_CLIENT"
|
||||
ditto "$SOURCE_CLIENT/pack" "$BUNDLE_CLIENT/pack"
|
||||
if [ -d "$SOURCE_CLIENT/BGM" ]; then ditto "$SOURCE_CLIENT/BGM" "$BUNDLE_CLIENT/BGM"; fi
|
||||
if [ -f "$SOURCE_CLIENT/locale.cfg" ]; then cp "$SOURCE_CLIENT/locale.cfg" "$BUNDLE_CLIENT/locale.cfg"; fi
|
||||
if [ -d "$REPO/assets/Sound/sound" ]; then ditto "$REPO/assets/Sound/sound" "$BUNDLE_CLIENT/sound"; fi
|
||||
test -s "$BUNDLE_CLIENT/pack/Index"
|
||||
|
||||
# Record the exact source revision inside the signed bundle. A Beta release is built only
|
||||
|
||||
@@ -53,6 +53,11 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <pthread.h>
|
||||
#if defined(__APPLE__)
|
||||
#include <execinfo.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -345,6 +350,15 @@ bool Start(const char* stdlib_path, std::string* error)
|
||||
{
|
||||
if (g_launcher)
|
||||
return true;
|
||||
#if defined(__APPLE__)
|
||||
if (std::getenv("MT_BETA_DIAGNOSTIC"))
|
||||
signal(SIGSEGV, [](int) {
|
||||
void* frames[64];
|
||||
int count = backtrace(frames, 64);
|
||||
backtrace_symbols_fd(frames, count, STDERR_FILENO);
|
||||
std::_Exit(139);
|
||||
});
|
||||
#endif
|
||||
|
||||
// 40250 Main (UserInterface.cpp:410): if (LocaleService_LoadGlobal(hInstance)) SetDefaultCodePage(...).
|
||||
std::string locale_config = "locale.cfg";
|
||||
|
||||
@@ -42,6 +42,8 @@ func _init_roots() -> void:
|
||||
|
||||
# 音效查找根目录
|
||||
var candidate_roots := [
|
||||
client.path_join("sound"),
|
||||
client.path_join("Sound/sound"),
|
||||
assets.path_join("Sound/sound"),
|
||||
assets.path_join("sound2/sound"),
|
||||
assets.path_join("sound_m/sound"),
|
||||
|
||||
Reference in New Issue
Block a user