News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

XML based compilers

Started by Alpha, June 15, 2012, 01:00:36 PM

Previous topic - Next topic

Alpha

Just wondering, are there any updates on the current status of this branch?

killerbot

I am gonna do some tests of your latest updates this Sunday, was completely unable to get to it any sooner :-(

Alpha

I presume you meant this coming Sunday ;) ...

Alpha

Here is a quick patch to prevent compilers from incorrectly being marked as "User-defined" in the auto detection dialog.

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;

killerbot

hmmmm, darn, this weekend for sure, or I owe you some nice belgian beers ;-)

MortenMacFly

Quote from: killerbot on September 25, 2012, 11:20:21 PM
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Alpha

Quote from: killerbot on September 25, 2012, 11:20:21 PM
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 ;).)

killerbot

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.

Alpha

Quote from: killerbot on October 01, 2012, 07:57:35 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.

Quote from: killerbot on October 01, 2012, 07:57:35 PM
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 :).

Alpha

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).

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++"


oBFusCATed

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!]

Alpha

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).

oBFusCATed

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!]

killerbot

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.

oBFusCATed

Quote from: killerbot on October 06, 2012, 11:09:41 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!]