Merge pull request #275 from noway421/some_more_tweaks

Resource directories defined on compile time
This commit is contained in:
Tomoaki KAWADA 2014-05-27 01:01:01 +09:00
commit 620a58798c
2 changed files with 5 additions and 7 deletions

View File

@ -20,3 +20,6 @@
#cmakedefine RESDIR_DEFINED
#define RESDIR "${RESDIR}"
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
#define OPENSPADES_INSTALL_RESOURCES "${OPENSPADES_INSTALL_RESOURCES}"

View File

@ -423,12 +423,7 @@ int main(int argc, char ** argv)
spades::FileManager::AddFileSystem
(new spades::DirectoryFileSystem("./Resources", false));
spades::FileManager::AddFileSystem
(new spades::DirectoryFileSystem("/usr/local/share/games/openspades/Resources", false));
spades::FileManager::AddFileSystem
(new spades::DirectoryFileSystem("/usr/share/games/openspades/Resources", false));
spades::FileManager::AddFileSystem(new spades::DirectoryFileSystem(CMAKE_INSTALL_PREFIX "/" OPENSPADES_INSTALL_RESOURCES, false));
std::string xdg_data_home = home+"/.local/share";
@ -513,7 +508,7 @@ int main(int argc, char ** argv)
}
// register resource directory specified by Makefile (or something)
#if defined(RESDIR_DEFINED) && !NDEBUG
#if defined(RESDIR_DEFINED)
spades::FileManager::AddFileSystem(new spades::DirectoryFileSystem(RESDIR, false));
#endif