
Property changes on: src\plugins\compilergcc\compiler_defs.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compiler_defs.h
===================================================================
--- src/plugins/compilergcc/compiler_defs.h	(revision 5730)
+++ src/plugins/compilergcc/compiler_defs.h	(working copy)
@@ -1,63 +1,63 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- */
-
-#ifndef COMPILER_DEFS_H
-#define COMPILER_DEFS_H
-
-#include <wx/string.h>
-#include <wx/list.h>    // WX_DECLARE_LIST
-
-class cbProject;
-class ProjectBuildTarget;
-
-struct CompilerCommand
-{
-    CompilerCommand(const wxString& cmd, const wxString& msg, cbProject* prj, ProjectBuildTarget* tgt, bool is_run = false)
-        : command(cmd), message(msg), project(prj), target(tgt), isRun(is_run), mustWait(false), isLink(false)
-    {}
-    CompilerCommand(const CompilerCommand& rhs)
-        : command(rhs.command), message(rhs.message), project(rhs.project), target(rhs.target), isRun(rhs.isRun), mustWait(rhs.mustWait), isLink(rhs.isLink)
-    {}
-    wxString command;
-    wxString message;
-    wxString dir;
-    cbProject* project;
-    ProjectBuildTarget* target;
-    bool isRun; ///< if it's a command to run the target.
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ */
+
+#ifndef COMPILER_DEFS_H
+#define COMPILER_DEFS_H
+
+#include <wx/string.h>
+#include <wx/list.h>    // WX_DECLARE_LIST
+
+class cbProject;
+class ProjectBuildTarget;
+
+struct CompilerCommand
+{
+    CompilerCommand(const wxString& cmd, const wxString& msg, cbProject* prj, ProjectBuildTarget* tgt, bool is_run = false)
+        : command(cmd), message(msg), project(prj), target(tgt), isRun(is_run), mustWait(false), isLink(false)
+    {}
+    CompilerCommand(const CompilerCommand& rhs)
+        : command(rhs.command), message(rhs.message), project(rhs.project), target(rhs.target), isRun(rhs.isRun), mustWait(rhs.mustWait), isLink(rhs.isLink)
+    {}
+    wxString command;
+    wxString message;
+    wxString dir;
+    cbProject* project;
+    ProjectBuildTarget* target;
+    bool isRun; ///< if it's a command to run the target.
     bool mustWait; ///< wait for all previous commands to finish (for parallel builds).
-    bool isLink; ///< wait for all previous commands to finish (for parallel builds) - only for linking stage.
-};
-WX_DECLARE_LIST(CompilerCommand, CompilerCommands);
-
-class CompilerQueue
-{
-    public:
-        CompilerQueue();
-        ~CompilerQueue();
-
-        /// Clear the queue.
-        void Clear();
-        /// Get the commands count.
-        size_t GetCount() const;
-        bool LastCommandWasRun() const;
-        /// Queue a command.
-        void Add(CompilerCommand* cmd);
-        /// Queue all commands from another CompilerQueue.
-        void Add(CompilerQueue* queue);
-        /** Get the next command in queue.
-          * If @c from is NULL, returns the top command.
-          * If @c from is not NULL, the command following @c from is
-          * returned.
-          * if @c remove is true (default), the command is removed from the list.
-          * This means that the caller must delete it.
-          */
-        CompilerCommand* Next();
-        CompilerCommand* Peek();
-    protected:
-        CompilerCommands m_Commands;
-        bool m_LastWasRun;
-};
-
-#endif // COMPILER_DEFS_H
+    bool isLink; ///< wait for all previous commands to finish (for parallel builds) - only for linking stage.
+};
+WX_DECLARE_LIST(CompilerCommand, CompilerCommands);
+
+class CompilerQueue
+{
+    public:
+        CompilerQueue();
+        ~CompilerQueue();
+
+        /// Clear the queue.
+        void Clear();
+        /// Get the commands count.
+        size_t GetCount() const;
+        bool LastCommandWasRun() const;
+        /// Queue a command.
+        void Add(CompilerCommand* cmd);
+        /// Queue all commands from another CompilerQueue.
+        void Add(CompilerQueue* queue);
+        /** Get the next command in queue.
+          * If @c from is NULL, returns the top command.
+          * If @c from is not NULL, the command following @c from is
+          * returned.
+          * if @c remove is true (default), the command is removed from the list.
+          * This means that the caller must delete it.
+          */
+        CompilerCommand* Next();
+        CompilerCommand* Peek();
+    protected:
+        CompilerCommands m_Commands;
+        bool m_LastWasRun;
+};
+
+#endif // COMPILER_DEFS_H

Property changes on: src\plugins\compilergcc\compiler_defs.h
___________________________________________________________________
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerCYGWIN.cpp
===================================================================
--- src/plugins/compilergcc/compilerCYGWIN.cpp	(revision 5730)
+++ src/plugins/compilergcc/compilerCYGWIN.cpp	(working copy)
@@ -1,72 +1,72 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#ifdef __WXMSW__
-// this compiler is valid only in windows
-
-#include "compilerCYGWIN.h"
-#include <wx/filefn.h>
-#include <wx/msw/registry.h>
-
-CompilerCYGWIN::CompilerCYGWIN()
-    : CompilerMINGW(_("Cygwin GCC"), _T("cygwin"))
-{
-    Reset();
-}
-
-CompilerCYGWIN::~CompilerCYGWIN()
-{
-}
-
-Compiler * CompilerCYGWIN::CreateCopy()
-{
-    Compiler* c = new CompilerCYGWIN(*this);
-    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
-    return c;
-}
-
-void CompilerCYGWIN::Reset()
-{
-    CompilerMINGW::Reset();
-
-	m_Programs.C = _T("gcc.exe");
-	m_Programs.CPP = _T("g++.exe");
-	m_Programs.LD = _T("g++.exe");
-	m_Programs.DBG = _T("gdb.exe");
-	m_Programs.LIB = _T("ar.exe");
-	m_Programs.WINDRES = _T("windres.exe");
-	m_Programs.MAKE = _T("make.exe");
-
-    m_Switches.forceFwdSlashes = true;
-
-	m_Options.AddOption(_("Do not use cygwin specific functionality"), _T("-mno-cygwin"), _("General"));
-}
-
-AutoDetectResult CompilerCYGWIN::AutoDetectInstallationDir()
-{
-    m_MasterPath = _T("C:\\Cygwin"); // just a guess
-
-    // look in registry for Cygwin
-
-    wxRegKey key; // defaults to HKCR
-    key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\Cygnus Solutions\\Cygwin\\mounts v2\\/"));
-    if (key.Exists() && key.Open(wxRegKey::Read))
-    {
-        // found; read it
-        key.QueryValue(_T("native"), m_MasterPath);
-    }
-    AutoDetectResult ret = wxFileExists(m_MasterPath + wxFILE_SEP_PATH +
-                                        _T("bin") + wxFILE_SEP_PATH +
-                                        m_Programs.C)
-                            ? adrDetected
-                            : adrGuessed;
-    return ret;
-}
-
-#endif // __WXMSW__
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#ifdef __WXMSW__
+// this compiler is valid only in windows
+
+#include "compilerCYGWIN.h"
+#include <wx/filefn.h>
+#include <wx/msw/registry.h>
+
+CompilerCYGWIN::CompilerCYGWIN()
+    : CompilerMINGW(_("Cygwin GCC"), _T("cygwin"))
+{
+    Reset();
+}
+
+CompilerCYGWIN::~CompilerCYGWIN()
+{
+}
+
+Compiler * CompilerCYGWIN::CreateCopy()
+{
+    Compiler* c = new CompilerCYGWIN(*this);
+    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
+    return c;
+}
+
+void CompilerCYGWIN::Reset()
+{
+    CompilerMINGW::Reset();
+
+	m_Programs.C = _T("gcc.exe");
+	m_Programs.CPP = _T("g++.exe");
+	m_Programs.LD = _T("g++.exe");
+	m_Programs.DBG = _T("gdb.exe");
+	m_Programs.LIB = _T("ar.exe");
+	m_Programs.WINDRES = _T("windres.exe");
+	m_Programs.MAKE = _T("make.exe");
+
+    m_Switches.forceFwdSlashes = true;
+
+	m_Options.AddOption(_("Do not use cygwin specific functionality"), _T("-mno-cygwin"), _("General"));
+}
+
+AutoDetectResult CompilerCYGWIN::AutoDetectInstallationDir()
+{
+    m_MasterPath = _T("C:\\Cygwin"); // just a guess
+
+    // look in registry for Cygwin
+
+    wxRegKey key; // defaults to HKCR
+    key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\Cygnus Solutions\\Cygwin\\mounts v2\\/"));
+    if (key.Exists() && key.Open(wxRegKey::Read))
+    {
+        // found; read it
+        key.QueryValue(_T("native"), m_MasterPath);
+    }
+    AutoDetectResult ret = wxFileExists(m_MasterPath + wxFILE_SEP_PATH +
+                                        _T("bin") + wxFILE_SEP_PATH +
+                                        m_Programs.C)
+                            ? adrDetected
+                            : adrGuessed;
+    return ret;
+}
+
+#endif // __WXMSW__

Property changes on: src\plugins\compilergcc\compilerCYGWIN.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerCYGWIN.h
===================================================================
--- src/plugins/compilergcc/compilerCYGWIN.h	(revision 5730)
+++ src/plugins/compilergcc/compilerCYGWIN.h	(working copy)
@@ -8,18 +8,18 @@

 #ifndef COMPILER_CYGWIN_H
 #define COMPILER_CYGWIN_H
-
-#include "compilerMINGW.h"

+#include "compilerMINGW.h"
+
 class CompilerCYGWIN : public CompilerMINGW
 {
 	public:
 		CompilerCYGWIN();
 		~CompilerCYGWIN();
-        virtual void Reset();
-        virtual AutoDetectResult AutoDetectInstallationDir();
+        virtual void Reset();
+        virtual AutoDetectResult AutoDetectInstallationDir();
 	protected:
-        virtual Compiler* CreateCopy();
+        virtual Compiler* CreateCopy();
 	private:

 };

Property changes on: src\plugins\compilergcc\compilerCYGWIN.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\compilergcc\compilerDMD.cpp
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: src\plugins\compilergcc\compilerDMD.h
___________________________________________________________________
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerGDC.cpp
===================================================================
--- src/plugins/compilergcc/compilerGDC.cpp	(revision 5730)
+++ src/plugins/compilergcc/compilerGDC.cpp	(working copy)
@@ -1,258 +1,258 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#include <sdk.h>
-#include <prep.h>
-#include "compilerGDC.h"
-#include <wx/intl.h>
-#include <wx/regex.h>
-#include <wx/config.h>
-#include <wx/fileconf.h>
-#include <wx/msgdlg.h>
-#include "manager.h"
-#include "logmanager.h"
-
-#include <configmanager.h>
-
-#ifdef __WXMSW__
-    #include <wx/msw/registry.h>
-#endif
-
-CompilerGDC::CompilerGDC()
-    : Compiler(_("GDC D Compiler"), _T("gdc"))
-{
-    Reset();
-}
-
-CompilerGDC::~CompilerGDC()
-{
-    //dtor
-}
-
-Compiler * CompilerGDC::CreateCopy()
-{
-    Compiler* c = new CompilerGDC(*this);
-    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
-    return c;
-}
-
-void CompilerGDC::Reset()
-{
-    if (platform::windows)
-    {
-        m_Programs.C = _T("mingw32-gdc.exe");
-        m_Programs.CPP = _T("mingw32-gdc.exe");
-        m_Programs.LD = _T("mingw32-gdc.exe");
-        m_Programs.DBG = _T("gdb.exe");
-        m_Programs.LIB = _T("ar.exe");
-        m_Programs.WINDRES = _T("windres.exe");
-        m_Programs.MAKE = _T("mingw32-make.exe");
-    }
-    else
-    {
-        m_Programs.C = _T("gdc");
-        m_Programs.CPP = _T("gdc");
-        m_Programs.LD = _T("gdc");
-        m_Programs.DBG = _T("gdb");
-        m_Programs.LIB = _T("ar");
-        m_Programs.WINDRES = _T("");
-        m_Programs.MAKE = _T("make");
-    }
-    m_Switches.includeDirs = _T("-I");
-    m_Switches.libDirs = _T("-L");
-    m_Switches.linkLibs = _T("-l");
-    m_Switches.defines = _T("-fversion=");
-    m_Switches.genericSwitch = _T("-");
-    m_Switches.objectExtension = _T("o");
-    m_Switches.needDependencies = true;
-    m_Switches.forceCompilerUseQuotes = false;
-    m_Switches.forceLinkerUseQuotes = false;
-    m_Switches.logging = clogSimple;
-    m_Switches.libPrefix = _T("lib");
-    m_Switches.libExtension = _T("a");
-    m_Switches.linkerNeedsLibPrefix = false;
-    m_Switches.linkerNeedsLibExtension = false;
-
-    // Summary of GCC options: http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
-
-    m_Options.ClearOptions();
-    m_Options.AddOption(_("Produce debugging symbols"),
-                _T("-g"),
-                _("Debugging"),
-                _T(""),
-                true,
-                _T("-O -O1 -O2 -O3 -Os"),
-                _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
-    wxString gprof_link = _T("-pg");
-    if (platform::windows)
-        gprof_link = _T("-pg -lgmon");
-    m_Options.AddOption(_("Profile code when executed"), _T("-pg"), _("Profiling"), gprof_link);
-
-    wxString category = _("Warnings");
-
-    // warnings
-    m_Options.AddOption(_("Enable all compiler warnings (overrides every other setting)"), _T("-Wall"), category);
-    m_Options.AddOption(_("Enable standard compiler warnings"), _T("-W"), category);
-    m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
-    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
-    m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
-    m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
-    m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
-    // D features
-    category = _("D");
-    m_Options.AddOption(_("generate documentation"), _T("-fdoc"), category);
-    m_Options.AddOption(_("allow deprecated features"), _T("-fdeprecated"), category);
-    m_Options.AddOption(_("compile in debug code"), _T("-debug"), category);
-    m_Options.AddOption(_("inline expand functions"), _T("-finline-functions"), category);
-    m_Options.AddOption(_("compile release version, which means not generating code for contracts and asserts"), _T("-frelease"), category);
-    m_Options.AddOption(_("compile in unittest code, also turns on asserts"), _T("-funittest"), category);
-
-    // optimization
-    category = _("Optimization");
-    m_Options.AddOption(_("Strip all symbols from binary (minimizes size)"), _T(""), category, _T("-s"), true, _T("-g -ggdb"), _("Stripping the binary will strip debugging symbols as well!"));
-    m_Options.AddOption(_("Optimize generated code (for speed)"), _T("-O"), category);
-    m_Options.AddOption(_("Optimize more (for speed)"), _T("-O1"), category);
-    m_Options.AddOption(_("Optimize even more (for speed)"), _T("-O2"), category);
-    m_Options.AddOption(_("Optimize fully (for speed)"), _T("-O3"), category);
-    m_Options.AddOption(_("Optimize generated code (for size)"), _T("-Os"), category);
-    m_Options.AddOption(_("Expensive optimizations"), _T("-fexpensive-optimizations"), category);
-    // machine dependent options - cpu arch
-    category = _("CPU architecture tuning (choose none, or only one of these)");
-    m_Options.AddOption(_("i386"), _T("-march=i386"), category);
-    m_Options.AddOption(_("i486"), _T("-march=i486"), category);
-    m_Options.AddOption(_("Intel Pentium"), _T("-march=i586"), category);
-    m_Options.AddOption(_("Intel Pentium (MMX)"), _T("-march=pentium-mmx"), category);
-    m_Options.AddOption(_("Intel Pentium PRO"), _T("-march=i686"), category);
-    m_Options.AddOption(_("Intel Pentium 2 (MMX)"), _T("-march=pentium2"), category);
-    m_Options.AddOption(_("Intel Pentium 3 (MMX, SSE)"), _T("-march=pentium3"), category);
-    m_Options.AddOption(_("Intel Pentium 4 (MMX, SSE, SSE2)"), _T("-march=pentium4"), category);
-    m_Options.AddOption(_("Intel Pentium 4 Prescott (MMX, SSE, SSE2, SSE3)"), _T("-march=prescott"), category);
-    m_Options.AddOption(_("Intel Pentium 4 Nocona (MMX, SSE, SSE2, SSE3, 64bit extensions)"), _T("-march=nocona"), category);
-    m_Options.AddOption(_("Intel Pentium M (MMX, SSE, SSE2)"), _T("-march=pentium-m"), category);
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include <sdk.h>
+#include <prep.h>
+#include "compilerGDC.h"
+#include <wx/intl.h>
+#include <wx/regex.h>
+#include <wx/config.h>
+#include <wx/fileconf.h>
+#include <wx/msgdlg.h>
+#include "manager.h"
+#include "logmanager.h"
+
+#include <configmanager.h>
+
+#ifdef __WXMSW__
+    #include <wx/msw/registry.h>
+#endif
+
+CompilerGDC::CompilerGDC()
+    : Compiler(_("GDC D Compiler"), _T("gdc"))
+{
+    Reset();
+}
+
+CompilerGDC::~CompilerGDC()
+{
+    //dtor
+}
+
+Compiler * CompilerGDC::CreateCopy()
+{
+    Compiler* c = new CompilerGDC(*this);
+    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
+    return c;
+}
+
+void CompilerGDC::Reset()
+{
+    if (platform::windows)
+    {
+        m_Programs.C = _T("mingw32-gdc.exe");
+        m_Programs.CPP = _T("mingw32-gdc.exe");
+        m_Programs.LD = _T("mingw32-gdc.exe");
+        m_Programs.DBG = _T("gdb.exe");
+        m_Programs.LIB = _T("ar.exe");
+        m_Programs.WINDRES = _T("windres.exe");
+        m_Programs.MAKE = _T("mingw32-make.exe");
+    }
+    else
+    {
+        m_Programs.C = _T("gdc");
+        m_Programs.CPP = _T("gdc");
+        m_Programs.LD = _T("gdc");
+        m_Programs.DBG = _T("gdb");
+        m_Programs.LIB = _T("ar");
+        m_Programs.WINDRES = _T("");
+        m_Programs.MAKE = _T("make");
+    }
+    m_Switches.includeDirs = _T("-I");
+    m_Switches.libDirs = _T("-L");
+    m_Switches.linkLibs = _T("-l");
+    m_Switches.defines = _T("-fversion=");
+    m_Switches.genericSwitch = _T("-");
+    m_Switches.objectExtension = _T("o");
+    m_Switches.needDependencies = true;
+    m_Switches.forceCompilerUseQuotes = false;
+    m_Switches.forceLinkerUseQuotes = false;
+    m_Switches.logging = clogSimple;
+    m_Switches.libPrefix = _T("lib");
+    m_Switches.libExtension = _T("a");
+    m_Switches.linkerNeedsLibPrefix = false;
+    m_Switches.linkerNeedsLibExtension = false;
+
+    // Summary of GCC options: http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
+
+    m_Options.ClearOptions();
+    m_Options.AddOption(_("Produce debugging symbols"),
+                _T("-g"),
+                _("Debugging"),
+                _T(""),
+                true,
+                _T("-O -O1 -O2 -O3 -Os"),
+                _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
+    wxString gprof_link = _T("-pg");
+    if (platform::windows)
+        gprof_link = _T("-pg -lgmon");
+    m_Options.AddOption(_("Profile code when executed"), _T("-pg"), _("Profiling"), gprof_link);
+
+    wxString category = _("Warnings");
+
+    // warnings
+    m_Options.AddOption(_("Enable all compiler warnings (overrides every other setting)"), _T("-Wall"), category);
+    m_Options.AddOption(_("Enable standard compiler warnings"), _T("-W"), category);
+    m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
+    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
+    m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
+    m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
+    m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
+    // D features
+    category = _("D");
+    m_Options.AddOption(_("generate documentation"), _T("-fdoc"), category);
+    m_Options.AddOption(_("allow deprecated features"), _T("-fdeprecated"), category);
+    m_Options.AddOption(_("compile in debug code"), _T("-debug"), category);
+    m_Options.AddOption(_("inline expand functions"), _T("-finline-functions"), category);
+    m_Options.AddOption(_("compile release version, which means not generating code for contracts and asserts"), _T("-frelease"), category);
+    m_Options.AddOption(_("compile in unittest code, also turns on asserts"), _T("-funittest"), category);
+
+    // optimization
+    category = _("Optimization");
+    m_Options.AddOption(_("Strip all symbols from binary (minimizes size)"), _T(""), category, _T("-s"), true, _T("-g -ggdb"), _("Stripping the binary will strip debugging symbols as well!"));
+    m_Options.AddOption(_("Optimize generated code (for speed)"), _T("-O"), category);
+    m_Options.AddOption(_("Optimize more (for speed)"), _T("-O1"), category);
+    m_Options.AddOption(_("Optimize even more (for speed)"), _T("-O2"), category);
+    m_Options.AddOption(_("Optimize fully (for speed)"), _T("-O3"), category);
+    m_Options.AddOption(_("Optimize generated code (for size)"), _T("-Os"), category);
+    m_Options.AddOption(_("Expensive optimizations"), _T("-fexpensive-optimizations"), category);
+    // machine dependent options - cpu arch
+    category = _("CPU architecture tuning (choose none, or only one of these)");
+    m_Options.AddOption(_("i386"), _T("-march=i386"), category);
+    m_Options.AddOption(_("i486"), _T("-march=i486"), category);
+    m_Options.AddOption(_("Intel Pentium"), _T("-march=i586"), category);
+    m_Options.AddOption(_("Intel Pentium (MMX)"), _T("-march=pentium-mmx"), category);
+    m_Options.AddOption(_("Intel Pentium PRO"), _T("-march=i686"), category);
+    m_Options.AddOption(_("Intel Pentium 2 (MMX)"), _T("-march=pentium2"), category);
+    m_Options.AddOption(_("Intel Pentium 3 (MMX, SSE)"), _T("-march=pentium3"), category);
+    m_Options.AddOption(_("Intel Pentium 4 (MMX, SSE, SSE2)"), _T("-march=pentium4"), category);
+    m_Options.AddOption(_("Intel Pentium 4 Prescott (MMX, SSE, SSE2, SSE3)"), _T("-march=prescott"), category);
+    m_Options.AddOption(_("Intel Pentium 4 Nocona (MMX, SSE, SSE2, SSE3, 64bit extensions)"), _T("-march=nocona"), category);
+    m_Options.AddOption(_("Intel Pentium M (MMX, SSE, SSE2)"), _T("-march=pentium-m"), category);
     m_Options.AddOption(_("Intel Core2 (MMX, SSE, SSE2, SSE3, SSSE3, 64bit extensions)"), _T("-march=core2"), category);
-    m_Options.AddOption(_("AMD K6 (MMX)"), _T("-march=k6"), category);
-    m_Options.AddOption(_("AMD K6-2 (MMX, 3DNow!)"), _T("-march=k6-2"), category);
-    m_Options.AddOption(_("AMD K6-3 (MMX, 3DNow!)"), _T("-march=k6-3"), category);
-    m_Options.AddOption(_("AMD Athlon (MMX, 3DNow!, enhanced 3DNow!, SSE prefetch)"), _T("-march=athlon"), category);
-    m_Options.AddOption(_("AMD Athlon Thunderbird (MMX, 3DNow!, enhanced 3DNow!, SSE prefetch)"), _T("-march=athlon-tbird"), category);
-    m_Options.AddOption(_("AMD Athlon 4 (MMX, 3DNow!, enhanced 3DNow!, full SSE)"), _T("-march=athlon-4"), category);
-    m_Options.AddOption(_("AMD Athlon XP (MMX, 3DNow!, enhanced 3DNow!, full SSE)"), _T("-march=athlon-xp"), category);
-    m_Options.AddOption(_("AMD Athlon MP (MMX, 3DNow!, enhanced 3DNow!, full SSE)"), _T("-march=athlon-mp"), category);
-    m_Options.AddOption(_("AMD K8 core (x86-64 instruction set)"), _T("-march=k8"), category);
-    m_Options.AddOption(_("AMD Opteron (x86-64 instruction set)"), _T("-march=opteron"), category);
-    m_Options.AddOption(_("AMD Athlon64 (x86-64 instruction set)"), _T("-march=athlon64"), category);
-    m_Options.AddOption(_("AMD Athlon-FX (x86-64 instruction set)"), _T("-march=athlon-fx"), category);
-
-    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
-    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
-    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("$rescomp -i $file -J rc -o $resource_output -O coff $res_includes")));
-    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
-    if (platform::windows)
-    {
-        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    else
-    {
-        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -r $static_output $link_objects\nranlib $static_output")));
-    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
-
-    LoadDefaultRegExArray();
-
-    m_CompilerOptions.Clear();
-    m_LinkerOptions.Clear();
-    m_LinkLibs.Clear();
-    m_CmdsBefore.Clear();
-    m_CmdsAfter.Clear();
-}
-
-void CompilerGDC::LoadDefaultRegExArray()
-{
-    m_RegExes.Clear();
-    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("'Instantiated from here' info"), cltNormal, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]+([iI]nstantiated from here.*)"), 3, 1, 2));    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
-}
-
-AutoDetectResult CompilerGDC::AutoDetectInstallationDir()
-{
-    wxString sep = wxFileName::GetPathSeparator();
-    if (platform::windows)
-    {
-        // look first if MinGW was installed with Code::Blocks (new in beta6)
-        m_MasterPath = ConfigManager::GetExecutableFolder();
-        if (!wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C))
-        {
-            // no... search for MinGW installation dir
-            wxString windir = wxGetOSDirectory();
-            wxFileConfig ini(_T(""), _T(""), windir + _T("/MinGW.ini"), _T(""), wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_NO_ESCAPE_CHARACTERS);
-            m_MasterPath = ini.Read(_T("/InstallSettings/InstallPath"), _T("C:\\MinGW"));
-            if (!wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C))
-            {
-#ifdef __WXMSW__ // for wxRegKey
-                // not found...
-                // look for dev-cpp installation
-                wxRegKey key; // defaults to HKCR
-                key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\Dev-C++"));
-                if (key.Exists() && key.Open(wxRegKey::Read)) {
-                    // found; read it
-                    key.QueryValue(_T("Install_Dir"), m_MasterPath);
-                }
-                else {
-                    // installed by inno-setup
-                    // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Minimalist GNU for Windows 4.1_is1
-                    wxString name;
-                    long index;
-                    key.SetName(_T("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"));
-                    //key.SetName("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion");
-                    bool ok = key.GetFirstKey(name, index);
-                    while (ok && !name.StartsWith(_T("Minimalist GNU for Windows"))) {
-                        ok = key.GetNextKey(name, index);
-                    }
-                    if (ok) {
-                        name = key.GetName() + _T("\\") + name;
-                        key.SetName(name);
-                        #if wxCHECK_VERSION(2, 9, 0)
-                        Manager::Get()->GetLogManager()->DebugLog(F(_T("name: %s"), name.wx_str()));
-                        #else
-                        Manager::Get()->GetLogManager()->DebugLog(F(_T("name: %s"), name.c_str()));
-                        #endif
-                        if (key.Exists()) key.QueryValue(_T("InstallLocation"), m_MasterPath);
-                    }
-                }
-#endif
-            }
-        }
-        else
-            m_Programs.MAKE = _T("make.exe"); // we distribute "make" not "mingw32-make"
-    }
-    else
-        m_MasterPath = _T("/usr");
-
-    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
-    if (ret == adrDetected)
-    {
-        AddIncludeDir(m_MasterPath + sep + _T("include") + sep + _T("d"));
-        AddLibDir(m_MasterPath + sep + _T("lib"));
-    }
-    return ret;
-}
+    m_Options.AddOption(_("AMD K6 (MMX)"), _T("-march=k6"), category);
+    m_Options.AddOption(_("AMD K6-2 (MMX, 3DNow!)"), _T("-march=k6-2"), category);
+    m_Options.AddOption(_("AMD K6-3 (MMX, 3DNow!)"), _T("-march=k6-3"), category);
+    m_Options.AddOption(_("AMD Athlon (MMX, 3DNow!, enhanced 3DNow!, SSE prefetch)"), _T("-march=athlon"), category);
+    m_Options.AddOption(_("AMD Athlon Thunderbird (MMX, 3DNow!, enhanced 3DNow!, SSE prefetch)"), _T("-march=athlon-tbird"), category);
+    m_Options.AddOption(_("AMD Athlon 4 (MMX, 3DNow!, enhanced 3DNow!, full SSE)"), _T("-march=athlon-4"), category);
+    m_Options.AddOption(_("AMD Athlon XP (MMX, 3DNow!, enhanced 3DNow!, full SSE)"), _T("-march=athlon-xp"), category);
+    m_Options.AddOption(_("AMD Athlon MP (MMX, 3DNow!, enhanced 3DNow!, full SSE)"), _T("-march=athlon-mp"), category);
+    m_Options.AddOption(_("AMD K8 core (x86-64 instruction set)"), _T("-march=k8"), category);
+    m_Options.AddOption(_("AMD Opteron (x86-64 instruction set)"), _T("-march=opteron"), category);
+    m_Options.AddOption(_("AMD Athlon64 (x86-64 instruction set)"), _T("-march=athlon64"), category);
+    m_Options.AddOption(_("AMD Athlon-FX (x86-64 instruction set)"), _T("-march=athlon-fx"), category);
+
+    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
+    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
+    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("$rescomp -i $file -J rc -o $resource_output -O coff $res_includes")));
+    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
+    if (platform::windows)
+    {
+        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    else
+    {
+        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -r $static_output $link_objects\nranlib $static_output")));
+    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
+
+    LoadDefaultRegExArray();
+
+    m_CompilerOptions.Clear();
+    m_LinkerOptions.Clear();
+    m_LinkLibs.Clear();
+    m_CmdsBefore.Clear();
+    m_CmdsAfter.Clear();
+}
+
+void CompilerGDC::LoadDefaultRegExArray()
+{
+    m_RegExes.Clear();
+    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("'Instantiated from here' info"), cltNormal, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]+([iI]nstantiated from here.*)"), 3, 1, 2));    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
+}
+
+AutoDetectResult CompilerGDC::AutoDetectInstallationDir()
+{
+    wxString sep = wxFileName::GetPathSeparator();
+    if (platform::windows)
+    {
+        // look first if MinGW was installed with Code::Blocks (new in beta6)
+        m_MasterPath = ConfigManager::GetExecutableFolder();
+        if (!wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C))
+        {
+            // no... search for MinGW installation dir
+            wxString windir = wxGetOSDirectory();
+            wxFileConfig ini(_T(""), _T(""), windir + _T("/MinGW.ini"), _T(""), wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_NO_ESCAPE_CHARACTERS);
+            m_MasterPath = ini.Read(_T("/InstallSettings/InstallPath"), _T("C:\\MinGW"));
+            if (!wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C))
+            {
+#ifdef __WXMSW__ // for wxRegKey
+                // not found...
+                // look for dev-cpp installation
+                wxRegKey key; // defaults to HKCR
+                key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\Dev-C++"));
+                if (key.Exists() && key.Open(wxRegKey::Read)) {
+                    // found; read it
+                    key.QueryValue(_T("Install_Dir"), m_MasterPath);
+                }
+                else {
+                    // installed by inno-setup
+                    // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Minimalist GNU for Windows 4.1_is1
+                    wxString name;
+                    long index;
+                    key.SetName(_T("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"));
+                    //key.SetName("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion");
+                    bool ok = key.GetFirstKey(name, index);
+                    while (ok && !name.StartsWith(_T("Minimalist GNU for Windows"))) {
+                        ok = key.GetNextKey(name, index);
+                    }
+                    if (ok) {
+                        name = key.GetName() + _T("\\") + name;
+                        key.SetName(name);
+                        #if wxCHECK_VERSION(2, 9, 0)
+                        Manager::Get()->GetLogManager()->DebugLog(F(_T("name: %s"), name.wx_str()));
+                        #else
+                        Manager::Get()->GetLogManager()->DebugLog(F(_T("name: %s"), name.c_str()));
+                        #endif
+                        if (key.Exists()) key.QueryValue(_T("InstallLocation"), m_MasterPath);
+                    }
+                }
+#endif
+            }
+        }
+        else
+            m_Programs.MAKE = _T("make.exe"); // we distribute "make" not "mingw32-make"
+    }
+    else
+        m_MasterPath = _T("/usr");
+
+    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
+    if (ret == adrDetected)
+    {
+        AddIncludeDir(m_MasterPath + sep + _T("include") + sep + _T("d"));
+        AddLibDir(m_MasterPath + sep + _T("lib"));
+    }
+    return ret;
+}

