Skip to content

Commit

Permalink
OS X|libcore|App: Built-in basedir for command line apps
Browse files Browse the repository at this point in the history
Unbundled apps don't have a Resources folder, so they now expect
a Unix-style read-only shared data directory to be present.
  • Loading branch information
skyjake committed Feb 17, 2015
1 parent f0f864f commit b47c0c0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doomsday/sdk/libcore/src/core/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,12 +571,20 @@ NativePath App::nativeBasePath()
#else
# ifdef MACOSX
path = d->appPath.fileNamePath() / "../Resources";
if(!path.exists())
{
// Try the built-in base directory (unbundled apps).
path = DENG_BASE_DIR;
}
# else
path = DENG_BASE_DIR;
# endif
if(!path.exists())
{
// Fall back to using the application binary path, which always exists.
// We use this instead of the working directory because the basedir is
// meant for storing read-only data files that may be deployed with
// the application binary.
path = d->appPath.fileNamePath();
}
// Also check the system config files.
Expand Down

0 comments on commit b47c0c0

Please sign in to comment.