From 7d8008a54e3792f28edde0b6b51c16f32118d4ba Mon Sep 17 00:00:00 2001 From: Garux Date: Thu, 11 Nov 2021 19:25:04 +0300 Subject: [PATCH] use gamepacks/ subfolder for gamepacks for cleaner editor's folder structure --- Makefile | 4 ++-- radiant/preferences.cpp | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 78e387c6..63b15d7a 100644 --- a/Makefile +++ b/Makefile @@ -1327,9 +1327,9 @@ $(INSTALLDIR)/mbspc.$(EXE): \ .PHONY: install-data install-data: binaries - $(MKDIR) $(INSTALLDIR)/games + $(MKDIR) $(INSTALLDIR)/gamepacks/games $(FIND) $(INSTALLDIR_BASE)/ -name .svn -exec $(RM_R) {} \; -prune - DOWNLOAD_GAMEPACKS="$(DOWNLOAD_GAMEPACKS)" GIT="$(GIT)" SVN="$(SVN)" WGET="$(WGET)" RM_R="$(RM_R)" MV="$(MV)" UNZIPPER="$(UNZIPPER)" ECHO="$(ECHO)" SH="$(SH)" CP="$(CP)" CP_R="$(CP_R)" $(SH) install-gamepacks.sh "$(INSTALLDIR)" + DOWNLOAD_GAMEPACKS="$(DOWNLOAD_GAMEPACKS)" GIT="$(GIT)" SVN="$(SVN)" WGET="$(WGET)" RM_R="$(RM_R)" MV="$(MV)" UNZIPPER="$(UNZIPPER)" ECHO="$(ECHO)" SH="$(SH)" CP="$(CP)" CP_R="$(CP_R)" $(SH) install-gamepacks.sh "$(INSTALLDIR)/gamepacks" $(ECHO) $(RADIANT_MINOR_VERSION) > $(INSTALLDIR)/RADIANT_MINOR $(ECHO) $(RADIANT_MAJOR_VERSION) > $(INSTALLDIR)/RADIANT_MAJOR $(CP_R) setup/data/tools/* $(INSTALLDIR)/ diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index b78c2377..38992bb6 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -92,9 +92,7 @@ CGameDescription::CGameDescription( xmlDocPtr pDoc, const CopiedString& gameFile } { - StringOutputStream path( 256 ); - path << AppPath_get() << gameFile << "/"; - mGameToolsPath = path.c_str(); + mGameToolsPath = StringOutputStream( 256 )( AppPath_get(), "gamepacks/", gameFile, '/' ); } ASSERT_MESSAGE( file_exists( mGameToolsPath.c_str() ), "game directory not found: " << makeQuoted( mGameToolsPath ) ); @@ -331,9 +329,7 @@ public: }; void CGameDialog::ScanForGames(){ - StringOutputStream strGamesPath( 256 ); - strGamesPath << AppPath_get() << "games/"; - const char *path = strGamesPath.c_str(); + const auto path = StringOutputStream( 256 )( AppPath_get(), "gamepacks/games/" ); globalOutputStream() << "Scanning for game description files: " << path << '\n';