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

suggestion: add "Download" button into Compiler Framework"

<< < (5/6) > >>

MortenMacFly:

--- Quote from: Alpha on December 16, 2012, 08:43:14 pm ---Assuming I understand the idea being discussed, the following would be the core of the necessary changes (I think):

--- End quote ---
Well if thats what dmoore means its OK with me. But I assumed he means even more: Like calling a certain pre-compiler in the build stage... but I might think too complicated...

dmoore:
For now, Alpha's patch is good enough for me  :) (I haven't tested yet)

I would need to think about what else, if anything, is really needed.

MortenMacFly:

--- Quote from: dmoore on December 17, 2012, 02:36:58 am ---For now, Alpha's patch is good enough for me  :) (I haven't tested yet)

--- End quote ---
OK, nice - well that is easy, indeed.


--- Quote from: Alpha on December 16, 2012, 08:43:14 pm ---(Note: this code was very quickly stuck together; do not commit without changing/fixing/polishing.)

--- End quote ---
Put it to the queue once ready...

Alpha:

--- Quote from: MortenMacFly on December 17, 2012, 03:14:27 pm ---Put it to the queue once ready...

--- End quote ---
Okay; will do after I finish testing.

dmoore:
A couple of suggested tweaks:


--- Code: ---Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp (revision 8685)
+++ src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -1880,9 +1880,16 @@
     else
     {
         // commands-only target?
-        cbMessageBox(_("You can't \"run\" a commands-only target..."));
-        m_pProject->SetCurrentlyCompilingTarget(0);
-        return -1;
+        if (target->GetHostApplication().IsEmpty())
+        {
+            cbMessageBox(_("You must select a host application to \"run\" a commands-only target..."));
+            m_pProject->SetCurrentlyCompilingTarget(0);
+            return -1;
+        }
+        command << hostapStr << strSPACE;
+        command << target->GetExecutionParameters();
+        Manager::Get()->GetMacrosManager()->ReplaceMacros(command, target);
+        Manager::Get()->GetMacrosManager()->ReplaceEnvVars(command);
     }
 
     wxString script = command;
@@ -1903,12 +1910,12 @@
         cmd << command;
 
     Manager::Get()->GetLogManager()->Log(_("Checking for existence: ") + f.GetFullPath(), m_PageIndex);
-    if (!wxFileExists(f.GetFullPath()))
-    {
+    if ( (target->GetTargetType() != ttCommandsOnly) && !wxFileExists(f.GetFullPath()) )
+     {
         int ret = cbMessageBox(_("It seems that this project has not been built yet.\n"
-                                "Do you want to build it now?"),
-                                _("Information"),
-                                wxYES_NO | wxCANCEL | wxICON_QUESTION);
+                                 "Do you want to build it now?"),
+                               _("Information"),
+                               wxYES_NO | wxCANCEL | wxICON_QUESTION);
         switch (ret)
         {
             case wxID_YES:

--- End code ---

Should also do something about the linker message and maybe remove (disable) the irrelevant build options tabs.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version