Add mac sandbox build support

This commit is contained in:
yash-signal
2026-02-27 12:57:31 -06:00
committed by Yash
parent 54e5b64ab0
commit e3560adbcf
9 changed files with 102 additions and 10 deletions

25
scripts/build-mas-dev.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Copyright 2026 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only
set -euo pipefail
if [[ -z "${MAS_PROVISIONING_PROFILE:-}" ]]; then
echo "MAS_PROVISIONING_PROFILE is required" >&2
exit 1
fi
# Electron Builder applies `mac` config first and then `masDev`.
# Override mac configuration during build to ensure consistency between
# the two sets of values, otherwise the mas-dev build will crash on launch.
SIGNAL_ENV="${SIGNAL_ENV:-production}" \
SKIP_SIGNING_SCRIPT=1 \
pnpm run build:electron \
--config.directories.output=release \
--mac mas-dev \
--arm64 \
--publish=never \
--config.mac.entitlements=./build/entitlements.mas-dev.plist \
--config.mac.entitlementsInherit=./build/entitlements.mas-dev.inherit.plist \
--config.mac.preAutoEntitlements=false \
--config.masDev.provisioningProfile="$MAS_PROVISIONING_PROFILE"