nextcloud-desktop/shell_integration/MacOSX/NextcloudIntegration/NextcloudDev/Craft.sh
Iva Horn 0bbb377c23 fix: Source mapping for extensions in Xcode debugger.
LLVM could not resolve breakpoints set in Xcode. That requires dSYM files to work. I changed the build setting to produce these files for all targets and debug configuration builds. Now it is possible to also conveniently break in Xcode when attaching to the extension processes.

Signed-off-by: Iva Horn <iva.horn@icloud.com>
2025-10-06 18:31:50 +02:00

41 lines
1.2 KiB
Bash

#!/bin/env zsh
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: GPL-2.0-or-later
# Read the available environment paths which include (for example) Homebrew.
for f in /etc/paths.d/*; do
while read -r line; do
export PATH="$PATH:$line"
done < "$f"
done
if [ -f "$HOME/.zprofile" ]; then
echo "Sourcing $HOME/.zprofile to include possible PATH definitions..."
source "$HOME/.zprofile"
fi
if [ -z "${CODE_SIGN_IDENTITY}" ]; then
echo "Error: CODE_SIGN_IDENTITY is not defined or is empty!"
exit 1
fi
DESKTOP_CLIENT_PROJECT_ROOT="$SOURCE_ROOT/../../.."
if [ -d "$DESKTOP_CLIENT_PROJECT_ROOT/admin/osx/mac-crafter" ]; then
cd "$DESKTOP_CLIENT_PROJECT_ROOT/admin/osx/mac-crafter"
else
echo "Error: Directory '$DESKTOP_CLIENT_PROJECT_ROOT/admin/osx/mac-crafter' does not exist!"
exit 1
fi
swift run mac-crafter \
--build-path="$SOURCE_ROOT/DerivedData" \
--product-path="/Applications" \
--build-type="Debug" \
--dev \
--disable-auto-updater \
--build-file-provider-module \
--code-sign-identity="$CODE_SIGN_IDENTITY" \
"$DESKTOP_CLIENT_PROJECT_ROOT"