From 03d3c5ebcfdbbfcfcae79b14a385bf25d7e71104 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 27 Aug 2010 16:48:44 +0200 Subject: [PATCH] Fixed: #1074 sheets_packer using default static relative paths --- code/ryzom/client/src/sheet_manager.cpp | 2 +- code/ryzom/client/src/sheet_manager.h | 9 +++++++++ code/ryzom/tools/sheets_packer/sheets_packer_init.cpp | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/sheet_manager.cpp b/code/ryzom/client/src/sheet_manager.cpp index fff3c5162..5ac3d2831 100644 --- a/code/ryzom/client/src/sheet_manager.cpp +++ b/code/ryzom/client/src/sheet_manager.cpp @@ -674,7 +674,7 @@ void CSheetManager::loadAllSheet(NLMISC::IProgressCallback &callBack, bool updat path.clear(); } if(path.empty()) - path = "../../client/data/" + TypeVersion[i].Type + ".packed_sheets"; + path = CPath::standardizePath(_OutputDataPath) + TypeVersion[i].Type + ".packed_sheets"; ::loadForm(extensions, path, entitySheetContainer, updatePackedSheet); TEntitySheetMap::iterator it = entitySheetContainer.begin(); diff --git a/code/ryzom/client/src/sheet_manager.h b/code/ryzom/client/src/sheet_manager.h index ee504f9fd..c0ba386a2 100644 --- a/code/ryzom/client/src/sheet_manager.h +++ b/code/ryzom/client/src/sheet_manager.h @@ -203,11 +203,20 @@ public: /// dump all visual slots indexes in a file void dumpVisualSlotsIndex(); + /// Set output data path + void setOutputDataPath(const std::string &dataPath) { _OutputDataPath = dataPath; } + + /// Return output data path + const std::string& getOutputDataPath() const { return _OutputDataPath; } + private: typedef std::vector TItemVector; typedef std::vector TSlots; TSlots _VisualSlots; + // directory where to create .packed_sheets + std::string _OutputDataPath; + protected: diff --git a/code/ryzom/tools/sheets_packer/sheets_packer_init.cpp b/code/ryzom/tools/sheets_packer/sheets_packer_init.cpp index 9e1afe071..02f115d03 100644 --- a/code/ryzom/tools/sheets_packer/sheets_packer_init.cpp +++ b/code/ryzom/tools/sheets_packer/sheets_packer_init.cpp @@ -92,6 +92,7 @@ bool init() // load packed sheets nlinfo("Loading sheets..."); IProgressCallback callback; + SheetMngr.setOutputDataPath(AppCfg.OutputDataPath); SheetMngr.load (callback, true, true); // Make the lmconts.packed file