diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-12-19 09:30:49 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-19 15:33:17 -0800 |
commit | dcec0175e2bc66cd58741f8ff4075e466d1ab44e (patch) | |
tree | c4cb2b3d2165d96f9029500b9a0929595a606fb1 /scripts | |
parent | fceb3691d9b4ccccf1ebb76f83fb7d58067251d7 (diff) | |
download | subsurface-dcec0175e2bc66cd58741f8ff4075e466d1ab44e.tar.gz |
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.sh | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index 05921473b..d07a56e83 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -100,11 +100,21 @@ while [[ $# -gt 0 ]] ; do # we are building Subsurface BUILD_DESKTOP="1" ;; + -downloader) + # we are building Subsurface + BUILD_DOWNLOADER="1" + ;; -both) # we are building Subsurface and Subsurface-mobile BUILD_MOBILE="1" BUILD_DESKTOP="1" ;; + -all) + # we are building Subsurface and Subsurface-mobile + BUILD_MOBILE="1" + BUILD_DESKTOP="1" + BUILD_DOWNLOADER="1" + ;; -create-appdir) # we are building an AppImage as by product CREATE_APPDIR="1" @@ -152,19 +162,21 @@ if [ "$PLATFORM" = Darwin ] ; then fi # 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 -# if the first argument is "-both" then build both in subsurface/build and "$BUILD_PREFIX"build-mobile +# the user can explicitly pick the builds requested +# for historic reasons, -both builds mobile and desktop, -all builds the downloader as well if [ "$BUILD_MOBILE" = "1" ] ; then echo "building Subsurface-mobile in ${SRC_DIR}/build-mobile" - BUILDS=( "MobileExecutable" ) - BUILDDIRS=( "${BUILD_PREFIX}build-mobile" ) -else - # if no options are given, build Subsurface - BUILD_DESKTOP="1" + BUILDS+=( "MobileExecutable" ) + BUILDDIRS+=( "${BUILD_PREFIX}build-mobile" ) fi - -if [ "$BUILD_DESKTOP" = "1" ] ; then +if [ "$BUILD_DOWNLOADER" = "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" BUILDS+=( "DesktopExecutable" ) BUILDDIRS+=( "${BUILD_PREFIX}build" ) |