Author Topic: XML based compilers  (Read 330968 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: XML based compilers
« Reply #135 on: September 13, 2012, 11:30:31 pm »
Just wondering, are there any updates on the current status of this branch?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5513
Re: XML based compilers
« Reply #136 on: September 13, 2012, 11:53:26 pm »
I am gonna do some tests of your latest updates this Sunday, was completely unable to get to it any sooner :-(

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: XML based compilers
« Reply #137 on: September 22, 2012, 12:11:56 am »
I presume you meant this coming Sunday ;) ...

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: XML based compilers
« Reply #138 on: September 25, 2012, 11:14:47 pm »
Here is a quick patch to prevent compilers from incorrectly being marked as "User-defined" in the auto detection dialog.
Code
Index: src/sdk/autodetectcompilers.cpp
===================================================================
--- src/sdk/autodetectcompilers.cpp (revision 8407)
+++ src/sdk/autodetectcompilers.cpp (working copy)
@@ -96,7 +96,7 @@
                 else if ( !path.IsEmpty() )
                 {
                     // Check, if the master path is valid:
-                    if ( wxFileName::DirExists(path_no_macros) )
+                    if ( wxFileName::DirExists(path_no_macros) && !(path == pathDetected || path_no_macros == pathDetected) )
                     {
                         list->SetItem(idx, 1, _("User-defined")); // OK
                         highlight = 0;

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5513
Re: XML based compilers
« Reply #139 on: September 25, 2012, 11:20:21 pm »
hmmmm, darn, this weekend for sure, or I owe you some nice belgian beers ;-)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: XML based compilers
« Reply #140 on: September 26, 2012, 07:29:55 am »
nice belgian beers ;-)
From a German point of view: Isn't this a paradoxon? ;D ;D ;D
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: XML based compilers
« Reply #141 on: September 27, 2012, 12:55:39 am »
hmmmm, darn, this weekend for sure, or I owe you some nice belgian beers ;-)
Not a problem; I am sure you have been very busy.  (Although, if you do not get around to it, that might have to be a rain check; I am currently underage ;).)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5513
Re: XML based compilers
« Reply #142 on: October 01, 2012, 07:57:35 pm »
I can confirm the "exe" problem is gone, it now remembered it is gcc-4.7.
One strange things : it claimed the SDCC was user defined. Never touched that one ...

Seems to be ok. I will prepare nightlies.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: XML based compilers
« Reply #143 on: October 01, 2012, 09:11:52 pm »
One strange things : it claimed the SDCC was user defined. Never touched that one ...
That is an artifact of a fix to its auto-detection routine; as it only will report this oddity once (on the switch from trunk to XML compiler), I did not think it was worthwhile to write a special rule for it.

Seems to be ok. I will prepare nightlies.
Okay.  I will be waiting for the bug reports that only appear after everything is thought to be fixed :).

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: XML based compilers
« Reply #144 on: October 06, 2012, 09:01:36 pm »
I noticed Ubuntu seems to make multiline textboxes default to zero height.  This patch should ensure there is at least reasonable edit room (on any platform).
Code
Index: src/plugins/compilergcc/compileroptionsdlg.cpp
===================================================================
--- src/plugins/compilergcc/compileroptionsdlg.cpp (revision 8435)
+++ src/plugins/compilergcc/compileroptionsdlg.cpp (working copy)
@@ -2777,6 +2777,11 @@
         Compiler* compiler = CompilerFactory::GetCompiler(m_CurrentCompilerIdx);
         wxTextEntryDialog dlg(this, wxT("List flags that will only be used during C compilation"),
                               wxT("C - only flags"), compiler->GetCOnlyFlags(), wxTextEntryDialogStyle|wxTE_MULTILINE|wxRESIZE_BORDER);
+        if (dlg.GetSize().GetHeight() < 220)
+        {
+            dlg.SetSize(dlg.GetPosition().x, dlg.GetPosition().y - (220 - dlg.GetSize().GetHeight()) / 2,
+                        dlg.GetSize().GetWidth(), 220);
+        }
         dlg.ShowModal();
         wxString flags = dlg.GetValue();
         flags.Replace(wxT("\n"), wxT(" "));
@@ -2795,6 +2800,11 @@
         Compiler* compiler = CompilerFactory::GetCompiler(m_CurrentCompilerIdx);
         wxTextEntryDialog dlg(this, wxT("List flags that will only be used during C++ compilation"),
                               wxT("C++ - only flags"), compiler->GetCPPOnlyFlags(), wxTextEntryDialogStyle|wxTE_MULTILINE|wxRESIZE_BORDER);
+        if (dlg.GetSize().GetHeight() < 220)
+        {
+            dlg.SetSize(dlg.GetPosition().x, dlg.GetPosition().y - (220 - dlg.GetSize().GetHeight()) / 2,
+                        dlg.GetSize().GetWidth(), 220);
+        }
         dlg.ShowModal();
         wxString flags = dlg.GetValue();
         flags.Replace(wxT("\n"), wxT(" "));
Index: src/plugins/compilergcc/resources/compilers/options_common_warnings.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/options_common_warnings.xml (revision 8435)
+++ src/plugins/compilergcc/resources/compilers/options_common_warnings.xml (working copy)
@@ -26,7 +26,7 @@
             <Option name="Have g++ follow the C++11 ISO C++ language standard"
                     option="-std=c++11"
                     supersedes="-std=c++98 -std=c++0x"/>
-            <Option name="zero as null pointer constant"
+            <Option name="Warn if '0' is used as a null pointer constant"
                     option="-Wzero-as-null-pointer-constant"/>
         </if>
         <Option name="Enable warnings demanded by strict ISO C and ISO C++"


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: XML based compilers
« Reply #145 on: October 06, 2012, 09:19:11 pm »
Why don't you specify min size for the control that is made the wrong height?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: XML based compilers
« Reply #146 on: October 06, 2012, 09:24:58 pm »
In this part of the code I had used a prefabricated wxTextEntryDialog (for ease of programming), so I do not have (guaranteed) direct access to any of the components (as far as I know).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: XML based compilers
« Reply #147 on: October 06, 2012, 09:26:25 pm »
So, this is an ubuntu bug and you must file a bug report. No need for such ugly hacks.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5513
Re: XML based compilers
« Reply #148 on: October 06, 2012, 11:09:41 pm »
good idea to file it to ubuntu, but keep the hack, and document it for what purpose it is there. The user couldn't care less for technical bla bla, he wants a working product. Just a matter to keep this in mind and check when it is fixed to remove the hack at the appropriate time.
Is it something that can happen often, or only in a very rare case ? If it is rather rare then indeed the hack might not be worth the hassle.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: XML based compilers
« Reply #149 on: October 06, 2012, 11:46:44 pm »
Is it something that can happen often, or only in a very rare case ? If it is rather rare then indeed the hack might not be worth the hassle.
The hack is already in svn...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]