Lines 1-6
Link Here
|
1 |
--- code/qcommon/files.c.orig 2009-11-09 23:41:42.205886000 +0100 |
1 |
--- code/qcommon/files.c.orig 2011-03-10 02:01:27.599036000 +0100 |
2 |
+++ code/qcommon/files.c 2010-02-16 15:26:18.000000000 +0100 |
2 |
+++ code/qcommon/files.c 2011-03-19 22:40:42.000000000 +0100 |
3 |
@@ -242,6 +242,7 @@ |
3 |
@@ -250,6 +250,7 @@ |
4 |
#endif |
4 |
#endif |
5 |
|
5 |
|
6 |
static cvar_t *fs_basepath; |
6 |
static cvar_t *fs_basepath; |
Lines 8-25
Link Here
|
8 |
static cvar_t *fs_basegame; |
8 |
static cvar_t *fs_basegame; |
9 |
static cvar_t *fs_gamedirvar; |
9 |
static cvar_t *fs_gamedirvar; |
10 |
static searchpath_t *fs_searchpaths; |
10 |
static searchpath_t *fs_searchpaths; |
11 |
@@ -2807,6 +2808,8 @@ |
11 |
@@ -2956,6 +2957,7 @@ |
12 |
fs_debug = Cvar_Get( "fs_debug", "0", 0 ); |
12 |
fs_debug = Cvar_Get( "fs_debug", "0", 0 ); |
13 |
fs_basepath = Cvar_Get ("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT ); |
13 |
fs_basepath = Cvar_Get ("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT|CVAR_PROTECTED ); |
14 |
fs_basegame = Cvar_Get ("fs_basegame", "", CVAR_INIT ); |
14 |
fs_basegame = Cvar_Get ("fs_basegame", "", CVAR_INIT ); |
15 |
+ fs_libpath = Cvar_Get ("fs_libpath", Sys_DefaultLibPath(), CVAR_INIT ); |
15 |
+ fs_libpath = Cvar_Get ("fs_libpath", Sys_DefaultLibPath(), CVAR_INIT ); |
16 |
+ |
|
|
17 |
homePath = Sys_DefaultHomePath(); |
16 |
homePath = Sys_DefaultHomePath(); |
18 |
if (!homePath || !homePath[0]) { |
17 |
if (!homePath || !homePath[0]) { |
19 |
homePath = fs_basepath->string; |
18 |
homePath = fs_basepath->string; |
20 |
--- code/qcommon/qcommon.h.orig 2010-02-15 17:20:33.680787000 +0100 |
19 |
@@ -2975,6 +2977,11 @@ |
21 |
+++ code/qcommon/qcommon.h 2010-02-16 15:26:18.000000000 +0100 |
20 |
if (fs_apppath->string[0]) |
22 |
@@ -1085,6 +1085,9 @@ |
21 |
FS_AddGameDirectory(fs_apppath->string, gameName); |
|
|
22 |
#endif |
23 |
+ |
24 |
+ // Search default library location if given |
25 |
+ if (fs_libpath->string[0]) { |
26 |
+ FS_AddGameDirectory ( fs_libpath->string, gameName ); |
27 |
+ } |
28 |
|
29 |
// NOTE: same filtering below for mods and basegame |
30 |
if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) { |
31 |
--- code/qcommon/qcommon.h.orig 2011-03-10 02:01:27.599036000 +0100 |
32 |
+++ code/qcommon/qcommon.h 2011-03-19 22:40:42.000000000 +0100 |
33 |
@@ -1104,6 +1104,9 @@ |
23 |
char *Sys_DefaultAppPath(void); |
34 |
char *Sys_DefaultAppPath(void); |
24 |
#endif |
35 |
#endif |
25 |
|
36 |
|
Lines 29-36
Link Here
|
29 |
void Sys_SetDefaultHomePath(const char *path); |
40 |
void Sys_SetDefaultHomePath(const char *path); |
30 |
char *Sys_DefaultHomePath(void); |
41 |
char *Sys_DefaultHomePath(void); |
31 |
const char *Sys_TempPath(void); |
42 |
const char *Sys_TempPath(void); |
32 |
--- code/sys/sys_main.c.orig 2010-02-15 17:20:33.680787000 +0100 |
43 |
--- code/sys/sys_main.c.orig 2011-02-23 17:17:09.009063000 +0100 |
33 |
+++ code/sys/sys_main.c 2010-02-16 15:26:18.000000000 +0100 |
44 |
+++ code/sys/sys_main.c 2011-03-19 22:40:42.000000000 +0100 |
34 |
@@ -49,6 +49,7 @@ |
45 |
@@ -49,6 +49,7 @@ |
35 |
|
46 |
|
36 |
static char binaryPath[ MAX_OSPATH ] = { 0 }; |
47 |
static char binaryPath[ MAX_OSPATH ] = { 0 }; |
Lines 69-109
Link Here
|
69 |
Sys_DefaultAppPath |
80 |
Sys_DefaultAppPath |
70 |
================= |
81 |
================= |
71 |
*/ |
82 |
*/ |
72 |
@@ -435,6 +459,7 @@ |
83 |
@@ -490,6 +514,14 @@ |
73 |
Used to load a development dll instead of a virtual machine |
|
|
74 |
#1 look in fs_homepath |
75 |
#2 look in fs_basepath |
76 |
+#3 look in fs_libpath |
77 |
================= |
78 |
*/ |
79 |
void *Sys_LoadDll( const char *name, char *fqpath , |
80 |
@@ -445,6 +470,7 @@ |
81 |
void (*dllEntry)( intptr_t (*syscallptr)(intptr_t, ...) ); |
82 |
char fname[MAX_OSPATH]; |
83 |
char *basepath; |
84 |
+ char *libpath; |
85 |
char *homepath; |
86 |
char *gamedir; |
87 |
|
88 |
@@ -454,6 +480,7 @@ |
89 |
|
90 |
// TODO: use fs_searchpaths from files.c |
91 |
basepath = Cvar_VariableString( "fs_basepath" ); |
92 |
+ libpath = Cvar_VariableString( "fs_libpath" ); |
93 |
homepath = Cvar_VariableString( "fs_homepath" ); |
94 |
gamedir = Cvar_VariableString( "fs_game" ); |
95 |
|
96 |
@@ -462,6 +489,9 @@ |
97 |
if(!libHandle && basepath) |
98 |
libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath); |
99 |
|
100 |
+ if(!libHandle && libpath) |
101 |
+ libHandle = Sys_TryLibraryLoad(libpath, gamedir, fname, fqpath); |
102 |
+ |
103 |
if(!libHandle) { |
104 |
Com_Printf ( "Sys_LoadDll(%s) failed to load library\n", name ); |
105 |
return NULL; |
106 |
@@ -515,6 +545,14 @@ |
107 |
# endif |
84 |
# endif |
108 |
#endif |
85 |
#endif |
109 |
|
86 |
|
Lines 118-124
Link Here
|
118 |
/* |
95 |
/* |
119 |
================= |
96 |
================= |
120 |
Sys_SigHandler |
97 |
Sys_SigHandler |
121 |
@@ -589,6 +627,7 @@ |
98 |
@@ -564,6 +596,7 @@ |
122 |
Sys_ParseArgs( argc, argv ); |
99 |
Sys_ParseArgs( argc, argv ); |
123 |
Sys_SetBinaryPath( Sys_Dirname( argv[ 0 ] ) ); |
100 |
Sys_SetBinaryPath( Sys_Dirname( argv[ 0 ] ) ); |
124 |
Sys_SetDefaultInstallPath( DEFAULT_BASEDIR ); |
101 |
Sys_SetDefaultInstallPath( DEFAULT_BASEDIR ); |