Patch to Fix compiling under Windows without using Precompiled Headers.
Also, fixes some rules that killerbot has passed on to me.
killerbot inspired ones.
1. If possible, headers should use forward declarations instead of includes.
2. Headers should never include pre-compiled headers like [sdk.h] or [wxprec.h].
Do not include sdk.h in headers
Do not include wxprec.h in headers
Do not use WX_PRECOMP in headers
Do not use CB_PRECOMP in headers
Ones I decided on by myself.
3. Used system includes in plugins for C::B SDK and wxWidgets includes.
In plugins, use [#include <sdk.h>] instead of [#include "sdk.h"]
4. Do not use [#include <wx/wx.h>] in either production headers or source code.
Index: src/Dialogs/wxSVNTreeCtrl.h
===================================================================
--- src/Dialogs/wxSVNTreeCtrl.h (revision 7)
+++ src/Dialogs/wxSVNTreeCtrl.h (working copy)
@@ -1,13 +1,7 @@
#ifndef WXSVNTREECTRL_H
#define WXSVNTREECTRL_H
-// For compilers that support precompilation, includes <wx/wx.h>
-#include <wx/wxprec.h>
-#ifndef WX_PRECOMP
- #include <wx/wx.h>
-#endif
-
#include <cbplugin.h>
#include <wx/treectrl.h>
Index: src/Dialogs/ConfigDialog.cpp
===================================================================
--- src/Dialogs/ConfigDialog.cpp (revision 7)
+++ src/Dialogs/ConfigDialog.cpp (working copy)
@@ -21,7 +21,13 @@
#endif
#ifndef WX_PRECOMP
-#include "wx/wx.h"
+#include <wx/checkbox.h>
+#include <wx/dialog.h>
+#include <wx/dirdlg.h>
+#include <wx/filedlg.h>
+#include <wx/log.h>
+#include <wx/stattext.h>
+#include <wx/window.h>
#endif
////@begin includes
@@ -30,6 +36,7 @@
#include "ConfigDialog.h"
#include "wx/file.h"
#include "wx/dir.h"
+#include <wx/sizer.h>
#include "wx/textctrl.h"
#include "SVNInside_globals.h"
Index: src/Dialogs/SVNFileSelect.cpp
===================================================================
--- src/Dialogs/SVNFileSelect.cpp (revision 7)
+++ src/Dialogs/SVNFileSelect.cpp (working copy)
@@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////
// Name: SVNFileSelect.cpp
// Purpose:
-// Author: Aurélien Rainone
+// Author: Aurélien Rainone
// Modified by:
// Created: 02/10/2007 22:45:30
// RCS-ID:
@@ -21,7 +21,12 @@
#endif
#ifndef WX_PRECOMP
-#include "wx/wx.h"
+#include <wx/button.h>
+#include <wx/checklst.h>
+#include <wx/log.h>
+#include <wx/sizer.h>
+#include <wx/stattext.h>
+#include <wx/textctrl.h>
#endif
////@begin includes
Index: src/Dialogs/ConfigDialog.h
===================================================================
--- src/Dialogs/ConfigDialog.h (revision 7)
+++ src/Dialogs/ConfigDialog.h (working copy)
@@ -32,7 +32,10 @@
*/
////@begin forward declarations
+class wxStaticText;
class wxToggleButton;
+class wxTextCtrl;
+class wxCheckBox;
////@end forward declarations
/*!
Index: src/Dialogs/wxSVNTreeCtrl.cpp
===================================================================
--- src/Dialogs/wxSVNTreeCtrl.cpp (revision 7)
+++ src/Dialogs/wxSVNTreeCtrl.cpp (working copy)
@@ -1,4 +1,8 @@
#include <sdk.h> // Code::Blocks SDK
+#ifndef CB_PRECOMP
+ #include <configmanager.h>
+ #include <cbproject.h>
+#endif
#include <wx/menu.h>
#include <wx/imaglist.h>
Index: src/Dialogs/SVNFileSelect.h
===================================================================
--- src/Dialogs/SVNFileSelect.h (revision 7)
+++ src/Dialogs/SVNFileSelect.h (working copy)
@@ -22,6 +22,7 @@
////@begin includes
#include "wx/xrc/xmlres.h"
+#include <wx/dialog.h>
#include "SVNInside_globals.h"
////@end includes
@@ -30,6 +31,10 @@
*/
////@begin forward declarations
+class wxButton;
+class wxCheckListBox;
+class wxStaticText;
+class wxTextCtrl;
////@end forward declarations
/*!
Index: src/SVNInside.cpp
===================================================================
--- src/SVNInside.cpp (revision 7)
+++ src/SVNInside.cpp (working copy)
@@ -1,4 +1,9 @@
#include <sdk.h> // Code::Blocks SDK
+#ifndef CB_PRECOMP
+ #include <projectmanager.h>
+ #include <cbproject.h>
+#endif
+
#include <configurationpanel.h>
#include "SVNInside.h"
Index: src/SVNCommand/CSVNcommand.h
===================================================================
--- src/SVNCommand/CSVNcommand.h (revision 7)
+++ src/SVNCommand/CSVNcommand.h (working copy)
@@ -1,13 +1,8 @@
#ifndef CSVNCOMMAND_H
#define CSVNCOMMAND_H
-// For compilers that support precompilation, includes <wx/wx.h>
-#include <wx/wxprec.h>
+#include <wx/string.h>
-#ifndef WX_PRECOMP
- #include <wx/wx.h>
-#endif
-
#include <string>
#include "ConsoleProc.h"
Index: src/SVNInside.h
===================================================================
--- src/SVNInside.h (revision 7)
+++ src/SVNInside.h (working copy)
@@ -10,13 +10,8 @@
#ifndef SVNINSIDE_H_INCLUDED
#define SVNINSIDE_H_INCLUDED
-// For compilers that support precompilation, includes <wx/wx.h>
-#include <wx/wxprec.h>
+#include <wx/process.h> // for "class wxProcess"
-#ifndef WX_PRECOMP
- #include <wx/wx.h>
-#endif
-
#include <cbplugin.h> // for "class cbPlugin"
#include <tinyxml.h> // for "tinyxml API"
#include <string>