mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-01 09:07:26 +00:00
Improve build.sh script (#1512)
This commit is contained in:
parent
67dec4cc3c
commit
378e94912a
22
build.sh
22
build.sh
@ -7,7 +7,7 @@ ERR=0
|
||||
|
||||
#### User variables ####
|
||||
BUILD="`pwd`/build"
|
||||
QMAKE_CONF=""
|
||||
QMAKE_CONF=$*
|
||||
ROOT_DIR=`pwd`
|
||||
|
||||
check_r2() {
|
||||
@ -64,13 +64,17 @@ find_gmake() {
|
||||
}
|
||||
|
||||
prepare_breakpad() {
|
||||
if [[ $OSTYPE == "linux-gnu" ]]; then
|
||||
source $ROOT_DIR/scripts/prepare_breakpad_linux.sh
|
||||
export PKG_CONFIG_PATH="$CUSTOM_BREAKPAD_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
elif [[ $OSTYPE == "darwin" ]]; then
|
||||
source $ROOT_DIR/scripts/prepare_breakpad_macos.sh
|
||||
if [ -z $OSTYPE ]; then
|
||||
echo "Could not identify OS, OSTYPE var is empty. You can try to disable breakpad to avoid this error."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $OSTYPE = "linux-gnu" ]; then
|
||||
. $ROOT_DIR/scripts/prepare_breakpad_linux.sh
|
||||
export PKG_CONFIG_PATH="$CUSTOM_BREAKPAD_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
elif [ $OSTYPE = "darwin" ]; then
|
||||
. $ROOT_DIR/scripts/prepare_breakpad_macos.sh
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
# Build radare2
|
||||
@ -96,7 +100,9 @@ fi
|
||||
$(find_lrelease) ./src/Cutter.pro
|
||||
|
||||
# Build
|
||||
prepare_breakpad
|
||||
if [ "${QMAKE_CONF/CUTTER_ENABLE_CRASH_REPORTS=true/something}" != $QMAKE_CONF ]; then
|
||||
prepare_breakpad
|
||||
fi
|
||||
mkdir -p "$BUILD"
|
||||
cd "$BUILD" || exit 1
|
||||
$(find_qmake) ../src/Cutter.pro $QMAKE_CONF
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
git clone https://github.com/google/breakpad.git
|
||||
cd breakpad
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPTPATH=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user