diff options
Diffstat (limited to 'games/openarena/files/patch-feature-DEFAULT_LIBDIR')
-rw-r--r-- | games/openarena/files/patch-feature-DEFAULT_LIBDIR | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/games/openarena/files/patch-feature-DEFAULT_LIBDIR b/games/openarena/files/patch-feature-DEFAULT_LIBDIR deleted file mode 100644 index f2f06163d8fd..000000000000 --- a/games/openarena/files/patch-feature-DEFAULT_LIBDIR +++ /dev/null @@ -1,105 +0,0 @@ ---- code/qcommon/files.c.orig 2011-12-24 13:29:32.000000000 +0100 -+++ code/qcommon/files.c 2012-03-07 23:00:53.000000000 +0100 -@@ -250,6 +250,7 @@ - #endif - - static cvar_t *fs_basepath; -+static cvar_t *fs_libpath; - static cvar_t *fs_basegame; - static cvar_t *fs_gamedirvar; - static searchpath_t *fs_searchpaths; -@@ -2859,6 +2860,7 @@ - fs_debug = Cvar_Get( "fs_debug", "0", 0 ); - fs_basepath = Cvar_Get ("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT ); - fs_basegame = Cvar_Get ("fs_basegame", "", CVAR_INIT ); -+ fs_libpath = Cvar_Get ("fs_libpath", Sys_DefaultLibPath(), CVAR_INIT ); - homePath = Sys_DefaultHomePath(); - if (!homePath || !homePath[0]) { - homePath = fs_basepath->string; -@@ -2878,6 +2880,11 @@ - if (fs_apppath->string[0]) - FS_AddGameDirectory(fs_apppath->string, gameName); - #endif -+ -+ // Search default library location if given -+ if (fs_libpath->string[0]) { -+ FS_AddGameDirectory ( fs_libpath->string, gameName ); -+ } - - // NOTE: same filtering below for mods and basegame - if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { ---- code/qcommon/qcommon.h.orig 2011-12-24 13:29:32.000000000 +0100 -+++ code/qcommon/qcommon.h 2012-03-07 23:00:53.000000000 +0100 -@@ -1099,6 +1099,9 @@ - char *Sys_DefaultAppPath(void); - #endif - -+void Sys_SetDefaultLibPath(const char *path); -+char *Sys_DefaultLibPath(void); -+ - void Sys_SetDefaultHomePath(const char *path); - char *Sys_DefaultHomePath(void); - const char *Sys_TempPath(void); ---- code/sys/sys_main.c.orig 2011-12-24 13:29:37.000000000 +0100 -+++ code/sys/sys_main.c 2012-03-07 23:00:53.000000000 +0100 -@@ -49,6 +49,7 @@ - - static char binaryPath[ MAX_OSPATH ] = { 0 }; - static char installPath[ MAX_OSPATH ] = { 0 }; -+static char libPath[ MAX_OSPATH ] = { 0 }; - - /* - ================= -@@ -95,6 +96,29 @@ - - /* - ================= -+Sys_SetDefaultLibPath -+================= -+*/ -+void Sys_SetDefaultLibPath(const char *path) -+{ -+ Q_strncpyz(libPath, path, sizeof(libPath)); -+} -+ -+/* -+================= -+Sys_DefaultLibPath -+================= -+*/ -+char *Sys_DefaultLibPath(void) -+{ -+ if (*libPath) -+ return libPath; -+ else -+ return Sys_Cwd(); -+} -+ -+/* -+================= - Sys_DefaultAppPath - ================= - */ -@@ -490,6 +514,14 @@ - # endif - #endif - -+#ifndef DEFAULT_LIBDIR -+# ifdef MACOS_X -+# define DEFAULT_LIBDIR Sys_StripAppBundle(Sys_BinaryPath()) -+# else -+# define DEFAULT_LIBDIR Sys_BinaryPath() -+# endif -+#endif -+ - /* - ================= - Sys_SigHandler -@@ -564,6 +596,7 @@ - Sys_ParseArgs( argc, argv ); - Sys_SetBinaryPath( Sys_Dirname( argv[ 0 ] ) ); - Sys_SetDefaultInstallPath( DEFAULT_BASEDIR ); -+ Sys_SetDefaultLibPath( DEFAULT_LIBDIR ); - - // Concatenate the command line for passing to Com_Init - for( i = 1; i < argc; i++ ) |