Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Detection of invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] path

(1/1)

BlueHazzard:
I have a invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] setting in my config. To reproduce:
1) Create a new compiler in the compiler options
2) Leave the path empty and save the settings.

Now if you open codeblocks you get the AutoDetectCompilers dialog. Now if you scroll trough the entries all are valid, but the invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] is "Not-Found" as all other default compilers that have no path set. This should not be the case. If the compiler is user added there should be a big red warning that this compiler has no path, or is invalid....

Now i looked into the code and found this:
sdk\autodetectcompilers.cpp:59

--- Code: ---            wxString path = compiler->GetMasterPath();
            wxString path_no_macros = compiler->GetMasterPath();
            Manager::Get()->GetMacrosManager()->ReplaceMacros(path_no_macros);

            int idx = list->GetItemCount() - 1;
            int highlight = 0;
            if (path.IsEmpty() && Manager::Get()->GetConfigManager(wxT("compiler"))->Exists(wxT("/sets/") + compiler->GetID() + wxT("/name")))
            {
                // Here, some user-interaction is required not to show this
                // dialog again on each new start-up of C::B.
                list->SetItem(idx, 1, _("Invalid"));
                // So we better clearly HIGHLIGHT this entry:
                highlight = 1;
            }
            else // The compiler is *probably* invalid, but at least a master-path is set
            {
                list->SetItem(idx, 1, _("Not found"));
                highlight = -1;
            }

--- End code ---

what is

--- Code: ---Manager::Get()->GetConfigManager(wxT("compiler"))->Exists(wxT("/sets/") + compiler->GetID() + wxT("/name"))
--- End code ---
. Why is there a differentiation? If the master path is empty this should be "invalid" or not?

can someone bring light to this?
thank you!

BlueHazzard:
WTF? Is there a auto insert thing for forum posts with "Detection of invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]" keyword? I did not added this

--- Quote ---[YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]
--- End quote ---
thing xD

BlueHazzard:
Ok, this is going out of hand now with the title

oBFusCATed:
Yes, there is detection of the words i n v a l i d c o m p i l e r. And they are replaced with this message. There are too many people posting about it, so we had to take this measure.

Navigation

[0] Message Index

Go to full version