Make macos version work (testes on m1 at least)

1. Change name of discord's library to libdiscord_game_sdk, so it
links properly
2. Change it's install name with install_name_tool to use @loader_path
instead of @rpath, that one's a blunder on discord's side, it should
really have been loader_path from the beginning (rpath means look at
where the binary is started from, loader_path means look at where the
library is)
3. Combine the aarch and x86 library into one, again no idea why
discord does not do this themselves
This commit is contained in:
Ekaterina Vaartis
2024-02-25 16:40:54 +03:00
parent bcdf52d5c6
commit 4726a4488b
3 changed files with 18 additions and 10 deletions

View File

@@ -4,8 +4,8 @@ import os
env = SConscript("src/lib/godot-cpp/SConstruct")
if env["platform"] == "macos":
discord_library = "discord_game_sdk.dylib"
discord_library_second = "discord_game_sdk_aarch64.dylib"
discord_library = "libdiscord_game_sdk.dylib"
discord_library_second = ""
libexportfolder = "/macos/"
elif env["platform"] in ("linuxbsd", "linux"):