From 5d0b2a2b9440f3bc585564cef0144e0c9e1ada43 Mon Sep 17 00:00:00 2001 From: Timothee Besset Date: Mon, 3 Jun 2013 03:23:11 +0100 Subject: [PATCH] fix crashes: libxml2 static linking, turn off libintl stuff --- libs/synapse.h | 4 ++++ plugins/mapxml/plugin.h | 4 ++++ radiant.sln | 8 ++++++++ radiant/feedback.h | 4 ++++ radiant/preferences.cpp | 3 +++ radiant/xmlstuff.h | 4 ++++ tools/quake2/common/inout.c | 4 ++++ tools/quake2/common/inout.h | 4 ++++ tools/quake2/qdata_heretic2/common/inout.c | 4 ++++ tools/quake2/qdata_heretic2/common/inout.h | 4 ++++ tools/quake3/common/inout.c | 4 ++++ tools/quake3/common/inout.h | 4 ++++ 12 files changed, 51 insertions(+) diff --git a/libs/synapse.h b/libs/synapse.h index bd177a5..4f7e9aa 100644 --- a/libs/synapse.h +++ b/libs/synapse.h @@ -70,6 +70,10 @@ // if you #include glib *after* STL, you get those errors .. better be safe then #include +#if defined( _WIN32 ) + // required for static linking libxml on Windows + #define LIBXML_STATIC +#endif #include "libxml/parser.h" #include "irefcount.h" diff --git a/plugins/mapxml/plugin.h b/plugins/mapxml/plugin.h index 6552712..4cecf24 100644 --- a/plugins/mapxml/plugin.h +++ b/plugins/mapxml/plugin.h @@ -24,6 +24,10 @@ #include #include +#if defined( _WIN32 ) + // required for static linking libxml on Windows + #define LIBXML_STATIC +#endif #include "libxml/parser.h" #include "synapse.h" diff --git a/radiant.sln b/radiant.sln index e26621d..be856b2 100644 --- a/radiant.sln +++ b/radiant.sln @@ -80,6 +80,14 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vfsqlpk3", "plugins\vfsqlpk3\vfsqlpk3.vcxproj", "{9FD68F2C-B26A-461D-96E0-55AFC48AC9E0}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "q3map2_urt", "tools\urt\tools\quake3\q3map2\q3map2_urt.vcxproj", "{7AF7537E-94C3-4680-8F5E-C1CE30DC2041}" + ProjectSection(ProjectDependencies) = postProject + {B957BA35-F807-4C84-85A2-C1F9AC56713B} = {B957BA35-F807-4C84-85A2-C1F9AC56713B} + {818BAC3D-0399-4416-930D-0AA28D55F798} = {818BAC3D-0399-4416-930D-0AA28D55F798} + {12E69671-B980-4BFF-BC1A-6D9A3C158D16} = {12E69671-B980-4BFF-BC1A-6D9A3C158D16} + {B99A58B4-E5AB-42F6-A28F-D7ACB80E0B06} = {B99A58B4-E5AB-42F6-A28F-D7ACB80E0B06} + {14734EBB-B167-48D9-9B93-2277F645925F} = {14734EBB-B167-48D9-9B93-2277F645925F} + {DDE81BE7-D457-47F3-9762-A838EFA2672E} = {DDE81BE7-D457-47F3-9762-A838EFA2672E} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "q3data", "tools\quake3\q3data\q3data.vcxproj", "{8DFCF3C0-5EC6-4E28-9D38-23FBE5F214FB}" EndProject diff --git a/radiant/feedback.h b/radiant/feedback.h index 8db96b2..ac75ed2 100644 --- a/radiant/feedback.h +++ b/radiant/feedback.h @@ -28,6 +28,10 @@ #ifndef __Q3MAP_FEEDBACK__ #define __Q3MAP_FEEDBACK__ +#if defined( _WIN32 ) + // required for static linking libxml on Windows + #define LIBXML_STATIC +#endif #include "libxml/parser.h" // a select message with a brush/entity select information diff --git a/radiant/preferences.cpp b/radiant/preferences.cpp index 1af3d6c..e987bd8 100644 --- a/radiant/preferences.cpp +++ b/radiant/preferences.cpp @@ -3465,6 +3465,9 @@ void CGameInstall::Run() { if ( fg == NULL ) { Error( "Failed to open %s for writing\n", gameFilePath.GetBuffer() ); } + // Running Windows, crashing here? + // Make sure that libintl.h is not redefining fprintf to some broken BS! + // - TTimo fprintf( fg, "\n