-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
qgis-mac-packager.bash
executable file
·56 lines (42 loc) · 1.69 KB
/
qgis-mac-packager.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
set -eo pipefail
PWD=$(pwd)
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
if (( $# < 5 )); then
echo "usage: $0 package_name config_file major minor patch"
echo "example: ./$0 /path/to/qgis_nightly_master_20200717_024956.dmg config/nightly.conf 3 18 0"
exit 1
fi
PACKAGE=$1
CONFIG_FILE=$2
export QGIS_MAJOR_VERSION=$3
export QGIS_MINOR_VERSION=$4
export QGIS_PATCH_VERSION=$5
echo "qgis-mac-packager.bash QGIS $QGIS_MAJOR_VERSION.$QGIS_MINOR_VERSION.$QGIS_PATCH_VERSION"
echo "Checking config file $CONFIG_FILE"
if [ ! -f "$CONFIG_FILE" ]; then
echo "invalid config file (1st argument) $CONFIG_FILE"
fi
shift
source $CONFIG_FILE
echo "Verifying the QGIS repo is cloned locally in $QGIS_SOURCE_DIR"
if [ ! -f "$QGIS_SOURCE_DIR/INSTALL.md" ]; then
error "missing $QGIS_SOURCE_DIR/INSTALL.md"
fi
echo "Verifying the Qt package installation"
if [ ! -d "$QT_BASE" ]; then
error "missing QT in $QT_BASE, install version ${VERSION_qt} from ${QGIS_DOWNLOAD_ROOT_URL}/deps/"
fi
echo "Verifying the qgis-deps package installation"
if [ ! -d "$QGIS_DEPS_STAGE_PATH" ]; then
error "missing QGIS-DEPS in $QGIS_DEPS_STAGE_PATH, install version ${QGIS_DEPS_SDK_VERSION} from ${QGIS_DOWNLOAD_ROOT_URL}/deps/"
fi
echo "Building QGIS"
$DIR/qgis_build/qgis_build.bash "$CONFIG_FILE" $QGIS_MAJOR_VERSION $QGIS_MINOR_VERSION $QGIS_PATCH_VERSION
echo "Bundle QGIS"
$DIR/qgis_bundle/qgis_bundle.bash "$CONFIG_FILE" $QGIS_MAJOR_VERSION $QGIS_MINOR_VERSION $QGIS_PATCH_VERSION
echo "Package QGIS to $PACKAGE"
$DIR/qgis_package/qgis_package.bash "$CONFIG_FILE" $QGIS_MAJOR_VERSION $QGIS_MINOR_VERSION $QGIS_PATCH_VERSION "$PACKAGE"
echo "All done (qgis-mac-packager.bash)"
cd "$PWD"
exit 0