Developer forums (C::B DEVELOPMENT STRICTLY!) > Compiler Framework Redesign

XML based compilers

<< < (16/41) > >>

Alpha:

--- Quote from: MortenMacFly on July 21, 2012, 07:38:33 pm ---
--- Quote from: Alpha on July 21, 2012, 04:30:17 pm ---Maybe this is a slightly tidier way to fix PCH for compilerXML.cpp:

--- Code: ----#include <wx/string.h>
+class wxString;
[...]
         wxString m_fileName;

--- End code ---

--- End quote ---
That is wrong. You cannot use a fwd decl if you are using  an instance of wxString.

--- End quote ---
I must have been working without actually thinking... I completely did not see that variable (though I do not know how, as I was the one who wrote it :-[).

Alpha:
In this patch, converted to pure XML:

* GNU GCC Compiler for AVR
* Borland C++ Compiler (5.5, 5.82)
* Digital Mars D Compiler
I cannot think of any major changes/additions (other than possibly converting a few more interfaces to pure XML) from my part to this branch that will occur in the near future, so I think this branch is ready for whatever the next step is (maybe a nightly?) to be considered for integration with the trunk.

(Again, I would recommend to anyone who is testing this that they start with a clean profile.)

MortenMacFly:

--- Quote from: Alpha on July 28, 2012, 03:43:45 am ---I cannot think of any major changes/additions (other than possibly converting a few more interfaces to pure XML)
--- End quote ---
I agree. The fact that you converted so many compiler already is also a proof f the concept. 8)
What's needed from my point of view is:
- testing under other platforms
- build test under Linux
- testing the use of macros for path's, executables etc...

I've merged  trunk into the branch so all devs/willing people can try this branch w/o loosing features from trunk.

Alpha:
Compiler logging tweaks:

* Clear progress bar on abort
* Remove tabs from build messages (so they do not print as squares)
* Auto adjust build message size
--- Code: ---Index: src/sdk/loggers.cpp
===================================================================
--- src/sdk/loggers.cpp (revision 8175)
+++ src/sdk/loggers.cpp (working copy)
@@ -340,7 +340,7 @@
     control->Thaw();
 }
 
-void ListCtrlLogger::Append(const wxArrayString& colValues, Logger::level lv)
+void ListCtrlLogger::Append(const wxArrayString& colValues, Logger::level lv, int autoSize)
 {
     if (!control)
         return;
@@ -353,6 +353,8 @@
     int idx = control->GetItemCount() - 1;
     for (size_t i = 1; i < colValues.GetCount(); ++i)
         control->SetItem(idx, i, colValues[i]);
+    if (autoSize != -1)
+        control->SetColumnWidth(autoSize, wxLIST_AUTOSIZE);
     control->Thaw();
 }
 
Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp (revision 8175)
+++ src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -3382,7 +3382,9 @@
     wxArrayString errors;
     errors.Add(filename);
     errors.Add(line);
-    errors.Add(msg);
+    wxString msgFix = msg;
+    msgFix.Replace(wxT("\t"), wxT("    "));
+    errors.Add(msgFix);
 
     Logger::level lv = Logger::info;
     if (lt == cltError)
@@ -3390,8 +3392,7 @@
     else if (lt == cltWarning)
         lv = Logger::warning;
 
-    m_pListLog->Append(errors, lv);
-//    m_pListLog->GetListControl()->SetColumnWidth(2, wxLIST_AUTOSIZE);
+    m_pListLog->Append(errors, lv, 2);
 
     // add to error keeping struct
     m_Errors.AddError(lt, prj, filename, line.IsEmpty() ? 0 : atoi(wxSafeConvertWX2MB(line)), msg);
@@ -3642,6 +3643,8 @@
             LogWarningOrError(cltNormal, 0, wxEmptyString, wxEmptyString,
                               wxString::Format(_("=== Build finished: %s ==="), msg.wx_str()));
             SaveBuildLog();
+            if (!Manager::IsBatchBuild() && m_pLog->progress)
+                m_pLog->progress->SetValue(0);
         }
         else
         {
@@ -3665,9 +3668,6 @@
             Manager::Get()->ProcessEvent(evtSwitch);
 
             m_pListLog->FocusError(m_Errors.GetFirstError());
-            // Build is not completed, so clear the progress bar
-            if (m_pLog->progress)
-                m_pLog->progress->SetValue(0);
         }
         else
         {
Index: src/include/loggers.h
===================================================================
--- src/include/loggers.h (revision 8175)
+++ src/include/loggers.h (working copy)
@@ -136,7 +136,7 @@
     virtual void      CopyContentsToClipboard(bool selectionOnly = false);
     virtual void      UpdateSettings();
     virtual void      Append(const wxString& msg, Logger::level lv = info);
-    virtual void      Append(const wxArrayString& colValues, Logger::level lv = info);
+    virtual void      Append(const wxArrayString& colValues, Logger::level lv = info, int autoSize = -1);
     virtual size_t    GetItemsCount() const;
     virtual void      Clear();
     virtual wxWindow* CreateControl(wxWindow* parent);

--- End code ---

MortenMacFly:
@Jens: Do you / Did you try that "beast" under Linux already?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version