Property changes on: src\plugins\compilergcc\compilerGDC.cpp
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: src\plugins\compilergcc\compilerGDC.h
___________________________________________________________________
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerGNUARM.cpp
===================================================================
--- src/plugins/compilergcc/compilerGNUARM.cpp	(revision 5730)
+++ src/plugins/compilergcc/compilerGNUARM.cpp	(working copy)
@@ -1,253 +1,253 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#include <sdk.h>
-#include <prep.h>
-#ifndef CB_PRECOMP
-    #include <wx/intl.h>
-    #include <wx/regex.h>
-    #include <wx/utils.h> // wxGetOSDirectory, wxGetEnv
-#endif
-#include <wx/filefn.h> // wxFileExists
-#include <wx/fileconf.h> // wxFileConfig
-#include "compilerGNUARM.h"
-
-CompilerGNUARM::CompilerGNUARM()
-    : Compiler(_("GNU ARM GCC Compiler"),_T("arm-elf-gcc"))
-{
-    Reset();
-}
-
-CompilerGNUARM::~CompilerGNUARM()
-{
-    //dtor
-}
-
-Compiler * CompilerGNUARM::CreateCopy()
-{
-    Compiler* c = new CompilerGNUARM(*this);
-    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
-    return c;
-}
-
-void CompilerGNUARM::Reset()
-{
-    if (platform::windows)
-    {
-        m_Programs.C = _T("arm-elf-gcc.exe");
-        m_Programs.CPP = _T("arm-elf-g++.exe");
-        m_Programs.LD = _T("arm-elf-g++.exe");
-        m_Programs.DBG = _T("arm-elf-gdb.exe");
-        m_Programs.LIB = _T("arm-elf-ar.exe");
-        m_Programs.WINDRES = _T("");
-        m_Programs.MAKE = _T("make.exe");
-    }
-    else
-    {
-        m_Programs.C = _T("arm-elf-gcc");
-        m_Programs.CPP = _T("arm-elf-g++");
-        m_Programs.LD = _T("arm-elf-g++");
-        m_Programs.DBG = _T("arm-elf-gdb");
-        m_Programs.LIB = _T("arm-elf-ar");
-        m_Programs.WINDRES = _T("");
-        m_Programs.MAKE = _T("make");
-    }
-    m_Switches.includeDirs = _T("-I");
-    m_Switches.libDirs = _T("-L");
-    m_Switches.linkLibs = _T("-l");
-    m_Switches.defines = _T("-D");
-    m_Switches.genericSwitch = _T("-");
-    m_Switches.objectExtension = _T("o");
-    m_Switches.needDependencies = true;
-    m_Switches.forceCompilerUseQuotes = false;
-    m_Switches.forceLinkerUseQuotes = false;
-    m_Switches.logging = clogSimple;
-    m_Switches.libPrefix = _T("lib");
-    m_Switches.libExtension = _T("a");
-    m_Switches.linkerNeedsLibPrefix = false;
-    m_Switches.linkerNeedsLibExtension = false;
-
-    // Summary of GCC options: http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
-
-    m_Options.ClearOptions();
-    m_Options.AddOption(_("Produce debugging symbols"),
-                _T("-g"),
-                _("Debugging"),
-                _T(""),
-                true,
-                _T("-O -O1 -O2 -O3 -Os"),
-                _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
-
-    wxString gprof_link = _T("-pg");
-    if (platform::windows)
-        gprof_link = _T("-pg -lgmon");
-    m_Options.AddOption(_("Profile code when executed"), _T("-pg"), _("Profiling"), gprof_link);
-
-    wxString category = _("Warnings");
-
-    // warnings
-    m_Options.AddOption(_("In C mode, support all ISO C90 programs. In C++ mode, remove GNU extensions that conflict with ISO C++"), _T("-ansi"), category);
-    m_Options.AddOption(_("Enable all compiler warnings (overrides many other settings)"), _T("-Wall"), category);
-    m_Options.AddOption(_("Enable extra compiler warnings"), _T("-Wextra"), category);
-    m_Options.AddOption(_("Enable standard compiler warnings"), _T("-W"), category);
-    m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
-    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
-    m_Options.AddOption(_("Have g++ follow the 1998 ISO C++ language standard"), _T("-std=c++98"), category);
-    m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
-    m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
-    m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
-    m_Options.AddOption(_("Enable Effective-C++ warnings (thanks Scott Myers)"), _T("-Weffc++"), category);
-    m_Options.AddOption(_("Warn whenever a switch statement does not have a default case"), _T("-Wswitch-default"), category);
-    m_Options.AddOption(_("Warn whenever a switch statement has an index of enumerated type and lacks a case for one or more of the named codes of that enumeration"), _T("-Wswitch-enum"), category);
-    m_Options.AddOption(_("Warn if a user supplied include directory does not exist"), _T("-Wmissing-include-dirs"), category);
-    m_Options.AddOption(_("Warn if a global function is defined without a previous declaration"), _T("-Wmissing-declarations"), category);
-    m_Options.AddOption(_("Warn if the compiler detects that code will never be executed"), _T("-Wunreachable-code"), category);
-    m_Options.AddOption(_("Warn if a function can not be inlined and it was declared as inline"), _T("-Winline"), category);
-    m_Options.AddOption(_("Warn if floating point values are used in equality comparisons"), _T("-Wfloat-equal"), category);
-    m_Options.AddOption(_("Warn if an undefined identifier is evaluated in an '#if' directive"), _T("-Wundef"), category);
-    m_Options.AddOption(_("Warn whenever a pointer is cast such that the required alignment of the target is increased"), _T("-Wcast-align"), category);
-    m_Options.AddOption(_("Warn if anything is declared more than once in the same scope"), _T("-Wredundant-decls"), category);
-    m_Options.AddOption(_("Warn about unitialized variables which are initialized with themselves"), _T("-Winit-self"), category);
-    m_Options.AddOption(_("Warn whenever a local variable shadows another local variable, parameter or global variable or whenever a built-in function is shadowed"), _T("-Wshadow"), category);
-
-    // optimization
-    category = _("Optimization");
-    m_Options.AddOption(_("Strip all symbols from binary (minimizes size)"), _T(""), category, _T("-s"), true, _T("-g -ggdb"), _("Stripping the binary will strip debugging symbols as well!"));
-    m_Options.AddOption(_("Optimize generated code (for speed)"), _T("-O"), category);
-    m_Options.AddOption(_("Optimize more (for speed)"), _T("-O1"), category);
-    m_Options.AddOption(_("Optimize even more (for speed)"), _T("-O2"), category);
-    m_Options.AddOption(_("Optimize fully (for speed)"), _T("-O3"), category);
-    m_Options.AddOption(_("Optimize generated code (for size)"), _T("-Os"), category);
-    m_Options.AddOption(_("Expensive optimizations"), _T("-fexpensive-optimizations"), category);
-    m_Options.AddOption(_("Don't keep the frame pointer in a register for functions that don't need one"), _T("-fomit-frame-pointer"), category);
-    // machine dependent options - cpu arch
-    category = _("ARM CPU architecture specific");
-    m_Options.AddOption(_("-mapcs-frame"), _T("-mapcs-frame"), category);
-    m_Options.AddOption(_("-mno-apcs-frame"), _T("-mno-apcs-frame"), category);
-    m_Options.AddOption(_("-mabi=NAME"), _T("-mabi=NAME"), category);
-    m_Options.AddOption(_("-mapcs-stack-check"), _T("-mapcs-stack-check"), category);
-    m_Options.AddOption(_("-mno-apcs-stack-check"), _T("-mno-apcs-stack-check"), category);
-    m_Options.AddOption(_("-mapcs-float"), _T("-mapcs-float"), category);
-    m_Options.AddOption(_("-mno-apcs-float"), _T("-mno-apcs-float"), category);
-    m_Options.AddOption(_("-mapcs-reentrant"), _T("-mapcs-reentrant"), category);
-    m_Options.AddOption(_("-mno-apcs-reentrant"), _T("-mno-apcs-reentrant"), category);
-    m_Options.AddOption(_("-msched-prolog"), _T("-msched-prolog"), category);
-    m_Options.AddOption(_("-mno-sched-prolog"), _T("-mno-sched-prolog"), category);
-    m_Options.AddOption(_("-mlittle-endian"), _T("-mlittle-endian"), category);
-    m_Options.AddOption(_("-mbig-endian"), _T("-mbig-endian"), category);
-    m_Options.AddOption(_("-mwords-little-endian"), _T("-mwords-little-endian"), category);
-    m_Options.AddOption(_("-mfloat-abi=NAME"), _T("-mfloat-abi=NAME"), category);
-    m_Options.AddOption(_("-msoft-float"), _T("-msoft-float"), category);
-    m_Options.AddOption(_("-mhard-float"), _T("-mhard-float"), category);
-    m_Options.AddOption(_("-mfpe"), _T("-mfpe"), category);
-    m_Options.AddOption(_("-mthumb-interwork"), _T("-mthumb-interwork"), category);
-    m_Options.AddOption(_("-mno-thumb-interwork"), _T("-mno-thumb-interwork"), category);
-    m_Options.AddOption(_("-mcpu=NAME"), _T("-mcpu=NAME"), category);
-    m_Options.AddOption(_("-march=NAME"), _T("-march=NAME"), category);
-    m_Options.AddOption(_("-mfpu=NAME"), _T("-mfpu=NAME"), category);
-    m_Options.AddOption(_("-mstructure-size-boundary=N"), _T("-mstructure-size-boundary=N"), category);
-    m_Options.AddOption(_("-mabort-on-noreturn"), _T("-mabort-on-noreturn"), category);
-    m_Options.AddOption(_("-mlong-calls"), _T("-mlong-calls"), category);
-    m_Options.AddOption(_("-mno-long-calls"), _T("-mno-long-calls"), category);
-    m_Options.AddOption(_("-msingle-pic-base"), _T("-msingle-pic-base"), category);
-    m_Options.AddOption(_("-mno-single-pic-base"), _T("-mno-single-pic-base"), category);
-    m_Options.AddOption(_("-mpic-register=REG"), _T("-mpic-register=REG"), category);
-    m_Options.AddOption(_("-mnop-fun-dllimport"), _T("-mnop-fun-dllimport"), category);
-    m_Options.AddOption(_("-mcirrus-fix-invalid-insns"), _T("-mcirrus-fix-invalid-insns"), category);
-    m_Options.AddOption(_("-mno-cirrus-fix-invalid-insns"), _T("-mno-cirrus-fix-invalid-insns"), category);
-    m_Options.AddOption(_("-mpoke-function-name"), _T("-mpoke-function-name"), category);
-    m_Options.AddOption(_("-mthumb"), _T("-mthumb"), category);
-    m_Options.AddOption(_("-marm"), _T("-marm"), category);
-    m_Options.AddOption(_("-mtpcs-frame"), _T("-mtpcs-frame"), category);
-    m_Options.AddOption(_("-mtpcs-leaf-frame"), _T("-mtpcs-leaf-frame"), category);
-    m_Options.AddOption(_("-mcaller-super-interworking"), _T("-mcaller-super-interworking"), category);
-    m_Options.AddOption(_("-mcallee-super-interworking"), _T("-mcallee-super-interworking"), category);
-
-    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
-    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
-    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("$rescomp -i $file -J rc -o $resource_output -O coff $res_includes")));
-    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
-    if (platform::windows)
-    {
-        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    else
-    {
-        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -r -s $static_output $link_objects")));
-    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
-
-    LoadDefaultRegExArray();
-
-    m_CompilerOptions.Clear();
-    m_LinkerOptions.Clear();
-    m_LinkLibs.Clear();
-    m_CmdsBefore.Clear();
-    m_CmdsAfter.Clear();
-} // end of Reset
-
-void CompilerGNUARM::LoadDefaultRegExArray()
-{
-    m_RegExes.Clear();
-    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("'In function...' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):[ \t]+") + _T("([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("'Instantiated from' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]+([iI]nstantiated from .*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler note"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Nn]ote:[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("General note"), cltInfo, _T("([Nn]ote:[ \t].*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
-}
-
-AutoDetectResult CompilerGNUARM::AutoDetectInstallationDir()
-{
-    wxString sep = wxFileName::GetPathSeparator();
-    if (platform::windows)
-    {
-        // Search for GNUARM installation dir
-        wxString windir = wxGetOSDirectory();
-        wxFileConfig ini(_T(""), _T(""), windir + _T("/GnuARM.ini"), _T(""), wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_NO_ESCAPE_CHARACTERS);
-        // need it as const , so correct overloaded method will be selected
-        wxString Programs = _T("C:\\Program Files");
-        // what's the "Program Files" location
-        // TO DO : support 64 bit ->    32 bit apps are in "ProgramFiles(x86)"
-        //                              64 bit apps are in "ProgramFiles"
-        wxGetEnv(_T("ProgramFiles"), &Programs);
-        // need it as const , so correct overloaded method will be selected
-        const wxString ProgramsConst = Programs + _T("\\GNUARM");
-        m_MasterPath = ini.Read(_T("/InstallSettings/InstallPath"), ProgramsConst);
-
-        if (wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C))
-        {
-            m_Programs.MAKE = _T("make.exe"); // we distribute "make" not "mingw32-make"
-        }
-    }
-    else
-        m_MasterPath = _T("/usr");
-
-    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
-    if (ret == adrDetected)
-    {
-        AddIncludeDir(m_MasterPath + sep + _T("include"));
-        AddLibDir(m_MasterPath + sep + _T("lib"));
-    }
-    return ret;
-} // end of AutoDetectInstallationDir
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include <sdk.h>
+#include <prep.h>
+#ifndef CB_PRECOMP
+    #include <wx/intl.h>
+    #include <wx/regex.h>
+    #include <wx/utils.h> // wxGetOSDirectory, wxGetEnv
+#endif
+#include <wx/filefn.h> // wxFileExists
+#include <wx/fileconf.h> // wxFileConfig
+#include "compilerGNUARM.h"
+
+CompilerGNUARM::CompilerGNUARM()
+    : Compiler(_("GNU ARM GCC Compiler"),_T("arm-elf-gcc"))
+{
+    Reset();
+}
+
+CompilerGNUARM::~CompilerGNUARM()
+{
+    //dtor
+}
+
+Compiler * CompilerGNUARM::CreateCopy()
+{
+    Compiler* c = new CompilerGNUARM(*this);
+    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
+    return c;
+}
+
+void CompilerGNUARM::Reset()
+{
+    if (platform::windows)
+    {
+        m_Programs.C = _T("arm-elf-gcc.exe");
+        m_Programs.CPP = _T("arm-elf-g++.exe");
+        m_Programs.LD = _T("arm-elf-g++.exe");
+        m_Programs.DBG = _T("arm-elf-gdb.exe");
+        m_Programs.LIB = _T("arm-elf-ar.exe");
+        m_Programs.WINDRES = _T("");
+        m_Programs.MAKE = _T("make.exe");
+    }
+    else
+    {
+        m_Programs.C = _T("arm-elf-gcc");
+        m_Programs.CPP = _T("arm-elf-g++");
+        m_Programs.LD = _T("arm-elf-g++");
+        m_Programs.DBG = _T("arm-elf-gdb");
+        m_Programs.LIB = _T("arm-elf-ar");
+        m_Programs.WINDRES = _T("");
+        m_Programs.MAKE = _T("make");
+    }
+    m_Switches.includeDirs = _T("-I");
+    m_Switches.libDirs = _T("-L");
+    m_Switches.linkLibs = _T("-l");
+    m_Switches.defines = _T("-D");
+    m_Switches.genericSwitch = _T("-");
+    m_Switches.objectExtension = _T("o");
+    m_Switches.needDependencies = true;
+    m_Switches.forceCompilerUseQuotes = false;
+    m_Switches.forceLinkerUseQuotes = false;
+    m_Switches.logging = clogSimple;
+    m_Switches.libPrefix = _T("lib");
+    m_Switches.libExtension = _T("a");
+    m_Switches.linkerNeedsLibPrefix = false;
+    m_Switches.linkerNeedsLibExtension = false;
+
+    // Summary of GCC options: http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
+
+    m_Options.ClearOptions();
+    m_Options.AddOption(_("Produce debugging symbols"),
+                _T("-g"),
+                _("Debugging"),
+                _T(""),
+                true,
+                _T("-O -O1 -O2 -O3 -Os"),
+                _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
+
+    wxString gprof_link = _T("-pg");
+    if (platform::windows)
+        gprof_link = _T("-pg -lgmon");
+    m_Options.AddOption(_("Profile code when executed"), _T("-pg"), _("Profiling"), gprof_link);
+
+    wxString category = _("Warnings");
+
+    // warnings
+    m_Options.AddOption(_("In C mode, support all ISO C90 programs. In C++ mode, remove GNU extensions that conflict with ISO C++"), _T("-ansi"), category);
+    m_Options.AddOption(_("Enable all compiler warnings (overrides many other settings)"), _T("-Wall"), category);
+    m_Options.AddOption(_("Enable extra compiler warnings"), _T("-Wextra"), category);
+    m_Options.AddOption(_("Enable standard compiler warnings"), _T("-W"), category);
+    m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
+    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
+    m_Options.AddOption(_("Have g++ follow the 1998 ISO C++ language standard"), _T("-std=c++98"), category);
+    m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
+    m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
+    m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
+    m_Options.AddOption(_("Enable Effective-C++ warnings (thanks Scott Myers)"), _T("-Weffc++"), category);
+    m_Options.AddOption(_("Warn whenever a switch statement does not have a default case"), _T("-Wswitch-default"), category);
+    m_Options.AddOption(_("Warn whenever a switch statement has an index of enumerated type and lacks a case for one or more of the named codes of that enumeration"), _T("-Wswitch-enum"), category);
+    m_Options.AddOption(_("Warn if a user supplied include directory does not exist"), _T("-Wmissing-include-dirs"), category);
+    m_Options.AddOption(_("Warn if a global function is defined without a previous declaration"), _T("-Wmissing-declarations"), category);
+    m_Options.AddOption(_("Warn if the compiler detects that code will never be executed"), _T("-Wunreachable-code"), category);
+    m_Options.AddOption(_("Warn if a function can not be inlined and it was declared as inline"), _T("-Winline"), category);
+    m_Options.AddOption(_("Warn if floating point values are used in equality comparisons"), _T("-Wfloat-equal"), category);
+    m_Options.AddOption(_("Warn if an undefined identifier is evaluated in an '#if' directive"), _T("-Wundef"), category);
+    m_Options.AddOption(_("Warn whenever a pointer is cast such that the required alignment of the target is increased"), _T("-Wcast-align"), category);
+    m_Options.AddOption(_("Warn if anything is declared more than once in the same scope"), _T("-Wredundant-decls"), category);
+    m_Options.AddOption(_("Warn about unitialized variables which are initialized with themselves"), _T("-Winit-self"), category);
+    m_Options.AddOption(_("Warn whenever a local variable shadows another local variable, parameter or global variable or whenever a built-in function is shadowed"), _T("-Wshadow"), category);
+
+    // optimization
+    category = _("Optimization");
+    m_Options.AddOption(_("Strip all symbols from binary (minimizes size)"), _T(""), category, _T("-s"), true, _T("-g -ggdb"), _("Stripping the binary will strip debugging symbols as well!"));
+    m_Options.AddOption(_("Optimize generated code (for speed)"), _T("-O"), category);
+    m_Options.AddOption(_("Optimize more (for speed)"), _T("-O1"), category);
+    m_Options.AddOption(_("Optimize even more (for speed)"), _T("-O2"), category);
+    m_Options.AddOption(_("Optimize fully (for speed)"), _T("-O3"), category);
+    m_Options.AddOption(_("Optimize generated code (for size)"), _T("-Os"), category);
+    m_Options.AddOption(_("Expensive optimizations"), _T("-fexpensive-optimizations"), category);
+    m_Options.AddOption(_("Don't keep the frame pointer in a register for functions that don't need one"), _T("-fomit-frame-pointer"), category);
+    // machine dependent options - cpu arch
+    category = _("ARM CPU architecture specific");
+    m_Options.AddOption(_("-mapcs-frame"), _T("-mapcs-frame"), category);
+    m_Options.AddOption(_("-mno-apcs-frame"), _T("-mno-apcs-frame"), category);
+    m_Options.AddOption(_("-mabi=NAME"), _T("-mabi=NAME"), category);
+    m_Options.AddOption(_("-mapcs-stack-check"), _T("-mapcs-stack-check"), category);
+    m_Options.AddOption(_("-mno-apcs-stack-check"), _T("-mno-apcs-stack-check"), category);
+    m_Options.AddOption(_("-mapcs-float"), _T("-mapcs-float"), category);
+    m_Options.AddOption(_("-mno-apcs-float"), _T("-mno-apcs-float"), category);
+    m_Options.AddOption(_("-mapcs-reentrant"), _T("-mapcs-reentrant"), category);
+    m_Options.AddOption(_("-mno-apcs-reentrant"), _T("-mno-apcs-reentrant"), category);
+    m_Options.AddOption(_("-msched-prolog"), _T("-msched-prolog"), category);
+    m_Options.AddOption(_("-mno-sched-prolog"), _T("-mno-sched-prolog"), category);
+    m_Options.AddOption(_("-mlittle-endian"), _T("-mlittle-endian"), category);
+    m_Options.AddOption(_("-mbig-endian"), _T("-mbig-endian"), category);
+    m_Options.AddOption(_("-mwords-little-endian"), _T("-mwords-little-endian"), category);
+    m_Options.AddOption(_("-mfloat-abi=NAME"), _T("-mfloat-abi=NAME"), category);
+    m_Options.AddOption(_("-msoft-float"), _T("-msoft-float"), category);
+    m_Options.AddOption(_("-mhard-float"), _T("-mhard-float"), category);
+    m_Options.AddOption(_("-mfpe"), _T("-mfpe"), category);
+    m_Options.AddOption(_("-mthumb-interwork"), _T("-mthumb-interwork"), category);
+    m_Options.AddOption(_("-mno-thumb-interwork"), _T("-mno-thumb-interwork"), category);
+    m_Options.AddOption(_("-mcpu=NAME"), _T("-mcpu=NAME"), category);
+    m_Options.AddOption(_("-march=NAME"), _T("-march=NAME"), category);
+    m_Options.AddOption(_("-mfpu=NAME"), _T("-mfpu=NAME"), category);
+    m_Options.AddOption(_("-mstructure-size-boundary=N"), _T("-mstructure-size-boundary=N"), category);
+    m_Options.AddOption(_("-mabort-on-noreturn"), _T("-mabort-on-noreturn"), category);
+    m_Options.AddOption(_("-mlong-calls"), _T("-mlong-calls"), category);
+    m_Options.AddOption(_("-mno-long-calls"), _T("-mno-long-calls"), category);
+    m_Options.AddOption(_("-msingle-pic-base"), _T("-msingle-pic-base"), category);
+    m_Options.AddOption(_("-mno-single-pic-base"), _T("-mno-single-pic-base"), category);
+    m_Options.AddOption(_("-mpic-register=REG"), _T("-mpic-register=REG"), category);
+    m_Options.AddOption(_("-mnop-fun-dllimport"), _T("-mnop-fun-dllimport"), category);
+    m_Options.AddOption(_("-mcirrus-fix-invalid-insns"), _T("-mcirrus-fix-invalid-insns"), category);
+    m_Options.AddOption(_("-mno-cirrus-fix-invalid-insns"), _T("-mno-cirrus-fix-invalid-insns"), category);
+    m_Options.AddOption(_("-mpoke-function-name"), _T("-mpoke-function-name"), category);
+    m_Options.AddOption(_("-mthumb"), _T("-mthumb"), category);
+    m_Options.AddOption(_("-marm"), _T("-marm"), category);
+    m_Options.AddOption(_("-mtpcs-frame"), _T("-mtpcs-frame"), category);
+    m_Options.AddOption(_("-mtpcs-leaf-frame"), _T("-mtpcs-leaf-frame"), category);
+    m_Options.AddOption(_("-mcaller-super-interworking"), _T("-mcaller-super-interworking"), category);
+    m_Options.AddOption(_("-mcallee-super-interworking"), _T("-mcallee-super-interworking"), category);
+
+    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
+    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
+    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("$rescomp -i $file -J rc -o $resource_output -O coff $res_includes")));
+    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
+    if (platform::windows)
+    {
+        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    else
+    {
+        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -r -s $static_output $link_objects")));
+    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
+
+    LoadDefaultRegExArray();
+
+    m_CompilerOptions.Clear();
+    m_LinkerOptions.Clear();
+    m_LinkLibs.Clear();
+    m_CmdsBefore.Clear();
+    m_CmdsAfter.Clear();
+} // end of Reset
+
+void CompilerGNUARM::LoadDefaultRegExArray()
+{
+    m_RegExes.Clear();
+    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("'In function...' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):[ \t]+") + _T("([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("'Instantiated from' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]+([iI]nstantiated from .*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler note"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Nn]ote:[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("General note"), cltInfo, _T("([Nn]ote:[ \t].*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
+}
+
+AutoDetectResult CompilerGNUARM::AutoDetectInstallationDir()
+{
+    wxString sep = wxFileName::GetPathSeparator();
+    if (platform::windows)
+    {
+        // Search for GNUARM installation dir
+        wxString windir = wxGetOSDirectory();
+        wxFileConfig ini(_T(""), _T(""), windir + _T("/GnuARM.ini"), _T(""), wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_NO_ESCAPE_CHARACTERS);
+        // need it as const , so correct overloaded method will be selected
+        wxString Programs = _T("C:\\Program Files");
+        // what's the "Program Files" location
+        // TO DO : support 64 bit ->    32 bit apps are in "ProgramFiles(x86)"
+        //                              64 bit apps are in "ProgramFiles"
+        wxGetEnv(_T("ProgramFiles"), &Programs);
+        // need it as const , so correct overloaded method will be selected
+        const wxString ProgramsConst = Programs + _T("\\GNUARM");
+        m_MasterPath = ini.Read(_T("/InstallSettings/InstallPath"), ProgramsConst);
+
+        if (wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C))
+        {
+            m_Programs.MAKE = _T("make.exe"); // we distribute "make" not "mingw32-make"
+        }
+    }
+    else
+        m_MasterPath = _T("/usr");
+
+    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
+    if (ret == adrDetected)
+    {
+        AddIncludeDir(m_MasterPath + sep + _T("include"));
+        AddLibDir(m_MasterPath + sep + _T("lib"));
+    }
+    return ret;
+} // end of AutoDetectInstallationDir

Property changes on: src\plugins\compilergcc\compilerGNUARM.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerGNUARM.h
===================================================================
--- src/plugins/compilergcc/compilerGNUARM.h	(revision 5730)
+++ src/plugins/compilergcc/compilerGNUARM.h	(working copy)
@@ -1,24 +1,24 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- */
-
-#ifndef COMPILER_GNUARM_H
-#define COMPILER_GNUARM_H
-
-#include "compiler.h"
-
-class CompilerGNUARM : public Compiler
-{
-    public:
-        CompilerGNUARM();
-        virtual ~CompilerGNUARM();
-        virtual void Reset();
-        virtual void LoadDefaultRegExArray();
-        virtual AutoDetectResult AutoDetectInstallationDir();
-    protected:
-        virtual Compiler* CreateCopy();
-    private:
-};
-
-#endif // COMPILER_GNUARM_H
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ */
+
+#ifndef COMPILER_GNUARM_H
+#define COMPILER_GNUARM_H
+
+#include "compiler.h"
+
+class CompilerGNUARM : public Compiler
+{
+    public:
+        CompilerGNUARM();
+        virtual ~CompilerGNUARM();
+        virtual void Reset();
+        virtual void LoadDefaultRegExArray();
+        virtual AutoDetectResult AutoDetectInstallationDir();
+    protected:
+        virtual Compiler* CreateCopy();
+    private:
+};
+
+#endif // COMPILER_GNUARM_H

Property changes on: src\plugins\compilergcc\compilerGNUARM.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerGNUAVR.cpp
===================================================================
--- src/plugins/compilergcc/compilerGNUAVR.cpp	(revision 5730)
+++ src/plugins/compilergcc/compilerGNUAVR.cpp	(working copy)
@@ -1,289 +1,289 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#include <sdk.h>
-#include <prep.h>
-#ifndef CB_PRECOMP
-    #include <wx/intl.h>
-    #include <wx/regex.h>
-#endif
-#include "compilerGNUAVR.h"
-
-CompilerGNUAVR::CompilerGNUAVR()
-    : Compiler(_("GNU AVR GCC Compiler"),_T("avr-gcc"))
-{
-    Reset();
-}
-
-CompilerGNUAVR::~CompilerGNUAVR()
-{
-    //dtor
-}
-
-Compiler * CompilerGNUAVR::CreateCopy()
-{
-    Compiler* c = new CompilerGNUAVR(*this);
-    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
-    return c;
-} // end of CreateCopy
-
-void CompilerGNUAVR::Reset()
-{
-    if (platform::windows)
-    {
-        m_Programs.C = _T("avr-gcc.exe");
-        m_Programs.CPP = _T("avr-g++.exe");
-        m_Programs.LD = _T("avr-g++.exe");
-        m_Programs.DBG = _T("avr-gdb.exe");
-        m_Programs.LIB = _T("avr-ar.exe");
-        m_Programs.WINDRES = _T("");
-        m_Programs.MAKE = _T("make.exe");
-    }
-    else
-    {
-        m_Programs.C = _T("avr-gcc");
-        m_Programs.CPP = _T("avr-g++");
-        m_Programs.LD = _T("avr-g++");
-        m_Programs.DBG = _T("avr-gdb");
-        m_Programs.LIB = _T("avr-ar");
-        m_Programs.WINDRES = _T("");
-        m_Programs.MAKE = _T("make");
-    }
-    m_Switches.includeDirs = _T("-I");
-    m_Switches.libDirs = _T("-L");
-    m_Switches.linkLibs = _T("-l");
-    m_Switches.defines = _T("-D");
-    m_Switches.genericSwitch = _T("-");
-    m_Switches.objectExtension = _T("o");
-    m_Switches.needDependencies = true;
-    m_Switches.forceCompilerUseQuotes = false;
-    m_Switches.forceLinkerUseQuotes = false;
-    m_Switches.logging = clogSimple;
-    m_Switches.libPrefix = _T("lib");
-    m_Switches.libExtension = _T("a");
-    m_Switches.linkerNeedsLibPrefix = false;
-    m_Switches.linkerNeedsLibExtension = false;
-
-    // Summary of GCC options: http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
-
-    m_Options.ClearOptions();
-    m_Options.AddOption(_("Produce debugging symbols"),
-                _T("-g"),
-                _("Debugging"),
-                _T(""),
-                true,
-                _T("-O -O1 -O2 -O3 -Os"),
-                _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
-
-    wxString gprof_link = _T("-pg");
-    if (platform::windows)
-        gprof_link = _T("-pg -lgmon");
-    m_Options.AddOption(_("Profile code when executed"), _T("-pg"), _("Profiling"), gprof_link);
-
-    wxString category = _("Warnings");
-
-    // warnings
-    m_Options.AddOption(_("In C mode, support all ISO C90 programs. In C++ mode, remove GNU extensions that conflict with ISO C++"), _T("-ansi"), category);
-    m_Options.AddOption(_("Enable all compiler warnings (overrides every other setting)"), _T("-Wall"), category);
-    m_Options.AddOption(_("Enable standard compiler warnings"), _T("-W"), category);
-    m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
-    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
-    m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
-    m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
-    m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
-    // optimization
-    category = _("Optimization");
-    m_Options.AddOption(_("Strip all symbols from binary (minimizes size)"), _T(""), category, _T("-s"), true, _T("-g -ggdb"), _("Stripping the binary will strip debugging symbols as well!"));
-    m_Options.AddOption(_("Optimize generated code (for speed)"), _T("-O"), category);
-    m_Options.AddOption(_("Optimize more (for speed)"), _T("-O1"), category);
-    m_Options.AddOption(_("Optimize even more (for speed)"), _T("-O2"), category);
-    m_Options.AddOption(_("Optimize fully (for speed)"), _T("-O3"), category);
-    m_Options.AddOption(_("Optimize generated code (for size)"), _T("-Os"), category);
-    m_Options.AddOption(_("Expensive optimizations"), _T("-fexpensive-optimizations"), category);
-    // machine dependent options - cpu arch
-    category = _("AVR CPU architecture specific");
-    m_Options.AddOption(_("AVR 1 architecture (only assembler)"), _T("-mmcu=avr1"), category);
-    m_Options.AddOption(_("AT90S1200 (only assembler)"), _T("-mmcu=at90s1200"), category);
-    m_Options.AddOption(_("ATtiny11 (only assembler)"), _T("-mmcu=attiny11"), category);
-    m_Options.AddOption(_("ATtiny12 (only assembler)"), _T("-mmcu=attiny12"), category);
-    m_Options.AddOption(_("ATtiny15 (only assembler)"), _T("-mmcu=attiny15"), category);
-    m_Options.AddOption(_("ATtiny28 (only assembler)"), _T("-mmcu=attiny28"), category);
-    m_Options.AddOption(_("AVR 2 archtecture"), _T("-mmcu=avr2"), category);
-    m_Options.AddOption(_("AT90S2313"), _T("-mmcu=at90s2313"), category);
-    m_Options.AddOption(_("AT90S2323"), _T("-mmcu=at90s2323"), category);
-    m_Options.AddOption(_("AT90S2333"), _T("-mmcu=at90s2333"), category);
-    m_Options.AddOption(_("AT90S2343"), _T("-mmcu=at90s2343"), category);
-    m_Options.AddOption(_("ATtiny22"), _T("-mmcu=attiny22"), category);
-    m_Options.AddOption(_("ATtiny26"), _T("-mmcu=attiny26"), category);
-    m_Options.AddOption(_("AT90S4414"), _T("-mmcu=at90s4414"), category);
-    m_Options.AddOption(_("AT90S4433"), _T("-mmcu=at90s4433"), category);
-    m_Options.AddOption(_("AT90S4434"), _T("-mmcu=at90s4434"), category);
-    m_Options.AddOption(_("AT90S8515"), _T("-mmcu=at90s8515"), category);
-    m_Options.AddOption(_("AT90C8534"), _T("-mmcu=at90c8534"), category);
-    m_Options.AddOption(_("AT90s8535"), _T("-mmcu=at90s8535"), category);
-    m_Options.AddOption(_("AVR 2.5 architecture"), _T("-mmcu=avr25"), category);
-    m_Options.AddOption(_("ATtiny13"), _T("-mmcu=attiny13"), category);
-    m_Options.AddOption(_("ATtiny2313"), _T("-mmcu=attiny2313"), category);
-    m_Options.AddOption(_("ATtiny24"), _T("-mmcu=attiny24"), category);
-    m_Options.AddOption(_("ATtiny44"), _T("-mmcu=attiny44"), category);
-    m_Options.AddOption(_("ATtiny84"), _T("-mmcu=attiny84"), category);
-    m_Options.AddOption(_("ATtiny25"), _T("-mmcu=attiny25"), category);
-    m_Options.AddOption(_("ATtiny45"), _T("-mmcu=attiny45"), category);
-    m_Options.AddOption(_("ATtiny85"), _T("-mmcu=attiny85"), category);
-    m_Options.AddOption(_("ATtiny261"), _T("-mmcu=attiny261"), category);
-    m_Options.AddOption(_("ATtiny461"), _T("-mmcu=attiny461"), category);
-    m_Options.AddOption(_("ATtiny861"), _T("-mmcu=attiny861"), category);
-    m_Options.AddOption(_("AT86RF401"), _T("-mmcu=at86rf401"), category);
-    m_Options.AddOption(_("AVR 3 architecture"), _T("-mmcu=avr3"), category);
-    m_Options.AddOption(_("ATmega103"), _T("-mmcu=atmega103"), category);
-    m_Options.AddOption(_("ATmega603"), _T("-mmcu=atmega603"), category);
-    m_Options.AddOption(_("AT43USB320"), _T("-mmcu=at43usb320"), category);
-    m_Options.AddOption(_("AT43USB355"), _T("-mmcu=at43usb355"), category);
-    m_Options.AddOption(_("AT76C711"), _T("-mmcu=at76c711"), category);
-    m_Options.AddOption(_("AVR 4 architecture"), _T("-mmcu=avr4"), category);
-    m_Options.AddOption(_("ATmega8"), _T("-mmcu=atmega8"), category);
-    m_Options.AddOption(_("ATmega48"), _T("-mmcu=atmega48"), category);
-    m_Options.AddOption(_("ATmega88"), _T("-mmcu=atmega88"), category);
-    m_Options.AddOption(_("ATmega8515"), _T("-mmcu=atmega8515"), category);
-    m_Options.AddOption(_("ATmega8535"), _T("-mmcu=atmega8535"), category);
-    m_Options.AddOption(_("ATmega8HVA"), _T("-mmcu=atmega8hva"), category);
-    m_Options.AddOption(_("AT90PWM1"), _T("-mmcu=at90pwm1"), category);
-    m_Options.AddOption(_("AT90PWM2"), _T("-mmcu=at90pwm2"), category);
-    m_Options.AddOption(_("AT90PWM3"), _T("-mmcu=at90pwm3"), category);
-    m_Options.AddOption(_("AVR 5 architecture"), _T("-mmcu=avr5"), category);
-    m_Options.AddOption(_("ATmega16"), _T("-mmcu=atmega16"), category);
-    m_Options.AddOption(_("ATmega161"), _T("-mmcu=atmega161"), category);
-    m_Options.AddOption(_("ATmega163"), _T("-mmcu=atmega163"), category);
-    m_Options.AddOption(_("ATmega164P"), _T("-mmcu=atmega164p"), category);
-    m_Options.AddOption(_("ATmega165"), _T("-mmcu=atmega165"), category);
-    m_Options.AddOption(_("ATmega165P"), _T("-mmcu=atmega165p"), category);
-    m_Options.AddOption(_("ATmega168"), _T("-mmcu=atmega168"), category);
-    m_Options.AddOption(_("ATmega169"), _T("-mmcu=atmega169"), category);
-    m_Options.AddOption(_("ATmega169P"), _T("-mmcu=atmega169p"), category);
-    m_Options.AddOption(_("ATmega32"), _T("-mmcu=atmega32"), category);
-    m_Options.AddOption(_("ATmega323"), _T("-mmcu=atmega323"), category);
-    m_Options.AddOption(_("ATmega324P"), _T("-mmcu=atmega324p"), category);
-    m_Options.AddOption(_("ATmega325"), _T("-mmcu=atmega325"), category);
-    m_Options.AddOption(_("ATmega325P"), _T("-mmcu=atmega325p"), category);
-    m_Options.AddOption(_("ATmega3250"), _T("-mmcu=atmega3250"), category);
-    m_Options.AddOption(_("ATmega3250P"), _T("-mmcu=atmega3250p"), category);
-    m_Options.AddOption(_("ATmega329"), _T("-mmcu=atmega329"), category);
-    m_Options.AddOption(_("ATmega329P"), _T("-mmcu=atmega329p"), category);
-    m_Options.AddOption(_("ATmega3290"), _T("-mmcu=atmega3290"), category);
-    m_Options.AddOption(_("ATmega3290P"), _T("-mmcu=atmega3290p"), category);
-    m_Options.AddOption(_("ATmega406"), _T("-mmcu=atmega406"), category);
-    m_Options.AddOption(_("ATmega64"), _T("-mmcu=atmega64"), category);
-    m_Options.AddOption(_("ATmega640"), _T("-mmcu=atmega640"), category);
-    m_Options.AddOption(_("ATmega644"), _T("-mmcu=atmega644"), category);
-    m_Options.AddOption(_("ATmega644P"), _T("-mmcu=atmega644p"), category);
-    m_Options.AddOption(_("ATmega645"), _T("-mmcu=atmega645"), category);
-    m_Options.AddOption(_("ATmega6450"), _T("-mmcu=atmega6450"), category);
-    m_Options.AddOption(_("ATmega649"), _T("-mmcu=atmega649"), category);
-    m_Options.AddOption(_("ATmega6490"), _T("-mmcu=atmega6490"), category);
-    m_Options.AddOption(_("ATmega128"), _T("-mmcu=atmega128"), category);
-    m_Options.AddOption(_("ATmega1280"), _T("-mmcu=atmega1280"), category);
-    m_Options.AddOption(_("ATmega1281"), _T("-mmcu=atmega1281"), category);
-    m_Options.AddOption(_("ATmega16HVA"), _T("-mmcu=atmega16hva"), category);
-    m_Options.AddOption(_("AT90CAN32"), _T("-mmcu=at90can32"), category);
-    m_Options.AddOption(_("AT90CAN64"), _T("-mmcu=at90can64"), category);
-    m_Options.AddOption(_("AT90CAN128"), _T("-mmcu=at90can128"), category);
-    m_Options.AddOption(_("AT90USB82"), _T("-mmcu=at90usb82"), category);
-    m_Options.AddOption(_("AT90USB162"), _T("-mmcu=at90usb162"), category);
-    m_Options.AddOption(_("AT90USB646"), _T("-mmcu=at90usb646"), category);
-    m_Options.AddOption(_("AT90USB647"), _T("-mmcu=at90usb647"), category);
-    m_Options.AddOption(_("AT90USB1286"), _T("-mmcu=at90usb1286"), category);
-    m_Options.AddOption(_("AT90USB1287"), _T("-mmcu=at90usb1287"), category);
-    m_Options.AddOption(_("AT94K"), _T("-mmcu=at94k"), category);
-    m_Options.AddOption(_("Output instruction sizes to the asm file"), _T("-msize"), category);
-    m_Options.AddOption(_("Initial stack address"), _T("-minit-stack=N"), category);
-    m_Options.AddOption(_("Disable interrupts"), _T("-mno-interrupts"), category);
-    m_Options.AddOption(_("Expand functions prologues/epilogues"), _T("-mcall-prologues"), category);
-    m_Options.AddOption(_("Disable tablejump instructions"), _T("-mno-tablejump"), category);
-    m_Options.AddOption(_("8 bits stack pointer"), _T("-mtiny-stack"), category);
-    m_Options.AddOption(_("int as 8 bit integer"), _T("-mint8"), category);
-
-    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
-    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
-    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("$rescomp -i $file -J rc -o $resource_output -O coff $res_includes")));
-    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
-    if (platform::windows)
-    {
-        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    else
-    {
-        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -r -s $static_output $link_objects")));
-    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
-
-    LoadDefaultRegExArray();
-
-    m_CompilerOptions.Clear();
-    m_LinkerOptions.Clear();
-    m_LinkLibs.Clear();
-    m_CmdsBefore.Clear();
-    m_CmdsAfter.Clear();
-} // end of Reset
-
-void CompilerGNUAVR::LoadDefaultRegExArray()
-{
-    m_RegExes.Clear();
-    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("'In function...' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):[ \t]+") + _T("([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("'Instantiated from' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]+([iI]nstantiated from .*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler note"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Nn]ote:[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("General note"), cltInfo, _T("([Nn]ote:[ \t].*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
-} // end of LoadDefaultRegExArray
-
-AutoDetectResult CompilerGNUAVR::AutoDetectInstallationDir()
-{
-    wxString sep = wxFileName::GetPathSeparator();
-    if (platform::windows)
-    {
-        m_MasterPath = wxFindFirstFile(_T("C:\\WinAVR*"), wxDIR);
-        if (m_MasterPath.empty())
-        {
-            m_MasterPath = _T("C:\\WinAVR");
-        }
-    }
-    else
-        m_MasterPath = _T("/usr");
-
-    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
-    if (ret == adrDetected)
-    {
-        if (platform::windows)
-        {
-            AddIncludeDir(m_MasterPath + sep + _T("avr\\include"));
-            AddLibDir(m_MasterPath + sep + _T("avr\\lib"));
-            m_ExtraPaths.Add(m_MasterPath + sep + _T("utils") + sep + _T("bin")); // for make
-        }
-        else
-        {
-            AddIncludeDir(m_MasterPath + sep + _T("include"));
-            AddLibDir(m_MasterPath + sep + _T("lib"));
-        }
-    }
-    return ret;
-} // end of AutoDetectInstallationDir
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include <sdk.h>
+#include <prep.h>
+#ifndef CB_PRECOMP
+    #include <wx/intl.h>
+    #include <wx/regex.h>
+#endif
+#include "compilerGNUAVR.h"
+
+CompilerGNUAVR::CompilerGNUAVR()
+    : Compiler(_("GNU AVR GCC Compiler"),_T("avr-gcc"))
+{
+    Reset();
+}
+
+CompilerGNUAVR::~CompilerGNUAVR()
+{
+    //dtor
+}
+
+Compiler * CompilerGNUAVR::CreateCopy()
+{
+    Compiler* c = new CompilerGNUAVR(*this);
+    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
+    return c;
+} // end of CreateCopy
+
+void CompilerGNUAVR::Reset()
+{
+    if (platform::windows)
+    {
+        m_Programs.C = _T("avr-gcc.exe");
+        m_Programs.CPP = _T("avr-g++.exe");
+        m_Programs.LD = _T("avr-g++.exe");
+        m_Programs.DBG = _T("avr-gdb.exe");
+        m_Programs.LIB = _T("avr-ar.exe");
+        m_Programs.WINDRES = _T("");
+        m_Programs.MAKE = _T("make.exe");
+    }
+    else
+    {
+        m_Programs.C = _T("avr-gcc");
+        m_Programs.CPP = _T("avr-g++");
+        m_Programs.LD = _T("avr-g++");
+        m_Programs.DBG = _T("avr-gdb");
+        m_Programs.LIB = _T("avr-ar");
+        m_Programs.WINDRES = _T("");
+        m_Programs.MAKE = _T("make");
+    }
+    m_Switches.includeDirs = _T("-I");
+    m_Switches.libDirs = _T("-L");
+    m_Switches.linkLibs = _T("-l");
+    m_Switches.defines = _T("-D");
+    m_Switches.genericSwitch = _T("-");
+    m_Switches.objectExtension = _T("o");
+    m_Switches.needDependencies = true;
+    m_Switches.forceCompilerUseQuotes = false;
+    m_Switches.forceLinkerUseQuotes = false;
+    m_Switches.logging = clogSimple;
+    m_Switches.libPrefix = _T("lib");
+    m_Switches.libExtension = _T("a");
+    m_Switches.linkerNeedsLibPrefix = false;
+    m_Switches.linkerNeedsLibExtension = false;
+
+    // Summary of GCC options: http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
+
+    m_Options.ClearOptions();
+    m_Options.AddOption(_("Produce debugging symbols"),
+                _T("-g"),
+                _("Debugging"),
+                _T(""),
+                true,
+                _T("-O -O1 -O2 -O3 -Os"),
+                _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
+
+    wxString gprof_link = _T("-pg");
+    if (platform::windows)
+        gprof_link = _T("-pg -lgmon");
+    m_Options.AddOption(_("Profile code when executed"), _T("-pg"), _("Profiling"), gprof_link);
+
+    wxString category = _("Warnings");
+
+    // warnings
+    m_Options.AddOption(_("In C mode, support all ISO C90 programs. In C++ mode, remove GNU extensions that conflict with ISO C++"), _T("-ansi"), category);
+    m_Options.AddOption(_("Enable all compiler warnings (overrides every other setting)"), _T("-Wall"), category);
+    m_Options.AddOption(_("Enable standard compiler warnings"), _T("-W"), category);
+    m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
+    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
+    m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
+    m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
+    m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
+    // optimization
+    category = _("Optimization");
+    m_Options.AddOption(_("Strip all symbols from binary (minimizes size)"), _T(""), category, _T("-s"), true, _T("-g -ggdb"), _("Stripping the binary will strip debugging symbols as well!"));
+    m_Options.AddOption(_("Optimize generated code (for speed)"), _T("-O"), category);
+    m_Options.AddOption(_("Optimize more (for speed)"), _T("-O1"), category);
+    m_Options.AddOption(_("Optimize even more (for speed)"), _T("-O2"), category);
+    m_Options.AddOption(_("Optimize fully (for speed)"), _T("-O3"), category);
+    m_Options.AddOption(_("Optimize generated code (for size)"), _T("-Os"), category);
+    m_Options.AddOption(_("Expensive optimizations"), _T("-fexpensive-optimizations"), category);
+    // machine dependent options - cpu arch
+    category = _("AVR CPU architecture specific");
+    m_Options.AddOption(_("AVR 1 architecture (only assembler)"), _T("-mmcu=avr1"), category);
+    m_Options.AddOption(_("AT90S1200 (only assembler)"), _T("-mmcu=at90s1200"), category);
+    m_Options.AddOption(_("ATtiny11 (only assembler)"), _T("-mmcu=attiny11"), category);
+    m_Options.AddOption(_("ATtiny12 (only assembler)"), _T("-mmcu=attiny12"), category);
+    m_Options.AddOption(_("ATtiny15 (only assembler)"), _T("-mmcu=attiny15"), category);
+    m_Options.AddOption(_("ATtiny28 (only assembler)"), _T("-mmcu=attiny28"), category);
+    m_Options.AddOption(_("AVR 2 archtecture"), _T("-mmcu=avr2"), category);
+    m_Options.AddOption(_("AT90S2313"), _T("-mmcu=at90s2313"), category);
+    m_Options.AddOption(_("AT90S2323"), _T("-mmcu=at90s2323"), category);
+    m_Options.AddOption(_("AT90S2333"), _T("-mmcu=at90s2333"), category);
+    m_Options.AddOption(_("AT90S2343"), _T("-mmcu=at90s2343"), category);
+    m_Options.AddOption(_("ATtiny22"), _T("-mmcu=attiny22"), category);
+    m_Options.AddOption(_("ATtiny26"), _T("-mmcu=attiny26"), category);
+    m_Options.AddOption(_("AT90S4414"), _T("-mmcu=at90s4414"), category);
+    m_Options.AddOption(_("AT90S4433"), _T("-mmcu=at90s4433"), category);
+    m_Options.AddOption(_("AT90S4434"), _T("-mmcu=at90s4434"), category);
+    m_Options.AddOption(_("AT90S8515"), _T("-mmcu=at90s8515"), category);
+    m_Options.AddOption(_("AT90C8534"), _T("-mmcu=at90c8534"), category);
+    m_Options.AddOption(_("AT90s8535"), _T("-mmcu=at90s8535"), category);
+    m_Options.AddOption(_("AVR 2.5 architecture"), _T("-mmcu=avr25"), category);
+    m_Options.AddOption(_("ATtiny13"), _T("-mmcu=attiny13"), category);
+    m_Options.AddOption(_("ATtiny2313"), _T("-mmcu=attiny2313"), category);
+    m_Options.AddOption(_("ATtiny24"), _T("-mmcu=attiny24"), category);
+    m_Options.AddOption(_("ATtiny44"), _T("-mmcu=attiny44"), category);
+    m_Options.AddOption(_("ATtiny84"), _T("-mmcu=attiny84"), category);
+    m_Options.AddOption(_("ATtiny25"), _T("-mmcu=attiny25"), category);
+    m_Options.AddOption(_("ATtiny45"), _T("-mmcu=attiny45"), category);
+    m_Options.AddOption(_("ATtiny85"), _T("-mmcu=attiny85"), category);
+    m_Options.AddOption(_("ATtiny261"), _T("-mmcu=attiny261"), category);
+    m_Options.AddOption(_("ATtiny461"), _T("-mmcu=attiny461"), category);
+    m_Options.AddOption(_("ATtiny861"), _T("-mmcu=attiny861"), category);
+    m_Options.AddOption(_("AT86RF401"), _T("-mmcu=at86rf401"), category);
+    m_Options.AddOption(_("AVR 3 architecture"), _T("-mmcu=avr3"), category);
+    m_Options.AddOption(_("ATmega103"), _T("-mmcu=atmega103"), category);
+    m_Options.AddOption(_("ATmega603"), _T("-mmcu=atmega603"), category);
+    m_Options.AddOption(_("AT43USB320"), _T("-mmcu=at43usb320"), category);
+    m_Options.AddOption(_("AT43USB355"), _T("-mmcu=at43usb355"), category);
+    m_Options.AddOption(_("AT76C711"), _T("-mmcu=at76c711"), category);
+    m_Options.AddOption(_("AVR 4 architecture"), _T("-mmcu=avr4"), category);
+    m_Options.AddOption(_("ATmega8"), _T("-mmcu=atmega8"), category);
+    m_Options.AddOption(_("ATmega48"), _T("-mmcu=atmega48"), category);
+    m_Options.AddOption(_("ATmega88"), _T("-mmcu=atmega88"), category);
+    m_Options.AddOption(_("ATmega8515"), _T("-mmcu=atmega8515"), category);
+    m_Options.AddOption(_("ATmega8535"), _T("-mmcu=atmega8535"), category);
+    m_Options.AddOption(_("ATmega8HVA"), _T("-mmcu=atmega8hva"), category);
+    m_Options.AddOption(_("AT90PWM1"), _T("-mmcu=at90pwm1"), category);
+    m_Options.AddOption(_("AT90PWM2"), _T("-mmcu=at90pwm2"), category);
+    m_Options.AddOption(_("AT90PWM3"), _T("-mmcu=at90pwm3"), category);
+    m_Options.AddOption(_("AVR 5 architecture"), _T("-mmcu=avr5"), category);
+    m_Options.AddOption(_("ATmega16"), _T("-mmcu=atmega16"), category);
+    m_Options.AddOption(_("ATmega161"), _T("-mmcu=atmega161"), category);
+    m_Options.AddOption(_("ATmega163"), _T("-mmcu=atmega163"), category);
+    m_Options.AddOption(_("ATmega164P"), _T("-mmcu=atmega164p"), category);
+    m_Options.AddOption(_("ATmega165"), _T("-mmcu=atmega165"), category);
+    m_Options.AddOption(_("ATmega165P"), _T("-mmcu=atmega165p"), category);
+    m_Options.AddOption(_("ATmega168"), _T("-mmcu=atmega168"), category);
+    m_Options.AddOption(_("ATmega169"), _T("-mmcu=atmega169"), category);
+    m_Options.AddOption(_("ATmega169P"), _T("-mmcu=atmega169p"), category);
+    m_Options.AddOption(_("ATmega32"), _T("-mmcu=atmega32"), category);
+    m_Options.AddOption(_("ATmega323"), _T("-mmcu=atmega323"), category);
+    m_Options.AddOption(_("ATmega324P"), _T("-mmcu=atmega324p"), category);
+    m_Options.AddOption(_("ATmega325"), _T("-mmcu=atmega325"), category);
+    m_Options.AddOption(_("ATmega325P"), _T("-mmcu=atmega325p"), category);
+    m_Options.AddOption(_("ATmega3250"), _T("-mmcu=atmega3250"), category);
+    m_Options.AddOption(_("ATmega3250P"), _T("-mmcu=atmega3250p"), category);
+    m_Options.AddOption(_("ATmega329"), _T("-mmcu=atmega329"), category);
+    m_Options.AddOption(_("ATmega329P"), _T("-mmcu=atmega329p"), category);
+    m_Options.AddOption(_("ATmega3290"), _T("-mmcu=atmega3290"), category);
+    m_Options.AddOption(_("ATmega3290P"), _T("-mmcu=atmega3290p"), category);
+    m_Options.AddOption(_("ATmega406"), _T("-mmcu=atmega406"), category);
+    m_Options.AddOption(_("ATmega64"), _T("-mmcu=atmega64"), category);
+    m_Options.AddOption(_("ATmega640"), _T("-mmcu=atmega640"), category);
+    m_Options.AddOption(_("ATmega644"), _T("-mmcu=atmega644"), category);
+    m_Options.AddOption(_("ATmega644P"), _T("-mmcu=atmega644p"), category);
+    m_Options.AddOption(_("ATmega645"), _T("-mmcu=atmega645"), category);
+    m_Options.AddOption(_("ATmega6450"), _T("-mmcu=atmega6450"), category);
+    m_Options.AddOption(_("ATmega649"), _T("-mmcu=atmega649"), category);
+    m_Options.AddOption(_("ATmega6490"), _T("-mmcu=atmega6490"), category);
+    m_Options.AddOption(_("ATmega128"), _T("-mmcu=atmega128"), category);
+    m_Options.AddOption(_("ATmega1280"), _T("-mmcu=atmega1280"), category);
+    m_Options.AddOption(_("ATmega1281"), _T("-mmcu=atmega1281"), category);
+    m_Options.AddOption(_("ATmega16HVA"), _T("-mmcu=atmega16hva"), category);
+    m_Options.AddOption(_("AT90CAN32"), _T("-mmcu=at90can32"), category);
+    m_Options.AddOption(_("AT90CAN64"), _T("-mmcu=at90can64"), category);
+    m_Options.AddOption(_("AT90CAN128"), _T("-mmcu=at90can128"), category);
+    m_Options.AddOption(_("AT90USB82"), _T("-mmcu=at90usb82"), category);
+    m_Options.AddOption(_("AT90USB162"), _T("-mmcu=at90usb162"), category);
+    m_Options.AddOption(_("AT90USB646"), _T("-mmcu=at90usb646"), category);
+    m_Options.AddOption(_("AT90USB647"), _T("-mmcu=at90usb647"), category);
+    m_Options.AddOption(_("AT90USB1286"), _T("-mmcu=at90usb1286"), category);
+    m_Options.AddOption(_("AT90USB1287"), _T("-mmcu=at90usb1287"), category);
+    m_Options.AddOption(_("AT94K"), _T("-mmcu=at94k"), category);
+    m_Options.AddOption(_("Output instruction sizes to the asm file"), _T("-msize"), category);
+    m_Options.AddOption(_("Initial stack address"), _T("-minit-stack=N"), category);
+    m_Options.AddOption(_("Disable interrupts"), _T("-mno-interrupts"), category);
+    m_Options.AddOption(_("Expand functions prologues/epilogues"), _T("-mcall-prologues"), category);
+    m_Options.AddOption(_("Disable tablejump instructions"), _T("-mno-tablejump"), category);
+    m_Options.AddOption(_("8 bits stack pointer"), _T("-mtiny-stack"), category);
+    m_Options.AddOption(_("int as 8 bit integer"), _T("-mint8"), category);
+
+    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
+    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
+    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("$rescomp -i $file -J rc -o $resource_output -O coff $res_includes")));
+    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
+    if (platform::windows)
+    {
+        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    else
+    {
+        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -r -s $static_output $link_objects")));
+    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
+
+    LoadDefaultRegExArray();
+
+    m_CompilerOptions.Clear();
+    m_LinkerOptions.Clear();
+    m_LinkLibs.Clear();
+    m_CmdsBefore.Clear();
+    m_CmdsAfter.Clear();
+} // end of Reset
+
+void CompilerGNUAVR::LoadDefaultRegExArray()
+{
+    m_RegExes.Clear();
+    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("'In function...' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):[ \t]+") + _T("([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("'Instantiated from' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]+([iI]nstantiated from .*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler note"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Nn]ote:[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("General note"), cltInfo, _T("([Nn]ote:[ \t].*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
+} // end of LoadDefaultRegExArray
+
+AutoDetectResult CompilerGNUAVR::AutoDetectInstallationDir()
+{
+    wxString sep = wxFileName::GetPathSeparator();
+    if (platform::windows)
+    {
+        m_MasterPath = wxFindFirstFile(_T("C:\\WinAVR*"), wxDIR);
+        if (m_MasterPath.empty())
+        {
+            m_MasterPath = _T("C:\\WinAVR");
+        }
+    }
+    else
+        m_MasterPath = _T("/usr");
+
+    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
+    if (ret == adrDetected)
+    {
+        if (platform::windows)
+        {
+            AddIncludeDir(m_MasterPath + sep + _T("avr\\include"));
+            AddLibDir(m_MasterPath + sep + _T("avr\\lib"));
+            m_ExtraPaths.Add(m_MasterPath + sep + _T("utils") + sep + _T("bin")); // for make
+        }
+        else
+        {
+            AddIncludeDir(m_MasterPath + sep + _T("include"));
+            AddLibDir(m_MasterPath + sep + _T("lib"));
+        }
+    }
+    return ret;
+} // end of AutoDetectInstallationDir

Property changes on: src\plugins\compilergcc\compilerGNUAVR.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerGNUAVR.h
===================================================================
--- src/plugins/compilergcc/compilerGNUAVR.h	(revision 5730)
+++ src/plugins/compilergcc/compilerGNUAVR.h	(working copy)
@@ -1,23 +1,23 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- */
-
-#ifndef COMPILER_GNUAVR_H
-#define COMPILER_GNUAVR_H
-
-#include "compiler.h"
-
-class CompilerGNUAVR : public Compiler
-{
-    public:
-        CompilerGNUAVR();
-        virtual ~CompilerGNUAVR();
-        virtual void Reset();
-        virtual void LoadDefaultRegExArray();
-        virtual AutoDetectResult AutoDetectInstallationDir();
-    protected:
-        virtual Compiler* CreateCopy();
-};
-
-#endif // COMPILER_GNUAVR_H
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ */
+
+#ifndef COMPILER_GNUAVR_H
+#define COMPILER_GNUAVR_H
+
+#include "compiler.h"
+
+class CompilerGNUAVR : public Compiler
+{
+    public:
+        CompilerGNUAVR();
+        virtual ~CompilerGNUAVR();
+        virtual void Reset();
+        virtual void LoadDefaultRegExArray();
+        virtual AutoDetectResult AutoDetectInstallationDir();
+    protected:
+        virtual Compiler* CreateCopy();
+};
+
+#endif // COMPILER_GNUAVR_H

Property changes on: src\plugins\compilergcc\compilerGNUAVR.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerGNUMSP430.cpp
===================================================================
--- src/plugins/compilergcc/compilerGNUMSP430.cpp	(revision 5730)
+++ src/plugins/compilergcc/compilerGNUMSP430.cpp	(working copy)
@@ -1,312 +1,312 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#include <sdk.h>
-#include <prep.h>
-#ifndef CB_PRECOMP
-    #include <wx/intl.h>
-    #include <wx/regex.h>
-    #include <wx/utils.h> // wxGetOSDirectory, wxGetEnv
-#endif
-#include <wx/filefn.h> // wxFileExists
-#include <wx/fileconf.h> // wxFileConfig
-#include <wx/msgdlg.h>
-#ifdef __WXMSW__
-#include <wx/msw/registry.h>
-#endif // __WXMSW__
-#include "compilerGNUMSP430.h"
-
-CompilerGNUMSP430::CompilerGNUMSP430()
-        : Compiler(_("GNU GCC Compiler for MSP430"),_T("msp430-gcc"))
-{
-    Reset();
-}
-
-CompilerGNUMSP430::~CompilerGNUMSP430()
-{
-    //dtor
-}
-
-Compiler * CompilerGNUMSP430::CreateCopy()
-{
-    Compiler* c = new CompilerGNUMSP430(*this);
-    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
-    return c;
-}
-
-void CompilerGNUMSP430::Reset()
-{
-    if (platform::windows)
-    {
-        m_Programs.C = _T("msp430-gcc.exe");
-        m_Programs.CPP = _T("msp430-g++.exe");
-        m_Programs.LD = _T("msp430-g++.exe");
-        m_Programs.DBG = _T("msp430-insight.exe");
-        m_Programs.LIB = _T("msp430-ar.exe");
-        m_Programs.WINDRES = _T("");
-        m_Programs.MAKE = _T("make.exe");
-    }
-    else
-    {
-        m_Programs.C = _T("msp430-gcc");
-        m_Programs.CPP = _T("msp430-g++");
-        m_Programs.LD = _T("msp430-g++");
-        m_Programs.DBG = _T("msp430-insight");
-        m_Programs.LIB = _T("msp430-ar");
-        m_Programs.WINDRES = _T("");
-        m_Programs.MAKE = _T("make");
-    }
-    m_Switches.includeDirs = _T("-I");
-    m_Switches.libDirs = _T("-L");
-    m_Switches.linkLibs = _T("-l");
-    m_Switches.defines = _T("-D");
-    m_Switches.genericSwitch = _T("-");
-    m_Switches.objectExtension = _T("o");
-    m_Switches.needDependencies = true;
-    m_Switches.forceCompilerUseQuotes = false;
-    m_Switches.forceLinkerUseQuotes = false;
-    m_Switches.logging = clogFull;
-    m_Switches.libPrefix = _T("lib");
-    m_Switches.libExtension = _T("a");
-    m_Switches.linkerNeedsLibPrefix = false;
-    m_Switches.linkerNeedsLibExtension = false;
-
-    // Summary of GCC options: http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
-
-    m_Options.ClearOptions();
-    m_Options.AddOption(_("Produce debugging symbols"),
-                        _T("-g"),
-                        _("Debugging"),
-                        _T(""),
-                        true,
-                        _T("-O -O1 -O2 -O3 -Os"),
-                        _("You have optimizations enabled. This will make debugging difficult because variables may be optimized away etc."));
-    wxString gprof_link = _T("-pg");
-    if (platform::windows)
-        gprof_link = _T("-pg -lgmon");
-    m_Options.AddOption(_("Profile code when executed"), _T("-pg"), _("Profiling"), gprof_link);
-
-    wxString category = _("Warnings");
-
-    // warnings
-    m_Options.AddOption(_("In C mode, support all ISO C90 programs. In C++ mode, remove GNU extensions that conflict with ISO C++"), _T("-ansi"), category);
-    m_Options.AddOption(_("Enable all compiler warnings (overrides every other setting)"), _T("-Wall"), category);
-    m_Options.AddOption(_("Enable standard compiler warnings"), _T("-W"), category);
-    m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
-    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
-    m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
-    m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
-    m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
-
-    category = _("General Options");
-
-    // general options
-    m_Options.AddOption(_("Output an error if same variable is declared without extern in different modules"), _T("-fno-common"), category);
-    m_Options.AddOption(_("Save intermediate files in the build directory"), _T("-save-temps"), category);
-
-    // Startup options
-    category = _("Linker and startup code");
-    m_Options.AddOption(_("do not link against the default crt0.o, so you can add your own startup code (MSP430 specific)"), _T("-nocrt0"), category);
-    m_Options.AddOption(_("do not link against standard system startup files"), _T("-nostartfiles"), category);
-    m_Options.AddOption(_("only search library directories explicitly specified on the command line"), _T("-nostdlib"), category);
-
-    // optimization
-    category = _("Optimization");
-    m_Options.AddOption(_("Strip all symbols from binary (minimizes size)"), _T(""), category, _T("-s"), true, _T("-g -ggdb"), _("Stripping the binary will strip debugging symbols as well!"));
-    m_Options.AddOption(_("Optimize generated code (for speed)"), _T("-O"), category);
-    m_Options.AddOption(_("Optimize more (for speed)"), _T("-O1"), category);
-    m_Options.AddOption(_("Optimize even more (for speed)"), _T("-O2"), category);
-    m_Options.AddOption(_("Optimize fully (for speed)"), _T("-O3"), category);
-    m_Options.AddOption(_("Optimize generated code (for size)"), _T("-Os"), category);
-    m_Options.AddOption(_("Expensive optimizations"), _T("-fexpensive-optimizations"), category);
-    m_Options.AddOption(_("No instruction scheduling before reload"), _T("-fno-schedule-insns"), category);
-    m_Options.AddOption(_("No instruction scheduling after reload"), _T("-fno-schedule-insns2"), category);
-
-    // machine dependent options
-    category = _("MSP430 achitecture specific");
-
-    m_Options.AddOption(_("Use subroutine call for function prologue/epilogue when possible"), _T("-msave-prologue"), category);
-    m_Options.AddOption(_("Do not perform volatile workaround for bitwise operations"), _T("-mno-volatile-workaround"), category);
-    m_Options.AddOption(_("No stack init in main()"), _T("-mno-stack-init"), category);
-    m_Options.AddOption(_("Produce IAR assembler syntax"), _T("-mIAR"), category);
-    m_Options.AddOption(_("Assume interrupt routine does not do hardware multiply"), _T("-mnoint-hwmul"), category);
-    m_Options.AddOption(_("Issue inline multiplication code for 32-bit integers"), _T("-minline-hwmul"), category);
-    m_Options.AddOption(_("Disable hardware multiplier"), _T("-mdisable-hwmul"), category);
-    m_Options.AddOption(_("Force hardware multiplier"), _T("-mforce-hwmul"), category);
-    m_Options.AddOption(_("Strict alignment for all structures"), _T("-mstrict-align"), category);
-    m_Options.AddOption(_("Add stack information to profiler"), _T("-mpgr"), category);
-    m_Options.AddOption(_("Add library profile information"), _T("-mpgl"), category);
-    m_Options.AddOption(_("Add ordinary profile information"), _T("-mpgs"), category);
-    m_Options.AddOption(_("Jump to specified routine at the end of main()"), _T("-mendup-at="), category);
-    m_Options.AddOption(_("Specify the initial stack address"), _T("-minit-stack="), category);
-    m_Options.AddOption(_("enable relaxation at assembly time"), _T("-mQ"), category);
-    m_Options.AddOption(_("enable polymorph instructions"), _T("-mP"), category);
-
-    // machine dependent options
-    category = _("MSP430 MCU derivatives");
-
-    m_Options.AddOption(_("MSP430 MSP1"), _T("-mmcu=msp1"), category);
-    m_Options.AddOption(_("MSP430 MSP2"), _T("-mmcu=msp2"), category);
-    m_Options.AddOption(_("MSP430 110"), _T("-mmcu=msp430x110"), category);
-    m_Options.AddOption(_("MSP430 112"), _T("-mmcu=msp430x112"), category);
-    m_Options.AddOption(_("MSP430 1101"), _T("-mmcu=msp430x1101"), category);
-    m_Options.AddOption(_("MSP430 1111"), _T("-mmcu=msp430x1111"), category);
-    m_Options.AddOption(_("MSP430 1121"), _T("-mmcu=msp430x1121"), category);
-    m_Options.AddOption(_("MSP430 1122"), _T("-mmcu=msp430x1122"), category);
-    m_Options.AddOption(_("MSP430 1132"), _T("-mmcu=msp430x1132"), category);
-    m_Options.AddOption(_("MSP430 122"), _T("-mmcu=msp430x122"), category);
-    m_Options.AddOption(_("MSP430 123"), _T("-mmcu=msp430x123"), category);
-    m_Options.AddOption(_("MSP430 1222"), _T("-mmcu=msp430x1222"), category);
-    m_Options.AddOption(_("MSP430 1232"), _T("-mmcu=msp430x1232"), category);
-    m_Options.AddOption(_("MSP430 133"), _T("-mmcu=msp430x133"), category);
-    m_Options.AddOption(_("MSP430 135"), _T("-mmcu=msp430x135"), category);
-    m_Options.AddOption(_("MSP430 1331"), _T("-mmcu=msp430x1331"), category);
-    m_Options.AddOption(_("MSP430 1351"), _T("-mmcu=msp430x1351"), category);
-    m_Options.AddOption(_("MSP430 147"), _T("-mmcu=msp430x147"), category);
-    m_Options.AddOption(_("MSP430 148"), _T("-mmcu=msp430x148"), category);
-    m_Options.AddOption(_("MSP430 149"), _T("-mmcu=msp430x149"), category);
-    m_Options.AddOption(_("MSP430 1471"), _T("-mmcu=msp430x1471"), category);
-    m_Options.AddOption(_("MSP430 1481"), _T("-mmcu=msp430x1481"), category);
-    m_Options.AddOption(_("MSP430 1491"), _T("-mmcu=msp430x1491"), category);
-    m_Options.AddOption(_("MSP430 155"), _T("-mmcu=msp430x155"), category);
-    m_Options.AddOption(_("MSP430 156"), _T("-mmcu=msp430x156"), category);
-    m_Options.AddOption(_("MSP430 157"), _T("-mmcu=msp430x157"), category);
-    m_Options.AddOption(_("MSP430 167"), _T("-mmcu=msp430x167"), category);
-    m_Options.AddOption(_("MSP430 168"), _T("-mmcu=msp430x168"), category);
-    m_Options.AddOption(_("MSP430 169"), _T("-mmcu=msp430x169"), category);
-    m_Options.AddOption(_("MSP430 1610"), _T("-mmcu=msp430x1610"), category);
-    m_Options.AddOption(_("MSP430 1611"), _T("-mmcu=msp430x1611"), category);
-    m_Options.AddOption(_("MSP430 1612"), _T("-mmcu=msp430x1612"), category);
-    m_Options.AddOption(_("MSP430 2001"), _T("-mmcu=msp430x2001"), category);
-    m_Options.AddOption(_("MSP430 2011"), _T("-mmcu=msp430x2011"), category);
-    m_Options.AddOption(_("MSP430 2002"), _T("-mmcu=msp430x2002"), category);
-    m_Options.AddOption(_("MSP430 2012"), _T("-mmcu=msp430x2012"), category);
-    m_Options.AddOption(_("MSP430 2003"), _T("-mmcu=msp430x2003"), category);
-    m_Options.AddOption(_("MSP430 2013"), _T("-mmcu=msp430x2013"), category);
-    m_Options.AddOption(_("MSP430 2101"), _T("-mmcu=msp430x2101"), category);
-    m_Options.AddOption(_("MSP430 2111"), _T("-mmcu=msp430x2111"), category);
-    m_Options.AddOption(_("MSP430 2121"), _T("-mmcu=msp430x2121"), category);
-    m_Options.AddOption(_("MSP430 2131"), _T("-mmcu=msp430x2131"), category);
-    m_Options.AddOption(_("MSP430 2234"), _T("-mmcu=msp430x2234"), category);
-    m_Options.AddOption(_("MSP430 2254"), _T("-mmcu=msp430x2254"), category);
-    m_Options.AddOption(_("MSP430 2274"), _T("-mmcu=msp430x2274"), category);
-    m_Options.AddOption(_("MSP430 311"), _T("-mmcu=msp430x311"), category);
-    m_Options.AddOption(_("MSP430 312"), _T("-mmcu=msp430x312"), category);
-    m_Options.AddOption(_("MSP430 313"), _T("-mmcu=msp430x313"), category);
-    m_Options.AddOption(_("MSP430 314"), _T("-mmcu=msp430x314"), category);
-    m_Options.AddOption(_("MSP430 315"), _T("-mmcu=msp430x315"), category);
-    m_Options.AddOption(_("MSP430 323"), _T("-mmcu=msp430x323"), category);
-    m_Options.AddOption(_("MSP430 325"), _T("-mmcu=msp430x325"), category);
-    m_Options.AddOption(_("MSP430 336"), _T("-mmcu=msp430x336"), category);
-    m_Options.AddOption(_("MSP430 337"), _T("-mmcu=msp430x337"), category);
-    m_Options.AddOption(_("MSP430 412"), _T("-mmcu=msp430x412"), category);
-    m_Options.AddOption(_("MSP430 413"), _T("-mmcu=msp430x413"), category);
-    m_Options.AddOption(_("MSP430 415"), _T("-mmcu=msp430x415"), category);
-    m_Options.AddOption(_("MSP430 417"), _T("-mmcu=msp430x417"), category);
-    m_Options.AddOption(_("MSP430 423"), _T("-mmcu=msp430x423"), category);
-    m_Options.AddOption(_("MSP430 425"), _T("-mmcu=msp430x425"), category);
-    m_Options.AddOption(_("MSP430 427"), _T("-mmcu=msp430x427"), category);
-    m_Options.AddOption(_("MSP430 4250"), _T("-mmcu=msp430x4250"), category);
-    m_Options.AddOption(_("MSP430 4260"), _T("-mmcu=msp430x4260"), category);
-    m_Options.AddOption(_("MSP430 4270"), _T("-mmcu=msp430x4270"), category);
-    m_Options.AddOption(_("MSP430 E423"), _T("-mmcu=msp430xE423"), category);
-    m_Options.AddOption(_("MSP430 E425"), _T("-mmcu=msp430xE425"), category);
-    m_Options.AddOption(_("MSP430 E427"), _T("-mmcu=msp430xE427"), category);
-    m_Options.AddOption(_("MSP430 W423"), _T("-mmcu=msp430xW423"), category);
-    m_Options.AddOption(_("MSP430 W425"), _T("-mmcu=msp430xW425"), category);
-    m_Options.AddOption(_("MSP430 W427"), _T("-mmcu=msp430xW427"), category);
-    m_Options.AddOption(_("MSP430 G437"), _T("-mmcu=msp430xG437"), category);
-    m_Options.AddOption(_("MSP430 G438"), _T("-mmcu=msp430xG438"), category);
-    m_Options.AddOption(_("MSP430 G439"), _T("-mmcu=msp430xG439"), category);
-    m_Options.AddOption(_("MSP430 435"), _T("-mmcu=msp430x435"), category);
-    m_Options.AddOption(_("MSP430 436"), _T("-mmcu=msp430x436"), category);
-    m_Options.AddOption(_("MSP430 437"), _T("-mmcu=msp430x437"), category);
-    m_Options.AddOption(_("MSP430 447"), _T("-mmcu=msp430x447"), category);
-    m_Options.AddOption(_("MSP430 448"), _T("-mmcu=msp430x448"), category);
-    m_Options.AddOption(_("MSP430 449"), _T("-mmcu=msp430x449"), category);
-    m_Options.AddOption(_("MSP430 4616"), _T("-mmcu=msp430xG4616"), category);
-    m_Options.AddOption(_("MSP430 4617"), _T("-mmcu=msp430xG4617"), category);
-    m_Options.AddOption(_("MSP430 4618"), _T("-mmcu=msp430xG4618"), category);
-    m_Options.AddOption(_("MSP430 4619"), _T("-mmcu=msp430xG4619"), category);
-
-    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
-    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
-    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("$rescomp -i $file -J rc -o $resource_output -O coff $res_includes")));
-    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
-    if (platform::windows)
-    {
-        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    else
-    {
-        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -rs $static_output $link_objects")));
-    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
-
-    LoadDefaultRegExArray();
-
-    m_CompilerOptions.Clear();
-    m_LinkerOptions.Clear();
-    m_LinkLibs.Clear();
-    m_CmdsBefore.Clear();
-    m_CmdsAfter.Clear();
-}
-
-void CompilerGNUMSP430::LoadDefaultRegExArray()
-{
-    m_RegExes.Clear();
-    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("'In function...' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):[ \t]+") + _T("([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("'Instantiated from' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]+([iI]nstantiated from .*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler note"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Nn]ote:[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("General note"), cltInfo, _T("([Nn]ote:[ \t].*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
-}
-
-AutoDetectResult CompilerGNUMSP430::AutoDetectInstallationDir()
-{
-    wxString sep = wxFileName::GetPathSeparator();
-#ifdef __WXMSW__
-	m_MasterPath = _T("C:\\HighTec\\Msp430"); // just a guess
-
-    //    wxLogNull ln;
-        wxRegKey key; // defaults to HKCR
-        key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\HighTec EDV-Systeme\\Msp430\\"));
-        if (key.Exists() && key.Open(wxRegKey::Read))
-        {
-            // found; read it
-            if (key.HasValue(_T("InstallPath")))
-            {
-                key.QueryValue(_T("InstallPath"), m_MasterPath);
-            }
-        }
-#else
-        m_MasterPath = _T("/usr/local/msp430");
-#endif // __WXMSW__
-    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
-    if (ret == adrDetected)
-    {
-          AddIncludeDir(m_MasterPath + sep + _T("msp430") + sep + _T("include"));
-    }
-    return ret;
-}
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include <sdk.h>
+#include <prep.h>
+#ifndef CB_PRECOMP
+    #include <wx/intl.h>
+    #include <wx/regex.h>
+    #include <wx/utils.h> // wxGetOSDirectory, wxGetEnv
+#endif
+#include <wx/filefn.h> // wxFileExists
+#include <wx/fileconf.h> // wxFileConfig
+#include <wx/msgdlg.h>
+#ifdef __WXMSW__
+#include <wx/msw/registry.h>
+#endif // __WXMSW__
+#include "compilerGNUMSP430.h"
+
+CompilerGNUMSP430::CompilerGNUMSP430()
+        : Compiler(_("GNU GCC Compiler for MSP430"),_T("msp430-gcc"))
+{
+    Reset();
+}
+
+CompilerGNUMSP430::~CompilerGNUMSP430()
+{
+    //dtor
+}
+
+Compiler * CompilerGNUMSP430::CreateCopy()
+{
+    Compiler* c = new CompilerGNUMSP430(*this);
+    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
+    return c;
+}
+
+void CompilerGNUMSP430::Reset()
+{
+    if (platform::windows)
+    {
+        m_Programs.C = _T("msp430-gcc.exe");
+        m_Programs.CPP = _T("msp430-g++.exe");
+        m_Programs.LD = _T("msp430-g++.exe");
+        m_Programs.DBG = _T("msp430-insight.exe");
+        m_Programs.LIB = _T("msp430-ar.exe");
+        m_Programs.WINDRES = _T("");
+        m_Programs.MAKE = _T("make.exe");
+    }
+    else
+    {
+        m_Programs.C = _T("msp430-gcc");
+        m_Programs.CPP = _T("msp430-g++");
+        m_Programs.LD = _T("msp430-g++");
+        m_Programs.DBG = _T("msp430-insight");
+        m_Programs.LIB = _T("msp430-ar");
+        m_Programs.WINDRES = _T("");
+        m_Programs.MAKE = _T("make");
+    }
+    m_Switches.includeDirs = _T("-I");
+    m_Switches.libDirs = _T("-L");
+    m_Switches.linkLibs = _T("-l");
+    m_Switches.defines = _T("-D");
+    m_Switches.genericSwitch = _T("-");
+    m_Switches.objectExtension = _T("o");
+    m_Switches.needDependencies = true;
+    m_Switches.forceCompilerUseQuotes = false;
+    m_Switches.forceLinkerUseQuotes = false;
+    m_Switches.logging = clogFull;
+    m_Switches.libPrefix = _T("lib");
+    m_Switches.libExtension = _T("a");
+    m_Switches.linkerNeedsLibPrefix = false;
+    m_Switches.linkerNeedsLibExtension = false;
+
+    // Summary of GCC options: http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
+
+    m_Options.ClearOptions();
+    m_Options.AddOption(_("Produce debugging symbols"),
+                        _T("-g"),
+                        _("Debugging"),
+                        _T(""),
+                        true,
+                        _T("-O -O1 -O2 -O3 -Os"),
+                        _("You have optimizations enabled. This will make debugging difficult because variables may be optimized away etc."));
+    wxString gprof_link = _T("-pg");
+    if (platform::windows)
+        gprof_link = _T("-pg -lgmon");
+    m_Options.AddOption(_("Profile code when executed"), _T("-pg"), _("Profiling"), gprof_link);
+
+    wxString category = _("Warnings");
+
+    // warnings
+    m_Options.AddOption(_("In C mode, support all ISO C90 programs. In C++ mode, remove GNU extensions that conflict with ISO C++"), _T("-ansi"), category);
+    m_Options.AddOption(_("Enable all compiler warnings (overrides every other setting)"), _T("-Wall"), category);
+    m_Options.AddOption(_("Enable standard compiler warnings"), _T("-W"), category);
+    m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
+    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
+    m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
+    m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
+    m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
+
+    category = _("General Options");
+
+    // general options
+    m_Options.AddOption(_("Output an error if same variable is declared without extern in different modules"), _T("-fno-common"), category);
+    m_Options.AddOption(_("Save intermediate files in the build directory"), _T("-save-temps"), category);
+
+    // Startup options
+    category = _("Linker and startup code");
+    m_Options.AddOption(_("do not link against the default crt0.o, so you can add your own startup code (MSP430 specific)"), _T("-nocrt0"), category);
+    m_Options.AddOption(_("do not link against standard system startup files"), _T("-nostartfiles"), category);
+    m_Options.AddOption(_("only search library directories explicitly specified on the command line"), _T("-nostdlib"), category);
+
+    // optimization
+    category = _("Optimization");
+    m_Options.AddOption(_("Strip all symbols from binary (minimizes size)"), _T(""), category, _T("-s"), true, _T("-g -ggdb"), _("Stripping the binary will strip debugging symbols as well!"));
+    m_Options.AddOption(_("Optimize generated code (for speed)"), _T("-O"), category);
+    m_Options.AddOption(_("Optimize more (for speed)"), _T("-O1"), category);
+    m_Options.AddOption(_("Optimize even more (for speed)"), _T("-O2"), category);
+    m_Options.AddOption(_("Optimize fully (for speed)"), _T("-O3"), category);
+    m_Options.AddOption(_("Optimize generated code (for size)"), _T("-Os"), category);
+    m_Options.AddOption(_("Expensive optimizations"), _T("-fexpensive-optimizations"), category);
+    m_Options.AddOption(_("No instruction scheduling before reload"), _T("-fno-schedule-insns"), category);
+    m_Options.AddOption(_("No instruction scheduling after reload"), _T("-fno-schedule-insns2"), category);
+
+    // machine dependent options
+    category = _("MSP430 achitecture specific");
+
+    m_Options.AddOption(_("Use subroutine call for function prologue/epilogue when possible"), _T("-msave-prologue"), category);
+    m_Options.AddOption(_("Do not perform volatile workaround for bitwise operations"), _T("-mno-volatile-workaround"), category);
+    m_Options.AddOption(_("No stack init in main()"), _T("-mno-stack-init"), category);
+    m_Options.AddOption(_("Produce IAR assembler syntax"), _T("-mIAR"), category);
+    m_Options.AddOption(_("Assume interrupt routine does not do hardware multiply"), _T("-mnoint-hwmul"), category);
+    m_Options.AddOption(_("Issue inline multiplication code for 32-bit integers"), _T("-minline-hwmul"), category);
+    m_Options.AddOption(_("Disable hardware multiplier"), _T("-mdisable-hwmul"), category);
+    m_Options.AddOption(_("Force hardware multiplier"), _T("-mforce-hwmul"), category);
+    m_Options.AddOption(_("Strict alignment for all structures"), _T("-mstrict-align"), category);
+    m_Options.AddOption(_("Add stack information to profiler"), _T("-mpgr"), category);
+    m_Options.AddOption(_("Add library profile information"), _T("-mpgl"), category);
+    m_Options.AddOption(_("Add ordinary profile information"), _T("-mpgs"), category);
+    m_Options.AddOption(_("Jump to specified routine at the end of main()"), _T("-mendup-at="), category);
+    m_Options.AddOption(_("Specify the initial stack address"), _T("-minit-stack="), category);
+    m_Options.AddOption(_("enable relaxation at assembly time"), _T("-mQ"), category);
+    m_Options.AddOption(_("enable polymorph instructions"), _T("-mP"), category);
+
+    // machine dependent options
+    category = _("MSP430 MCU derivatives");
+
+    m_Options.AddOption(_("MSP430 MSP1"), _T("-mmcu=msp1"), category);
+    m_Options.AddOption(_("MSP430 MSP2"), _T("-mmcu=msp2"), category);
+    m_Options.AddOption(_("MSP430 110"), _T("-mmcu=msp430x110"), category);
+    m_Options.AddOption(_("MSP430 112"), _T("-mmcu=msp430x112"), category);
+    m_Options.AddOption(_("MSP430 1101"), _T("-mmcu=msp430x1101"), category);
+    m_Options.AddOption(_("MSP430 1111"), _T("-mmcu=msp430x1111"), category);
+    m_Options.AddOption(_("MSP430 1121"), _T("-mmcu=msp430x1121"), category);
+    m_Options.AddOption(_("MSP430 1122"), _T("-mmcu=msp430x1122"), category);
+    m_Options.AddOption(_("MSP430 1132"), _T("-mmcu=msp430x1132"), category);
+    m_Options.AddOption(_("MSP430 122"), _T("-mmcu=msp430x122"), category);
+    m_Options.AddOption(_("MSP430 123"), _T("-mmcu=msp430x123"), category);
+    m_Options.AddOption(_("MSP430 1222"), _T("-mmcu=msp430x1222"), category);
+    m_Options.AddOption(_("MSP430 1232"), _T("-mmcu=msp430x1232"), category);
+    m_Options.AddOption(_("MSP430 133"), _T("-mmcu=msp430x133"), category);
+    m_Options.AddOption(_("MSP430 135"), _T("-mmcu=msp430x135"), category);
+    m_Options.AddOption(_("MSP430 1331"), _T("-mmcu=msp430x1331"), category);
+    m_Options.AddOption(_("MSP430 1351"), _T("-mmcu=msp430x1351"), category);
+    m_Options.AddOption(_("MSP430 147"), _T("-mmcu=msp430x147"), category);
+    m_Options.AddOption(_("MSP430 148"), _T("-mmcu=msp430x148"), category);
+    m_Options.AddOption(_("MSP430 149"), _T("-mmcu=msp430x149"), category);
+    m_Options.AddOption(_("MSP430 1471"), _T("-mmcu=msp430x1471"), category);
+    m_Options.AddOption(_("MSP430 1481"), _T("-mmcu=msp430x1481"), category);
+    m_Options.AddOption(_("MSP430 1491"), _T("-mmcu=msp430x1491"), category);
+    m_Options.AddOption(_("MSP430 155"), _T("-mmcu=msp430x155"), category);
+    m_Options.AddOption(_("MSP430 156"), _T("-mmcu=msp430x156"), category);
+    m_Options.AddOption(_("MSP430 157"), _T("-mmcu=msp430x157"), category);
+    m_Options.AddOption(_("MSP430 167"), _T("-mmcu=msp430x167"), category);
+    m_Options.AddOption(_("MSP430 168"), _T("-mmcu=msp430x168"), category);
+    m_Options.AddOption(_("MSP430 169"), _T("-mmcu=msp430x169"), category);
+    m_Options.AddOption(_("MSP430 1610"), _T("-mmcu=msp430x1610"), category);
+    m_Options.AddOption(_("MSP430 1611"), _T("-mmcu=msp430x1611"), category);
+    m_Options.AddOption(_("MSP430 1612"), _T("-mmcu=msp430x1612"), category);
+    m_Options.AddOption(_("MSP430 2001"), _T("-mmcu=msp430x2001"), category);
+    m_Options.AddOption(_("MSP430 2011"), _T("-mmcu=msp430x2011"), category);
+    m_Options.AddOption(_("MSP430 2002"), _T("-mmcu=msp430x2002"), category);
+    m_Options.AddOption(_("MSP430 2012"), _T("-mmcu=msp430x2012"), category);
+    m_Options.AddOption(_("MSP430 2003"), _T("-mmcu=msp430x2003"), category);
+    m_Options.AddOption(_("MSP430 2013"), _T("-mmcu=msp430x2013"), category);
+    m_Options.AddOption(_("MSP430 2101"), _T("-mmcu=msp430x2101"), category);
+    m_Options.AddOption(_("MSP430 2111"), _T("-mmcu=msp430x2111"), category);
+    m_Options.AddOption(_("MSP430 2121"), _T("-mmcu=msp430x2121"), category);
+    m_Options.AddOption(_("MSP430 2131"), _T("-mmcu=msp430x2131"), category);
+    m_Options.AddOption(_("MSP430 2234"), _T("-mmcu=msp430x2234"), category);
+    m_Options.AddOption(_("MSP430 2254"), _T("-mmcu=msp430x2254"), category);
+    m_Options.AddOption(_("MSP430 2274"), _T("-mmcu=msp430x2274"), category);
+    m_Options.AddOption(_("MSP430 311"), _T("-mmcu=msp430x311"), category);
+    m_Options.AddOption(_("MSP430 312"), _T("-mmcu=msp430x312"), category);
+    m_Options.AddOption(_("MSP430 313"), _T("-mmcu=msp430x313"), category);
+    m_Options.AddOption(_("MSP430 314"), _T("-mmcu=msp430x314"), category);
+    m_Options.AddOption(_("MSP430 315"), _T("-mmcu=msp430x315"), category);
+    m_Options.AddOption(_("MSP430 323"), _T("-mmcu=msp430x323"), category);
+    m_Options.AddOption(_("MSP430 325"), _T("-mmcu=msp430x325"), category);
+    m_Options.AddOption(_("MSP430 336"), _T("-mmcu=msp430x336"), category);
+    m_Options.AddOption(_("MSP430 337"), _T("-mmcu=msp430x337"), category);
+    m_Options.AddOption(_("MSP430 412"), _T("-mmcu=msp430x412"), category);
+    m_Options.AddOption(_("MSP430 413"), _T("-mmcu=msp430x413"), category);
+    m_Options.AddOption(_("MSP430 415"), _T("-mmcu=msp430x415"), category);
+    m_Options.AddOption(_("MSP430 417"), _T("-mmcu=msp430x417"), category);
+    m_Options.AddOption(_("MSP430 423"), _T("-mmcu=msp430x423"), category);
+    m_Options.AddOption(_("MSP430 425"), _T("-mmcu=msp430x425"), category);
+    m_Options.AddOption(_("MSP430 427"), _T("-mmcu=msp430x427"), category);
+    m_Options.AddOption(_("MSP430 4250"), _T("-mmcu=msp430x4250"), category);
+    m_Options.AddOption(_("MSP430 4260"), _T("-mmcu=msp430x4260"), category);
+    m_Options.AddOption(_("MSP430 4270"), _T("-mmcu=msp430x4270"), category);
+    m_Options.AddOption(_("MSP430 E423"), _T("-mmcu=msp430xE423"), category);
+    m_Options.AddOption(_("MSP430 E425"), _T("-mmcu=msp430xE425"), category);
+    m_Options.AddOption(_("MSP430 E427"), _T("-mmcu=msp430xE427"), category);
+    m_Options.AddOption(_("MSP430 W423"), _T("-mmcu=msp430xW423"), category);
+    m_Options.AddOption(_("MSP430 W425"), _T("-mmcu=msp430xW425"), category);
+    m_Options.AddOption(_("MSP430 W427"), _T("-mmcu=msp430xW427"), category);
+    m_Options.AddOption(_("MSP430 G437"), _T("-mmcu=msp430xG437"), category);
+    m_Options.AddOption(_("MSP430 G438"), _T("-mmcu=msp430xG438"), category);
+    m_Options.AddOption(_("MSP430 G439"), _T("-mmcu=msp430xG439"), category);
+    m_Options.AddOption(_("MSP430 435"), _T("-mmcu=msp430x435"), category);
+    m_Options.AddOption(_("MSP430 436"), _T("-mmcu=msp430x436"), category);
+    m_Options.AddOption(_("MSP430 437"), _T("-mmcu=msp430x437"), category);
+    m_Options.AddOption(_("MSP430 447"), _T("-mmcu=msp430x447"), category);
+    m_Options.AddOption(_("MSP430 448"), _T("-mmcu=msp430x448"), category);
+    m_Options.AddOption(_("MSP430 449"), _T("-mmcu=msp430x449"), category);
+    m_Options.AddOption(_("MSP430 4616"), _T("-mmcu=msp430xG4616"), category);
+    m_Options.AddOption(_("MSP430 4617"), _T("-mmcu=msp430xG4617"), category);
+    m_Options.AddOption(_("MSP430 4618"), _T("-mmcu=msp430xG4618"), category);
+    m_Options.AddOption(_("MSP430 4619"), _T("-mmcu=msp430xG4619"), category);
+
+    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
+    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
+    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("$rescomp -i $file -J rc -o $resource_output -O coff $res_includes")));
+    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
+    if (platform::windows)
+    {
+        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    else
+    {
+        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -rs $static_output $link_objects")));
+    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
+
+    LoadDefaultRegExArray();
+
+    m_CompilerOptions.Clear();
+    m_LinkerOptions.Clear();
+    m_LinkLibs.Clear();
+    m_CmdsBefore.Clear();
+    m_CmdsAfter.Clear();
+}
+
+void CompilerGNUMSP430::LoadDefaultRegExArray()
+{
+    m_RegExes.Clear();
+    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("'In function...' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):[ \t]+") + _T("([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("'Instantiated from' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]+([iI]nstantiated from .*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler note"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Nn]ote:[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("General note"), cltInfo, _T("([Nn]ote:[ \t].*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
+}
+
+AutoDetectResult CompilerGNUMSP430::AutoDetectInstallationDir()
+{
+    wxString sep = wxFileName::GetPathSeparator();
+#ifdef __WXMSW__
+	m_MasterPath = _T("C:\\HighTec\\Msp430"); // just a guess
+
+    //    wxLogNull ln;
+        wxRegKey key; // defaults to HKCR
+        key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\HighTec EDV-Systeme\\Msp430\\"));
+        if (key.Exists() && key.Open(wxRegKey::Read))
+        {
+            // found; read it
+            if (key.HasValue(_T("InstallPath")))
+            {
+                key.QueryValue(_T("InstallPath"), m_MasterPath);
+            }
+        }
+#else
+        m_MasterPath = _T("/usr/local/msp430");
+#endif // __WXMSW__
+    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
+    if (ret == adrDetected)
+    {
+          AddIncludeDir(m_MasterPath + sep + _T("msp430") + sep + _T("include"));
+    }
+    return ret;
+}

Property changes on: src\plugins\compilergcc\compilerGNUMSP430.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\compilergcc\compilerGNUMSP430.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerGNUPOWERPC.cpp
===================================================================
--- src/plugins/compilergcc/compilerGNUPOWERPC.cpp	(revision 5730)
+++ src/plugins/compilergcc/compilerGNUPOWERPC.cpp	(working copy)
@@ -1,239 +1,239 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#include <sdk.h>
-#include <prep.h>
-#ifndef CB_PRECOMP
-    #include <wx/intl.h>
-    #include <wx/regex.h>
-    #include <wx/utils.h> // wxGetOSDirectory, wxGetEnv
-#endif
-#include <wx/filefn.h> // wxFileExists
-#include <wx/fileconf.h> // wxFileConfig
-#ifdef __WXMSW__
-#include <wx/msw/registry.h>
-#endif // __WXMSW__
-#include "compilerGNUPOWERPC.h"
-
-CompilerGNUPOWERPC::CompilerGNUPOWERPC()
-        : Compiler(_("GNU GCC Compiler for PowerPC"),_T("ppc-gcc"))
-{
-    Reset();
-}
-
-CompilerGNUPOWERPC::~CompilerGNUPOWERPC()
-{
-    //dtor
-}
-
-Compiler * CompilerGNUPOWERPC::CreateCopy()
-{
-    Compiler* c = new CompilerGNUPOWERPC(*this);
-    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
-    return c;
-}
-
-void CompilerGNUPOWERPC::Reset()
-{
-    if (platform::windows)
-    {
-        m_Programs.C = _T("ppc-gcc.exe");
-        m_Programs.CPP = _T("ppc-g++.exe");
-        m_Programs.LD = _T("ppc-g++.exe");
-        m_Programs.DBG = _T("ppc-insight.exe");
-        m_Programs.LIB = _T("ppc-ar.exe");
-        m_Programs.WINDRES = _T("");
-        m_Programs.MAKE = _T("make.exe");
-    }
-    else
-    {
-        m_Programs.C = _T("ppc-gcc");
-        m_Programs.CPP = _T("ppc-g++");
-        m_Programs.LD = _T("ppc-g++");
-        m_Programs.DBG = _T("ppc-insight");
-        m_Programs.LIB = _T("ppc-ar");
-        m_Programs.WINDRES = _T("");
-        m_Programs.MAKE = _T("make");
-    }
-    m_Switches.includeDirs = _T("-I");
-    m_Switches.libDirs = _T("-L");
-    m_Switches.linkLibs = _T("-l");
-    m_Switches.defines = _T("-D");
-    m_Switches.genericSwitch = _T("-");
-    m_Switches.objectExtension = _T("o");
-    m_Switches.needDependencies = true;
-    m_Switches.forceCompilerUseQuotes = false;
-    m_Switches.forceLinkerUseQuotes = false;
-    m_Switches.logging = clogFull;
-    m_Switches.libPrefix = _T("lib");
-    m_Switches.libExtension = _T("a");
-    m_Switches.linkerNeedsLibPrefix = false;
-    m_Switches.linkerNeedsLibExtension = false;
-
-    // Summary of GCC options: http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
-
-    m_Options.ClearOptions();
-    m_Options.AddOption(_("Produce debugging symbols"),
-                        _T("-g"),
-                        _("Debugging"),
-                        _T(""),
-                        true,
-                        _T("-O -O1 -O2 -O3 -Os"),
-                        _("You have optimizations enabled. This will make debugging difficult because variables may be optimized away etc."));
-    wxString gprof_link = _T("-pg");
-    if (platform::windows)
-        gprof_link = _T("-pg -lgmon");
-    m_Options.AddOption(_("Profile code when executed"), _T("-pg"), _("Profiling"), gprof_link);
-
-    wxString category = _("Warnings");
-
-    // warnings
-    m_Options.AddOption(_("In C mode, support all ISO C90 programs. In C++ mode, remove GNU extensions that conflict with ISO C++"), _T("-ansi"), category);
-    m_Options.AddOption(_("Enable all compiler warnings (overrides every other setting)"), _T("-Wall"), category);
-    m_Options.AddOption(_("Enable standard compiler warnings"), _T("-W"), category);
-    m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
-    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
-    m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
-    m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
-    m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
-
-    category = _("General Options");
-
-    // general options
-    m_Options.AddOption(_("Output an error if same variable is declared without extern in different modules"), _T("-fno-common"), category);
-    m_Options.AddOption(_("Save intermediate files in the build directory"), _T("-save-temps"), category);
-
-    // Startup options
-    category = _("Linker and startup code");
-    m_Options.AddOption(_("do not link against the default crt0.o, so you can add your own startup code (PowerPC specific)"), _T("-nocrt0"), category);
-    m_Options.AddOption(_("do not link against standard system startup files"), _T("-nostartfiles"), category);
-    m_Options.AddOption(_("only search library directories explicitly specified on the command line"), _T("-nostdlib"), category);
-
-    // optimization
-    category = _("Optimization");
-    m_Options.AddOption(_("Strip all symbols from binary (minimizes size)"), _T(""), category, _T("-s"), true, _T("-g -ggdb"), _("Stripping the binary will strip debugging symbols as well!"));
-    m_Options.AddOption(_("Optimize generated code (for speed)"), _T("-O"), category);
-    m_Options.AddOption(_("Optimize more (for speed)"), _T("-O1"), category);
-    m_Options.AddOption(_("Optimize even more (for speed)"), _T("-O2"), category);
-    m_Options.AddOption(_("Optimize fully (for speed)"), _T("-O3"), category);
-    m_Options.AddOption(_("Optimize generated code (for size)"), _T("-Os"), category);
-    m_Options.AddOption(_("Expensive optimizations"), _T("-fexpensive-optimizations"), category);
-    m_Options.AddOption(_("No instruction scheduling before reload"), _T("-fno-schedule-insns"), category);
-    m_Options.AddOption(_("No instruction scheduling after reload"), _T("-fno-schedule-insns2"), category);
-
-    // machine dependent options
-    category = _("PowerPC achitecture specific");
-
-    m_Options.AddOption(_("Generate 32-bit code"), _T("-m32"), category);
-    m_Options.AddOption(_("Use EABI"), _T("-meabi"), category);
-    m_Options.AddOption(_("Produce big endian code"), _T("-mbig-endian"), category);
-    m_Options.AddOption(_("Produce little endian code"), _T("-mlittle-endian"), category);
-    m_Options.AddOption(_("Do not allow bit-fields to cross word boundaries"), _T("-mno-bit-word"), category);
-    m_Options.AddOption(_("Align to the base type of the bit-field"), _T("-mbit-align"), category);
-    m_Options.AddOption(_("Do not generate single field mfcr instruction"), _T("-mno-mfcrf"), category);
-    m_Options.AddOption(_("Generate single field mfcr instruction"), _T("-mmfcrf"), category);
-    m_Options.AddOption(_("Generate load/store with update instructions"), _T("-mupdate"), category);
-    m_Options.AddOption(_("Generate load/store multiple instructions"), _T("-mmultiple"), category);
-    m_Options.AddOption(_("Do not use hardware floating point"), _T("-msoft-float"), category);
-    m_Options.AddOption(_("Use hardware floating point"), _T("-mhard-float"), category);
-    m_Options.AddOption(_("Select method for sdata handling"), _T("-msdata="), category);
-    m_Options.AddOption(_("Specify alignment of structure fields default/natural"), _T("-malign="), category);
-    m_Options.AddOption(_("Avoid all range limits on call instructions"), _T("-mlongcall"), category);
-    m_Options.AddOption(_("Using floating point in the GPRs"), _T("-mfloat-gprs=yes"), category);
-    m_Options.AddOption(_("Not using floating point in the GPRs"), _T("-mfloat-gprs=no"), category);
-//    m_Options.AddOption(_("Specify size of long double (64 or 128 bits)"), _T("-mlong-double="), category);
-    m_Options.AddOption(_("Enable debug output"), _T("-mdebug"), category);
-    m_Options.AddOption(_("Schedule code for given CPU"), _T("-mtune="), category);
-    m_Options.AddOption(_("Allow symbolic names for registers"), _T("-mregnames"), category);
-    m_Options.AddOption(_("Do not allow symbolic names for registers"), _T("-mno-regnames"), category);
-    m_Options.AddOption(_("Support for GCC's -mrelocatble option"), _T("-mrelocatable"), category);
-    m_Options.AddOption(_("Support for GCC's -mrelocatble-lib option"), _T("-mrelocatable-lib"), category);
-
-    // machine dependent options
-    category = _("PowerPC MCU derivatives");
-
-    m_Options.AddOption(_("Select CPU PowerPC 5xx"), _T("-mcpu=505"), category);
-    m_Options.AddOption(_("Select CPU PowerPC 823"), _T("-mcpu=823"), category);
-    m_Options.AddOption(_("Select PowerPC 5200"), _T("-mcpu=603e -msoft-float"), category);
-
-    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
-    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
-    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("$rescomp -i $file -J rc -o $resource_output -O coff $res_includes")));
-    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
-    if (platform::windows)
-    {
-        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    else
-    {
-        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -rs $static_output $link_objects")));
-    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
-
-    LoadDefaultRegExArray();
-
-    m_CompilerOptions.Clear();
-    m_LinkerOptions.Clear();
-    m_LinkLibs.Clear();
-    m_CmdsBefore.Clear();
-    m_CmdsAfter.Clear();
-}
-
-void CompilerGNUPOWERPC::LoadDefaultRegExArray()
-{
-    m_RegExes.Clear();
-    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("'In function...' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):[ \t]+") + _T("([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("'Instantiated from' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]+([iI]nstantiated from .*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler note"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Nn]ote:[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("General note"), cltInfo, _T("([Nn]ote:[ \t].*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
-}
-
-AutoDetectResult CompilerGNUPOWERPC::AutoDetectInstallationDir()
-{
-    wxString sep = wxFileName::GetPathSeparator();
-#ifdef __WXMSW__
-     m_MasterPath = _T("C:\\HighTec\\PowerPC"); // just a guess
-
-    //    wxLogNull ln;
-    wxRegKey key; // defaults to HKCR
-     key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\HighTec EDV-Systeme\\PowerPC\\"));
-     if (key.Exists() && key.Open(wxRegKey::Read))
-     {
-     // found; read it
-	if (key.HasValue(_T("InstallPath")))
-     	{
-     		key.QueryValue(_T("InstallPath"), m_MasterPath);
-     	}
-      }
-#else
-     m_MasterPath = _T("/usr/local/ppc");
-#endif // __WXMSW__
-    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
-//    if (ret == adrDetected)
-//    {
-//          AddIncludeDir(m_MasterPath + sep + _T("ppc-ht-eabi") + sep + _T("include"));
-//    }
-    return ret;
-}
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include <sdk.h>
+#include <prep.h>
+#ifndef CB_PRECOMP
+    #include <wx/intl.h>
+    #include <wx/regex.h>
+    #include <wx/utils.h> // wxGetOSDirectory, wxGetEnv
+#endif
+#include <wx/filefn.h> // wxFileExists
+#include <wx/fileconf.h> // wxFileConfig
+#ifdef __WXMSW__
+#include <wx/msw/registry.h>
+#endif // __WXMSW__
+#include "compilerGNUPOWERPC.h"
+
+CompilerGNUPOWERPC::CompilerGNUPOWERPC()
+        : Compiler(_("GNU GCC Compiler for PowerPC"),_T("ppc-gcc"))
+{
+    Reset();
+}
+
+CompilerGNUPOWERPC::~CompilerGNUPOWERPC()
+{
+    //dtor
+}
+
+Compiler * CompilerGNUPOWERPC::CreateCopy()
+{
+    Compiler* c = new CompilerGNUPOWERPC(*this);
+    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
+    return c;
+}
+
+void CompilerGNUPOWERPC::Reset()
+{
+    if (platform::windows)
+    {
+        m_Programs.C = _T("ppc-gcc.exe");
+        m_Programs.CPP = _T("ppc-g++.exe");
+        m_Programs.LD = _T("ppc-g++.exe");
+        m_Programs.DBG = _T("ppc-insight.exe");
+        m_Programs.LIB = _T("ppc-ar.exe");
+        m_Programs.WINDRES = _T("");
+        m_Programs.MAKE = _T("make.exe");
+    }
+    else
+    {
+        m_Programs.C = _T("ppc-gcc");
+        m_Programs.CPP = _T("ppc-g++");
+        m_Programs.LD = _T("ppc-g++");
+        m_Programs.DBG = _T("ppc-insight");
+        m_Programs.LIB = _T("ppc-ar");
+        m_Programs.WINDRES = _T("");
+        m_Programs.MAKE = _T("make");
+    }
+    m_Switches.includeDirs = _T("-I");
+    m_Switches.libDirs = _T("-L");
+    m_Switches.linkLibs = _T("-l");
+    m_Switches.defines = _T("-D");
+    m_Switches.genericSwitch = _T("-");
+    m_Switches.objectExtension = _T("o");
+    m_Switches.needDependencies = true;
+    m_Switches.forceCompilerUseQuotes = false;
+    m_Switches.forceLinkerUseQuotes = false;
+    m_Switches.logging = clogFull;
+    m_Switches.libPrefix = _T("lib");
+    m_Switches.libExtension = _T("a");
+    m_Switches.linkerNeedsLibPrefix = false;
+    m_Switches.linkerNeedsLibExtension = false;
+
+    // Summary of GCC options: http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
+
+    m_Options.ClearOptions();
+    m_Options.AddOption(_("Produce debugging symbols"),
+                        _T("-g"),
+                        _("Debugging"),
+                        _T(""),
+                        true,
+                        _T("-O -O1 -O2 -O3 -Os"),
+                        _("You have optimizations enabled. This will make debugging difficult because variables may be optimized away etc."));
+    wxString gprof_link = _T("-pg");
+    if (platform::windows)
+        gprof_link = _T("-pg -lgmon");
+    m_Options.AddOption(_("Profile code when executed"), _T("-pg"), _("Profiling"), gprof_link);
+
+    wxString category = _("Warnings");
+
+    // warnings
+    m_Options.AddOption(_("In C mode, support all ISO C90 programs. In C++ mode, remove GNU extensions that conflict with ISO C++"), _T("-ansi"), category);
+    m_Options.AddOption(_("Enable all compiler warnings (overrides every other setting)"), _T("-Wall"), category);
+    m_Options.AddOption(_("Enable standard compiler warnings"), _T("-W"), category);
+    m_Options.AddOption(_("Stop compiling after first error"), _T("-Wfatal-errors"), category);
+    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
+    m_Options.AddOption(_("Enable warnings demanded by strict ISO C and ISO C++"), _T("-pedantic"), category);
+    m_Options.AddOption(_("Treat as errors the warnings demanded by strict ISO C and ISO C++"), _T("-pedantic-errors"), category);
+    m_Options.AddOption(_("Warn if main() is not conformant"), _T("-Wmain"), category);
+
+    category = _("General Options");
+
+    // general options
+    m_Options.AddOption(_("Output an error if same variable is declared without extern in different modules"), _T("-fno-common"), category);
+    m_Options.AddOption(_("Save intermediate files in the build directory"), _T("-save-temps"), category);
+
+    // Startup options
+    category = _("Linker and startup code");
+    m_Options.AddOption(_("do not link against the default crt0.o, so you can add your own startup code (PowerPC specific)"), _T("-nocrt0"), category);
+    m_Options.AddOption(_("do not link against standard system startup files"), _T("-nostartfiles"), category);
+    m_Options.AddOption(_("only search library directories explicitly specified on the command line"), _T("-nostdlib"), category);
+
+    // optimization
+    category = _("Optimization");
+    m_Options.AddOption(_("Strip all symbols from binary (minimizes size)"), _T(""), category, _T("-s"), true, _T("-g -ggdb"), _("Stripping the binary will strip debugging symbols as well!"));
+    m_Options.AddOption(_("Optimize generated code (for speed)"), _T("-O"), category);
+    m_Options.AddOption(_("Optimize more (for speed)"), _T("-O1"), category);
+    m_Options.AddOption(_("Optimize even more (for speed)"), _T("-O2"), category);
+    m_Options.AddOption(_("Optimize fully (for speed)"), _T("-O3"), category);
+    m_Options.AddOption(_("Optimize generated code (for size)"), _T("-Os"), category);
+    m_Options.AddOption(_("Expensive optimizations"), _T("-fexpensive-optimizations"), category);
+    m_Options.AddOption(_("No instruction scheduling before reload"), _T("-fno-schedule-insns"), category);
+    m_Options.AddOption(_("No instruction scheduling after reload"), _T("-fno-schedule-insns2"), category);
+
+    // machine dependent options
+    category = _("PowerPC achitecture specific");
+
+    m_Options.AddOption(_("Generate 32-bit code"), _T("-m32"), category);
+    m_Options.AddOption(_("Use EABI"), _T("-meabi"), category);
+    m_Options.AddOption(_("Produce big endian code"), _T("-mbig-endian"), category);
+    m_Options.AddOption(_("Produce little endian code"), _T("-mlittle-endian"), category);
+    m_Options.AddOption(_("Do not allow bit-fields to cross word boundaries"), _T("-mno-bit-word"), category);
+    m_Options.AddOption(_("Align to the base type of the bit-field"), _T("-mbit-align"), category);
+    m_Options.AddOption(_("Do not generate single field mfcr instruction"), _T("-mno-mfcrf"), category);
+    m_Options.AddOption(_("Generate single field mfcr instruction"), _T("-mmfcrf"), category);
+    m_Options.AddOption(_("Generate load/store with update instructions"), _T("-mupdate"), category);
+    m_Options.AddOption(_("Generate load/store multiple instructions"), _T("-mmultiple"), category);
+    m_Options.AddOption(_("Do not use hardware floating point"), _T("-msoft-float"), category);
+    m_Options.AddOption(_("Use hardware floating point"), _T("-mhard-float"), category);
+    m_Options.AddOption(_("Select method for sdata handling"), _T("-msdata="), category);
+    m_Options.AddOption(_("Specify alignment of structure fields default/natural"), _T("-malign="), category);
+    m_Options.AddOption(_("Avoid all range limits on call instructions"), _T("-mlongcall"), category);
+    m_Options.AddOption(_("Using floating point in the GPRs"), _T("-mfloat-gprs=yes"), category);
+    m_Options.AddOption(_("Not using floating point in the GPRs"), _T("-mfloat-gprs=no"), category);
+//    m_Options.AddOption(_("Specify size of long double (64 or 128 bits)"), _T("-mlong-double="), category);
+    m_Options.AddOption(_("Enable debug output"), _T("-mdebug"), category);
+    m_Options.AddOption(_("Schedule code for given CPU"), _T("-mtune="), category);
+    m_Options.AddOption(_("Allow symbolic names for registers"), _T("-mregnames"), category);
+    m_Options.AddOption(_("Do not allow symbolic names for registers"), _T("-mno-regnames"), category);
+    m_Options.AddOption(_("Support for GCC's -mrelocatble option"), _T("-mrelocatable"), category);
+    m_Options.AddOption(_("Support for GCC's -mrelocatble-lib option"), _T("-mrelocatable-lib"), category);
+
+    // machine dependent options
+    category = _("PowerPC MCU derivatives");
+
+    m_Options.AddOption(_("Select CPU PowerPC 5xx"), _T("-mcpu=505"), category);
+    m_Options.AddOption(_("Select CPU PowerPC 823"), _T("-mcpu=823"), category);
+    m_Options.AddOption(_("Select PowerPC 5200"), _T("-mcpu=603e -msoft-float"), category);
+
+    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
+    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("$compiler -MM $options -MF $dep_object -MT $object $includes $file")));
+    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("$rescomp -i $file -J rc -o $resource_output -O coff $res_includes")));
+    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
+    if (platform::windows)
+    {
+        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    else
+    {
+        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -rs $static_output $link_objects")));
+    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
+
+    LoadDefaultRegExArray();
+
+    m_CompilerOptions.Clear();
+    m_LinkerOptions.Clear();
+    m_LinkLibs.Clear();
+    m_CmdsBefore.Clear();
+    m_CmdsAfter.Clear();
+}
+
+void CompilerGNUPOWERPC::LoadDefaultRegExArray()
+{
+    m_RegExes.Clear();
+    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("'In function...' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):[ \t]+") + _T("([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("'Instantiated from' info"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]+([iI]nstantiated from .*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler note"), cltInfo, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Nn]ote:[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("General note"), cltInfo, _T("([Nn]ote:[ \t].*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Auto-import info"), cltInfo, _T("([Ii]nfo:[ \t].*)\\(auto-import\\)"), 1));
+}
+
+AutoDetectResult CompilerGNUPOWERPC::AutoDetectInstallationDir()
+{
+    wxString sep = wxFileName::GetPathSeparator();
+#ifdef __WXMSW__
+     m_MasterPath = _T("C:\\HighTec\\PowerPC"); // just a guess
+
+    //    wxLogNull ln;
+    wxRegKey key; // defaults to HKCR
+     key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\HighTec EDV-Systeme\\PowerPC\\"));
+     if (key.Exists() && key.Open(wxRegKey::Read))
+     {
+     // found; read it
+	if (key.HasValue(_T("InstallPath")))
+     	{
+     		key.QueryValue(_T("InstallPath"), m_MasterPath);
+     	}
+      }
+#else
+     m_MasterPath = _T("/usr/local/ppc");
+#endif // __WXMSW__
+    AutoDetectResult ret = wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
+//    if (ret == adrDetected)
+//    {
+//          AddIncludeDir(m_MasterPath + sep + _T("ppc-ht-eabi") + sep + _T("include"));
+//    }
+    return ret;
+}

Property changes on: src\plugins\compilergcc\compilerGNUPOWERPC.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\compilergcc\compilerGNUPOWERPC.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\compilergcc\compilerGNUTRICORE.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\compilergcc\compilerGNUTRICORE.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\compilergcc\compilerLCC.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL


Property changes on: src\plugins\compilergcc\compilerLCC.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL

Index: src/plugins/compilergcc/compilerMINGWgenerator.cpp
===================================================================
--- src/plugins/compilergcc/compilerMINGWgenerator.cpp	(revision 5730)
+++ src/plugins/compilergcc/compilerMINGWgenerator.cpp	(working copy)
@@ -1,90 +1,90 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#include <sdk.h>
-#include "compilerMINGWgenerator.h"
-#include <wx/intl.h>
-#include "cbexception.h"
-#include "cbproject.h"
-#include "compilerfactory.h"
-#include "compiler.h"
-#include "manager.h"
-#include "configmanager.h"
-#include "logmanager.h"
-#include "macrosmanager.h"
-#include "scriptingmanager.h"
-
-CompilerMINGWGenerator::CompilerMINGWGenerator()
-{
-    //ctor
-    m_VerStr = wxEmptyString;
-}
-
-CompilerMINGWGenerator::~CompilerMINGWGenerator()
-{
-    //dtor
-}
-
-wxString CompilerMINGWGenerator::SetupIncludeDirs(Compiler* compiler, ProjectBuildTarget* target)
-{
-    wxString result = CompilerCommandGenerator::SetupIncludeDirs(compiler, target);
-    m_VerStr = compiler->GetVersionString();
-    wxString pch_prepend = wxEmptyString;
-    bool IsGcc4 = m_VerStr.Left(1).IsSameAs(_T("4"));
-    bool HasPCH = false; // We don't know yet if there are any header files to be compiled...
-
-    // for PCH to work, the very first include dir *must* be the object output dir
-    // *only* if PCH is generated in the object output dir
-    if (target &&
-        target->GetParentProject()->GetModeForPCH() == pchObjectDir)
-    {
-        wxArrayString includedDirs; // avoid adding duplicate dirs...
-        wxString sep = wxFILE_SEP_PATH;
-        // find all PCH in project
-        int count = target->GetParentProject()->GetFilesCount();
-        for (int i = 0; i < count; ++i)
-        {
-            ProjectFile* f = target->GetParentProject()->GetFile(i);
-            if (FileTypeOf(f->relativeFilename) == ftHeader &&
-                f->compile)
-            {
-                // it is a PCH; add it's object dir to includes
-                wxString dir = wxFileName(target->GetObjectOutput() + sep + f->GetObjName()).GetPath();
-                if (includedDirs.Index(dir) == wxNOT_FOUND)
-                {
-                    includedDirs.Add(dir);
-                    QuoteStringIfNeeded(dir);
-                    if (!IsGcc4)
-                        pch_prepend << compiler->GetSwitches().includeDirs << dir << _T(' ');
-                    else
-                        pch_prepend << _T("-iquote") << dir << _T(' ');
-                }
-                HasPCH = true; // there is at least one header file to be compiled
-            }
-        }
-        // for gcc-4.0+, use the following:
-        // pch_prepend << _T("-iquote") << dir << _T(' ');
-        // for earlier versions, -I- must be used
-        if (!IsGcc4)
-            pch_prepend << _T("-I- ");
-        count = (int)includedDirs.GetCount();
-        for (int i = 0; i < count; ++i)
-        {
-            QuoteStringIfNeeded(includedDirs[i]);
-            pch_prepend << compiler->GetSwitches().includeDirs << includedDirs[i] << _T(' ');
-        }
-        pch_prepend << _T("-I. ");
-    }
-
-    // add in array
-    if (HasPCH)
-        result.Prepend(pch_prepend);
-
-    return result;
-}
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include <sdk.h>
+#include "compilerMINGWgenerator.h"
+#include <wx/intl.h>
+#include "cbexception.h"
+#include "cbproject.h"
+#include "compilerfactory.h"
+#include "compiler.h"
+#include "manager.h"
+#include "configmanager.h"
+#include "logmanager.h"
+#include "macrosmanager.h"
+#include "scriptingmanager.h"
+
+CompilerMINGWGenerator::CompilerMINGWGenerator()
+{
+    //ctor
+    m_VerStr = wxEmptyString;
+}
+
+CompilerMINGWGenerator::~CompilerMINGWGenerator()
+{
+    //dtor
+}
+
+wxString CompilerMINGWGenerator::SetupIncludeDirs(Compiler* compiler, ProjectBuildTarget* target)
+{
+    wxString result = CompilerCommandGenerator::SetupIncludeDirs(compiler, target);
+    m_VerStr = compiler->GetVersionString();
+    wxString pch_prepend = wxEmptyString;
+    bool IsGcc4 = m_VerStr.Left(1).IsSameAs(_T("4"));
+    bool HasPCH = false; // We don't know yet if there are any header files to be compiled...
+
+    // for PCH to work, the very first include dir *must* be the object output dir
+    // *only* if PCH is generated in the object output dir
+    if (target &&
+        target->GetParentProject()->GetModeForPCH() == pchObjectDir)
+    {
+        wxArrayString includedDirs; // avoid adding duplicate dirs...
+        wxString sep = wxFILE_SEP_PATH;
+        // find all PCH in project
+        int count = target->GetParentProject()->GetFilesCount();
+        for (int i = 0; i < count; ++i)
+        {
+            ProjectFile* f = target->GetParentProject()->GetFile(i);
+            if (FileTypeOf(f->relativeFilename) == ftHeader &&
+                f->compile)
+            {
+                // it is a PCH; add it's object dir to includes
+                wxString dir = wxFileName(target->GetObjectOutput() + sep + f->GetObjName()).GetPath();
+                if (includedDirs.Index(dir) == wxNOT_FOUND)
+                {
+                    includedDirs.Add(dir);
+                    QuoteStringIfNeeded(dir);
+                    if (!IsGcc4)
+                        pch_prepend << compiler->GetSwitches().includeDirs << dir << _T(' ');
+                    else
+                        pch_prepend << _T("-iquote") << dir << _T(' ');
+                }
+                HasPCH = true; // there is at least one header file to be compiled
+            }
+        }
+        // for gcc-4.0+, use the following:
+        // pch_prepend << _T("-iquote") << dir << _T(' ');
+        // for earlier versions, -I- must be used
+        if (!IsGcc4)
+            pch_prepend << _T("-I- ");
+        count = (int)includedDirs.GetCount();
+        for (int i = 0; i < count; ++i)
+        {
+            QuoteStringIfNeeded(includedDirs[i]);
+            pch_prepend << compiler->GetSwitches().includeDirs << includedDirs[i] << _T(' ');
+        }
+        pch_prepend << _T("-I. ");
+    }
+
+    // add in array
+    if (HasPCH)
+        result.Prepend(pch_prepend);
+
+    return result;
+}

Property changes on: src\plugins\compilergcc\compilerMINGWgenerator.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerMINGWgenerator.h
===================================================================
--- src/plugins/compilergcc/compilerMINGWgenerator.h	(revision 5730)
+++ src/plugins/compilergcc/compilerMINGWgenerator.h	(working copy)
@@ -1,23 +1,23 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- */
-
-#ifndef COMPILERMINGWGENERATOR_H
-#define COMPILERMINGWGENERATOR_H
-
-#include <compilercommandgenerator.h>
-
-// Overriden to support PCH for GCC
-class CompilerMINGWGenerator : public CompilerCommandGenerator
-{
-    public:
-        CompilerMINGWGenerator();
-        virtual ~CompilerMINGWGenerator();
-    protected:
-        virtual wxString SetupIncludeDirs(Compiler* compiler, ProjectBuildTarget* target);
-    private:
-        wxString m_VerStr;
-};
-
-#endif // COMPILERMINGWGENERATOR_H
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ */
+
+#ifndef COMPILERMINGWGENERATOR_H
+#define COMPILERMINGWGENERATOR_H
+
+#include <compilercommandgenerator.h>
+
+// Overriden to support PCH for GCC
+class CompilerMINGWGenerator : public CompilerCommandGenerator
+{
+    public:
+        CompilerMINGWGenerator();
+        virtual ~CompilerMINGWGenerator();
+    protected:
+        virtual wxString SetupIncludeDirs(Compiler* compiler, ProjectBuildTarget* target);
+    private:
+        wxString m_VerStr;
+};
+
+#endif // COMPILERMINGWGENERATOR_H

Property changes on: src\plugins\compilergcc\compilerMINGWgenerator.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerMSVC8.cpp
===================================================================
--- src/plugins/compilergcc/compilerMSVC8.cpp	(revision 5730)
+++ src/plugins/compilergcc/compilerMSVC8.cpp	(working copy)
@@ -1,318 +1,318 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#ifdef __WXMSW__
-// this compiler is valid only in windows
-
-#include <sdk.h>
-#include "compilerMSVC8.h"
-#include <wx/wx.h>
-#include <wx/intl.h>
-#include <wx/regex.h>
-#include <wx/config.h>
-#include <wx/msw/registry.h>
-
-CompilerMSVC8::CompilerMSVC8()
-    : Compiler(_("Microsoft Visual C++ 2005/2008"), _T("msvc8"))
-{
-    Reset();
-}
-
-CompilerMSVC8::~CompilerMSVC8()
-{
-    //dtor
-}
-
-Compiler * CompilerMSVC8::CreateCopy()
-{
-    Compiler* c = new CompilerMSVC8(*this);
-    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
-    return c;
-}
-
-void CompilerMSVC8::Reset()
-{
-    m_Programs.C = _T("cl.exe");
-    m_Programs.CPP = _T("cl.exe");
-    m_Programs.LD = _T("link.exe");
-    m_Programs.LIB = _T("link.exe");
-    m_Programs.WINDRES = _T("rc.exe");
-    m_Programs.MAKE = _T("nmake.exe");
-    m_Programs.DBG = _T("cdb.exe");
-
-    m_Switches.includeDirs = _T("/I");
-    m_Switches.libDirs = _T("/LIBPATH:");
-    m_Switches.linkLibs = _T("");
-    m_Switches.defines = _T("/D");
-    m_Switches.genericSwitch = _T("/");
-    m_Switches.objectExtension = _T("obj");
-    m_Switches.needDependencies = false;
-    m_Switches.forceCompilerUseQuotes = false;
-    m_Switches.forceLinkerUseQuotes = false;
-    m_Switches.logging = clogNone;
-    m_Switches.libPrefix = _T("");
-    m_Switches.libExtension = _T("lib");
-    m_Switches.linkerNeedsLibPrefix = false;
-    m_Switches.linkerNeedsLibExtension = true;
-
-    m_Options.ClearOptions();
-
-    //Language
-    m_Options.AddOption(_("Produce debugging symbols"),
-                        _T("/Zi"),
-                        _("Language"),
-                        _T("/DEBUG"),
-                        true,
-                        _T("/Og /O1 /O2 /Os /Ot /Ox /NDEBUG"),
-                        _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
-    m_Options.AddOption(_("Disable extensions"), _T("/Za"), _("Language"));
-    // /vd{0|1|2} disable/enable vtordisp
-    // /vm<x> type of pointers to members
-    m_Options.AddOption(_("Enforce Standard C++ for scoping rules"), _T("/Zc:forScope"), _("Language"));
-    m_Options.AddOption(_("wchar_t is the native type, not a typedef"), _T("/Zc:wchar_t"), _("Language"));
-    m_Options.AddOption(_("Enable Edit and Continue debug info"), _T("/ZI"), _("Language"));
-    m_Options.AddOption(_("Enable OpenMP 2.0 language extensions"), _T("/openmp"), _("Language"));
-
-    //Warnings
-    m_Options.AddOption(_("Disable all warnings"), _T("/w"), _("Warnings"));
-    m_Options.AddOption(_("Enable all compiler warnings"), _T("/Wall"), _("Warnings"));
-    m_Options.AddOption(_("Enable warnings level 1"), _T("/W1"), _("Warnings"));
-    m_Options.AddOption(_("Enable warnings level 2"), _T("/W2"), _("Warnings"));
-    m_Options.AddOption(_("Enable warnings level 3"), _T("/W3"), _("Warnings"));
-    m_Options.AddOption(_("Enable warnings level 4"), _T("/W4"), _("Warnings"));
-    m_Options.AddOption(_("Enable one line diagnostics"), _T("/WL"), _("Warnings"));
-    m_Options.AddOption(_("Enable 64bit porting warnings"), _T("/Wp64"), _("Warnings"));
-    m_Options.AddOption(_("Treat warnings as errors"), _T("/WX"), _("Warnings"));
-
-    //Optimization
-    //m_Options.AddOption(_("Enable global optimization"), _T("/Og"), _("Optimization")); // Deprecated in MSVC 8
-    m_Options.AddOption(_("Maximum optimization (no need for other options)"), _T("/Ox"), _("Optimization"));
-    m_Options.AddOption(_("Disable optimizations"), _T("/Od"), _("Optimization")); //added no optimization
-    m_Options.AddOption(_("Minimize space"), _T("/O1"), _("Optimization"));
-    m_Options.AddOption(_("Maximize speed"), _T("/O2"), _("Optimization"));
-    m_Options.AddOption(_("Favor code space"), _T("/Os"), _("Optimization"));
-    m_Options.AddOption(_("Favor code speed"), _T("/Ot"), _("Optimization"));
-    m_Options.AddOption(_("Enable intrinsic functions"), _T("/Oi"), _("Optimization"));
-    m_Options.AddOption(_("Enable frame pointer omission"), _T("/Oy"), _("Optimization"));
-    m_Options.AddOption(_("Inline expansion"), _T("/Ob"), _("Optimization"));
-
-    //Code generation
-    m_Options.AddOption(_("Enable read-only string pooling"), _T("/GF"), _("Code generation"));
-    m_Options.AddOption(_("Separate functions for linker"), _T("/Gy"), _("Code generation"));
-    m_Options.AddOption(_("Enable security checks"), _T("/GS"), _("Code generation"));
-    m_Options.AddOption(_("Enable C++ RTTI"), _T("/GR"), _("Code generation"));
-    m_Options.AddOption(_("Enable C++ exception handling (no SEH)"), _T("/EHs"), _("Code generation"));
-    m_Options.AddOption(_("Enable C++ exception handling (w/ SEH)"), _T("/EHa"), _("Code generation"));
-    m_Options.AddOption(_("extern \"C\" defaults to nothrow"), _T("/EHc"), _("Code generation"));
-    m_Options.AddOption(_("Consider floating-point exceptions when generating code"), _T("/fp:except"), _("Code generation"));
-    m_Options.AddOption(_("Do not consider floating-point exceptions when generating code"), _T("/fp:except-"), _("Code generation"));
-    m_Options.AddOption(_("\"fast\" floating-point model; results are less predictable"), _T("/fp:fast"), _("Code generation"));
-    m_Options.AddOption(_("\"precise\" floating-point model; results are predictable"), _T("/fp:precise"), _("Code generation"));
-    m_Options.AddOption(_("\"strict\" floating-point model (implies /fp:except)"), _T("/fp:strict"), _("Code generation"));
-    m_Options.AddOption(_("Enable minimal rebuild"), _T("/Gm"), _("Code generation"));
-    m_Options.AddOption(_("Enable link-time code generation"), _T("/GL"), _("Code generation"), _T(""), true, _T("/Zi /ZI"), _("Link-time code generation is incompatible with debugging info"));
-    m_Options.AddOption(_("Optimize for windows application"), _T("/GA"), _("Code generation"));
-    //m_Options.AddOption(_("Force stack checking for all funcs"), _T("/Ge"), _("Code generation")); // Deprecated in MSVC 8
-    // /Gs[num] control stack checking calls
-    m_Options.AddOption(_("Enable _penter function call"), _T("/Gh"), _("Code generation"));
-    m_Options.AddOption(_("Enable _pexit function call"), _T("/GH"), _("Code generation"));
-    m_Options.AddOption(_("Generate fiber-safe TLS accesses"), _T("/GT"), _("Code generation"));
-    m_Options.AddOption(_("Enable fast checks (/RTCsu)"), _T("/RTC1"), _("Code generation"));
-    m_Options.AddOption(_("Convert to smaller type checks"), _T("/RTCc"), _("Code generation"));
-    m_Options.AddOption(_("Stack Frame runtime checking"), _T("/RTCs"), _("Code generation"));
-    m_Options.AddOption(_("Uninitialized local usage checks"), _T("/RTCu"), _("Code generation"));
-    // /clr[:option] compile for common language runtime, where option is:
-    //  pure - produce IL-only output file (no native executable code)
-    //  safe - produce IL-only verifiable output file
-    //  oldSyntax - accept the Managed Extensions syntax from Visual C++ 2002/2003
-    //  initialAppDomain - enable initial AppDomain behavior of Visual C++ 2002
-    //  noAssembly - do not produce an assembly
-    m_Options.AddOption(_("__cdecl calling convention"), _T("/Gd"), _("Code generation"));
-    m_Options.AddOption(_("__fastcall calling convention"), _T("/Gr"), _("Code generation"));
-    m_Options.AddOption(_("__stdcall calling convention"), _T("/Gz"), _("Code generation"));
-    //m_Options.AddOption(_("use FIST instead of ftol("), _T("/QIfist"), _("Code generation")); // Deprecated in MSVC 8
-    //m_Options.AddOption(_("Ensure function padding for hotpatchable images"), _T("/hotpatch"), _("Code generation"));
-    m_Options.AddOption(_("Enable SSE instruction set"), _T("/arch:SSE"), _("Code generation"));
-    m_Options.AddOption(_("Enable SSE2 instruction set"), _T("/arch:SSE2"), _("Code generation"));
-
-    //Misc
-    m_Options.AddOption(_("Default char type is unsigned"), _T("/J"), _("Other"));
-    m_Options.AddOption(_("Compile all files as .c"), _T("/TC"), _("Other"));
-    m_Options.AddOption(_("Compile all files as .cpp"), _T("/TP"), _("Other"));
-
-    // Added Runtime options for cl.exe, that is the runtime library selection
-    m_Options.AddOption(_("Multi-threaded Runtime Library"), _T("/MT"), _("Runtime"), _T(""), true);
-    m_Options.AddOption(_("Multi-threaded Debug Runtime Library"), _T("/MTd"), _("Runtime"));
-    m_Options.AddOption(_("Multi-threaded DLL Runtime Library"), _T("/MD"), _("Runtime"));
-    m_Options.AddOption(_("Multi-threaded DLL Debug Runtime Library"), _T("/MDd"), _("Runtime"));
-
-
-    m_Commands[(int)ctCompileObjectCmd].push_back( CompilerTool(_T("$compiler /nologo $options $includes /c $file /Fo$object")) );
-    m_Commands[(int)ctCompileResourceCmd].push_back( CompilerTool(_T("$rescomp $res_includes -fo$resource_output $file")) );
-    m_Commands[(int)ctLinkExeCmd].push_back( CompilerTool(_T("$linker /nologo /subsystem:windows $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options")) );
-    m_Commands[(int)ctLinkConsoleExeCmd].push_back( CompilerTool(_T("$linker /nologo $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options")) );
-    m_Commands[(int)ctLinkDynamicCmd].push_back( CompilerTool(_T("$linker /dll /nologo $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options")) );
-    m_Commands[(int)ctLinkStaticCmd].push_back( CompilerTool(_T("$lib_linker /lib /nologo $libdirs /out:$static_output $libs $link_objects $link_resobjects $link_options")) );
-    m_Commands[(int)ctLinkNativeCmd].push_back( CompilerTool(_T("$linker /nologo /subsystem:native $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options")) );
-
-    LoadDefaultRegExArray();
-
-    m_CompilerOptions.Clear();
-    m_LinkerOptions.Clear();
-    m_LinkLibs.Clear();
-    m_CmdsBefore.Clear();
-    m_CmdsAfter.Clear();
-}
-
-void CompilerMSVC8::LoadDefaultRegExArray()
-{
-    m_RegExes.Clear();
-    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T(")\\(([0-9]+)\\) :[ \t]([Ww]arning[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T(")\\(([0-9]+)\\) :[ \t](.*[Ee]rror[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker warning"), cltWarning, _T("(") + FilePathWithSpaces + _T(")[ \t]+:[ \t]+(.*warning LNK[0-9]+.*)"), 2, 1, 0));
-    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T(")[ \t]+:[ \t]+(.*error LNK[0-9]+.*)"), 2, 1, 0));
-}
-
-AutoDetectResult CompilerMSVC8::AutoDetectInstallationDir()
-{
-    wxString sep = wxFileName::GetPathSeparator();
-    wxString idepath;
-
-    // Read the VCToolkitInstallDir environment variable
-    wxGetEnv(_T("VS90COMNTOOLS"), &m_MasterPath);
-    if(m_MasterPath.IsEmpty())
-    {
-        wxGetEnv(_T("VS80COMNTOOLS"), &m_MasterPath);
-    }
-
-    if ( !m_MasterPath.IsEmpty() )
-    {
-        wxFileName name = wxFileName::DirName(m_MasterPath);
-
-        name.RemoveLastDir();
-        name.AppendDir(_T("IDE"));
-        idepath = name.GetPath();
-        if ( !wxDirExists(idepath) )
-            idepath = _T("");
-
-        name.RemoveLastDir();
-        name.RemoveLastDir();
-        name.AppendDir(_T("VC"));
-        m_MasterPath = name.GetPath();
-        if ( !wxDirExists(m_MasterPath) )
-            m_MasterPath = _T("");
-    }
-
-    if (m_MasterPath.IsEmpty())
-    {
-        // just a guess; the default installation dir
-        wxString Programs = _T("C:\\Program Files");
-        // what's the "Program Files" location
-        // TO DO : support 64 bit ->    32 bit apps are in "ProgramFiles(x86)"
-        //                              64 bit apps are in "ProgramFiles"
-        wxGetEnv(_T("ProgramFiles"), &Programs);
-        m_MasterPath = Programs + _T("\\Microsoft Visual Studio 9.0\\VC");
-        idepath = Programs + _T("\\Microsoft Visual Studio 9.0\\Common7\\IDE");
-        if(!wxDirExists(m_MasterPath))
-        {
-            m_MasterPath = Programs + _T("\\Microsoft Visual Studio 8\\VC");
-            idepath = Programs + _T("\\Microsoft Visual Studio 8\\Common7\\IDE");
-        }
-    }
-
-    if (!m_MasterPath.IsEmpty())
-    {
-        wxRegKey key; // defaults to HKCR
-        bool sdkfound = false;
-        wxString dir;
-
-        // we need to add the IDE path, as the compiler requires some DLL present there
-        m_ExtraPaths.Add(idepath);
-
-        // try to detect Platform SDK (old versions)
-        key.SetName(_T("HKEY_CURRENT_USER\\Software\\Microsoft\\Win32SDK\\Directories"));
-        if (key.Exists() && key.Open(wxRegKey::Read))
-        {
-            key.QueryValue(_T("Install Dir"), dir);
-            if (!dir.IsEmpty() && wxDirExists(dir))
-                sdkfound = true;
-            key.Close();
-        }
-
-        // try to detect Platform SDK (newer versions)
-        wxString msPsdkKeyName[2] = { _T("HKEY_CURRENT_USER\\Software\\Microsoft\\MicrosoftSDK\\InstalledSDKs"),
-                                      _T("HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft SDKs\\Windows") };
-        wxString msPsdkKeyValue[2] = { _T("Install Dir"), _T("InstallationFolder") };
-        for (int i = 0; i < 2; ++i)
-        {
-            key.SetName(msPsdkKeyName[i]);
-            if (!sdkfound && key.Exists() && key.Open(wxRegKey::Read))
-            {
-                wxString name;
-                long idx;
-                bool cont = key.GetFirstKey(name, idx);
-
-                while(cont)
-                {
-                    wxRegKey subkey(key.GetName(), name);
-
-                    if (subkey.Open(wxRegKey::Read) &&
-                        (subkey.QueryValue(msPsdkKeyValue[i], dir), !dir.IsEmpty()) &&
-                        wxDirExists(dir))
-                    {
-                        sdkfound = true;
-                        cont = false;
-                    }
-                    else
-                        cont = key.GetNextKey(name, idx);
-
-                    subkey.Close();
-                }
-                key.Close();
-            }
-
-            if (sdkfound)
-                break;
-        }
-
-        // add include dirs for MS Platform SDK too (let them come before compiler's path)
-        if (sdkfound)
-        {
-            if (dir.GetChar(dir.Length() - 1) != '\\')
-                dir += sep;
-            AddIncludeDir(dir + _T("include"));
-            AddResourceIncludeDir(dir + _T("include"));
-            AddLibDir(dir + _T("lib"));
-            m_ExtraPaths.Add(dir + _T("bin"));
-        }
-
-        // now the compiler's include directories
-        AddIncludeDir(m_MasterPath + sep + _T("include"));
-        AddLibDir(m_MasterPath + sep + _T("lib"));
-        AddResourceIncludeDir(m_MasterPath + sep + _T("include"));
-
-        // add extra paths for "Debugging tools" too
-        key.SetName(_T("HKEY_CURRENT_USER\\Software\\Microsoft\\DebuggingTools"));
-        if (key.Exists() && key.Open(wxRegKey::Read))
-        {
-            key.QueryValue(_T("WinDbg"), dir);
-            if (!dir.IsEmpty() && wxDirExists(dir))
-            {
-                if (dir.GetChar(dir.Length() - 1) == '\\')
-                    dir.Remove(dir.Length() - 1, 1);
-                m_ExtraPaths.Add(dir);
-            }
-        }
-        key.Close();
-    }
-
-    return wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
-}
-
-#endif // __WXMSW__
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#ifdef __WXMSW__
+// this compiler is valid only in windows
+
+#include <sdk.h>
+#include "compilerMSVC8.h"
+#include <wx/wx.h>
+#include <wx/intl.h>
+#include <wx/regex.h>
+#include <wx/config.h>
+#include <wx/msw/registry.h>
+
+CompilerMSVC8::CompilerMSVC8()
+    : Compiler(_("Microsoft Visual C++ 2005/2008"), _T("msvc8"))
+{
+    Reset();
+}
+
+CompilerMSVC8::~CompilerMSVC8()
+{
+    //dtor
+}
+
+Compiler * CompilerMSVC8::CreateCopy()
+{
+    Compiler* c = new CompilerMSVC8(*this);
+    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
+    return c;
+}
+
+void CompilerMSVC8::Reset()
+{
+    m_Programs.C = _T("cl.exe");
+    m_Programs.CPP = _T("cl.exe");
+    m_Programs.LD = _T("link.exe");
+    m_Programs.LIB = _T("link.exe");
+    m_Programs.WINDRES = _T("rc.exe");
+    m_Programs.MAKE = _T("nmake.exe");
+    m_Programs.DBG = _T("cdb.exe");
+
+    m_Switches.includeDirs = _T("/I");
+    m_Switches.libDirs = _T("/LIBPATH:");
+    m_Switches.linkLibs = _T("");
+    m_Switches.defines = _T("/D");
+    m_Switches.genericSwitch = _T("/");
+    m_Switches.objectExtension = _T("obj");
+    m_Switches.needDependencies = false;
+    m_Switches.forceCompilerUseQuotes = false;
+    m_Switches.forceLinkerUseQuotes = false;
+    m_Switches.logging = clogNone;
+    m_Switches.libPrefix = _T("");
+    m_Switches.libExtension = _T("lib");
+    m_Switches.linkerNeedsLibPrefix = false;
+    m_Switches.linkerNeedsLibExtension = true;
+
+    m_Options.ClearOptions();
+
+    //Language
+    m_Options.AddOption(_("Produce debugging symbols"),
+                        _T("/Zi"),
+                        _("Language"),
+                        _T("/DEBUG"),
+                        true,
+                        _T("/Og /O1 /O2 /Os /Ot /Ox /NDEBUG"),
+                        _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
+    m_Options.AddOption(_("Disable extensions"), _T("/Za"), _("Language"));
+    // /vd{0|1|2} disable/enable vtordisp
+    // /vm<x> type of pointers to members
+    m_Options.AddOption(_("Enforce Standard C++ for scoping rules"), _T("/Zc:forScope"), _("Language"));
+    m_Options.AddOption(_("wchar_t is the native type, not a typedef"), _T("/Zc:wchar_t"), _("Language"));
+    m_Options.AddOption(_("Enable Edit and Continue debug info"), _T("/ZI"), _("Language"));
+    m_Options.AddOption(_("Enable OpenMP 2.0 language extensions"), _T("/openmp"), _("Language"));
+
+    //Warnings
+    m_Options.AddOption(_("Disable all warnings"), _T("/w"), _("Warnings"));
+    m_Options.AddOption(_("Enable all compiler warnings"), _T("/Wall"), _("Warnings"));
+    m_Options.AddOption(_("Enable warnings level 1"), _T("/W1"), _("Warnings"));
+    m_Options.AddOption(_("Enable warnings level 2"), _T("/W2"), _("Warnings"));
+    m_Options.AddOption(_("Enable warnings level 3"), _T("/W3"), _("Warnings"));
+    m_Options.AddOption(_("Enable warnings level 4"), _T("/W4"), _("Warnings"));
+    m_Options.AddOption(_("Enable one line diagnostics"), _T("/WL"), _("Warnings"));
+    m_Options.AddOption(_("Enable 64bit porting warnings"), _T("/Wp64"), _("Warnings"));
+    m_Options.AddOption(_("Treat warnings as errors"), _T("/WX"), _("Warnings"));
+
+    //Optimization
+    //m_Options.AddOption(_("Enable global optimization"), _T("/Og"), _("Optimization")); // Deprecated in MSVC 8
+    m_Options.AddOption(_("Maximum optimization (no need for other options)"), _T("/Ox"), _("Optimization"));
+    m_Options.AddOption(_("Disable optimizations"), _T("/Od"), _("Optimization")); //added no optimization
+    m_Options.AddOption(_("Minimize space"), _T("/O1"), _("Optimization"));
+    m_Options.AddOption(_("Maximize speed"), _T("/O2"), _("Optimization"));
+    m_Options.AddOption(_("Favor code space"), _T("/Os"), _("Optimization"));
+    m_Options.AddOption(_("Favor code speed"), _T("/Ot"), _("Optimization"));
+    m_Options.AddOption(_("Enable intrinsic functions"), _T("/Oi"), _("Optimization"));
+    m_Options.AddOption(_("Enable frame pointer omission"), _T("/Oy"), _("Optimization"));
+    m_Options.AddOption(_("Inline expansion"), _T("/Ob"), _("Optimization"));
+
+    //Code generation
+    m_Options.AddOption(_("Enable read-only string pooling"), _T("/GF"), _("Code generation"));
+    m_Options.AddOption(_("Separate functions for linker"), _T("/Gy"), _("Code generation"));
+    m_Options.AddOption(_("Enable security checks"), _T("/GS"), _("Code generation"));
+    m_Options.AddOption(_("Enable C++ RTTI"), _T("/GR"), _("Code generation"));
+    m_Options.AddOption(_("Enable C++ exception handling (no SEH)"), _T("/EHs"), _("Code generation"));
+    m_Options.AddOption(_("Enable C++ exception handling (w/ SEH)"), _T("/EHa"), _("Code generation"));
+    m_Options.AddOption(_("extern \"C\" defaults to nothrow"), _T("/EHc"), _("Code generation"));
+    m_Options.AddOption(_("Consider floating-point exceptions when generating code"), _T("/fp:except"), _("Code generation"));
+    m_Options.AddOption(_("Do not consider floating-point exceptions when generating code"), _T("/fp:except-"), _("Code generation"));
+    m_Options.AddOption(_("\"fast\" floating-point model; results are less predictable"), _T("/fp:fast"), _("Code generation"));
+    m_Options.AddOption(_("\"precise\" floating-point model; results are predictable"), _T("/fp:precise"), _("Code generation"));
+    m_Options.AddOption(_("\"strict\" floating-point model (implies /fp:except)"), _T("/fp:strict"), _("Code generation"));
+    m_Options.AddOption(_("Enable minimal rebuild"), _T("/Gm"), _("Code generation"));
+    m_Options.AddOption(_("Enable link-time code generation"), _T("/GL"), _("Code generation"), _T(""), true, _T("/Zi /ZI"), _("Link-time code generation is incompatible with debugging info"));
+    m_Options.AddOption(_("Optimize for windows application"), _T("/GA"), _("Code generation"));
+    //m_Options.AddOption(_("Force stack checking for all funcs"), _T("/Ge"), _("Code generation")); // Deprecated in MSVC 8
+    // /Gs[num] control stack checking calls
+    m_Options.AddOption(_("Enable _penter function call"), _T("/Gh"), _("Code generation"));
+    m_Options.AddOption(_("Enable _pexit function call"), _T("/GH"), _("Code generation"));
+    m_Options.AddOption(_("Generate fiber-safe TLS accesses"), _T("/GT"), _("Code generation"));
+    m_Options.AddOption(_("Enable fast checks (/RTCsu)"), _T("/RTC1"), _("Code generation"));
+    m_Options.AddOption(_("Convert to smaller type checks"), _T("/RTCc"), _("Code generation"));
+    m_Options.AddOption(_("Stack Frame runtime checking"), _T("/RTCs"), _("Code generation"));
+    m_Options.AddOption(_("Uninitialized local usage checks"), _T("/RTCu"), _("Code generation"));
+    // /clr[:option] compile for common language runtime, where option is:
+    //  pure - produce IL-only output file (no native executable code)
+    //  safe - produce IL-only verifiable output file
+    //  oldSyntax - accept the Managed Extensions syntax from Visual C++ 2002/2003
+    //  initialAppDomain - enable initial AppDomain behavior of Visual C++ 2002
+    //  noAssembly - do not produce an assembly
+    m_Options.AddOption(_("__cdecl calling convention"), _T("/Gd"), _("Code generation"));
+    m_Options.AddOption(_("__fastcall calling convention"), _T("/Gr"), _("Code generation"));
+    m_Options.AddOption(_("__stdcall calling convention"), _T("/Gz"), _("Code generation"));
+    //m_Options.AddOption(_("use FIST instead of ftol("), _T("/QIfist"), _("Code generation")); // Deprecated in MSVC 8
+    //m_Options.AddOption(_("Ensure function padding for hotpatchable images"), _T("/hotpatch"), _("Code generation"));
+    m_Options.AddOption(_("Enable SSE instruction set"), _T("/arch:SSE"), _("Code generation"));
+    m_Options.AddOption(_("Enable SSE2 instruction set"), _T("/arch:SSE2"), _("Code generation"));
+
+    //Misc
+    m_Options.AddOption(_("Default char type is unsigned"), _T("/J"), _("Other"));
+    m_Options.AddOption(_("Compile all files as .c"), _T("/TC"), _("Other"));
+    m_Options.AddOption(_("Compile all files as .cpp"), _T("/TP"), _("Other"));
+
+    // Added Runtime options for cl.exe, that is the runtime library selection
+    m_Options.AddOption(_("Multi-threaded Runtime Library"), _T("/MT"), _("Runtime"), _T(""), true);
+    m_Options.AddOption(_("Multi-threaded Debug Runtime Library"), _T("/MTd"), _("Runtime"));
+    m_Options.AddOption(_("Multi-threaded DLL Runtime Library"), _T("/MD"), _("Runtime"));
+    m_Options.AddOption(_("Multi-threaded DLL Debug Runtime Library"), _T("/MDd"), _("Runtime"));
+
+
+    m_Commands[(int)ctCompileObjectCmd].push_back( CompilerTool(_T("$compiler /nologo $options $includes /c $file /Fo$object")) );
+    m_Commands[(int)ctCompileResourceCmd].push_back( CompilerTool(_T("$rescomp $res_includes -fo$resource_output $file")) );
+    m_Commands[(int)ctLinkExeCmd].push_back( CompilerTool(_T("$linker /nologo /subsystem:windows $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options")) );
+    m_Commands[(int)ctLinkConsoleExeCmd].push_back( CompilerTool(_T("$linker /nologo $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options")) );
+    m_Commands[(int)ctLinkDynamicCmd].push_back( CompilerTool(_T("$linker /dll /nologo $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options")) );
+    m_Commands[(int)ctLinkStaticCmd].push_back( CompilerTool(_T("$lib_linker /lib /nologo $libdirs /out:$static_output $libs $link_objects $link_resobjects $link_options")) );
+    m_Commands[(int)ctLinkNativeCmd].push_back( CompilerTool(_T("$linker /nologo /subsystem:native $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options")) );
+
+    LoadDefaultRegExArray();
+
+    m_CompilerOptions.Clear();
+    m_LinkerOptions.Clear();
+    m_LinkLibs.Clear();
+    m_CmdsBefore.Clear();
+    m_CmdsAfter.Clear();
+}
+
+void CompilerMSVC8::LoadDefaultRegExArray()
+{
+    m_RegExes.Clear();
+    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T(")\\(([0-9]+)\\) :[ \t]([Ww]arning[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T(")\\(([0-9]+)\\) :[ \t](.*[Ee]rror[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker warning"), cltWarning, _T("(") + FilePathWithSpaces + _T(")[ \t]+:[ \t]+(.*warning LNK[0-9]+.*)"), 2, 1, 0));
+    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T(")[ \t]+:[ \t]+(.*error LNK[0-9]+.*)"), 2, 1, 0));
+}
+
+AutoDetectResult CompilerMSVC8::AutoDetectInstallationDir()
+{
+    wxString sep = wxFileName::GetPathSeparator();
+    wxString idepath;
+
+    // Read the VCToolkitInstallDir environment variable
+    wxGetEnv(_T("VS90COMNTOOLS"), &m_MasterPath);
+    if(m_MasterPath.IsEmpty())
+    {
+        wxGetEnv(_T("VS80COMNTOOLS"), &m_MasterPath);
+    }
+
+    if ( !m_MasterPath.IsEmpty() )
+    {
+        wxFileName name = wxFileName::DirName(m_MasterPath);
+
+        name.RemoveLastDir();
+        name.AppendDir(_T("IDE"));
+        idepath = name.GetPath();
+        if ( !wxDirExists(idepath) )
+            idepath = _T("");
+
+        name.RemoveLastDir();
+        name.RemoveLastDir();
+        name.AppendDir(_T("VC"));
+        m_MasterPath = name.GetPath();
+        if ( !wxDirExists(m_MasterPath) )
+            m_MasterPath = _T("");
+    }
+
+    if (m_MasterPath.IsEmpty())
+    {
+        // just a guess; the default installation dir
+        wxString Programs = _T("C:\\Program Files");
+        // what's the "Program Files" location
+        // TO DO : support 64 bit ->    32 bit apps are in "ProgramFiles(x86)"
+        //                              64 bit apps are in "ProgramFiles"
+        wxGetEnv(_T("ProgramFiles"), &Programs);
+        m_MasterPath = Programs + _T("\\Microsoft Visual Studio 9.0\\VC");
+        idepath = Programs + _T("\\Microsoft Visual Studio 9.0\\Common7\\IDE");
+        if(!wxDirExists(m_MasterPath))
+        {
+            m_MasterPath = Programs + _T("\\Microsoft Visual Studio 8\\VC");
+            idepath = Programs + _T("\\Microsoft Visual Studio 8\\Common7\\IDE");
+        }
+    }
+
+    if (!m_MasterPath.IsEmpty())
+    {
+        wxRegKey key; // defaults to HKCR
+        bool sdkfound = false;
+        wxString dir;
+
+        // we need to add the IDE path, as the compiler requires some DLL present there
+        m_ExtraPaths.Add(idepath);
+
+        // try to detect Platform SDK (old versions)
+        key.SetName(_T("HKEY_CURRENT_USER\\Software\\Microsoft\\Win32SDK\\Directories"));
+        if (key.Exists() && key.Open(wxRegKey::Read))
+        {
+            key.QueryValue(_T("Install Dir"), dir);
+            if (!dir.IsEmpty() && wxDirExists(dir))
+                sdkfound = true;
+            key.Close();
+        }
+
+        // try to detect Platform SDK (newer versions)
+        wxString msPsdkKeyName[2] = { _T("HKEY_CURRENT_USER\\Software\\Microsoft\\MicrosoftSDK\\InstalledSDKs"),
+                                      _T("HKEY_CURRENT_USER\\Software\\Microsoft\\Microsoft SDKs\\Windows") };
+        wxString msPsdkKeyValue[2] = { _T("Install Dir"), _T("InstallationFolder") };
+        for (int i = 0; i < 2; ++i)
+        {
+            key.SetName(msPsdkKeyName[i]);
+            if (!sdkfound && key.Exists() && key.Open(wxRegKey::Read))
+            {
+                wxString name;
+                long idx;
+                bool cont = key.GetFirstKey(name, idx);
+
+                while(cont)
+                {
+                    wxRegKey subkey(key.GetName(), name);
+
+                    if (subkey.Open(wxRegKey::Read) &&
+                        (subkey.QueryValue(msPsdkKeyValue[i], dir), !dir.IsEmpty()) &&
+                        wxDirExists(dir))
+                    {
+                        sdkfound = true;
+                        cont = false;
+                    }
+                    else
+                        cont = key.GetNextKey(name, idx);
+
+                    subkey.Close();
+                }
+                key.Close();
+            }
+
+            if (sdkfound)
+                break;
+        }
+
+        // add include dirs for MS Platform SDK too (let them come before compiler's path)
+        if (sdkfound)
+        {
+            if (dir.GetChar(dir.Length() - 1) != '\\')
+                dir += sep;
+            AddIncludeDir(dir + _T("include"));
+            AddResourceIncludeDir(dir + _T("include"));
+            AddLibDir(dir + _T("lib"));
+            m_ExtraPaths.Add(dir + _T("bin"));
+        }
+
+        // now the compiler's include directories
+        AddIncludeDir(m_MasterPath + sep + _T("include"));
+        AddLibDir(m_MasterPath + sep + _T("lib"));
+        AddResourceIncludeDir(m_MasterPath + sep + _T("include"));
+
+        // add extra paths for "Debugging tools" too
+        key.SetName(_T("HKEY_CURRENT_USER\\Software\\Microsoft\\DebuggingTools"));
+        if (key.Exists() && key.Open(wxRegKey::Read))
+        {
+            key.QueryValue(_T("WinDbg"), dir);
+            if (!dir.IsEmpty() && wxDirExists(dir))
+            {
+                if (dir.GetChar(dir.Length() - 1) == '\\')
+                    dir.Remove(dir.Length() - 1, 1);
+                m_ExtraPaths.Add(dir);
+            }
+        }
+        key.Close();
+    }
+
+    return wxFileExists(m_MasterPath + sep + _T("bin") + sep + m_Programs.C) ? adrDetected : adrGuessed;
+}
+
+#endif // __WXMSW__

Property changes on: src\plugins\compilergcc\compilerMSVC8.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerMSVC8.h
===================================================================
--- src/plugins/compilergcc/compilerMSVC8.h	(revision 5730)
+++ src/plugins/compilergcc/compilerMSVC8.h	(working copy)
@@ -1,30 +1,30 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- */
-
-#ifdef __WXMSW__
-// this compiler is valid only in windows
-// for VC8 and VC9 (DevStudio 2005 and 2008 that is)
-
-#ifndef COMPILERMSVC8_H
-#define COMPILERMSVC8_H
-
-#include <compiler.h>
-
-class CompilerMSVC8 : public Compiler
-{
-	public:
-		CompilerMSVC8();
-		virtual ~CompilerMSVC8();
-        virtual void Reset();
-		virtual void LoadDefaultRegExArray();
-        virtual AutoDetectResult AutoDetectInstallationDir();
-	protected:
-        Compiler * CreateCopy();
-	private:
-};
-
-#endif // COMPILERMSVC8_H
-
-#endif // __WXMSW__
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ */
+
+#ifdef __WXMSW__
+// this compiler is valid only in windows
+// for VC8 and VC9 (DevStudio 2005 and 2008 that is)
+
+#ifndef COMPILERMSVC8_H
+#define COMPILERMSVC8_H
+
+#include <compiler.h>
+
+class CompilerMSVC8 : public Compiler
+{
+	public:
+		CompilerMSVC8();
+		virtual ~CompilerMSVC8();
+        virtual void Reset();
+		virtual void LoadDefaultRegExArray();
+        virtual AutoDetectResult AutoDetectInstallationDir();
+	protected:
+        Compiler * CreateCopy();
+	private:
+};
+
+#endif // COMPILERMSVC8_H
+
+#endif // __WXMSW__

Property changes on: src\plugins\compilergcc\compilerMSVC8.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerOWgenerator.cpp
===================================================================
--- src/plugins/compilergcc/compilerOWgenerator.cpp	(revision 5730)
+++ src/plugins/compilergcc/compilerOWgenerator.cpp	(working copy)
@@ -1,281 +1,281 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#ifdef __WXMSW__ // For Windows Only
-
-#include <sdk.h>
-#ifndef CB_PRECOMP
-#   include "compiler.h"
-#   include "cbproject.h"
-#   include "projectbuildtarget.h"
-#   include "logmanager.h"
-#   include "macrosmanager.h"
-#endif
-#include "compileoptionsbase.h"
-#include "compilerOWgenerator.h"
-
-
-CompilerOWGenerator::CompilerOWGenerator()
-{
-    //ctor
-    m_DebuggerType = wxEmptyString;
-}
-
-CompilerOWGenerator::~CompilerOWGenerator()
-{
-    //dtor
-}
-
-wxString CompilerOWGenerator::SetupLibrariesDirs(Compiler* compiler, ProjectBuildTarget* target)
-{
-    wxArrayString LibDirs = compiler->GetLibDirs();
-    if (LibDirs.IsEmpty())
-        return wxEmptyString;
-    wxString Result = compiler->GetSwitches().libDirs + _T(" ");
-    if (target)
-    {
-        wxString tmp, targetStr, projectStr;
-        // First prepare the target
-        const wxArrayString targetArr = target->GetLibDirs();
-        for (size_t i = 0; i < targetArr.GetCount(); ++i)
-        {
-            tmp = targetArr[i];
-            Manager::Get()->GetMacrosManager()->ReplaceMacros(tmp, target);
-            targetStr << tmp << _T(";");
-        }
-        // Now for project
-        const wxArrayString projectArr = target->GetParentProject()->GetLibDirs();
-        for (size_t i = 0; i < projectArr.GetCount(); ++i)
-        {
-            tmp = projectArr[i];
-            Manager::Get()->GetMacrosManager()->ReplaceMacros(tmp, target);
-            projectStr << tmp << _T(";");
-        }
-        // Decide order and arrange it
-        Result << GetOrderedOptions(target, ortLibDirs, projectStr, targetStr);
-    }
-    // Finally add the compiler options
-    const wxArrayString compilerArr = compiler->GetLibDirs();
-    wxString tmp, compilerStr;
-    for (size_t i = 0; i < compilerArr.GetCount(); ++i)
-    {
-        tmp = compilerArr[i];
-        Manager::Get()->GetMacrosManager()->ReplaceMacros(tmp, target);
-        compilerStr << tmp << _T(";");
-    }
-    // Now append it
-    Result << compilerStr;
-    // Remove last ';' char
-    Result = Result.Trim(true);
-    if (Result.Right(1).IsSameAs(_T(';')))
-        Result = Result.RemoveLast();
-    return Result;
-}
-
-wxString CompilerOWGenerator::SetupLinkerOptions(Compiler* compiler, ProjectBuildTarget* target)
-{
-    wxString Temp, LinkerOptions, Result;
-    wxArrayString ComLinkerOptions, OtherLinkerOptions, LinkerOptionsArr;
-    int i, j, Count;
-
-    for (j = 0; j < 3; ++j)
-    {
-        LinkerOptions = wxEmptyString;
-        if (j == 0 && target)
-        {
-            ComLinkerOptions = target->GetCompilerOptions();
-            OtherLinkerOptions = target->GetLinkerOptions();
-        }
-        else if (j == 1 && target)
-        {
-            ComLinkerOptions = target->GetParentProject()->GetCompilerOptions();
-            OtherLinkerOptions = target->GetParentProject()->GetLinkerOptions();
-        }
-        else if (j == 2)
-        {
-            ComLinkerOptions = compiler->GetCompilerOptions();
-            OtherLinkerOptions = compiler->GetLinkerOptions();
-        }
-        if (!ComLinkerOptions.IsEmpty())
-        {
-            Count = ComLinkerOptions.GetCount();
-            for (i = 0; i < Count; ++i)
-            {
-                Temp = ComLinkerOptions[i];
-
-                // Replace any macros
-                Manager::Get()->GetMacrosManager()->ReplaceMacros(Temp, target);
-
-// TODO (Biplab#5#): Move the linker options parsing code to a different function
-                //Let's not scan all the options unnecessarily
-                if (Temp.Matches(_T("-b*")))
-                {
-                    Temp = MapTargetType(Temp, target->GetTargetType());
-                    if (!Temp.IsEmpty() && LinkerOptions.Find(_T("system")) == wxNOT_FOUND)
-                        LinkerOptions += Temp;
-                }
-                // TODO: Map and Set All Debug Flags
-                else if (Temp.Matches(_T("-d*")) && Temp.Length() <= 4)
-                {
-                    LinkerOptions = LinkerOptions + MapDebugOptions(Temp);
-                }
-                // Debugger Type: -hw (Watcom), -hd (Dwarf), -hc (CodeView)
-                else if (Temp.Matches(_T("-h?")))
-                {
-                    MapDebuggerOptions(Temp);
-                }
-                else if (Temp.StartsWith(_T("-l=")))
-                {
-                    Temp = Temp.AfterFirst(_T('='));
-                    if (LinkerOptions.Find(_T("system")) == wxNOT_FOUND && !Temp.IsEmpty())
-                        LinkerOptions += _T("system ") + Temp + _T(" ");
-                }
-                else if (Temp.StartsWith(_T("-fm")))
-                {
-                    LinkerOptions += _T("option map");
-                    int pos = Temp.Find(_T('='));
-                    if (pos != wxNOT_FOUND)
-                        LinkerOptions += Temp.Mid(pos);
-                    LinkerOptions.Append(_T(" "));
-                }
-                else if (Temp.StartsWith(_T("-k")))
-                {
-                    LinkerOptions += _T("option stack=") + Temp.Mid(2) + _T(" ");
-                }
-                else if (Temp.StartsWith(_T("@")))
-                {
-                    LinkerOptions += Temp + _T(" ");
-                }
-            }
-        }
-        /* Following code will allow user to add any valid linker option
-        *  in target's linker option section.
-        */
-        if (!OtherLinkerOptions.IsEmpty())
-        {
-            int Count = OtherLinkerOptions.GetCount();
-            for (i = 0; i < Count; ++i)
-            {
-                Temp = OtherLinkerOptions[i];
-                /* Let's make a small check. It should not start with - or /  */
-                if ((Temp[0] != _T('-')) && (Temp[0] != _T('/')))
-                    LinkerOptions = LinkerOptions + Temp + _T(" ");
-            }
-        }
-        // Finally add it to an array
-        LinkerOptionsArr.Add(LinkerOptions);
-    }
-    // Arrange them in specified order
-    if (target)
-        Result = GetOrderedOptions(target, ortLinkerOptions, LinkerOptionsArr[1], LinkerOptionsArr[0]);
-    // Now append compiler level options
-    Result << LinkerOptionsArr[2];
-
-    return Result;
-}
-
-wxString CompilerOWGenerator::SetupLinkLibraries(Compiler* compiler, ProjectBuildTarget* target)
-{
-    wxString Result;
-    wxString targetStr, projectStr, compilerStr;
-    wxArrayString Libs;
-
-    if (target)
-    {
-        // Start with target first
-        Libs = target->GetLinkLibs();
-        for (size_t i = 0; i < Libs.GetCount(); ++i)
-            targetStr << Libs[i] + _T(",");
-        // Next process project
-        Libs = target->GetParentProject()->GetLinkLibs();
-        for (size_t i = 0; i < Libs.GetCount(); ++i)
-            projectStr << Libs[i] + _T(",");
-        // Set them in proper order
-        if (!targetStr.IsEmpty() || !projectStr.IsEmpty())
-            Result << GetOrderedOptions(target, ortLinkerOptions, projectStr, targetStr);
-    }
-    // Now prepare compiler libraries, if any
-    Libs = compiler->GetLinkLibs();
-    for (size_t i = 0; i < Libs.GetCount(); ++i)
-        compilerStr << Libs[i] << _T(",");
-    // Append it to result
-    Result << compilerStr;
-    // Now trim trailing spaces, if any, and the ',' at the end
-    Result = Result.Trim(true);
-    if (Result.Right(1).IsSameAs(_T(',')))
-        Result = Result.RemoveLast();
-
-    if (!Result.IsEmpty())
-        Result.Prepend(_T("library "));
-    return Result;
-}
-
-wxString CompilerOWGenerator::MapTargetType(const wxString& Opt, int target_type)
-{
-    if (Opt.IsSameAs(_T("-bt=nt")) || Opt.IsSameAs(_T("-bcl=nt")))
-    {
-        if (target_type == ttExecutable || target_type == ttStaticLib) // Win32 Executable
-            return _T("system nt_win ");
-        else if (target_type == ttConsoleOnly) // Console
-            return _T("system nt ");
-        else if (target_type == ttDynamicLib) // DLL
-            return _T("system nt_dll ");
-        else
-            return _T("system nt_win ref '_WinMain@16' "); // Default to Win32 executables
-    }
-    else if (Opt.IsSameAs(_T("-bt=linux")) || Opt.IsSameAs(_T("-bcl=linux")))
-    {
-        /* The support is experimental. Need proper manual to improve it. */
-        return _T("system linux ");
-    }
-    return wxEmptyString;
-}
-
-/* The following function will be expanded later
-   to incorporate detailed debug options
-*/
-wxString CompilerOWGenerator::MapDebugOptions(const wxString& Opt)
-{
-    if (Opt.IsSameAs(_T("-d0"))) // No Debug
-    {
-        return wxEmptyString;
-    }
-    if (Opt.IsSameAs(_T("-d1")))
-    {
-        return wxString(_T("debug ") + m_DebuggerType + _T("lines "));
-    }
-    if (Opt.IsSameAs(_T("-d2")) || Opt.IsSameAs(_T("-d3")))
-    {
-        return wxString(_T("debug ") + m_DebuggerType + _T("all "));
-    }
-    // Nothing Matched
-    return wxEmptyString;
-}
-
-void CompilerOWGenerator::MapDebuggerOptions(const wxString& Opt)
-{
-  if (Opt.IsSameAs(_T("-hw")))
-  {
-      m_DebuggerType = _T("watcom ");
-  }
-  else if (Opt.IsSameAs(_T("-hd")))
-  {
-      m_DebuggerType = _T("dwarf ");
-  }
-  else if (Opt.IsSameAs(_T("-hc")))
-  {
-      m_DebuggerType = _T("codeview ");
-  }
-  else
-  {
-      m_DebuggerType = wxEmptyString;
-  }
-}
-
-#endif // __WXMSW__
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#ifdef __WXMSW__ // For Windows Only
+
+#include <sdk.h>
+#ifndef CB_PRECOMP
+#   include "compiler.h"
+#   include "cbproject.h"
+#   include "projectbuildtarget.h"
+#   include "logmanager.h"
+#   include "macrosmanager.h"
+#endif
+#include "compileoptionsbase.h"
+#include "compilerOWgenerator.h"
+
+
+CompilerOWGenerator::CompilerOWGenerator()
+{
+    //ctor
+    m_DebuggerType = wxEmptyString;
+}
+
+CompilerOWGenerator::~CompilerOWGenerator()
+{
+    //dtor
+}
+
+wxString CompilerOWGenerator::SetupLibrariesDirs(Compiler* compiler, ProjectBuildTarget* target)
+{
+    wxArrayString LibDirs = compiler->GetLibDirs();
+    if (LibDirs.IsEmpty())
+        return wxEmptyString;
+    wxString Result = compiler->GetSwitches().libDirs + _T(" ");
+    if (target)
+    {
+        wxString tmp, targetStr, projectStr;
+        // First prepare the target
+        const wxArrayString targetArr = target->GetLibDirs();
+        for (size_t i = 0; i < targetArr.GetCount(); ++i)
+        {
+            tmp = targetArr[i];
+            Manager::Get()->GetMacrosManager()->ReplaceMacros(tmp, target);
+            targetStr << tmp << _T(";");
+        }
+        // Now for project
+        const wxArrayString projectArr = target->GetParentProject()->GetLibDirs();
+        for (size_t i = 0; i < projectArr.GetCount(); ++i)
+        {
+            tmp = projectArr[i];
+            Manager::Get()->GetMacrosManager()->ReplaceMacros(tmp, target);
+            projectStr << tmp << _T(";");
+        }
+        // Decide order and arrange it
+        Result << GetOrderedOptions(target, ortLibDirs, projectStr, targetStr);
+    }
+    // Finally add the compiler options
+    const wxArrayString compilerArr = compiler->GetLibDirs();
+    wxString tmp, compilerStr;
+    for (size_t i = 0; i < compilerArr.GetCount(); ++i)
+    {
+        tmp = compilerArr[i];
+        Manager::Get()->GetMacrosManager()->ReplaceMacros(tmp, target);
+        compilerStr << tmp << _T(";");
+    }
+    // Now append it
+    Result << compilerStr;
+    // Remove last ';' char
+    Result = Result.Trim(true);
+    if (Result.Right(1).IsSameAs(_T(';')))
+        Result = Result.RemoveLast();
+    return Result;
+}
+
+wxString CompilerOWGenerator::SetupLinkerOptions(Compiler* compiler, ProjectBuildTarget* target)
+{
+    wxString Temp, LinkerOptions, Result;
+    wxArrayString ComLinkerOptions, OtherLinkerOptions, LinkerOptionsArr;
+    int i, j, Count;
+
+    for (j = 0; j < 3; ++j)
+    {
+        LinkerOptions = wxEmptyString;
+        if (j == 0 && target)
+        {
+            ComLinkerOptions = target->GetCompilerOptions();
+            OtherLinkerOptions = target->GetLinkerOptions();
+        }
+        else if (j == 1 && target)
+        {
+            ComLinkerOptions = target->GetParentProject()->GetCompilerOptions();
+            OtherLinkerOptions = target->GetParentProject()->GetLinkerOptions();
+        }
+        else if (j == 2)
+        {
+            ComLinkerOptions = compiler->GetCompilerOptions();
+            OtherLinkerOptions = compiler->GetLinkerOptions();
+        }
+        if (!ComLinkerOptions.IsEmpty())
+        {
+            Count = ComLinkerOptions.GetCount();
+            for (i = 0; i < Count; ++i)
+            {
+                Temp = ComLinkerOptions[i];
+
+                // Replace any macros
+                Manager::Get()->GetMacrosManager()->ReplaceMacros(Temp, target);
+
+// TODO (Biplab#5#): Move the linker options parsing code to a different function
+                //Let's not scan all the options unnecessarily
+                if (Temp.Matches(_T("-b*")))
+                {
+                    Temp = MapTargetType(Temp, target->GetTargetType());
+                    if (!Temp.IsEmpty() && LinkerOptions.Find(_T("system")) == wxNOT_FOUND)
+                        LinkerOptions += Temp;
+                }
+                // TODO: Map and Set All Debug Flags
+                else if (Temp.Matches(_T("-d*")) && Temp.Length() <= 4)
+                {
+                    LinkerOptions = LinkerOptions + MapDebugOptions(Temp);
+                }
+                // Debugger Type: -hw (Watcom), -hd (Dwarf), -hc (CodeView)
+                else if (Temp.Matches(_T("-h?")))
+                {
+                    MapDebuggerOptions(Temp);
+                }
+                else if (Temp.StartsWith(_T("-l=")))
+                {
+                    Temp = Temp.AfterFirst(_T('='));
+                    if (LinkerOptions.Find(_T("system")) == wxNOT_FOUND && !Temp.IsEmpty())
+                        LinkerOptions += _T("system ") + Temp + _T(" ");
+                }
+                else if (Temp.StartsWith(_T("-fm")))
+                {
+                    LinkerOptions += _T("option map");
+                    int pos = Temp.Find(_T('='));
+                    if (pos != wxNOT_FOUND)
+                        LinkerOptions += Temp.Mid(pos);
+                    LinkerOptions.Append(_T(" "));
+                }
+                else if (Temp.StartsWith(_T("-k")))
+                {
+                    LinkerOptions += _T("option stack=") + Temp.Mid(2) + _T(" ");
+                }
+                else if (Temp.StartsWith(_T("@")))
+                {
+                    LinkerOptions += Temp + _T(" ");
+                }
+            }
+        }
+        /* Following code will allow user to add any valid linker option
+        *  in target's linker option section.
+        */
+        if (!OtherLinkerOptions.IsEmpty())
+        {
+            int Count = OtherLinkerOptions.GetCount();
+            for (i = 0; i < Count; ++i)
+            {
+                Temp = OtherLinkerOptions[i];
+                /* Let's make a small check. It should not start with - or /  */
+                if ((Temp[0] != _T('-')) && (Temp[0] != _T('/')))
+                    LinkerOptions = LinkerOptions + Temp + _T(" ");
+            }
+        }
+        // Finally add it to an array
+        LinkerOptionsArr.Add(LinkerOptions);
+    }
+    // Arrange them in specified order
+    if (target)
+        Result = GetOrderedOptions(target, ortLinkerOptions, LinkerOptionsArr[1], LinkerOptionsArr[0]);
+    // Now append compiler level options
+    Result << LinkerOptionsArr[2];
+
+    return Result;
+}
+
+wxString CompilerOWGenerator::SetupLinkLibraries(Compiler* compiler, ProjectBuildTarget* target)
+{
+    wxString Result;
+    wxString targetStr, projectStr, compilerStr;
+    wxArrayString Libs;
+
+    if (target)
+    {
+        // Start with target first
+        Libs = target->GetLinkLibs();
+        for (size_t i = 0; i < Libs.GetCount(); ++i)
+            targetStr << Libs[i] + _T(",");
+        // Next process project
+        Libs = target->GetParentProject()->GetLinkLibs();
+        for (size_t i = 0; i < Libs.GetCount(); ++i)
+            projectStr << Libs[i] + _T(",");
+        // Set them in proper order
+        if (!targetStr.IsEmpty() || !projectStr.IsEmpty())
+            Result << GetOrderedOptions(target, ortLinkerOptions, projectStr, targetStr);
+    }
+    // Now prepare compiler libraries, if any
+    Libs = compiler->GetLinkLibs();
+    for (size_t i = 0; i < Libs.GetCount(); ++i)
+        compilerStr << Libs[i] << _T(",");
+    // Append it to result
+    Result << compilerStr;
+    // Now trim trailing spaces, if any, and the ',' at the end
+    Result = Result.Trim(true);
+    if (Result.Right(1).IsSameAs(_T(',')))
+        Result = Result.RemoveLast();
+
+    if (!Result.IsEmpty())
+        Result.Prepend(_T("library "));
+    return Result;
+}
+
+wxString CompilerOWGenerator::MapTargetType(const wxString& Opt, int target_type)
+{
+    if (Opt.IsSameAs(_T("-bt=nt")) || Opt.IsSameAs(_T("-bcl=nt")))
+    {
+        if (target_type == ttExecutable || target_type == ttStaticLib) // Win32 Executable
+            return _T("system nt_win ");
+        else if (target_type == ttConsoleOnly) // Console
+            return _T("system nt ");
+        else if (target_type == ttDynamicLib) // DLL
+            return _T("system nt_dll ");
+        else
+            return _T("system nt_win ref '_WinMain@16' "); // Default to Win32 executables
+    }
+    else if (Opt.IsSameAs(_T("-bt=linux")) || Opt.IsSameAs(_T("-bcl=linux")))
+    {
+        /* The support is experimental. Need proper manual to improve it. */
+        return _T("system linux ");
+    }
+    return wxEmptyString;
+}
+
+/* The following function will be expanded later
+   to incorporate detailed debug options
+*/
+wxString CompilerOWGenerator::MapDebugOptions(const wxString& Opt)
+{
+    if (Opt.IsSameAs(_T("-d0"))) // No Debug
+    {
+        return wxEmptyString;
+    }
+    if (Opt.IsSameAs(_T("-d1")))
+    {
+        return wxString(_T("debug ") + m_DebuggerType + _T("lines "));
+    }
+    if (Opt.IsSameAs(_T("-d2")) || Opt.IsSameAs(_T("-d3")))
+    {
+        return wxString(_T("debug ") + m_DebuggerType + _T("all "));
+    }
+    // Nothing Matched
+    return wxEmptyString;
+}
+
+void CompilerOWGenerator::MapDebuggerOptions(const wxString& Opt)
+{
+  if (Opt.IsSameAs(_T("-hw")))
+  {
+      m_DebuggerType = _T("watcom ");
+  }
+  else if (Opt.IsSameAs(_T("-hd")))
+  {
+      m_DebuggerType = _T("dwarf ");
+  }
+  else if (Opt.IsSameAs(_T("-hc")))
+  {
+      m_DebuggerType = _T("codeview ");
+  }
+  else
+  {
+      m_DebuggerType = wxEmptyString;
+  }
+}
+
+#endif // __WXMSW__

Property changes on: src\plugins\compilergcc\compilerOWgenerator.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerOWgenerator.h
===================================================================
--- src/plugins/compilergcc/compilerOWgenerator.h	(revision 5730)
+++ src/plugins/compilergcc/compilerOWgenerator.h	(working copy)
@@ -1,41 +1,41 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- */
-
-#ifdef __WXMSW__ // For Windows Only
-
-#ifndef COMPILEROWGENERATOR_H
-#define COMPILEROWGENERATOR_H
-
-#include <compilercommandgenerator.h>
-
-//Overriden to fix OpenWatcom Linking Problem (@Biplab)
-
-class CompilerOWGenerator : public CompilerCommandGenerator
-{
-    public:
-        CompilerOWGenerator();
-        virtual ~CompilerOWGenerator();
-        virtual wxString SetupLibrariesDirs(Compiler* compiler, ProjectBuildTarget* target);
-        virtual wxString SetupLinkerOptions(Compiler* compiler, ProjectBuildTarget* target);
-        virtual wxString SetupLinkLibraries(Compiler* compiler, ProjectBuildTarget* target);
-    protected:
-    private:
-        // This maps target type to wlink.exe options
-        wxString MapTargetType(const wxString& Opt, int target_type);
-        // This maps debug related compiler options to wlink.exe options
-        wxString MapDebugOptions(const wxString& Opt);
-        // Open Watcom supports: Watcom debugger, Dwarf (default), CodeView
-        void MapDebuggerOptions(const wxString& Opt);
-
-    private:
-        // Debugger name which will later be used in MapDebugOptions
-        wxString m_DebuggerType;
-};
-
-
-
-#endif // COMPILEROWGENERATOR_H
-
-#endif // __WXMSW__
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ */
+
+#ifdef __WXMSW__ // For Windows Only
+
+#ifndef COMPILEROWGENERATOR_H
+#define COMPILEROWGENERATOR_H
+
+#include <compilercommandgenerator.h>
+
+//Overriden to fix OpenWatcom Linking Problem (@Biplab)
+
+class CompilerOWGenerator : public CompilerCommandGenerator
+{
+    public:
+        CompilerOWGenerator();
+        virtual ~CompilerOWGenerator();
+        virtual wxString SetupLibrariesDirs(Compiler* compiler, ProjectBuildTarget* target);
+        virtual wxString SetupLinkerOptions(Compiler* compiler, ProjectBuildTarget* target);
+        virtual wxString SetupLinkLibraries(Compiler* compiler, ProjectBuildTarget* target);
+    protected:
+    private:
+        // This maps target type to wlink.exe options
+        wxString MapTargetType(const wxString& Opt, int target_type);
+        // This maps debug related compiler options to wlink.exe options
+        wxString MapDebugOptions(const wxString& Opt);
+        // Open Watcom supports: Watcom debugger, Dwarf (default), CodeView
+        void MapDebuggerOptions(const wxString& Opt);
+
+    private:
+        // Debugger name which will later be used in MapDebugOptions
+        wxString m_DebuggerType;
+};
+
+
+
+#endif // COMPILEROWGENERATOR_H
+
+#endif // __WXMSW__

Property changes on: src\plugins\compilergcc\compilerOWgenerator.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerTcc.cpp
===================================================================
--- src/plugins/compilergcc/compilerTcc.cpp	(revision 5730)
+++ src/plugins/compilergcc/compilerTcc.cpp	(working copy)
@@ -1,152 +1,152 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#include <sdk.h>
-#include <prep.h>
-#ifndef CB_PRECOMP
-    #include <wx/intl.h>
-    #include <wx/regex.h>
-    #include <wx/string.h>
-#endif
-#include <wx/filefn.h> // wxFileExists
-#include "compilerTcc.h"
-
-CompilerTcc::CompilerTcc()
-    : Compiler(_("Tiny C Compiler"), _T("tcc"))
-{
-    Reset();
-}
-
-CompilerTcc::~CompilerTcc()
-{
-    //dtor
-}
-
-Compiler * CompilerTcc::CreateCopy()
-{
-    Compiler* c = new CompilerTcc(*this);
-    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
-    return c;
-} // end of CreateCopy
-
-void CompilerTcc::Reset()
-{
-    if (platform::windows)
-    {
-        m_Programs.C = _T("tcc.exe");
-        m_Programs.CPP = _T("");
-        m_Programs.LD = _T("tcc.exe");
-        m_Programs.DBG = _T("gdb.exe");
-        m_Programs.LIB = _T("tcc.exe");
-        m_Programs.WINDRES = _T("windres.exe");
-        m_Programs.MAKE = _T("mingw32-make.exe");
-    }
-    else
-    {
-        m_Programs.C = _T("tcc");
-        m_Programs.CPP = _T("");
-        m_Programs.LD = _T("tcc");
-        m_Programs.DBG = _T("gdb");
-        m_Programs.LIB = _T("tcc");
-        m_Programs.WINDRES = _T("");
-        m_Programs.MAKE = _T("make");
-    }
-    m_Switches.includeDirs = _T("-I");
-    m_Switches.libDirs = _T("-L");
-    m_Switches.linkLibs = _T("-l");
-    m_Switches.defines = _T("-D");
-    m_Switches.genericSwitch = _T("-");
-    m_Switches.objectExtension = _T("o");
-    m_Switches.needDependencies = true;
-    m_Switches.forceCompilerUseQuotes = false;
-    m_Switches.forceLinkerUseQuotes = false;
-    m_Switches.logging = clogSimple;
-    m_Switches.libPrefix = _T("lib");
-    m_Switches.libExtension = _T("a");
-    m_Switches.linkerNeedsLibPrefix = false;
-    m_Switches.linkerNeedsLibExtension = false;
-    m_Switches.supportsPCH = false;
-    m_Switches.PCHExtension = _T("");
-
-    // Summary of tcc options
-
-    m_Options.ClearOptions();
-    m_Options.AddOption(_("Produce debugging symbols"),
-                _T("-g"),
-                _("Debugging"));
-
-    wxString category = _("Warnings");
-
-    // warnings
-    m_Options.AddOption(_("Enable all compiler warnings (overrides every other setting)"), _T("-Wall"), category);
-    m_Options.AddOption(_("Disable all warnings"), _T("-w"), category);
-    m_Options.AddOption(_("Abort compilation if warnings are issued"), _T("-Werror"), category);
-    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
-
-
-    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
-    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("")));
-    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("")));
-    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
-    if (platform::windows)
-    {
-        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    else
-    {
-        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
-        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
-    }
-    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -r -static -o $static_output $link_objects")));
-    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
-
-    LoadDefaultRegExArray();
-
-    m_CompilerOptions.Clear();
-    m_LinkerOptions.Clear();
-    m_LinkLibs.Clear();
-    m_CmdsBefore.Clear();
-    m_CmdsAfter.Clear();
-}
-
-void CompilerTcc::LoadDefaultRegExArray()
-{
-    m_RegExes.Clear();
-    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
-    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
-    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
-    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
-}
-
-AutoDetectResult CompilerTcc::AutoDetectInstallationDir()
-{
-    wxString sep = wxFileName::GetPathSeparator();
-    if (platform::windows)
-        m_MasterPath = _T("C:\\tcc");
-    else
-        m_MasterPath = _T("/usr");
-    wxString BinPath = m_MasterPath + sep + wxT("tcc");
-    AutoDetectResult ret = wxFileExists(BinPath + sep + m_Programs.C) ? adrDetected : adrGuessed;
-    if (ret == adrDetected)
-    {
-        AddIncludeDir(m_MasterPath + sep + _T("include"));
-        AddLibDir(m_MasterPath + sep + _T("lib"));
-        m_ExtraPaths.Add(BinPath);
-    }
-    return ret;
-} // end of AutoDetectInstallationDir
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include <sdk.h>
+#include <prep.h>
+#ifndef CB_PRECOMP
+    #include <wx/intl.h>
+    #include <wx/regex.h>
+    #include <wx/string.h>
+#endif
+#include <wx/filefn.h> // wxFileExists
+#include "compilerTcc.h"
+
+CompilerTcc::CompilerTcc()
+    : Compiler(_("Tiny C Compiler"), _T("tcc"))
+{
+    Reset();
+}
+
+CompilerTcc::~CompilerTcc()
+{
+    //dtor
+}
+
+Compiler * CompilerTcc::CreateCopy()
+{
+    Compiler* c = new CompilerTcc(*this);
+    c->SetExtraPaths(m_ExtraPaths); // wxArrayString doesn't seem to be copied with the default copy ctor...
+    return c;
+} // end of CreateCopy
+
+void CompilerTcc::Reset()
+{
+    if (platform::windows)
+    {
+        m_Programs.C = _T("tcc.exe");
+        m_Programs.CPP = _T("");
+        m_Programs.LD = _T("tcc.exe");
+        m_Programs.DBG = _T("gdb.exe");
+        m_Programs.LIB = _T("tcc.exe");
+        m_Programs.WINDRES = _T("windres.exe");
+        m_Programs.MAKE = _T("mingw32-make.exe");
+    }
+    else
+    {
+        m_Programs.C = _T("tcc");
+        m_Programs.CPP = _T("");
+        m_Programs.LD = _T("tcc");
+        m_Programs.DBG = _T("gdb");
+        m_Programs.LIB = _T("tcc");
+        m_Programs.WINDRES = _T("");
+        m_Programs.MAKE = _T("make");
+    }
+    m_Switches.includeDirs = _T("-I");
+    m_Switches.libDirs = _T("-L");
+    m_Switches.linkLibs = _T("-l");
+    m_Switches.defines = _T("-D");
+    m_Switches.genericSwitch = _T("-");
+    m_Switches.objectExtension = _T("o");
+    m_Switches.needDependencies = true;
+    m_Switches.forceCompilerUseQuotes = false;
+    m_Switches.forceLinkerUseQuotes = false;
+    m_Switches.logging = clogSimple;
+    m_Switches.libPrefix = _T("lib");
+    m_Switches.libExtension = _T("a");
+    m_Switches.linkerNeedsLibPrefix = false;
+    m_Switches.linkerNeedsLibExtension = false;
+    m_Switches.supportsPCH = false;
+    m_Switches.PCHExtension = _T("");
+
+    // Summary of tcc options
+
+    m_Options.ClearOptions();
+    m_Options.AddOption(_("Produce debugging symbols"),
+                _T("-g"),
+                _("Debugging"));
+
+    wxString category = _("Warnings");
+
+    // warnings
+    m_Options.AddOption(_("Enable all compiler warnings (overrides every other setting)"), _T("-Wall"), category);
+    m_Options.AddOption(_("Disable all warnings"), _T("-w"), category);
+    m_Options.AddOption(_("Abort compilation if warnings are issued"), _T("-Werror"), category);
+    m_Options.AddOption(_("Inhibit all warning messages"), _T("-w"), category);
+
+
+    m_Commands[(int)ctCompileObjectCmd].push_back(CompilerTool(_T("$compiler $options $includes -c $file -o $object")));
+    m_Commands[(int)ctGenDependenciesCmd].push_back(CompilerTool(_T("")));
+    m_Commands[(int)ctCompileResourceCmd].push_back(CompilerTool(_T("")));
+    m_Commands[(int)ctLinkConsoleExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs")));
+    if (platform::windows)
+    {
+        m_Commands[(int)ctLinkExeCmd].push_back(CompilerTool(_T("$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows")));
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    else
+    {
+        m_Commands[(int)ctLinkExeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // no -mwindows
+        m_Commands[(int)ctLinkDynamicCmd].push_back(CompilerTool(_T("$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs")));
+    }
+    m_Commands[(int)ctLinkStaticCmd].push_back(CompilerTool(_T("$lib_linker -r -static -o $static_output $link_objects")));
+    m_Commands[(int)ctLinkNativeCmd] = m_Commands[(int)ctLinkConsoleExeCmd]; // unsupported currently
+
+    LoadDefaultRegExArray();
+
+    m_CompilerOptions.Clear();
+    m_LinkerOptions.Clear();
+    m_LinkLibs.Clear();
+    m_CmdsBefore.Clear();
+    m_CmdsAfter.Clear();
+}
+
+void CompilerTcc::LoadDefaultRegExArray()
+{
+    m_RegExes.Clear();
+    m_RegExes.Add(RegExStruct(_("Fatal error"), cltError, _T("FATAL:[ \t]*(.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error"), cltError, _T("windres.exe:[ \t](") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Resource compiler error (2)"), cltError, _T("windres.exe:[ \t](.*)"), 1));
+    m_RegExes.Add(RegExStruct(_("Preprocessor warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 4, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Preprocessor error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler warning"), cltWarning, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t]([Ww]arning:[ \t].*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Compiler error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error"), cltError, _T("(") + FilePathWithSpaces + _T("):([0-9]+):[0-9]+:[ \t](.*)"), 3, 1, 2));
+    m_RegExes.Add(RegExStruct(_("Linker error (2)"), cltError, FilePathWithSpaces + _T("\\(.text\\+[0-9A-Za-z]+\\):([ \tA-Za-z0-9_:+/\\.-]+):[ \t](.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Linker error (lib not found)"), cltError, _T(".*(ld.*):[ \t](cannot find.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("Undefined reference"), cltError, _T("(") + FilePathWithSpaces + _T("):[ \t](undefined reference.*)"), 2, 1));
+    m_RegExes.Add(RegExStruct(_("General warning"), cltWarning, _T("([Ww]arning:[ \t].*)"), 1));
+}
+
+AutoDetectResult CompilerTcc::AutoDetectInstallationDir()
+{
+    wxString sep = wxFileName::GetPathSeparator();
+    if (platform::windows)
+        m_MasterPath = _T("C:\\tcc");
+    else
+        m_MasterPath = _T("/usr");
+    wxString BinPath = m_MasterPath + sep + wxT("tcc");
+    AutoDetectResult ret = wxFileExists(BinPath + sep + m_Programs.C) ? adrDetected : adrGuessed;
+    if (ret == adrDetected)
+    {
+        AddIncludeDir(m_MasterPath + sep + _T("include"));
+        AddLibDir(m_MasterPath + sep + _T("lib"));
+        m_ExtraPaths.Add(BinPath);
+    }
+    return ret;
+} // end of AutoDetectInstallationDir

Property changes on: src\plugins\compilergcc\compilerTcc.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/compilergcc/compilerTcc.h
===================================================================
--- src/plugins/compilergcc/compilerTcc.h	(revision 5730)
+++ src/plugins/compilergcc/compilerTcc.h	(working copy)
@@ -1,23 +1,23 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- */
-
-#ifndef COMPILER_TCC_H
-#define COMPILER_TCC_H
-
-#include "compiler.h"
-
-class CompilerTcc : public Compiler
-{
-	public:
-		CompilerTcc();
-		virtual ~CompilerTcc();
-        virtual void Reset();
-		virtual void LoadDefaultRegExArray();
-        virtual AutoDetectResult AutoDetectInstallationDir();
-    protected:
-        virtual Compiler* CreateCopy();
-};
-
-#endif // COMPILER_TCC_H
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ */
+
+#ifndef COMPILER_TCC_H
+#define COMPILER_TCC_H
+
+#include "compiler.h"
+
+class CompilerTcc : public Compiler
+{
+	public:
+		CompilerTcc();
+		virtual ~CompilerTcc();
+        virtual void Reset();
+		virtual void LoadDefaultRegExArray();
+        virtual AutoDetectResult AutoDetectInstallationDir();
+    protected:
+        virtual Compiler* CreateCopy();
+};
+
+#endif // COMPILER_TCC_H

Property changes on: src\plugins\compilergcc\compilerTcc.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\debuggergdb\cpuregistersdlg.cpp
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: src\plugins\debuggergdb\cpuregistersdlg.h
___________________________________________________________________
Added: svn:eol-style
   + native

Index: src/plugins/debuggergdb/databreakpointdlg.cpp
===================================================================
--- src/plugins/debuggergdb/databreakpointdlg.cpp	(revision 5730)
+++ src/plugins/debuggergdb/databreakpointdlg.cpp	(working copy)
@@ -1,78 +1,78 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#include "databreakpointdlg.h"
-
-//(*InternalHeaders(DataBreakpointDlg)
-#include <wx/bitmap.h>
-#include <wx/button.h>
-#include <wx/font.h>
-#include <wx/fontenum.h>
-#include <wx/fontmap.h>
-#include <wx/image.h>
-#include <wx/intl.h>
-#include <wx/settings.h>
-//*)
-
-//(*IdInit(DataBreakpointDlg)
-const long DataBreakpointDlg::ID_CHECKBOX1 = wxNewId();
-const long DataBreakpointDlg::ID_RADIOBOX1 = wxNewId();
-//*)
-
-BEGIN_EVENT_TABLE(DataBreakpointDlg,wxDialog)
-    //(*EventTable(DataBreakpointDlg)
-    //*)
-END_EVENT_TABLE()
-
-DataBreakpointDlg::DataBreakpointDlg(wxWindow* parent,wxWindowID id,bool enabled,int selection)
-{
-    //(*Initialize(DataBreakpointDlg)
-    Create(parent,id,_("Data breakpoint"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE,_T("wxDialog"));
-    BoxSizer1 = new wxBoxSizer(wxVERTICAL);
-    CheckBox1 = new wxCheckBox(this,ID_CHECKBOX1,_("Enabled"),wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,_T("ID_CHECKBOX1"));
-    CheckBox1->SetValue(false);
-    BoxSizer1->Add(CheckBox1,0,wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL,8);
-    wxString wxRadioBoxChoices_RadioBox1[3] =
-    {
-        _("Break on read"),
-        _("Break on write"),
-        _("Break on read or write")
-    };
-    RadioBox1 = new wxRadioBox(this,ID_RADIOBOX1,_("Condition"),wxDefaultPosition,wxDefaultSize,3,wxRadioBoxChoices_RadioBox1,1,wxRA_SPECIFY_ROWS,wxDefaultValidator,_T("ID_RADIOBOX1"));
-    BoxSizer1->Add(RadioBox1,0,wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL,8);
-    StdDialogButtonSizer1 = new wxStdDialogButtonSizer();
-    StdDialogButtonSizer1->AddButton(new wxButton(this,wxID_OK,wxEmptyString));
-    StdDialogButtonSizer1->AddButton(new wxButton(this,wxID_CANCEL,wxEmptyString));
-    StdDialogButtonSizer1->Realize();
-    BoxSizer1->Add(StdDialogButtonSizer1,0,wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL,8);
-    SetSizer(BoxSizer1);
-    BoxSizer1->Fit(this);
-    BoxSizer1->SetSizeHints(this);
-    Center();
-    //*)
-
-    CheckBox1->SetValue(enabled);
-    RadioBox1->SetSelection(selection);
-}
-
-DataBreakpointDlg::~DataBreakpointDlg()
-{
-    //(*Destroy(DataBreakpointDlg)
-    //*)
-}
-
-bool DataBreakpointDlg::IsEnabled()
-{
-    return CheckBox1->IsChecked();
-}
-
-int DataBreakpointDlg::GetSelection()
-{
-    return RadioBox1->GetSelection();
-}
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include "databreakpointdlg.h"
+
+//(*InternalHeaders(DataBreakpointDlg)
+#include <wx/bitmap.h>
+#include <wx/button.h>
+#include <wx/font.h>
+#include <wx/fontenum.h>
+#include <wx/fontmap.h>
+#include <wx/image.h>
+#include <wx/intl.h>
+#include <wx/settings.h>
+//*)
+
+//(*IdInit(DataBreakpointDlg)
+const long DataBreakpointDlg::ID_CHECKBOX1 = wxNewId();
+const long DataBreakpointDlg::ID_RADIOBOX1 = wxNewId();
+//*)
+
+BEGIN_EVENT_TABLE(DataBreakpointDlg,wxDialog)
+    //(*EventTable(DataBreakpointDlg)
+    //*)
+END_EVENT_TABLE()
+
+DataBreakpointDlg::DataBreakpointDlg(wxWindow* parent,wxWindowID id,bool enabled,int selection)
+{
+    //(*Initialize(DataBreakpointDlg)
+    Create(parent,id,_("Data breakpoint"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE,_T("wxDialog"));
+    BoxSizer1 = new wxBoxSizer(wxVERTICAL);
+    CheckBox1 = new wxCheckBox(this,ID_CHECKBOX1,_("Enabled"),wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,_T("ID_CHECKBOX1"));
+    CheckBox1->SetValue(false);
+    BoxSizer1->Add(CheckBox1,0,wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL,8);
+    wxString wxRadioBoxChoices_RadioBox1[3] =
+    {
+        _("Break on read"),
+        _("Break on write"),
+        _("Break on read or write")
+    };
+    RadioBox1 = new wxRadioBox(this,ID_RADIOBOX1,_("Condition"),wxDefaultPosition,wxDefaultSize,3,wxRadioBoxChoices_RadioBox1,1,wxRA_SPECIFY_ROWS,wxDefaultValidator,_T("ID_RADIOBOX1"));
+    BoxSizer1->Add(RadioBox1,0,wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL,8);
+    StdDialogButtonSizer1 = new wxStdDialogButtonSizer();
+    StdDialogButtonSizer1->AddButton(new wxButton(this,wxID_OK,wxEmptyString));
+    StdDialogButtonSizer1->AddButton(new wxButton(this,wxID_CANCEL,wxEmptyString));
+    StdDialogButtonSizer1->Realize();
+    BoxSizer1->Add(StdDialogButtonSizer1,0,wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL,8);
+    SetSizer(BoxSizer1);
+    BoxSizer1->Fit(this);
+    BoxSizer1->SetSizeHints(this);
+    Center();
+    //*)
+
+    CheckBox1->SetValue(enabled);
+    RadioBox1->SetSelection(selection);
+}
+
+DataBreakpointDlg::~DataBreakpointDlg()
+{
+    //(*Destroy(DataBreakpointDlg)
+    //*)
+}
+
+bool DataBreakpointDlg::IsEnabled()
+{
+    return CheckBox1->IsChecked();
+}
+
+int DataBreakpointDlg::GetSelection()
+{
+    return RadioBox1->GetSelection();
+}

Property changes on: src\plugins\debuggergdb\databreakpointdlg.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/debuggergdb/databreakpointdlg.h
===================================================================
--- src/plugins/debuggergdb/databreakpointdlg.h	(revision 5730)
+++ src/plugins/debuggergdb/databreakpointdlg.h	(working copy)
@@ -29,9 +29,9 @@
 		//(*Identifiers(DataBreakpointDlg)
 		static const long ID_CHECKBOX1;
 		static const long ID_RADIOBOX1;
-		//*)
-
-		bool IsEnabled();
+		//*)
+
+		bool IsEnabled();
 		int GetSelection();

 	protected:

Property changes on: src\plugins\debuggergdb\databreakpointdlg.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\debuggergdb\debuggeroptionsprjdlg.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/debuggergdb/debuggeroptionsprjdlg.h
===================================================================
--- src/plugins/debuggergdb/debuggeroptionsprjdlg.h	(revision 5730)
+++ src/plugins/debuggergdb/debuggeroptionsprjdlg.h	(working copy)
@@ -1,51 +1,51 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- */
-
-#ifndef DEBUGGEROPTIONSPRJDLG_H
-#define DEBUGGEROPTIONSPRJDLG_H
-
-#include <wx/intl.h>
-#include "configurationpanel.h"
-#include <settings.h>
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ */

+#ifndef DEBUGGEROPTIONSPRJDLG_H
+#define DEBUGGEROPTIONSPRJDLG_H
+
+#include <wx/intl.h>
+#include "configurationpanel.h"
+#include <settings.h>
+
 #include "remotedebugging.h"
-
-class cbProject;
-class wxListBox;
-class DebuggerGDB;
-class CodeBlocksEvent;
-
-class DebuggerOptionsProjectDlg : public cbConfigurationPanel
-{
-	public:
-		DebuggerOptionsProjectDlg(wxWindow* parent, DebuggerGDB* debugger, cbProject* project);
-		virtual ~DebuggerOptionsProjectDlg();
-
-        virtual wxString GetTitle() const { return _("Debugger"); }
-        virtual wxString GetBitmapBaseName() const { return _T("debugger"); }
-        virtual void OnApply();
-        virtual void OnCancel(){}
-	protected:
+
+class cbProject;
+class wxListBox;
+class DebuggerGDB;
+class CodeBlocksEvent;
+
+class DebuggerOptionsProjectDlg : public cbConfigurationPanel
+{
+	public:
+		DebuggerOptionsProjectDlg(wxWindow* parent, DebuggerGDB* debugger, cbProject* project);
+		virtual ~DebuggerOptionsProjectDlg();
+
+        virtual wxString GetTitle() const { return _("Debugger"); }
+        virtual wxString GetBitmapBaseName() const { return _T("debugger"); }
+        virtual void OnApply();
+        virtual void OnCancel(){}
+	protected:
         void OnTargetSel(wxCommandEvent& event);
-        void OnAdd(wxCommandEvent& event);
-        void OnEdit(wxCommandEvent& event);
-        void OnDelete(wxCommandEvent& event);
-        void OnUpdateUI(wxUpdateUIEvent& event);
+        void OnAdd(wxCommandEvent& event);
+        void OnEdit(wxCommandEvent& event);
+        void OnDelete(wxCommandEvent& event);
+        void OnUpdateUI(wxUpdateUIEvent& event);
 	private:
         void OnBuildTargetRemoved(CodeBlocksEvent& event);
         void OnBuildTargetAdded(CodeBlocksEvent& event);
         void OnBuildTargetRenamed(CodeBlocksEvent& event);
 		void LoadCurrentRemoteDebuggingRecord();
 		void SaveCurrentRemoteDebuggingRecord();
-
-		DebuggerGDB* m_pDBG;
-        cbProject* m_pProject;
+
+		DebuggerGDB* m_pDBG;
+        cbProject* m_pProject;
 		wxArrayString m_OldPaths;
 		RemoteDebuggingMap m_CurrentRemoteDebugging;
-		int m_LastTargetSel;
-		DECLARE_EVENT_TABLE()
-};
-
-#endif // DEBUGGEROPTIONSPRJDLG_H
+		int m_LastTargetSel;
+		DECLARE_EVENT_TABLE()
+};
+
+#endif // DEBUGGEROPTIONSPRJDLG_H

Property changes on: src\plugins\debuggergdb\debuggeroptionsprjdlg.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/debuggergdb/examinememorydlg.cpp
===================================================================
--- src/plugins/debuggergdb/examinememorydlg.cpp	(revision 5730)
+++ src/plugins/debuggergdb/examinememorydlg.cpp	(working copy)
@@ -1,130 +1,130 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#include <sdk.h>
-#include "examinememorydlg.h"
-#include "debuggergdb.h"
-#include <wx/intl.h>
-#include <wx/xrc/xmlres.h>
-#include <wx/textctrl.h>
-#include <wx/combobox.h>
-#include <wx/button.h>
-
-BEGIN_EVENT_TABLE(ExamineMemoryDlg, wxPanel)
-    EVT_BUTTON(XRCID("btnGo"), ExamineMemoryDlg::OnGo)
-    EVT_COMBOBOX(XRCID("cmbBytes"), ExamineMemoryDlg::OnGo)
-    EVT_TEXT_ENTER(XRCID("txtAddress"), ExamineMemoryDlg::OnGo)
-END_EVENT_TABLE()
-
-ExamineMemoryDlg::ExamineMemoryDlg(wxWindow* parent, DebuggerGDB* debugger)
-    : m_pDbg(debugger),
-    m_LastRowStartingAddress(0)
-{
-    //ctor
-    wxXmlResource::Get()->LoadPanel(this, parent, _T("MemoryDumpPanel"));
-    m_pText = XRCCTRL(*this, "txtDump", wxTextCtrl);
-
-    wxFont font(8, wxMODERN, wxNORMAL, wxNORMAL);
-    m_pText->SetFont(font);
-
-    Clear();
-}
-
-ExamineMemoryDlg::~ExamineMemoryDlg()
-{
-    //dtor
-}
-
-void ExamineMemoryDlg::Begin()
-{
-    m_pText->Freeze();
-}
-
-void ExamineMemoryDlg::End()
-{
-    m_pText->Thaw();
-}
-
-void ExamineMemoryDlg::Clear()
-{
-    m_pText->Clear();
-    m_LastRowStartingAddress = 0;
-    m_ByteCounter = 0;
-    for (int i = 0; i < 67; ++i)
-        m_LineText[i] = _T(' ');
-}
-
-wxString ExamineMemoryDlg::GetBaseAddress()
-{
-    return XRCCTRL(*this, "txtAddress", wxTextCtrl)->GetValue();
-}
-
-int ExamineMemoryDlg::GetBytes()
-{
-    long a;
-    XRCCTRL(*this, "cmbBytes", wxComboBox)->GetValue().ToLong(&a);
-    return a;
-}
-
-void ExamineMemoryDlg::AddError(const wxString& err)
-{
-    m_pText->AppendText(err + _T('\n'));
-}
-
-void ExamineMemoryDlg::AddHexByte(const wxString& addr, const wxString& hexbyte)
-{
-//    m_pDbg->Log(_T("AddHexByte(") + addr + _T(", ") + hexbyte + _T(')'));
-    int bcmod = m_ByteCounter % 16;
-
-    if (m_LastRowStartingAddress == 0)
-    {
-        // because we 'll be appending each row *after* we have consumed it
-        // and then "addr" will point to the next row's starting address,
-        // we 'll keep the current row's starting address in "m_LastRowStartingAddress".
-
-        // if it's zero (i.e this is the first row), keep "addr" as starting address for this row.
-        // m_LastRowStartingAddress will be set again when we 've consumed this row...
-        addr.ToULong(&m_LastRowStartingAddress, 16);
-    }
-
-#define HEX_OFFSET(a) (a*3)
-#define CHAR_OFFSET(a) (16*3 + 3 + a)
-
-    unsigned long hb;
-    hexbyte.ToULong(&hb, 16);
-//    m_pDbg->Log(wxString::Format(_T("hb=%d, [0]=%c, [1]=%c"), hb, hexbyte[0], hexbyte[1]));
-//    m_pDbg->Log(wxString::Format(_T("HEX_OFFSET(bcmod)=%d, CHAR_OFFSET(bcmod)=%d"), HEX_OFFSET(bcmod), CHAR_OFFSET(bcmod)));
-    m_LineText[HEX_OFFSET(bcmod)] = hexbyte[0];
-    m_LineText[HEX_OFFSET(bcmod) + 1] = hexbyte[1];
-    m_LineText[CHAR_OFFSET(bcmod)] = hb >= 32 ? wxChar(hb) : wxChar(_T('.'));
-    ++m_ByteCounter;
-
-    // flush every 16 bytes
-    if (m_ByteCounter != 0 && m_ByteCounter % 16 == 0)
-    {
-        // filled 16 bytes window; append text and reset accumulator array
-        if (m_ByteCounter != 16) // after the first line,
-            m_pText->AppendText(_T('\n')); // prepend a newline
-        m_LineText[23] = _T('|'); // put a "separator" in the middle (just to ease reading a bit)
-
-        unsigned long a;
-        addr.ToULong(&a, 16);
-        m_pText->AppendText(wxString::Format(_T("0x%lx: %.67s"), m_LastRowStartingAddress, m_LineText));
-        for (int i = 0; i < 67; ++i)
-            m_LineText[i] = _T(' ');
-        // update starting address for next row
-        // add 8 bytes: addr is the start address of the second 8-byte chunk of this line, so next line is +8
-        m_LastRowStartingAddress = a + 8;
-    }
-}
-
-void ExamineMemoryDlg::OnGo(wxCommandEvent& event)
-{
-    m_pDbg->MemoryDump();
-}
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include <sdk.h>
+#include "examinememorydlg.h"
+#include "debuggergdb.h"
+#include <wx/intl.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/textctrl.h>
+#include <wx/combobox.h>
+#include <wx/button.h>
+
+BEGIN_EVENT_TABLE(ExamineMemoryDlg, wxPanel)
+    EVT_BUTTON(XRCID("btnGo"), ExamineMemoryDlg::OnGo)
+    EVT_COMBOBOX(XRCID("cmbBytes"), ExamineMemoryDlg::OnGo)
+    EVT_TEXT_ENTER(XRCID("txtAddress"), ExamineMemoryDlg::OnGo)
+END_EVENT_TABLE()
+
+ExamineMemoryDlg::ExamineMemoryDlg(wxWindow* parent, DebuggerGDB* debugger)
+    : m_pDbg(debugger),
+    m_LastRowStartingAddress(0)
+{
+    //ctor
+    wxXmlResource::Get()->LoadPanel(this, parent, _T("MemoryDumpPanel"));
+    m_pText = XRCCTRL(*this, "txtDump", wxTextCtrl);
+
+    wxFont font(8, wxMODERN, wxNORMAL, wxNORMAL);
+    m_pText->SetFont(font);
+
+    Clear();
+}
+
+ExamineMemoryDlg::~ExamineMemoryDlg()
+{
+    //dtor
+}
+
+void ExamineMemoryDlg::Begin()
+{
+    m_pText->Freeze();
+}
+
+void ExamineMemoryDlg::End()
+{
+    m_pText->Thaw();
+}
+
+void ExamineMemoryDlg::Clear()
+{
+    m_pText->Clear();
+    m_LastRowStartingAddress = 0;
+    m_ByteCounter = 0;
+    for (int i = 0; i < 67; ++i)
+        m_LineText[i] = _T(' ');
+}
+
+wxString ExamineMemoryDlg::GetBaseAddress()
+{
+    return XRCCTRL(*this, "txtAddress", wxTextCtrl)->GetValue();
+}
+
+int ExamineMemoryDlg::GetBytes()
+{
+    long a;
+    XRCCTRL(*this, "cmbBytes", wxComboBox)->GetValue().ToLong(&a);
+    return a;
+}
+
+void ExamineMemoryDlg::AddError(const wxString& err)
+{
+    m_pText->AppendText(err + _T('\n'));
+}
+
+void ExamineMemoryDlg::AddHexByte(const wxString& addr, const wxString& hexbyte)
+{
+//    m_pDbg->Log(_T("AddHexByte(") + addr + _T(", ") + hexbyte + _T(')'));
+    int bcmod = m_ByteCounter % 16;
+
+    if (m_LastRowStartingAddress == 0)
+    {
+        // because we 'll be appending each row *after* we have consumed it
+        // and then "addr" will point to the next row's starting address,
+        // we 'll keep the current row's starting address in "m_LastRowStartingAddress".
+
+        // if it's zero (i.e this is the first row), keep "addr" as starting address for this row.
+        // m_LastRowStartingAddress will be set again when we 've consumed this row...
+        addr.ToULong(&m_LastRowStartingAddress, 16);
+    }
+
+#define HEX_OFFSET(a) (a*3)
+#define CHAR_OFFSET(a) (16*3 + 3 + a)
+
+    unsigned long hb;
+    hexbyte.ToULong(&hb, 16);
+//    m_pDbg->Log(wxString::Format(_T("hb=%d, [0]=%c, [1]=%c"), hb, hexbyte[0], hexbyte[1]));
+//    m_pDbg->Log(wxString::Format(_T("HEX_OFFSET(bcmod)=%d, CHAR_OFFSET(bcmod)=%d"), HEX_OFFSET(bcmod), CHAR_OFFSET(bcmod)));
+    m_LineText[HEX_OFFSET(bcmod)] = hexbyte[0];
+    m_LineText[HEX_OFFSET(bcmod) + 1] = hexbyte[1];
+    m_LineText[CHAR_OFFSET(bcmod)] = hb >= 32 ? wxChar(hb) : wxChar(_T('.'));
+    ++m_ByteCounter;
+
+    // flush every 16 bytes
+    if (m_ByteCounter != 0 && m_ByteCounter % 16 == 0)
+    {
+        // filled 16 bytes window; append text and reset accumulator array
+        if (m_ByteCounter != 16) // after the first line,
+            m_pText->AppendText(_T('\n')); // prepend a newline
+        m_LineText[23] = _T('|'); // put a "separator" in the middle (just to ease reading a bit)
+
+        unsigned long a;
+        addr.ToULong(&a, 16);
+        m_pText->AppendText(wxString::Format(_T("0x%lx: %.67s"), m_LastRowStartingAddress, m_LineText));
+        for (int i = 0; i < 67; ++i)
+            m_LineText[i] = _T(' ');
+        // update starting address for next row
+        // add 8 bytes: addr is the start address of the second 8-byte chunk of this line, so next line is +8
+        m_LastRowStartingAddress = a + 8;
+    }
+}
+
+void ExamineMemoryDlg::OnGo(wxCommandEvent& event)
+{
+    m_pDbg->MemoryDump();
+}

Property changes on: src\plugins\debuggergdb\examinememorydlg.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\debuggergdb\examinememorydlg.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/debuggergdb/gdb_tipwindow.cpp
===================================================================
--- src/plugins/debuggergdb/gdb_tipwindow.cpp	(revision 5730)
+++ src/plugins/debuggergdb/gdb_tipwindow.cpp	(working copy)
@@ -1,573 +1,573 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-///////////////////////////////////////////////////////////////////////////////
-// Name:        gdb_tipwindow.cpp
-// Purpose:     implementation of GDBTipWindow
-// Author:      Vadim Zeitlin (wxTipWindow)
-// Modified by: Aug 3, 2006 Yiannis Mandravellos:
-//                  improved for use in GDB tooltip evaluation (Code::Blocks IDE)
-// Created:     10.09.00
-// RCS-ID:      Id: tipwin.cpp,v 1.28.2.1 2005/10/18 14:33:33 MW Exp
-// Copyright:   (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence:     wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-// ============================================================================
-// declarations
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include <sdk.h> // C::B sdk PCH
-
-#include <algorithm> // std::max
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "tipwin.h"
-#endif
-
-// For compilers that support precompilatixon, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-    #pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-    #include "wx/dcclient.h"
-#endif // WX_PRECOMP
-#include "gdb_tipwindow.h"
-
-#if wxUSE_TIPWINDOW
-
-#include "wx/timer.h"
-#include "wx/settings.h"
-#include "wx/intl.h"
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-static const wxCoord TEXT_MARGIN_X = 3;
-static const wxCoord TEXT_MARGIN_Y = 3;
-
-// ----------------------------------------------------------------------------
-// GDBTipWindowView
-// ----------------------------------------------------------------------------
-
-// Viewer window to put in the frame
-class GDBTipWindowView : public wxWindow
-{
-public:
-    GDBTipWindowView(wxWindow *parent);
-
-    // event handlers
-    void OnPaint(wxPaintEvent& event);
-    void OnMouseClick(wxMouseEvent& event);
-    void OnMouseMove(wxMouseEvent& event);
-
-#if !wxUSE_POPUPWIN
-    void OnKillFocus(wxFocusEvent& event);
-#endif // wxUSE_POPUPWIN
-
-    // calculate the client rect we need to display the text
-    void Adjust(const wxString& symbol, const wxString& typ, const wxString& addr, const wxString& contents, wxCoord maxLength);
-
-private:
-    wxSize GetTextSize(wxArrayString& array, const wxString& text, wxCoord maxLength, int indentationAfterFirstLine = 0);
-    void PrintArray(wxDC& dc, wxPoint& pt, const wxArrayString& array);
-    wxString AdjustContents(const wxString& contents);
-
-    GDBTipWindow* m_parent;
-    wxCoord m_headerHeight;
-
-    wxString m_symbol;
-    wxString m_type;
-    wxString m_address;
-    wxString m_contents;
-
-#if !wxUSE_POPUPWIN
-    long m_creationTime;
-#endif // !wxUSE_POPUPWIN
-
-    DECLARE_EVENT_TABLE()
-    DECLARE_NO_COPY_CLASS(GDBTipWindowView)
-};
-
-// ============================================================================
-// implementation
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// event tables
-// ----------------------------------------------------------------------------
-
-BEGIN_EVENT_TABLE(GDBTipWindow, wxTipWindowBase)
-    EVT_LEFT_DOWN(GDBTipWindow::OnMouseClick)
-    EVT_RIGHT_DOWN(GDBTipWindow::OnMouseClick)
-    EVT_MIDDLE_DOWN(GDBTipWindow::OnMouseClick)
-    EVT_KEY_DOWN(GDBTipWindow::OnKey)
-
-#if !wxUSE_POPUPWIN
-    EVT_KILL_FOCUS(GDBTipWindow::OnKillFocus)
-    EVT_ACTIVATE(GDBTipWindow::OnActivate)
-#endif // !wxUSE_POPUPWIN
-END_EVENT_TABLE()
-
-BEGIN_EVENT_TABLE(GDBTipWindowView, wxWindow)
-    EVT_PAINT(GDBTipWindowView::OnPaint)
-
-    EVT_LEFT_DOWN(GDBTipWindowView::OnMouseClick)
-    EVT_RIGHT_DOWN(GDBTipWindowView::OnMouseClick)
-    EVT_MIDDLE_DOWN(GDBTipWindowView::OnMouseClick)
-
-    EVT_MOTION(GDBTipWindowView::OnMouseMove)
-
-#if !wxUSE_POPUPWIN
-    EVT_KILL_FOCUS(GDBTipWindowView::OnKillFocus)
-#endif // !wxUSE_POPUPWIN
-END_EVENT_TABLE()
-
-// ----------------------------------------------------------------------------
-// GDBTipWindow
-// ----------------------------------------------------------------------------
-
-GDBTipWindow::GDBTipWindow(wxWindow *parent,
-                         const wxString& symbol,
-                         const wxString& typ,
-                         const wxString& addr,
-                         const wxString& contents,
-                         wxCoord maxLength,
-                         GDBTipWindow** windowPtr,
-                         wxRect *rectBounds)
-#if wxUSE_POPUPWIN
-           : wxPopupTransientWindow(parent),
-#else
-           : wxFrame(parent, wxID_ANY, wxEmptyString,
-                     wxDefaultPosition, wxDefaultSize,
-                     wxNO_BORDER | wxFRAME_NO_TASKBAR ),
-#endif
-            m_symbol(symbol),
-            m_type(typ),
-            m_address(addr),
-            m_contents(contents)
-{
-//    int size = Manager::Get()->GetConfigManager(_T("message_manager"))->ReadInt(_T("/log_font_size"), 8);
-    SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
-//    SetFont(wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT));
-
-    SetTipWindowPtr(windowPtr);
-    if ( rectBounds )
-    {
-        SetBoundingRect(*rectBounds);
-    }
-
-    // set colours
-    SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
-    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
-
-    // set size, position and show it
-    m_view = new GDBTipWindowView(this);
-    m_view->Adjust(symbol, typ, addr, contents, maxLength);
-    m_view->SetFocus();
-
-    int x, y;
-    wxGetMousePosition(&x, &y);
-
-    // we want to show the tip below the mouse, not over it
-    //
-    // NB: the reason we use "/ 2" here is that we don't know where the current
-    //     cursors hot spot is... it would be nice if we could find this out
-    //     though
-    y += wxSystemSettings::GetMetric(wxSYS_CURSOR_Y) / 2;
-//asm("int $3");
-#if wxUSE_POPUPWIN
-    Position(wxPoint(x, y), wxSize(0,0));
-    Popup(m_view);
-    #ifdef __WXGTK__
-        m_view->CaptureMouse();
-    #endif
-#else
-    Move(x, y);
-    Show(true);
-#endif
-}
-
-GDBTipWindow::~GDBTipWindow()
-{
-    if ( m_windowPtr )
-    {
-        *m_windowPtr = NULL;
-    }
-
-    #ifdef wxUSE_POPUPWIN
-        #ifdef __WXGTK__
-            if ( m_view->HasCapture() )
-                m_view->ReleaseMouse();
-        #endif
-    #endif
-}
-
-void GDBTipWindow::OnMouseClick(wxMouseEvent& WXUNUSED(event))
-{
-    Close();
-}
-
-void GDBTipWindow::OnKey(wxKeyEvent& event)
-{
-	Close();
-
-	// not using event.Skip() here to save us from a bad crash...
-}
-
-#if wxUSE_POPUPWIN
-
-void GDBTipWindow::OnDismiss()
-{
-    Close();
-}
-
-#else // !wxUSE_POPUPWIN
-
-void GDBTipWindow::OnActivate(wxActivateEvent& event)
-{
-    if (!event.GetActive())
-        Close();
-}
-
-void GDBTipWindow::OnKillFocus(wxFocusEvent& WXUNUSED(event))
-{
-    // Under Windows at least, we will get this immediately
-    // because when the view window is focussed, the
-    // tip window goes out of focus.
-#ifdef __WXGTK__
-    Close();
-#endif
-}
-
-#endif // wxUSE_POPUPWIN // !wxUSE_POPUPWIN
-
-void GDBTipWindow::SetBoundingRect(const wxRect& rectBound)
-{
-    m_rectBound = rectBound;
-}
-
-void GDBTipWindow::Close()
-{
-    if ( m_windowPtr )
-    {
-        *m_windowPtr = NULL;
-        m_windowPtr = NULL;
-    }
-
-#if wxUSE_POPUPWIN
-    Show(false);
-    #ifdef __WXGTK__
-		if ( m_view->HasCapture() )
-			m_view->ReleaseMouse();
-    #endif
-    delete this;//Destroy();
-#else
-    wxFrame::Close();
-#endif
-}
-
-// ----------------------------------------------------------------------------
-// GDBTipWindowView
-// ----------------------------------------------------------------------------
-
-GDBTipWindowView::GDBTipWindowView(wxWindow *parent)
-               : wxWindow(parent, wxID_ANY,
-                          wxDefaultPosition, wxDefaultSize,
-                          wxNO_BORDER)
-{
-    // set colours
-    SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
-    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
-
-#if !wxUSE_POPUPWIN
-    m_creationTime = wxGetLocalTime();
-#endif // !wxUSE_POPUPWIN
-
-    m_parent = (GDBTipWindow*)parent;
-    m_headerHeight = 0;
-}
-
-wxSize GDBTipWindowView::GetTextSize(wxArrayString& array, const wxString& text, wxCoord maxLength, int indentationAfterFirstLine)
-{
-    wxClientDC dc(this);
-    dc.SetFont(m_parent->GetFont());
-
-    // calculate the length: we want each line be no longer than maxLength
-    // pixels and we only break lines at words boundary
-    wxString current;
-    wxCoord height, width,
-            widthMax = 0;
-    m_parent->m_heightLine = 0;
-
-    // indentation string
-    wxString indent = wxString(_T(' '), indentationAfterFirstLine);
-
-    bool breakLine = false;
-    for ( const wxChar *p = text.c_str(); ; p++ )
-    {
-        if ( *p == _T('\n') || *p == _T('\0') )
-        {
-            dc.GetTextExtent(current, &width, &height);
-            if ( width > widthMax )
-                widthMax = width;
-
-            if ( height > m_parent->m_heightLine )
-                m_parent->m_heightLine = height;
-
-            array.Add(current);
-
-            if ( !*p )
-            {
-                // end of text
-                break;
-            }
-
-            current = indent;
-            breakLine = false;
-        }
-        else if ( breakLine && (*p == _T(' ') || *p == _T('\t')) )
-        {
-            // word boundary - break the line here
-            array.Add(current);
-            current = indent;
-            breakLine = false;
-        }
-        else // line goes on
-        {
-            current += *p;
-            dc.GetTextExtent(current, &width, &height);
-            if ( width > maxLength )
-                breakLine = true;
-
-            if ( width > widthMax )
-                widthMax = width;
-
-            if ( height > m_parent->m_heightLine )
-                m_parent->m_heightLine = height;
-        }
-    }
-
-    // this can happen if no newline and small enough not to break in lines
-    if (array.GetCount() == 0)
-        array.Add(text);
-
-    // this can happen if the text was empty; set a default height
-    if (m_parent->m_heightLine == 0)
-    {
-        dc.GetTextExtent(_T("Wq"), &width, &height);
-        m_parent->m_heightLine = height;
-    }
-
-    wxSize ret;
-    ret.x = widthMax;
-    ret.y = array.GetCount() * m_parent->m_heightLine;
-    //Manager::Get()->GetLogManager()->DebugLog(F(_T("text='%s', y=%d, m_parent->m_heightLine=%d"), text.c_str(), ret.y, m_parent->m_heightLine));
-    return ret;
-}
-
-wxString GDBTipWindowView::AdjustContents(const wxString& contents)
-{
-    // format contents string
-    //
-    // it comes in the form:
-    // {i=1, f=5.22, b=true, st={u="o"}}
-    //
-    // we 'll convert it to:
-    // {
-    //     i=1,
-    //     f=5.22,
-    //     b=true,
-    //     st={
-    //         u="o"
-    //     }
-    // }
-
-    wxString tmp = contents;
-    if (tmp.GetChar(0) == _T('{') && tmp.Last() == _T('}'))
-    {
-        tmp.Remove(0, 1);
-        tmp.RemoveLast();
-    }
-    wxString ret;
-    wxString indent;
-    int template_depth = 0;
-    for (const wxChar* p = tmp.c_str(); p && *p; ++p)
-    {
-        // indent
-        if (*p == _T('{'))
-        {
-            ret << *p;
-            indent << _T(' ') << _T(' ');
-            ret << _T('\n') << indent;
-        }
-
-        // unindent
-        else if (*p == _T('}'))
-        {
-            ret << _T('\n');
-            indent.RemoveLast();
-            indent.RemoveLast();
-            ret << indent << *p;
-        }
-
-        // template/function depth add
-        else if (*p == _T('<') || *p == _T('('))
-        {
-            ret << *p;
-            ++template_depth;
-        }
-
-        // template/function depth remove
-        else if (*p == _T('>') || *p == _T(')'))
-        {
-            ret << *p;
-            --template_depth;
-        }
-
-        // commas = newlines (except for templates)
-        else if (*p == _T(',') && template_depth <= 0)
-        {
-            ret << *p << _T('\n') << indent;
-            // skip whitespace so indentation doesn't break
-            ++p;
-            while (*p == _T(' ') || *p == _T('\t'))
-                ++p;
-            // don't ruin the for-loop's book-keeping ;)
-            --p;
-        }
-
-        // append
-        else
-        {
-            ret << *p;
-        }
-    }
-    return ret;
-}
-
-void GDBTipWindowView::Adjust(const wxString& symbol, const wxString& typ, const wxString& addr, const wxString& contents, wxCoord maxLength)
-{
-    wxString text;
-    wxString tmp;
-
-    tmp << _("Symbol  : ") << symbol << _T(" (") << typ << _T(')');
-    text = tmp;
-    wxSize size0 = GetTextSize(m_parent->m_symbolLines, text, maxLength, (_("Symbol  :") + symbol + _T(" ")).Length());
-
-    text.Clear();
-    text << _("Address : ") << addr;
-    wxSize size1 = GetTextSize(m_parent->m_symbolLines, text, maxLength, (_("Address : ") + addr).Length());
-
-    size1.x = std::max(size0.x, size1.x);
-
-    text = AdjustContents(contents);
-    wxSize size2 = GetTextSize(m_parent->m_textLines, text, std::max(maxLength, size1.x));
-
-    m_headerHeight = TEXT_MARGIN_Y + (m_parent->m_heightLine * m_parent->m_symbolLines.GetCount());
-
-    // take into account the border size and the margins
-    wxSize size(std::max(size1.x, size2.x), m_headerHeight + size2.y);
-    size.x += 2*(TEXT_MARGIN_X + 1);
-    size.y += 2*(TEXT_MARGIN_Y + 1);
-
-    m_parent->SetClientSize(size);
-    SetSize(0, 0, size.x, size.y);
-
-    m_symbol = symbol;
-    m_type = typ;
-    m_address = addr;
-    m_contents = contents;
-}
-
-void GDBTipWindowView::OnPaint(wxPaintEvent& WXUNUSED(event))
-{
-    wxPaintDC dc(this);
-
-    wxRect rect;
-    wxSize size = GetClientSize();
-
-    // first fill the header's background
-    dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE), wxSOLID));
-    dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), 1, wxSOLID) );
-    rect.width = size.x;
-    rect.height = m_headerHeight;
-    dc.DrawRectangle(rect);
-
-    // now fill the main's background
-    dc.SetBrush(wxBrush(GetBackgroundColour(), wxSOLID));
-    dc.SetPen( wxPen(GetForegroundColour(), 1, wxSOLID) );
-    rect.y = m_headerHeight - 1;
-    rect.height = size.y - (m_headerHeight - 1);
-    dc.DrawRectangle(rect);
-
-    // and then draw the text line by line
-    dc.SetTextBackground(GetBackgroundColour());
-    dc.SetTextForeground(GetForegroundColour());
-    dc.SetFont(m_parent->GetFont());
-
-    wxPoint pt;
-    pt.x = TEXT_MARGIN_X;
-    pt.y = TEXT_MARGIN_Y;
-
-    PrintArray(dc, pt, m_parent->m_symbolLines);
-    pt.y += 2;
-    PrintArray(dc, pt, m_parent->m_textLines);
-}
-
-void GDBTipWindowView::PrintArray(wxDC& dc, wxPoint& pt, const wxArrayString& array)
-{
-    size_t count = array.GetCount();
-    for ( size_t n = 0; n < count; n++ )
-    {
-        dc.DrawText(array[n], pt);
-
-        pt.y += m_parent->m_heightLine;
-    }
-}
-
-void GDBTipWindowView::OnMouseClick(wxMouseEvent& WXUNUSED(event))
-{
-    m_parent->Close();
-}
-
-void GDBTipWindowView::OnMouseMove(wxMouseEvent& event)
-{
-    const wxRect& rectBound = m_parent->m_rectBound;
-
-    if ( rectBound.width &&
-		!rectBound.Contains(ClientToScreen(event.GetPosition())) )
-    {
-        // mouse left the bounding rect, disappear
-        m_parent->Close();
-    }
-    else
-    {
-        event.Skip();
-    }
-}
-
-#if !wxUSE_POPUPWIN
-void GDBTipWindowView::OnKillFocus(wxFocusEvent& WXUNUSED(event))
-{
-    // Workaround the kill focus event happening just after creation in wxGTK
-    if (wxGetLocalTime() > m_creationTime + 1)
-        m_parent->Close();
-}
-#endif // !wxUSE_POPUPWIN
-
-#endif // wxUSE_TIPWINDOW
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+// Name:        gdb_tipwindow.cpp
+// Purpose:     implementation of GDBTipWindow
+// Author:      Vadim Zeitlin (wxTipWindow)
+// Modified by: Aug 3, 2006 Yiannis Mandravellos:
+//                  improved for use in GDB tooltip evaluation (Code::Blocks IDE)
+// Created:     10.09.00
+// RCS-ID:      Id: tipwin.cpp,v 1.28.2.1 2005/10/18 14:33:33 MW Exp
+// Copyright:   (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include <sdk.h> // C::B sdk PCH
+
+#include <algorithm> // std::max
+
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+    #pragma implementation "tipwin.h"
+#endif
+
+// For compilers that support precompilatixon, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+    #include "wx/dcclient.h"
+#endif // WX_PRECOMP
+#include "gdb_tipwindow.h"
+
+#if wxUSE_TIPWINDOW
+
+#include "wx/timer.h"
+#include "wx/settings.h"
+#include "wx/intl.h"
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+static const wxCoord TEXT_MARGIN_X = 3;
+static const wxCoord TEXT_MARGIN_Y = 3;
+
+// ----------------------------------------------------------------------------
+// GDBTipWindowView
+// ----------------------------------------------------------------------------
+
+// Viewer window to put in the frame
+class GDBTipWindowView : public wxWindow
+{
+public:
+    GDBTipWindowView(wxWindow *parent);
+
+    // event handlers
+    void OnPaint(wxPaintEvent& event);
+    void OnMouseClick(wxMouseEvent& event);
+    void OnMouseMove(wxMouseEvent& event);
+
+#if !wxUSE_POPUPWIN
+    void OnKillFocus(wxFocusEvent& event);
+#endif // wxUSE_POPUPWIN
+
+    // calculate the client rect we need to display the text
+    void Adjust(const wxString& symbol, const wxString& typ, const wxString& addr, const wxString& contents, wxCoord maxLength);
+
+private:
+    wxSize GetTextSize(wxArrayString& array, const wxString& text, wxCoord maxLength, int indentationAfterFirstLine = 0);
+    void PrintArray(wxDC& dc, wxPoint& pt, const wxArrayString& array);
+    wxString AdjustContents(const wxString& contents);
+
+    GDBTipWindow* m_parent;
+    wxCoord m_headerHeight;
+
+    wxString m_symbol;
+    wxString m_type;
+    wxString m_address;
+    wxString m_contents;
+
+#if !wxUSE_POPUPWIN
+    long m_creationTime;
+#endif // !wxUSE_POPUPWIN
+
+    DECLARE_EVENT_TABLE()
+    DECLARE_NO_COPY_CLASS(GDBTipWindowView)
+};
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// event tables
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(GDBTipWindow, wxTipWindowBase)
+    EVT_LEFT_DOWN(GDBTipWindow::OnMouseClick)
+    EVT_RIGHT_DOWN(GDBTipWindow::OnMouseClick)
+    EVT_MIDDLE_DOWN(GDBTipWindow::OnMouseClick)
+    EVT_KEY_DOWN(GDBTipWindow::OnKey)
+
+#if !wxUSE_POPUPWIN
+    EVT_KILL_FOCUS(GDBTipWindow::OnKillFocus)
+    EVT_ACTIVATE(GDBTipWindow::OnActivate)
+#endif // !wxUSE_POPUPWIN
+END_EVENT_TABLE()
+
+BEGIN_EVENT_TABLE(GDBTipWindowView, wxWindow)
+    EVT_PAINT(GDBTipWindowView::OnPaint)
+
+    EVT_LEFT_DOWN(GDBTipWindowView::OnMouseClick)
+    EVT_RIGHT_DOWN(GDBTipWindowView::OnMouseClick)
+    EVT_MIDDLE_DOWN(GDBTipWindowView::OnMouseClick)
+
+    EVT_MOTION(GDBTipWindowView::OnMouseMove)
+
+#if !wxUSE_POPUPWIN
+    EVT_KILL_FOCUS(GDBTipWindowView::OnKillFocus)
+#endif // !wxUSE_POPUPWIN
+END_EVENT_TABLE()
+
+// ----------------------------------------------------------------------------
+// GDBTipWindow
+// ----------------------------------------------------------------------------
+
+GDBTipWindow::GDBTipWindow(wxWindow *parent,
+                         const wxString& symbol,
+                         const wxString& typ,
+                         const wxString& addr,
+                         const wxString& contents,
+                         wxCoord maxLength,
+                         GDBTipWindow** windowPtr,
+                         wxRect *rectBounds)
+#if wxUSE_POPUPWIN
+           : wxPopupTransientWindow(parent),
+#else
+           : wxFrame(parent, wxID_ANY, wxEmptyString,
+                     wxDefaultPosition, wxDefaultSize,
+                     wxNO_BORDER | wxFRAME_NO_TASKBAR ),
+#endif
+            m_symbol(symbol),
+            m_type(typ),
+            m_address(addr),
+            m_contents(contents)
+{
+//    int size = Manager::Get()->GetConfigManager(_T("message_manager"))->ReadInt(_T("/log_font_size"), 8);
+    SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
+//    SetFont(wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT));
+
+    SetTipWindowPtr(windowPtr);
+    if ( rectBounds )
+    {
+        SetBoundingRect(*rectBounds);
+    }
+
+    // set colours
+    SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
+    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
+
+    // set size, position and show it
+    m_view = new GDBTipWindowView(this);
+    m_view->Adjust(symbol, typ, addr, contents, maxLength);
+    m_view->SetFocus();
+
+    int x, y;
+    wxGetMousePosition(&x, &y);
+
+    // we want to show the tip below the mouse, not over it
+    //
+    // NB: the reason we use "/ 2" here is that we don't know where the current
+    //     cursors hot spot is... it would be nice if we could find this out
+    //     though
+    y += wxSystemSettings::GetMetric(wxSYS_CURSOR_Y) / 2;
+//asm("int $3");
+#if wxUSE_POPUPWIN
+    Position(wxPoint(x, y), wxSize(0,0));
+    Popup(m_view);
+    #ifdef __WXGTK__
+        m_view->CaptureMouse();
+    #endif
+#else
+    Move(x, y);
+    Show(true);
+#endif
+}
+
+GDBTipWindow::~GDBTipWindow()
+{
+    if ( m_windowPtr )
+    {
+        *m_windowPtr = NULL;
+    }
+
+    #ifdef wxUSE_POPUPWIN
+        #ifdef __WXGTK__
+            if ( m_view->HasCapture() )
+                m_view->ReleaseMouse();
+        #endif
+    #endif
+}
+
+void GDBTipWindow::OnMouseClick(wxMouseEvent& WXUNUSED(event))
+{
+    Close();
+}
+
+void GDBTipWindow::OnKey(wxKeyEvent& event)
+{
+	Close();
+
+	// not using event.Skip() here to save us from a bad crash...
+}
+
+#if wxUSE_POPUPWIN
+
+void GDBTipWindow::OnDismiss()
+{
+    Close();
+}
+
+#else // !wxUSE_POPUPWIN
+
+void GDBTipWindow::OnActivate(wxActivateEvent& event)
+{
+    if (!event.GetActive())
+        Close();
+}
+
+void GDBTipWindow::OnKillFocus(wxFocusEvent& WXUNUSED(event))
+{
+    // Under Windows at least, we will get this immediately
+    // because when the view window is focussed, the
+    // tip window goes out of focus.
+#ifdef __WXGTK__
+    Close();
+#endif
+}
+
+#endif // wxUSE_POPUPWIN // !wxUSE_POPUPWIN
+
+void GDBTipWindow::SetBoundingRect(const wxRect& rectBound)
+{
+    m_rectBound = rectBound;
+}
+
+void GDBTipWindow::Close()
+{
+    if ( m_windowPtr )
+    {
+        *m_windowPtr = NULL;
+        m_windowPtr = NULL;
+    }
+
+#if wxUSE_POPUPWIN
+    Show(false);
+    #ifdef __WXGTK__
+		if ( m_view->HasCapture() )
+			m_view->ReleaseMouse();
+    #endif
+    delete this;//Destroy();
+#else
+    wxFrame::Close();
+#endif
+}
+
+// ----------------------------------------------------------------------------
+// GDBTipWindowView
+// ----------------------------------------------------------------------------
+
+GDBTipWindowView::GDBTipWindowView(wxWindow *parent)
+               : wxWindow(parent, wxID_ANY,
+                          wxDefaultPosition, wxDefaultSize,
+                          wxNO_BORDER)
+{
+    // set colours
+    SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
+    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
+
+#if !wxUSE_POPUPWIN
+    m_creationTime = wxGetLocalTime();
+#endif // !wxUSE_POPUPWIN
+
+    m_parent = (GDBTipWindow*)parent;
+    m_headerHeight = 0;
+}
+
+wxSize GDBTipWindowView::GetTextSize(wxArrayString& array, const wxString& text, wxCoord maxLength, int indentationAfterFirstLine)
+{
+    wxClientDC dc(this);
+    dc.SetFont(m_parent->GetFont());
+
+    // calculate the length: we want each line be no longer than maxLength
+    // pixels and we only break lines at words boundary
+    wxString current;
+    wxCoord height, width,
+            widthMax = 0;
+    m_parent->m_heightLine = 0;
+
+    // indentation string
+    wxString indent = wxString(_T(' '), indentationAfterFirstLine);
+
+    bool breakLine = false;
+    for ( const wxChar *p = text.c_str(); ; p++ )
+    {
+        if ( *p == _T('\n') || *p == _T('\0') )
+        {
+            dc.GetTextExtent(current, &width, &height);
+            if ( width > widthMax )
+                widthMax = width;
+
+            if ( height > m_parent->m_heightLine )
+                m_parent->m_heightLine = height;
+
+            array.Add(current);
+
+            if ( !*p )
+            {
+                // end of text
+                break;
+            }
+
+            current = indent;
+            breakLine = false;
+        }
+        else if ( breakLine && (*p == _T(' ') || *p == _T('\t')) )
+        {
+            // word boundary - break the line here
+            array.Add(current);
+            current = indent;
+            breakLine = false;
+        }
+        else // line goes on
+        {
+            current += *p;
+            dc.GetTextExtent(current, &width, &height);
+            if ( width > maxLength )
+                breakLine = true;
+
+            if ( width > widthMax )
+                widthMax = width;
+
+            if ( height > m_parent->m_heightLine )
+                m_parent->m_heightLine = height;
+        }
+    }
+
+    // this can happen if no newline and small enough not to break in lines
+    if (array.GetCount() == 0)
+        array.Add(text);
+
+    // this can happen if the text was empty; set a default height
+    if (m_parent->m_heightLine == 0)
+    {
+        dc.GetTextExtent(_T("Wq"), &width, &height);
+        m_parent->m_heightLine = height;
+    }
+
+    wxSize ret;
+    ret.x = widthMax;
+    ret.y = array.GetCount() * m_parent->m_heightLine;
+    //Manager::Get()->GetLogManager()->DebugLog(F(_T("text='%s', y=%d, m_parent->m_heightLine=%d"), text.c_str(), ret.y, m_parent->m_heightLine));
+    return ret;
+}
+
+wxString GDBTipWindowView::AdjustContents(const wxString& contents)
+{
+    // format contents string
+    //
+    // it comes in the form:
+    // {i=1, f=5.22, b=true, st={u="o"}}
+    //
+    // we 'll convert it to:
+    // {
+    //     i=1,
+    //     f=5.22,
+    //     b=true,
+    //     st={
+    //         u="o"
+    //     }
+    // }
+
+    wxString tmp = contents;
+    if (tmp.GetChar(0) == _T('{') && tmp.Last() == _T('}'))
+    {
+        tmp.Remove(0, 1);
+        tmp.RemoveLast();
+    }
+    wxString ret;
+    wxString indent;
+    int template_depth = 0;
+    for (const wxChar* p = tmp.c_str(); p && *p; ++p)
+    {
+        // indent
+        if (*p == _T('{'))
+        {
+            ret << *p;
+            indent << _T(' ') << _T(' ');
+            ret << _T('\n') << indent;
+        }
+
+        // unindent
+        else if (*p == _T('}'))
+        {
+            ret << _T('\n');
+            indent.RemoveLast();
+            indent.RemoveLast();
+            ret << indent << *p;
+        }
+
+        // template/function depth add
+        else if (*p == _T('<') || *p == _T('('))
+        {
+            ret << *p;
+            ++template_depth;
+        }
+
+        // template/function depth remove
+        else if (*p == _T('>') || *p == _T(')'))
+        {
+            ret << *p;
+            --template_depth;
+        }
+
+        // commas = newlines (except for templates)
+        else if (*p == _T(',') && template_depth <= 0)
+        {
+            ret << *p << _T('\n') << indent;
+            // skip whitespace so indentation doesn't break
+            ++p;
+            while (*p == _T(' ') || *p == _T('\t'))
+                ++p;
+            // don't ruin the for-loop's book-keeping ;)
+            --p;
+        }
+
+        // append
+        else
+        {
+            ret << *p;
+        }
+    }
+    return ret;
+}
+
+void GDBTipWindowView::Adjust(const wxString& symbol, const wxString& typ, const wxString& addr, const wxString& contents, wxCoord maxLength)
+{
+    wxString text;
+    wxString tmp;
+
+    tmp << _("Symbol  : ") << symbol << _T(" (") << typ << _T(')');
+    text = tmp;
+    wxSize size0 = GetTextSize(m_parent->m_symbolLines, text, maxLength, (_("Symbol  :") + symbol + _T(" ")).Length());
+
+    text.Clear();
+    text << _("Address : ") << addr;
+    wxSize size1 = GetTextSize(m_parent->m_symbolLines, text, maxLength, (_("Address : ") + addr).Length());
+
+    size1.x = std::max(size0.x, size1.x);
+
+    text = AdjustContents(contents);
+    wxSize size2 = GetTextSize(m_parent->m_textLines, text, std::max(maxLength, size1.x));
+
+    m_headerHeight = TEXT_MARGIN_Y + (m_parent->m_heightLine * m_parent->m_symbolLines.GetCount());
+
+    // take into account the border size and the margins
+    wxSize size(std::max(size1.x, size2.x), m_headerHeight + size2.y);
+    size.x += 2*(TEXT_MARGIN_X + 1);
+    size.y += 2*(TEXT_MARGIN_Y + 1);
+
+    m_parent->SetClientSize(size);
+    SetSize(0, 0, size.x, size.y);
+
+    m_symbol = symbol;
+    m_type = typ;
+    m_address = addr;
+    m_contents = contents;
+}
+
+void GDBTipWindowView::OnPaint(wxPaintEvent& WXUNUSED(event))
+{
+    wxPaintDC dc(this);
+
+    wxRect rect;
+    wxSize size = GetClientSize();
+
+    // first fill the header's background
+    dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE), wxSOLID));
+    dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT), 1, wxSOLID) );
+    rect.width = size.x;
+    rect.height = m_headerHeight;
+    dc.DrawRectangle(rect);
+
+    // now fill the main's background
+    dc.SetBrush(wxBrush(GetBackgroundColour(), wxSOLID));
+    dc.SetPen( wxPen(GetForegroundColour(), 1, wxSOLID) );
+    rect.y = m_headerHeight - 1;
+    rect.height = size.y - (m_headerHeight - 1);
+    dc.DrawRectangle(rect);
+
+    // and then draw the text line by line
+    dc.SetTextBackground(GetBackgroundColour());
+    dc.SetTextForeground(GetForegroundColour());
+    dc.SetFont(m_parent->GetFont());
+
+    wxPoint pt;
+    pt.x = TEXT_MARGIN_X;
+    pt.y = TEXT_MARGIN_Y;
+
+    PrintArray(dc, pt, m_parent->m_symbolLines);
+    pt.y += 2;
+    PrintArray(dc, pt, m_parent->m_textLines);
+}
+
+void GDBTipWindowView::PrintArray(wxDC& dc, wxPoint& pt, const wxArrayString& array)
+{
+    size_t count = array.GetCount();
+    for ( size_t n = 0; n < count; n++ )
+    {
+        dc.DrawText(array[n], pt);
+
+        pt.y += m_parent->m_heightLine;
+    }
+}
+
+void GDBTipWindowView::OnMouseClick(wxMouseEvent& WXUNUSED(event))
+{
+    m_parent->Close();
+}
+
+void GDBTipWindowView::OnMouseMove(wxMouseEvent& event)
+{
+    const wxRect& rectBound = m_parent->m_rectBound;
+
+    if ( rectBound.width &&
+		!rectBound.Contains(ClientToScreen(event.GetPosition())) )
+    {
+        // mouse left the bounding rect, disappear
+        m_parent->Close();
+    }
+    else
+    {
+        event.Skip();
+    }
+}
+
+#if !wxUSE_POPUPWIN
+void GDBTipWindowView::OnKillFocus(wxFocusEvent& WXUNUSED(event))
+{
+    // Workaround the kill focus event happening just after creation in wxGTK
+    if (wxGetLocalTime() > m_creationTime + 1)
+        m_parent->Close();
+}
+#endif // !wxUSE_POPUPWIN
+
+#endif // wxUSE_TIPWINDOW

Property changes on: src\plugins\debuggergdb\gdb_tipwindow.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/debuggergdb/gdb_tipwindow.h
===================================================================
--- src/plugins/debuggergdb/gdb_tipwindow.h	(revision 5730)
+++ src/plugins/debuggergdb/gdb_tipwindow.h	(working copy)
@@ -1,114 +1,114 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name:        gdb_tipwindow.h
-// Purpose:     GDBTipWindow is a window like the one typically used for
-//              showing the tooltips
-// Author:      Vadim Zeitlin (wxTipWindow)
-// Modified by: Aug 3, 2006 Yiannis Mandravellos:
-//                  improved for use in GDB tooltip evaluation (Code::Blocks IDE)
-// Created:     10.09.00
-// RCS-ID:      Id: tipwin.h,v 1.14 2004/05/23 20:50:25 JS Exp
-// Copyright:   (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence:     wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_GDB_TIPWINDOW_H_
-#define _WX_GDB_TIPWINDOW_H_
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma interface "tipwin.h"
-#endif
-
-#if wxUSE_TIPWINDOW
-
-#if wxUSE_POPUPWIN
-    #include "wx/popupwin.h"
-
-    #define wxTipWindowBase wxPopupTransientWindow
-#else
-    #include "wx/frame.h"
-
-    #define wxTipWindowBase wxFrame
-#endif
-#include "wx/arrstr.h"
-
-class GDBTipWindowView;
-
-// ----------------------------------------------------------------------------
-// GDBTipWindow
-// ----------------------------------------------------------------------------
-
-class GDBTipWindow : public wxTipWindowBase
-{
-public:
-    // the mandatory ctor parameters are: the parent window and the text to
-    // show
-    //
-    // optionally you may also specify the length at which the lines are going
-    // to be broken in rows (100 pixels by default)
-    //
-    // windowPtr and rectBound are just passed to SetTipWindowPtr() and
-    // SetBoundingRect() - see below
-    GDBTipWindow(wxWindow *parent,
-                const wxString& symbol,
-                const wxString& typ,
-                const wxString& addr,
-                const wxString& contents,
-                wxCoord maxLength = 240,
-                GDBTipWindow** windowPtr = NULL,
-                wxRect *rectBound = NULL);
-
-    virtual ~GDBTipWindow();
-
-    // If windowPtr is not NULL the given address will be NULLed when the
-    // window has closed
-    void SetTipWindowPtr(GDBTipWindow** windowPtr) { m_windowPtr = windowPtr; }
-
-    // If rectBound is not NULL, the window will disappear automatically when
-    // the mouse leave the specified rect: note that rectBound should be in the
-    // screen coordinates!
-    void SetBoundingRect(const wxRect& rectBound);
-
-    // Hide and destroy the window
-    void Close();
-
-protected:
-    // called by GDBTipWindowView only
-    bool CheckMouseInBounds(const wxPoint& pos);
-
-    // event handlers
+///////////////////////////////////////////////////////////////////////////////
+// Name:        gdb_tipwindow.h
+// Purpose:     GDBTipWindow is a window like the one typically used for
+//              showing the tooltips
+// Author:      Vadim Zeitlin (wxTipWindow)
+// Modified by: Aug 3, 2006 Yiannis Mandravellos:
+//                  improved for use in GDB tooltip evaluation (Code::Blocks IDE)
+// Created:     10.09.00
+// RCS-ID:      Id: tipwin.h,v 1.14 2004/05/23 20:50:25 JS Exp
+// Copyright:   (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GDB_TIPWINDOW_H_
+#define _WX_GDB_TIPWINDOW_H_
+
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+    #pragma interface "tipwin.h"
+#endif
+
+#if wxUSE_TIPWINDOW
+
+#if wxUSE_POPUPWIN
+    #include "wx/popupwin.h"
+
+    #define wxTipWindowBase wxPopupTransientWindow
+#else
+    #include "wx/frame.h"
+
+    #define wxTipWindowBase wxFrame
+#endif
+#include "wx/arrstr.h"
+
+class GDBTipWindowView;
+
+// ----------------------------------------------------------------------------
+// GDBTipWindow
+// ----------------------------------------------------------------------------
+
+class GDBTipWindow : public wxTipWindowBase
+{
+public:
+    // the mandatory ctor parameters are: the parent window and the text to
+    // show
+    //
+    // optionally you may also specify the length at which the lines are going
+    // to be broken in rows (100 pixels by default)
+    //
+    // windowPtr and rectBound are just passed to SetTipWindowPtr() and
+    // SetBoundingRect() - see below
+    GDBTipWindow(wxWindow *parent,
+                const wxString& symbol,
+                const wxString& typ,
+                const wxString& addr,
+                const wxString& contents,
+                wxCoord maxLength = 240,
+                GDBTipWindow** windowPtr = NULL,
+                wxRect *rectBound = NULL);
+
+    virtual ~GDBTipWindow();
+
+    // If windowPtr is not NULL the given address will be NULLed when the
+    // window has closed
+    void SetTipWindowPtr(GDBTipWindow** windowPtr) { m_windowPtr = windowPtr; }
+
+    // If rectBound is not NULL, the window will disappear automatically when
+    // the mouse leave the specified rect: note that rectBound should be in the
+    // screen coordinates!
+    void SetBoundingRect(const wxRect& rectBound);
+
+    // Hide and destroy the window
+    void Close();
+
+protected:
+    // called by GDBTipWindowView only
+    bool CheckMouseInBounds(const wxPoint& pos);
+
+    // event handlers
     void OnMouseClick(wxMouseEvent& event);
-
-    void OnKey(wxKeyEvent& event);
-
-#if !wxUSE_POPUPWIN
-    void OnActivate(wxActivateEvent& event);
-    void OnKillFocus(wxFocusEvent& event);
-#else // wxUSE_POPUPWIN
-    virtual void OnDismiss();
-#endif // wxUSE_POPUPWIN/!wxUSE_POPUPWIN
-
-private:
-    wxArrayString m_textLines;
-    wxArrayString m_symbolLines;
-    wxCoord m_heightLine;
-
-    wxString m_symbol;
-    wxString m_type;
-    wxString m_address;
-    wxString m_contents;
-
-    GDBTipWindowView *m_view;
-
-    GDBTipWindow** m_windowPtr;
-    wxRect m_rectBound;
-
-    DECLARE_EVENT_TABLE()
-
-    friend class GDBTipWindowView;
-
-    DECLARE_NO_COPY_CLASS(GDBTipWindow)
-};
-
-#endif // wxUSE_TIPWINDOW
-
-#endif // _WX_GDB_TIPWINDOW_H_
+
+    void OnKey(wxKeyEvent& event);
+
+#if !wxUSE_POPUPWIN
+    void OnActivate(wxActivateEvent& event);
+    void OnKillFocus(wxFocusEvent& event);
+#else // wxUSE_POPUPWIN
+    virtual void OnDismiss();
+#endif // wxUSE_POPUPWIN/!wxUSE_POPUPWIN
+
+private:
+    wxArrayString m_textLines;
+    wxArrayString m_symbolLines;
+    wxCoord m_heightLine;
+
+    wxString m_symbol;
+    wxString m_type;
+    wxString m_address;
+    wxString m_contents;
+
+    GDBTipWindowView *m_view;
+
+    GDBTipWindow** m_windowPtr;
+    wxRect m_rectBound;
+
+    DECLARE_EVENT_TABLE()
+
+    friend class GDBTipWindowView;
+
+    DECLARE_NO_COPY_CLASS(GDBTipWindow)
+};
+
+#endif // wxUSE_TIPWINDOW
+
+#endif // _WX_GDB_TIPWINDOW_H_

Property changes on: src\plugins\debuggergdb\gdb_tipwindow.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\debuggergdb\remotedebugging.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/debuggergdb/resources/debugger_options_dlg.xrc
===================================================================
--- src/plugins/debuggergdb/resources/debugger_options_dlg.xrc	(revision 5730)
+++ src/plugins/debuggergdb/resources/debugger_options_dlg.xrc	(working copy)
@@ -35,6 +35,7 @@
 					<object class="sizeritem">
 						<object class="wxCheckBox" name="chkAutoBuild">
 							<label>Auto-build project to ensure up-to-date</label>
+							<tooltip>Automatic project build before debug session is started</tooltip>
 						</object>
 						<flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
 					</object>
@@ -73,7 +74,7 @@
 					</object>
 					<object class="sizeritem">
 						<object class="wxCheckBox" name="chkDebugLog">
-							<label>Display debugger&apos;s  log</label>
+							<label>Display debugger&apos;s log</label>
 							<tooltip>If enabled, the debugger&apos;s raw input/output will be logged in a separate log page</tooltip>
 						</object>
 						<flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
@@ -88,6 +89,7 @@
 					<object class="sizeritem">
 						<object class="wxCheckBox" name="chkDoNotRun">
 							<label>Do *not* run the debugee</label>
+							<tooltip>If enabled, the debugger will not a send a run/continue command</tooltip>
 						</object>
 						<flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
 					</object>

Property changes on: src\plugins\debuggergdb\resources\debugger_project_options_dlg.xrc
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/debuggergdb/resources/manifest.xml
===================================================================
--- src/plugins/debuggergdb/resources/manifest.xml	(revision 5730)
+++ src/plugins/debuggergdb/resources/manifest.xml	(working copy)
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_plugin_manifest_file>
-    <SdkVersion major="1" minor="10" release="0" />
-    <Plugin name="Debugger">
-        <Value title="Debugger" />
-        <Value version="0.3" />
-        <Value description="Plugin that interfaces the GNU GDB and MS CDB debuggers." />
-        <Value author="Yiannis An. Mandravellos" />
-        <Value authorEmail="info@codeblocks.org" />
-        <Value authorWebsite="http://www.codeblocks.org" />
-        <Value thanksTo="" />
-        <Value license="GPL" />
-    </Plugin>
-</CodeBlocks_plugin_manifest_file>
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_plugin_manifest_file>
+    <SdkVersion major="1" minor="10" release="0" />
+    <Plugin name="Debugger">
+        <Value title="Debugger" />
+        <Value version="0.3" />
+        <Value description="Plugin that interfaces the GNU GDB and MS CDB debuggers." />
+        <Value author="Yiannis An. Mandravellos" />
+        <Value authorEmail="info@codeblocks.org" />
+        <Value authorWebsite="http://www.codeblocks.org" />
+        <Value thanksTo="" />
+        <Value license="GPL" />
+    </Plugin>
+</CodeBlocks_plugin_manifest_file>

Property changes on: src\plugins\debuggergdb\resources\manifest.xml
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\debuggergdb\resources\memdump.xrc
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\debuggergdb\resources\threads.xrc
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

Index: src/plugins/debuggergdb/threadsdlg.cpp
===================================================================
--- src/plugins/debuggergdb/threadsdlg.cpp	(revision 5730)
+++ src/plugins/debuggergdb/threadsdlg.cpp	(working copy)
@@ -1,109 +1,109 @@
-/*
- * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
- * http://www.gnu.org/licenses/gpl-3.0.html
- *
- * $Revision$
- * $Id$
- * $HeadURL$
- */
-
-#include <sdk.h>
-#include "threadsdlg.h"
-#include "debuggergdb.h"
-#include "debuggerdriver.h"
-#include <wx/intl.h>
-#include <wx/xrc/xmlres.h>
-#include <wx/menu.h>
-#include <globals.h>
-
-static const int idSwitch = wxNewId();
-
-BEGIN_EVENT_TABLE(ThreadsDlg, wxPanel)
-    EVT_LIST_ITEM_RIGHT_CLICK(XRCID("lstThreads"), ThreadsDlg::OnListRightClick)
-    EVT_MENU(idSwitch, ThreadsDlg::OnSwitchThread)
-END_EVENT_TABLE()
-
-ThreadsDlg::ThreadsDlg(wxWindow* parent, DebuggerGDB* debugger)
-    : m_pDbg(debugger)
-{
-    //ctor
-    wxXmlResource::Get()->LoadPanel(this, parent, _T("dlgThreads"));
-//    SetWindowStyle(GetWindowStyle() | wxFRAME_FLOAT_ON_PARENT);
-
-    wxListCtrl* lst = XRCCTRL(*this, "lstThreads", wxListCtrl);
-
-    wxFont font(8, wxMODERN, wxNORMAL, wxNORMAL);
-    lst->SetFont(font);
-    Clear();
-}
-
-ThreadsDlg::~ThreadsDlg()
-{
-    //dtor
-}
-
-void ThreadsDlg::Clear()
-{
-    wxListCtrl* lst = XRCCTRL(*this, "lstThreads", wxListCtrl);
-    lst->ClearAll();
-    lst->Freeze();
-    lst->DeleteAllItems();
-    lst->InsertColumn(0, _("Active"), wxLIST_FORMAT_LEFT, 64);
-    lst->InsertColumn(1, _("Number"), wxLIST_FORMAT_RIGHT, 64);
-    lst->InsertColumn(2, _("Info"), wxLIST_FORMAT_LEFT);
-    lst->Thaw();
-}
-
-void ThreadsDlg::AddThread(const wxString& active_mark, const wxString& thread_num, const wxString& thread_info)
-{
-//    Manager::Get()->GetLogManager()->DebugLog(_T("Add: mark=%s, num=%s, info=%s"), active_mark.c_str(), thread_num.c_str(), thread_info.c_str());
-    wxListCtrl* lst = XRCCTRL(*this, "lstThreads", wxListCtrl);
-    lst->Freeze();
-    lst->InsertItem(lst->GetItemCount(), active_mark);
-    int idx = lst->GetItemCount() - 1;
-    lst->SetItem(idx, 1, thread_num);
-    lst->SetItem(idx, 2, thread_info);
-
-    lst->SetColumnWidth(2, wxLIST_AUTOSIZE);
-    lst->Thaw();
-}
-
-void ThreadsDlg::OnListRightClick(wxListEvent& event)
-{
-    wxListCtrl* lst = XRCCTRL(*this, "lstThreads", wxListCtrl);
-
-    wxMenu m;
-    m.Append(idSwitch, _("Switch to this thread"));
-    lst->PopupMenu(&m);
-}
-
-void ThreadsDlg::OnSwitchThread(wxCommandEvent& event)
-{
-    wxListCtrl* lst = XRCCTRL(*this, "lstThreads", wxListCtrl);
-    if (lst->GetSelectedItemCount() == 0)
-        return;
-
-    // find selected item index
-    int index = lst->GetNextItem(-1,
-                                 wxLIST_NEXT_ALL,
-                                 wxLIST_STATE_SELECTED);
-
-    wxString active = lst->GetItemText(index);
-    if (active == _T("*"))
-        return; // same thread
-
-    wxString thread;
-    wxListItem info;
-    info.m_itemId = index;
-    info.m_col = 1;
-    info.m_mask = wxLIST_MASK_TEXT;
-    if (lst->GetItem(info))
-        thread = info.m_text;
-    else
-        return;
-
-    unsigned long thread_num;
-    if (thread.ToULong(&thread_num, 10))
-        if (m_pDbg->GetState().HasDriver())
-            m_pDbg->GetState().GetDriver()->SwitchThread(thread_num);
-}
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
+ * http://www.gnu.org/licenses/gpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include <sdk.h>
+#include "threadsdlg.h"
+#include "debuggergdb.h"
+#include "debuggerdriver.h"
+#include <wx/intl.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/menu.h>
+#include <globals.h>
+
+static const int idSwitch = wxNewId();
+
+BEGIN_EVENT_TABLE(ThreadsDlg, wxPanel)
+    EVT_LIST_ITEM_RIGHT_CLICK(XRCID("lstThreads"), ThreadsDlg::OnListRightClick)
+    EVT_MENU(idSwitch, ThreadsDlg::OnSwitchThread)
+END_EVENT_TABLE()
+
+ThreadsDlg::ThreadsDlg(wxWindow* parent, DebuggerGDB* debugger)
+    : m_pDbg(debugger)
+{
+    //ctor
+    wxXmlResource::Get()->LoadPanel(this, parent, _T("dlgThreads"));
+//    SetWindowStyle(GetWindowStyle() | wxFRAME_FLOAT_ON_PARENT);
+
+    wxListCtrl* lst = XRCCTRL(*this, "lstThreads", wxListCtrl);
+
+    wxFont font(8, wxMODERN, wxNORMAL, wxNORMAL);
+    lst->SetFont(font);
+    Clear();
+}
+
+ThreadsDlg::~ThreadsDlg()
+{
+    //dtor
+}
+
+void ThreadsDlg::Clear()
+{
+    wxListCtrl* lst = XRCCTRL(*this, "lstThreads", wxListCtrl);
+    lst->ClearAll();
+    lst->Freeze();
+    lst->DeleteAllItems();
+    lst->InsertColumn(0, _("Active"), wxLIST_FORMAT_LEFT, 64);
+    lst->InsertColumn(1, _("Number"), wxLIST_FORMAT_RIGHT, 64);
+    lst->InsertColumn(2, _("Info"), wxLIST_FORMAT_LEFT);
+    lst->Thaw();
+}
+
+void ThreadsDlg::AddThread(const wxString& active_mark, const wxString& thread_num, const wxString& thread_info)
+{
+//    Manager::Get()->GetLogManager()->DebugLog(_T("Add: mark=%s, num=%s, info=%s"), active_mark.c_str(), thread_num.c_str(), thread_info.c_str());
+    wxListCtrl* lst = XRCCTRL(*this, "lstThreads", wxListCtrl);
+    lst->Freeze();
+    lst->InsertItem(lst->GetItemCount(), active_mark);
+    int idx = lst->GetItemCount() - 1;
+    lst->SetItem(idx, 1, thread_num);
+    lst->SetItem(idx, 2, thread_info);
+
+    lst->SetColumnWidth(2, wxLIST_AUTOSIZE);
+    lst->Thaw();
+}
+
+void ThreadsDlg::OnListRightClick(wxListEvent& event)
+{
+    wxListCtrl* lst = XRCCTRL(*this, "lstThreads", wxListCtrl);
+
+    wxMenu m;
+    m.Append(idSwitch, _("Switch to this thread"));
+    lst->PopupMenu(&m);
+}
+
+void ThreadsDlg::OnSwitchThread(wxCommandEvent& event)
+{
+    wxListCtrl* lst = XRCCTRL(*this, "lstThreads", wxListCtrl);
+    if (lst->GetSelectedItemCount() == 0)
+        return;
+
+    // find selected item index
+    int index = lst->GetNextItem(-1,
+                                 wxLIST_NEXT_ALL,
+                                 wxLIST_STATE_SELECTED);
+
+    wxString active = lst->GetItemText(index);
+    if (active == _T("*"))
+        return; // same thread
+
+    wxString thread;
+    wxListItem info;
+    info.m_itemId = index;
+    info.m_col = 1;
+    info.m_mask = wxLIST_MASK_TEXT;
+    if (lst->GetItem(info))
+        thread = info.m_text;
+    else
+        return;
+
+    unsigned long thread_num;
+    if (thread.ToULong(&thread_num, 10))
+        if (m_pDbg->GetState().HasDriver())
+            m_pDbg->GetState().GetDriver()->SwitchThread(thread_num);
+}

Property changes on: src\plugins\debuggergdb\threadsdlg.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native


Property changes on: src\plugins\debuggergdb\threadsdlg.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:eol-style
   + native

