Update of /cvsroot/super-tux/supertux/lib/app
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14546/lib/app
Modified Files:
setup.cpp
Log Message:
The right (source) data directory should now be found whether you use libtool to link your application against the SuperTux library or not.
Index: setup.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/lib/app/setup.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- setup.cpp 6 Aug 2004 11:43:08 -0000 1.12
+++ setup.cpp 6 Aug 2004 12:10:54 -0000 1.13
@@ -297,16 +297,21 @@
}
else
{
- std::string exedir = std::string(dirname(exe_file)) + "/";
-
- datadir = exedir + "../../data"; // SuperTux run from source dir
+ std::string exedir = std::string(dirname(exe_file)) + "/";
+
+ datadir = exedir + "../data"; // SuperTux run from source dir
if (access(datadir.c_str(), F_OK) != 0)
{
+ datadir = exedir + "../../data"; //SuperTux run from source dir (with libtool script)
+
+ if (access(datadir.c_str(), F_OK) != 0)
+ {
datadir = exedir + "../share/" + package_symbol_name; // SuperTux run from PATH
if (access(datadir.c_str(), F_OK) != 0)
{ // If all fails, fall back to compiled path
datadir = DATA_PREFIX;
}
+ }
}
}
#else
|