From 7af7247c0a52badc41bdaa71ed39425d53f4f63d Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 30 May 2005 21:58:45 +0000 Subject: [PATCH] try to detect a .app package in MacOSX and use a basedir outside the .app git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5361 d7cf8633-e32d-0410-b094-e92efae38249 --- fs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs.c b/fs.c index 904645d6..6f7a4fc8 100644 --- a/fs.c +++ b/fs.c @@ -903,7 +903,13 @@ void FS_Init (void) fs_mempool = Mem_AllocPool("file management", 0, NULL); strcpy(fs_basedir, "."); - strcpy(fs_gamedir, "."); + strcpy(fs_gamedir, ""); + +#ifdef MACOSX + // FIXME: is there a better way to find the directory outside the .app? + if (strstr(com_argv[0], ".app/")) + strcpy(fs_basedir, "../../.."); +#endif PK3_OpenLibrary (); -- 2.39.2