aboutsummaryrefslogtreecommitdiff
path: root/bundle.lua
diff options
context:
space:
mode:
Diffstat (limited to 'bundle.lua')
-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