From: Thomas Debesse Date: Mon, 17 Jun 2019 19:42:42 +0000 (+0200) Subject: gamepacks: install them in a gamepacks/ subdirectory X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F135%2Fhead;p=xonotic%2Fnetradiant.git gamepacks: install them in a gamepacks/ subdirectory --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c388a5e..2811bc3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -324,7 +324,7 @@ set(GAMEPACKS_NAME_LIST none CACHE STRING "Download game packs by name") if (DOWNLOAD_GAMEPACKS) add_custom_target(game_packs ALL - COMMAND "${PROJECT_SOURCE_DIR}/gamepack-manager" --license ${GAMEPACKS_LICENSE_LIST} --name ${GAMEPACKS_NAME_LIST} --download-dir "${GAMEPACKS_DOWNLOAD_DIR}" --install-dir "${PROJECT_BINARY_DIR}" --download --install + COMMAND "${PROJECT_SOURCE_DIR}/gamepack-manager" --license ${GAMEPACKS_LICENSE_LIST} --name ${GAMEPACKS_NAME_LIST} --download-dir "${GAMEPACKS_DOWNLOAD_DIR}" --install-dir "${PROJECT_BINARY_DIR}/gamepacks" --download --install COMMENT "Downloading game packs" ) endif () @@ -351,11 +351,8 @@ if (DOWNLOAD_GAMEPACKS) set(GAME_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") endif () - file(GLOB GAME_DIRS ${PROJECT_BINARY_DIR}/*.game) - install(DIRECTORY - ${PROJECT_BINARY_DIR}/games - ${GAME_DIRS} + ${PROJECT_BINARY_DIR}/gamepacks DESTINATION ${RADIANT_DATA_DIR} ) endif () diff --git a/Makefile b/Makefile index f60b0d18..e8a1c5b0 100644 --- a/Makefile +++ b/Makefile @@ -1056,7 +1056,7 @@ $(INSTALLDIR)/heretic2/h2data.$(EXE): \ .PHONY: install-data install-data: binaries - DOWNLOAD_GAMEPACKS="$(DOWNLOAD_GAMEPACKS)" DOWNLOADDIR="$(DOWNLOADDIR)" INSTALLDIR="$(INSTALLDIR)" GIT="$(GIT)" SVN="$(SVN)" WGET="$(WGET)" RM_R="$(RM_R)" MV="$(MV)" UNZIPPER="$(UNZIPPER)" ECHO="$(ECHO)" CP="$(CP)" CP_R="$(CP_R)" ./gamepack-manager + DOWNLOAD_GAMEPACKS="$(DOWNLOAD_GAMEPACKS)" DOWNLOADDIR="$(DOWNLOADDIR)" INSTALLDIR="$(INSTALLDIR)/gamepacks" GIT="$(GIT)" SVN="$(SVN)" WGET="$(WGET)" RM_R="$(RM_R)" MV="$(MV)" UNZIPPER="$(UNZIPPER)" ECHO="$(ECHO)" CP="$(CP)" CP_R="$(CP_R)" ./gamepack-manager $(ECHO) $(RADIANT_MAJOR_VERSION) > $(INSTALLDIR)/RADIANT_MAJOR $(ECHO) $(RADIANT_MINOR_VERSION) > $(INSTALLDIR)/RADIANT_MINOR $(ECHO) $(RADIANT_PATCH_VERSION) > $(INSTALLDIR)/RADIANT_PATCH diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 2bd3ce44..14a39f71 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -121,7 +121,7 @@ CGameDescription::CGameDescription( xmlDocPtr pDoc, const CopiedString& gameFile { StringOutputStream path( 256 ); - path << DataPath_get() << gameFile.c_str() << "/"; + path << DataPath_get() << "gamepacks/" << gameFile.c_str() << "/"; mGameToolsPath = path.c_str(); } @@ -341,7 +341,7 @@ ui::Window CGameDialog::BuildDialog(){ void CGameDialog::ScanForGames(){ StringOutputStream strGamesPath( 256 ); - strGamesPath << DataPath_get() << "games/"; + strGamesPath << DataPath_get() << "gamepacks/games/"; const char *path = strGamesPath.c_str(); globalOutputStream() << "Scanning for game description files: " << path << '\n';