]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Download game packs
authorMattia Basaglia <mattia.basaglia@gmail.com>
Tue, 28 Jul 2015 12:46:27 +0000 (14:46 +0200)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Tue, 28 Jul 2015 12:46:27 +0000 (14:46 +0200)
CMakeLists.txt
Makefile
install-gamepacks.sh

index 8d744cc30de1a5c2561f667184eddc17af13698b..e408730580a34e10ae8356a92c9f85980ab35f05 100644 (file)
@@ -383,3 +383,10 @@ if(NOT (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR))
     file(COPY ${DATA_FILES} DESTINATION "${CMAKE_BINARY_DIR}/docs")
 endif()
 
+option(DOWNLOAD_GAMEPACKS "Download game packs" ON)
+if(DOWNLOAD_GAMEPACKS)
+    add_custom_target(game_packs ALL
+        COMMAND ${CMAKE_COMMAND} -E make_directory games
+        COMMAND DOWNLOAD_GAMEPACKS=yes SOURCE_DIR="${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/install-gamepacks.sh" "${CMAKE_BINARY_DIR}"
+    )
+endif()
index e4ae3fedfae1875b71726144b5680ebb3d2acb36..0be776985a6415a2355329597f1c15610957c4f7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -662,7 +662,7 @@ $(INSTALLDIR)/radiant.$(EXE): \
        radiant/mainframe.o \
        radiant/main.o \
        radiant/map.o \
-       $(if $(findstring $(OS),Win32),radiant/multimon.o,) \
+       radiant/multimon.o \
        radiant/mru.o \
        radiant/nullmodel.o \
        radiant/parse.o \
index f4ae8428962a9b53868566a911c362a7f1272334..2e3723da016495399538ac019f246e86f3edd4d4 100755 (executable)
@@ -4,15 +4,16 @@
 : ${SH:=sh}
 : ${CP:=cp}
 : ${CP_R:=cp -r}
+: ${SOURCE_DIR:=.}
 
 dest=$1
 
 case "$DOWNLOAD_GAMEPACKS" in
        yes)
-               LICENSEFILTER=GPL BATCH=1 $SH download-gamepacks.sh
+               LICENSEFILTER=GPL BATCH=1 $SH "$SOURCE_DIR/download-gamepacks.sh"
                ;;
        all)
-               BATCH=1 $SH download-gamepacks.sh
+               BATCH=1 $SH "$SOURCE_DIR/download-gamepacks.sh"
                ;;
        *)
                ;;
@@ -22,9 +23,9 @@ set -e
 for GAME in games/*; do
        if [ "$GAME" = "games/*" ]; then
                $ECHO "Game packs not found, please run"
-               $ECHO "  ./download-gamepacks.sh"
+               $ECHO "  $SOURCE_DIR/download-gamepacks.sh"
                $ECHO "and then try again!"
        else
-               $SH install-gamepack.sh "$GAME" "$dest"
+               $SH "$SOURCE_DIR/install-gamepack.sh" "$GAME" "$dest"
        fi
 done