aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2022-01-20 10:29:55 +0100
committerMartin Ridgers <[email protected]>2022-01-20 10:31:07 +0100
commitb089242de2da686afaa332131de38ca34f07c238 (patch)
treed596eddc5706cec25c2c5d7c024b9ead4c4533c6
parentAnswer Yes to everything xmake wants to do when bundling (diff)
downloadzen-b089242de2da686afaa332131de38ca34f07c238.tar.xz
zen-b089242de2da686afaa332131de38ca34f07c238.zip
'xmake bundle' for Mac
-rw-r--r--bundle.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/bundle.lua b/bundle.lua
index a7884ec76..50417f76d 100644
--- a/bundle.lua
+++ b/bundle.lua
@@ -110,7 +110,36 @@ local function main_windows()
crashpad_handler_path)
end
+--------------------------------------------------------------------------------
+local function main_mac()
+ -- Build and universalify
+ _build("x86_64")
+ _build("arm64")
+
+ os.mkdir("build/macosx/universal/release/")
+ local ret = _exec(
+ "lipo",
+ "-create",
+ "-output", "build/macosx/universal/release/zenserver",
+ "build/macosx/x86_64/release/zenserver",
+ "build/macosx/arm64/release/zenserver"
+ )
+ if ret > 0 then
+ raise("Failed creating univeral binary")
+ end
+
+ -- At the time of writing vcpkg does not support sentry-native on arm64. Once
+ -- it does we can create a univeral binary for this. For now just bundle x64
+ local crashpad_handler_path = _find_vcpkg_binary(
+ "x64-osx",
+ "sentry-native",
+ "crashpad_handler")
+ -- Zip
+ _zip(
+ "build/zenserver-trace-macos.zip",
+ "build/macosx/universal/release/zenserver",
+ crashpad_handler_path)
end
--------------------------------------------------------------------------------
@@ -119,5 +148,9 @@ function main()
return main_windows()
end
+ if is_host("mac") then
+ return main_mac()
+ end
+
raise("'xmake bundle' not currently supported on this platform")
end