Patch #2762 2009-05-18 07:49

horakdan

Use system tinyxml library when available
Download
2762-Use_system_tin.patch (52.7 KB)
Category
Application::Refinement
Status
Open
Close date
 
Assigned to
 
From fae0848a3f14c1aa8f6095a585d50a8201049d63 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Wed, 13 May 2009 10:21:19 +0200
Subject: [PATCH 01/19] add check for tinyxml into configure

---
 configure.in |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/configure.in b/configure.in
index 6f914bd..0a546ca 100644
--- a/configure.in
+++ b/configure.in
@@ -54,9 +54,18 @@ AC_SEARCH_LIBS(gzopen, z, [HAVE_ZLIB=yes], [HAVE_ZLIB=no])
 LIBS=$save_LIBS
 AC_SEARCH_LIBS(BZ2_bzopen, bz2, [HAVE_BZIP2=yes], [HAVE_BZIP2=no])
 LIBS=$save_LIBS
+save_CC=$CC
+save_CPP=$CPP
+CC=$CXX
+CPP=$CXXCPP
+AC_CHECK_HEADER(tinyxml.h, [HAVE_TINYXML=yes], [HAVE_TINYXML=no])
+CC=$save_CC
+CPP=$save_CPP
+
 
 AM_CONDITIONAL([HAVE_ZLIB], [test "$HAVE_ZLIB" = yes])
 AM_CONDITIONAL([HAVE_BZIP2], [test "$HAVE_BZIP2" = yes])
+AM_CONDITIONAL([HAVE_TINYXML], [test "$HAVE_TINYXML" = yes])
 
 dnl versioning info for libtool
 dnl Note this is the ABI version which is not the same as our actual library version
-- 
1.6.3.3

From 017c9d90b734a65dce3720fa690c12ee5b8b17a7 Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Wed, 13 May 2009 16:53:29 +0200
Subject: [PATCH 02/19] move tinywxuni.h header from tinyxml into sdk

---
 src/include/Makefile.am                            |    1 +
 src/include/tinywxuni.h                            |   15 +++++++++++++++
 src/include/tinyxml/Makefile.am                    |    2 +-
 src/include/tinyxml/tinywxuni.h                    |   15 ---------------
 .../contrib/BrowseTracker/BrowseTrackerLayout.cpp  |    2 +-
 .../contrib/lib_finder/librarydetectionmanager.cpp |    2 +-
 .../contrib/wxSmith/wxsversionconverter.cpp        |    2 +-
 .../contrib/wxSmith/wxwidgets/wxsitemresdata.cpp   |    2 +-
 .../wxSmith/wxwidgets/wxwidgetsresfactory.cpp      |    2 +-
 src/sdk/configmanager.cpp                          |    2 +-
 src/sdk/globals.cpp                                |    2 +-
 src/sdk/projectlayoutloader.cpp                    |    2 +-
 src/sdk/projectloader.cpp                          |    2 +-
 src/sdk/workspaceloader.cpp                        |    2 +-
 src/tools/cb_share_config/mainframe.cpp            |    2 +-
 15 files changed, 28 insertions(+), 27 deletions(-)
 create mode 100644 src/include/tinywxuni.h
 delete mode 100644 src/include/tinyxml/tinywxuni.h

diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 8d0d931..9138ffd 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -119,6 +119,7 @@ ALLHEADERS = annoyingdialog.h \
                 selecttargetdlg.h \
                 settings.h \
                 templatemanager.h \
+                tinywxuni.h \
                 toolsmanager.h \
                 uservarmanager.h \
                 virtualbuildtargetsdlg.h \
diff --git a/src/include/tinywxuni.h b/src/include/tinywxuni.h
new file mode 100644
index 0000000..9ebf3a5
--- /dev/null
+++ b/src/include/tinywxuni.h
@@ -0,0 +1,15 @@
+#ifndef TINYWXUNI_H
+#define TINYWXUNI_H
+
+class wxString;
+class TiXmlDocument;
+
+namespace TinyXML
+{
+    bool LoadDocument(const wxString& filename, TiXmlDocument *doc);
+    TiXmlDocument* LoadDocument(const wxString& filename);
+
+    bool SaveDocument(const wxString& filename, TiXmlDocument* doc);
+}
+
+#endif
diff --git a/src/include/tinyxml/Makefile.am b/src/include/tinyxml/Makefile.am
index fdfa2c5..c22e938 100644
--- a/src/include/tinyxml/Makefile.am
+++ b/src/include/tinyxml/Makefile.am
@@ -1,3 +1,3 @@
 sdkdir=$(includedir)/codeblocks/tinyxml
 
-sdk_HEADERS = tinystr.h tinyxml.h tinywxuni.h
+sdk_HEADERS = tinystr.h tinyxml.h
diff --git a/src/include/tinyxml/tinywxuni.h b/src/include/tinyxml/tinywxuni.h
deleted file mode 100644
index 9ebf3a5..0000000
--- a/src/include/tinyxml/tinywxuni.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef TINYWXUNI_H
-#define TINYWXUNI_H
-
-class wxString;
-class TiXmlDocument;
-
-namespace TinyXML
-{
-    bool LoadDocument(const wxString& filename, TiXmlDocument *doc);
-    TiXmlDocument* LoadDocument(const wxString& filename);
-
-    bool SaveDocument(const wxString& filename, TiXmlDocument* doc);
-}
-
-#endif
diff --git a/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp b/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp
index 7eeb514..30f38d4 100644
--- a/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp
+++ b/src/plugins/contrib/BrowseTracker/BrowseTrackerLayout.cpp
@@ -47,7 +47,7 @@
 
 #include <wx/tokenzr.h>
 #include "tinyxml/tinyxml.h"
-#include "tinyxml/tinywxuni.h"
+#include "tinywxuni.h"
 
 #include "BrowseTrackerLayout.h"
 #include "BrowseMarks.h"
diff --git a/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp b/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp
index db01cf2..b61adf8 100644
--- a/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp
+++ b/src/plugins/contrib/lib_finder/librarydetectionmanager.cpp
@@ -22,7 +22,7 @@
 */
 
 #include <tinyxml/tinyxml.h>
-#include <tinyxml/tinywxuni.
download for full patch...
horakdan 2009-08-18 12:48

patch updated to revision 5731