1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-08-08 07:09:52 +00:00

Intial support for package paths (as suggested by smls).

This commit is mainly intended to ease packaging for linux.
Unless environment variable AQUARIA_DATA_PATH is set, there are two
directories which are checked by the game:
If AQUARIA_DEFAULT_DATA_DIR is defined, it will chdir there for main
operation. If it's not defined, it chdirs into the directory where
the executable is located.
Then, if AQUARIA_EXTRA_DATA_DIR is defined, it will mount this directory
and all contents into the working path, so that the files present there
will override those from the working directory when accessed by the game.

Setting the environment variable AQUARIA_DATA_PATH will disable this
behavior altogether and use *only* AQUARIA_DATA_PATH as working dir.
This commit is contained in:
fgenesis 2013-06-19 02:08:24 +02:00
parent 8fbed64db3
commit 13eca9785f
6 changed files with 47 additions and 7 deletions

View file

@ -973,7 +973,7 @@ public:
NO_DESTROY
};
// init
Core(const std::string &filesystem, int numRenderLayers, const std::string &appName="BBGE", int particleSize=1024, std::string userDataSubFolder="");
Core(const std::string &filesystem, const std::string& extraDataDir, int numRenderLayers, const std::string &appName="BBGE", int particleSize=1024, std::string userDataSubFolder="");
void initPlatform(const std::string &filesystem);
~Core();
@ -1402,6 +1402,7 @@ protected:
virtual void onRender(){}
void setupFileAccess();
std::string _extraDataDir;
};
extern Core *core;