cutter/scripts/prepare_breakpad_macos.sh
karliss 29cbd06ab2
Run macos packaging in GHA. (#2529)
* Enable running of macOS packaging in GHA, most of the work done in dedbabde56
* Cleanup breakpad handling
* Have single version of main executable in folder expected by macOS and most tools instead of executable+symlink+shell script
* Handle Breakpad library lookup in more CMake way using FindBreakpad just like it's done on other platforms and packages
* Refactor error handling in some of the shell scripts to use `set -e` instead of `|| exit 1` for each command.
* Fix DMG background setup
2021-01-02 19:57:29 +02:00

25 lines
670 B
Bash
Executable File

#!/bin/sh
set -euo pipefail
SCRIPTPATH=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
DIR="$SCRIPTPATH/.."
cd "$DIR"
BREAKPAD_FRAMEWORK_DIR="$DIR/breakpad/framework"
BREAKPAD_DUMP_SYMS_DIR="$DIR/breakpad/bin"
git clone https://github.com/google/breakpad.git
mkdir $BREAKPAD_FRAMEWORK_DIR
mkdir $BREAKPAD_DUMP_SYMS_DIR
cd breakpad
git checkout 4d550cceca107f36c4bc1ea1126b7d32cc50f424
git apply "$SCRIPTPATH/breakpad_macos.patch"
cd src/client/mac/ && xcodebuild -sdk macosx
cp -R build/Release/Breakpad.framework "$BREAKPAD_FRAMEWORK_DIR"
cd $DIR/breakpad
cp -R src/. framework/Breakpad.framework/Headers
export BREAKPAD_FRAMEWORK_DIR=$BREAKPAD_FRAMEWORK_DIR
cd $DIR