]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Gecko: add a platform-specific search path for XULrunner. This makes it possible...
authorres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 16 Jan 2008 11:19:30 +0000 (11:19 +0000)
committerres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 16 Jan 2008 11:19:30 +0000 (11:19 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7967 d7cf8633-e32d-0410-b094-e92efae38249

cl_gecko.c
makefile.inc

index bff858c91fce5a6d6d4b4fcd3851228ac3970e83..db80596d7815361bf9148129021d447a9994009a 100644 (file)
@@ -360,6 +360,13 @@ void CL_Gecko_GetTextureExtent( clgecko_t *instance, float* pwidth, float* pheig
        *pheight = (float)instance->height / instance->texHeight;\r
 }\r
 \r
+#if defined(WIN64)\r
+# define XULRUNNER_DIR_SUFFIX  "win64"\r
+#elif defined(WIN32)\r
+# define XULRUNNER_DIR_SUFFIX  "win32"\r
+#elif defined(DP_ARCH) && defined(DP_MACHINE)\r
+# define XULRUNNER_DIR_SUFFIX  DP_ARCH "-" DP_MACHINE\r
+#endif\r
 \r
 clgecko_t * CL_Gecko_CreateBrowser( const char *name ) {\r
        clgecko_t *instance;\r
@@ -379,7 +386,10 @@ clgecko_t * CL_Gecko_CreateBrowser( const char *name ) {
                        Con_Printf( "CL_Gecko_CreateBrowser: setting up gecko embedding\n" );\r
                }\r
 \r
-               options = osgk_embedding_options_create();\r
+               options = osgk_embedding_options_create();
+       #ifdef XULRUNNER_DIR_SUFFIX
+               osgk_embedding_options_add_search_path( options, "./xulrunner-" XULRUNNER_DIR_SUFFIX "/" );\r
+       #endif\r
                osgk_embedding_options_add_search_path( options, "./xulrunner/" );\r
                dpsnprintf (profile_path, sizeof (profile_path), "%s/xulrunner_profile/", fs_gamedir);\r
                osgk_embedding_options_set_profile_dir( options, profile_path, 0 );\r
index 9a9c51bbde48ce4f40ff31f2431df2ddde5fb604..608677fe725a0ea81090ff6770b117d94a6b5400 100644 (file)
@@ -152,6 +152,12 @@ OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o $(OBJ_SND_COMMON) snd_sdl.o cd_sdl.o $(
 
 # Compilation
 CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) -Wall -Wsign-compare -Wdeclaration-after-statement
+ifdef DP_ARCH
+CFLAGS_COMMON+=-DDP_ARCH=\\\"$(DP_ARCH)\\\"
+endif
+ifdef DP_MACHINE
+CFLAGS_COMMON+=-DDP_MACHINE=\\\"$(DP_MACHINE)\\\"
+endif
 CFLAGS_DEBUG=-ggdb
 CFLAGS_PROFILE=-g -pg -ggdb
 CFLAGS_RELEASE=