aboutsummaryrefslogtreecommitdiff
path: root/scripts/bundle.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bundle.lua')
-rw-r--r--scripts/bundle.lua57
1 files changed, 15 insertions, 42 deletions
diff --git a/scripts/bundle.lua b/scripts/bundle.lua
index 09f097c82..6e2994742 100644
--- a/scripts/bundle.lua
+++ b/scripts/bundle.lua
@@ -140,22 +140,6 @@ local function _zip(store_only, zip_path, ...)
end
--------------------------------------------------------------------------------
-local function _find_vcpkg_binary(triple, port, binary)
- import("detect.sdks.find_vcpkgdir")
- local root_dir = find_vcpkgdir()
- if root_dir == nil or root_dir == "" then
- raise("Unable to find vcpkg root directory")
- end
-
- bin_path = root_dir.."/installed/"..triple.."/tools/"..port.."/"..binary
- if not os.isfile(bin_path) then
- raise("Unable to locate vcpkg tool "..bin_path)
- end
-
- return bin_path
-end
-
---------------------------------------------------------------------------------
local function main_windows(signidentity)
import("core.base.option")
@@ -197,18 +181,13 @@ local function main_windows(signidentity)
end
end
- local crashpad_handler_path = _find_vcpkg_binary(
- "x64-windows-static",
- "sentry-native",
- "crashpad_handler.exe")
-
_zip(false,
zip_path,
"build/windows/x64/release/zenserver.exe",
"build/windows/x64/release/zenserver.pdb",
"build/windows/x64/release/zen.exe",
"build/windows/x64/release/zen.pdb",
- crashpad_handler_path)
+ "build/windows/x64/release/crashpad_handler.exe")
end
--------------------------------------------------------------------------------
@@ -238,6 +217,16 @@ local function main_mac(signidentity)
raise("Failed creating universal zen binary")
end
+ ret = _exec(
+ "lipo",
+ "-create",
+ "-output", "build/macosx/universal/release/crashpad_handler",
+ "build/macosx/x86_64/release/crashpad_handler",
+ "build/macosx/arm64/release/crashpad_handler")
+ if ret > 0 then
+ raise("Failed creating universal crashpad_handler binary")
+ end
+
ret = _exec("codesign",
"-vvv",
"-strict",
@@ -260,22 +249,15 @@ local function main_mac(signidentity)
raise("Failed signing universal zen 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")
-
ret = _exec("codesign",
"-vvv",
"-strict",
"-s",
signidentity,
"-f",
- crashpad_handler_path)
+ "build/macosx/universal/release/crashpad_handler")
if ret > 0 then
- raise("Failed signing crashpad binary")
+ raise("Failed signing universal crashpad_handler binary")
end
-- Zip
@@ -283,27 +265,18 @@ local function main_mac(signidentity)
"build/zenserver-macos.zip",
"build/macosx/universal/release/zenserver",
"build/macosx/universal/release/zen",
- crashpad_handler_path)
+ "build/macosx/universal/release/crashpad_handler")
end
--------------------------------------------------------------------------------
local function main_linux()
_build("x86_64")
- -- Crashpad handler does not exist for Linux
- local crashpad_handler_path = nil
- --[[
- local crashpad_handler_path = _find_vcpkg_binary(
- "x64-linux",
- "sentry-native",
- "crashpad_handler")
- --]]
-
_zip(false,
"build/zenserver-linux.zip",
"build/linux/x86_64/release/zenserver",
"build/linux/x86_64/release/zen",
- crashpad_handler_path)
+ "build/linux/x86_64/release/crashpad_handler")
end
--------------------------------------------------------------------------------