mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
build-system: start enabling support for downloader in build.sh
This is just adding the third option and then untangles some of the 'there are only two options' based code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fceb3691d9
commit
dcec0175e2
1 changed files with 21 additions and 9 deletions
|
@ -100,11 +100,21 @@ while [[ $# -gt 0 ]] ; do
|
||||||
# we are building Subsurface
|
# we are building Subsurface
|
||||||
BUILD_DESKTOP="1"
|
BUILD_DESKTOP="1"
|
||||||
;;
|
;;
|
||||||
|
-downloader)
|
||||||
|
# we are building Subsurface
|
||||||
|
BUILD_DOWNLOADER="1"
|
||||||
|
;;
|
||||||
-both)
|
-both)
|
||||||
# we are building Subsurface and Subsurface-mobile
|
# we are building Subsurface and Subsurface-mobile
|
||||||
BUILD_MOBILE="1"
|
BUILD_MOBILE="1"
|
||||||
BUILD_DESKTOP="1"
|
BUILD_DESKTOP="1"
|
||||||
;;
|
;;
|
||||||
|
-all)
|
||||||
|
# we are building Subsurface and Subsurface-mobile
|
||||||
|
BUILD_MOBILE="1"
|
||||||
|
BUILD_DESKTOP="1"
|
||||||
|
BUILD_DOWNLOADER="1"
|
||||||
|
;;
|
||||||
-create-appdir)
|
-create-appdir)
|
||||||
# we are building an AppImage as by product
|
# we are building an AppImage as by product
|
||||||
CREATE_APPDIR="1"
|
CREATE_APPDIR="1"
|
||||||
|
@ -152,19 +162,21 @@ if [ "$PLATFORM" = Darwin ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# normally this script builds the desktop version in subsurface/build
|
# normally this script builds the desktop version in subsurface/build
|
||||||
# if the first argument is "-mobile" then build Subsurface-mobile in "$BUILD_PREFIX"build-mobile
|
# the user can explicitly pick the builds requested
|
||||||
# if the first argument is "-both" then build both in subsurface/build and "$BUILD_PREFIX"build-mobile
|
# for historic reasons, -both builds mobile and desktop, -all builds the downloader as well
|
||||||
|
|
||||||
if [ "$BUILD_MOBILE" = "1" ] ; then
|
if [ "$BUILD_MOBILE" = "1" ] ; then
|
||||||
echo "building Subsurface-mobile in ${SRC_DIR}/build-mobile"
|
echo "building Subsurface-mobile in ${SRC_DIR}/build-mobile"
|
||||||
BUILDS=( "MobileExecutable" )
|
BUILDS+=( "MobileExecutable" )
|
||||||
BUILDDIRS=( "${BUILD_PREFIX}build-mobile" )
|
BUILDDIRS+=( "${BUILD_PREFIX}build-mobile" )
|
||||||
else
|
|
||||||
# if no options are given, build Subsurface
|
|
||||||
BUILD_DESKTOP="1"
|
|
||||||
fi
|
fi
|
||||||
|
if [ "$BUILD_DOWNLOADER" = "1" ] ; then
|
||||||
if [ "$BUILD_DESKTOP" = "1" ] ; then
|
echo "building Subsurface-downloader in ${SRC_DIR}/build-downloader"
|
||||||
|
BUILDS+=( "DownloaderExecutable" )
|
||||||
|
BUILDDIRS+=( "${BUILD_PREFIX}build-downloader" )
|
||||||
|
fi
|
||||||
|
if [ "$BUILD_DESKTOP" = "1" ] || [ "$BUILDS" = "" ] ; then
|
||||||
|
# if no option is given, we build the desktopb version
|
||||||
echo "building Subsurface in ${SRC_DIR}/build"
|
echo "building Subsurface in ${SRC_DIR}/build"
|
||||||
BUILDS+=( "DesktopExecutable" )
|
BUILDS+=( "DesktopExecutable" )
|
||||||
BUILDDIRS+=( "${BUILD_PREFIX}build" )
|
BUILDDIRS+=( "${BUILD_PREFIX}build" )
|
||||||
|
|
Loading…
Add table
Reference in a new issue