Author Topic: The 01 November 2012 build (8497) is out.  (Read 132496 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: The 01 November 2012 build (8497) is out.
« Reply #15 on: November 03, 2012, 03:51:09 am »
[...]
Though it's a nice subtility, i think it's not a so good idea for other localisations than English. So, the old solution, though not perfect, is better.
During translation, you could translate the first message to the string minus the last terms, and the two suffix strings to (instead be) full word(s).  (Alternatively, you could translate the first message to the full string (as previous), and the two suffix strings to empty strings.)

Offline gd_on

  • Regular
  • ***
  • Posts: 488
Re: The 01 November 2012 build (8497) is out.
« Reply #16 on: November 03, 2012, 10:10:27 am »
Probably yes. There are different solutions/workaround to do this translation. Nevertheless, in the future there could be other strings which will have an "y" termination in the singular form and 'ies" in the plural form. So, it will be more difficult to find a good workaround, except to adopt in every case the plural form, which, in fine, in the "old" solution also in english. It's not an easy problem, I know...

gd_on
« Last Edit: November 09, 2012, 10:08:58 am by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: The 01 November 2012 build (8497) is out.
« Reply #17 on: November 03, 2012, 01:48:14 pm »
No macro replacement, looks like broken compiler lookup again.

Speaking of compiler, would it be possible to add support for "no compiler" projects? I disabled the Compiler plugin at job because it kept bugging me about not finding GCC (it's a PHP project), but when I tried to make a new project I couldn't because I *had* to choose a compiler and there was no compiler list to choose from (since I had disabled the plugin).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9504
Re: The 01 November 2012 build (8497) is out.
« Reply #18 on: November 04, 2012, 05:35:58 pm »
Speaking of compiler, would it be possible to add support for "no compiler" projects? I
We have a "commands only" target. Does that help?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: The 01 November 2012 build (8497) is out.
« Reply #19 on: November 05, 2012, 11:01:22 pm »
Speaking of compiler, would it be possible to add support for "no compiler" projects? I
We have a "commands only" target. Does that help?

Not really... if it's not supported in the "New Project" wizard, it's useless. I'm always forced to "choose" a compiler - and I always end up choosing GCC by default, which obviously I don't have on this machine. I want to be able to choose "No compiler" or something, so that it won't ask me for compiler settings.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12066
    • Travis build status
Re: The 01 November 2012 build (8497) is out.
« Reply #20 on: November 06, 2012, 12:20:50 am »
rickg22: Why don't you modify the empty project template and commit it? Or duplicate it and name it "Empty no compiler project" or something like that?
(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 rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: The 01 November 2012 build (8497) is out.
« Reply #21 on: November 07, 2012, 07:22:53 pm »
rickg22: Why don't you modify the empty project template and commit it? Or duplicate it and name it "Empty no compiler project" or something like that?

Because I barely have time :(

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: The 01 November 2012 build (8497) is out.
« Reply #22 on: November 07, 2012, 07:38:53 pm »
rickg22: Why don't you modify the empty project template and commit it? Or duplicate it and name it "Empty no compiler project" or something like that?

Because I barely have time :(

I need something like this too for some of the scripted language projects I work on. The other problem with commands only is that it can't be run or debugged. Is there a reason why not?
(Btw, won't there be other problems if a project does not have a compiler set? e.g. some of the core/plugins probably expect a project will have a compiler.) Happy to spend some time on this, but I want to work on the user customizable main and module menu stuff first.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: The 01 November 2012 build (8497) is out.
« Reply #23 on: November 08, 2012, 02:28:54 am »
I need something like this too for some of the scripted language projects I work on. The other problem with commands only is that it can't be run or debugged. Is there a reason why not?
It would probably be best to modify this in the XML Compiler branch, however I am not sure if features should be held off from that branch currently so it can be focused on merging (devs, is there a normal procedure here?).
If I can think of a good idea, I might try working on this as well...

I'm always forced to "choose" a compiler - and I always end up choosing GCC by default, which obviously I don't have on this machine. I want to be able to choose "No compiler" or something, so that it won't ask me for compiler settings.
So creating a dummy "Null Compiler" should suit your purposes?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: The 01 November 2012 build (8497) is out.
« Reply #24 on: November 08, 2012, 04:23:35 am »
@alpha: Don't make any changes on account of me. Get the stuff merged into trunk first. A final thought on the "commands only" target: Does it make any sense for that target to have any of the build option tabs other than the pre/post build steps?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12066
    • Travis build status
Re: The 01 November 2012 build (8497) is out.
« Reply #25 on: November 08, 2012, 08:11:23 am »
No merging until the release!  ::)
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9504
Re: The 01 November 2012 build (8497) is out.
« Reply #26 on: November 08, 2012, 08:35:36 am »
No merging until the release!  ::)
Yes, I think we made that point already.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9504
Re: The 01 November 2012 build (8497) is out.
« Reply #27 on: November 08, 2012, 08:40:37 am »
A final thought on the "commands only" target: Does it make any sense for that target to have any of the build option tabs other than the pre/post build steps?
Macros (envvars) as well I'd say ()if you want to use them in scripts).

So creating a dummy "Null Compiler" should suit your purposes?
Yes - sounds reasonable for these purposes. BTW: all compiler related change sin the branch, please. I'll merge all the latest changes from trunk into the branch in a minute...

For the release we had in mind the following:
- Don't mess with the compiler in trunk until release
- Release
- Merge compiler branch into trunk
- All up-coming nightlies will then use the new compiler framework.

So whatever work needs to be done on the compiler front: If these are no critical bugs to fix, please do it in the branch...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: The 01 November 2012 build (8497) is out.
« Reply #28 on: November 10, 2012, 01:36:47 am »

I'm always forced to "choose" a compiler - and I always end up choosing GCC by default, which obviously I don't have on this machine. I want to be able to choose "No compiler" or something, so that it won't ask me for compiler settings.
So creating a dummy "Null Compiler" should suit your purposes?

Yes! That's exactly what I had in mind, thanks! Just name it "No compiler" in the dialog :)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: The 01 November 2012 build (8497) is out.
« Reply #29 on: November 11, 2012, 12:40:58 am »
Here is a preliminary patch (against the XML Compiler branch); it covers (at least, should cover) the basics, but I am not sure what other tuning might benefit this.
Code: [Select]
Index: src/plugins/compilergcc/compileroptionsdlg.cpp
===================================================================
--- src/plugins/compilergcc/compileroptionsdlg.cpp (revision 8543)
+++ src/plugins/compilergcc/compileroptionsdlg.cpp (working copy)
@@ -2778,7 +2778,8 @@
         {
             dlg.SetSize(dlg.GetPosition().x, dlg.GetPosition().y - (220 - dlg.GetSize().GetHeight()) / 2,
                         dlg.GetSize().GetWidth(), 220);
-        }        dlg.ShowModal();
+        }
+        dlg.ShowModal();
         wxString flags = dlg.GetValue();
         flags.Replace(wxT("\n"), wxT(" "));
         flags.Replace(wxT("\r"), wxT(" "));
Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp (revision 8543)
+++ src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -701,6 +701,12 @@
 
     // Get configured masterpath, expand macros and remove trailing separators
     wxString masterPath = compiler->GetMasterPath();
+    bool isNoComp = false;
+    if (masterPath == wxT("-- No Compiler --")) // Special case so "No Compiler" is valid
+    {
+        isNoComp = true;
+        masterPath.Clear();
+    }
     Manager::Get()->GetMacrosManager()->ReplaceMacros(masterPath);
     while (   !masterPath.IsEmpty()
            && ((masterPath.Last() == '\\') || (masterPath.Last() == '/')) )
@@ -757,7 +763,7 @@
     /* TODO (jens#1#): Is the above correct ?
        Or should we search in the whole systempath (pathList in this case) for the executable? */
     // Try again...
-    if (binPath.IsEmpty() || (pathList.Index(binPath, caseSens)==wxNOT_FOUND))
+    if ((binPath.IsEmpty() || (pathList.Index(binPath, caseSens)==wxNOT_FOUND)) && !isNoComp)
     {
         InfoWindow::Display(_("Environment error"),
                             _("Can't find compiler executable in your configured search path's for ") + compiler->GetName() + _T('\n'));
Index: src/plugins/compilergcc/resources/compilers/options_null.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/options_null.xml (revision 0)
+++ src/plugins/compilergcc/resources/compilers/options_null.xml (revision 0)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!DOCTYPE CodeBlocks_compiler_options>
+<CodeBlocks_compiler_options>
+    <!-- No options -->
+    <Option name="No active compiler"
+            option="none"
+            checkAgainst="none"
+            checkMessage="This is not a switch; it does nothing."
+            supersedes="none"/>
+</CodeBlocks_compiler_options>
Index: src/plugins/compilergcc/resources/compilers/compiler_null.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/compiler_null.xml (revision 0)
+++ src/plugins/compilergcc/resources/compilers/compiler_null.xml (revision 0)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE CodeBlocks_compiler>
+<CodeBlocks_compiler name="*No Compiler*"
+                     id="null"
+                     weight="100">
+    <Path type="master">
+        <Fallback path="-- No Compiler --"/>
+    </Path>
+</CodeBlocks_compiler>
Index: src/plugins/compilergcc/compilerXML.cpp
===================================================================
--- src/plugins/compilergcc/compilerXML.cpp (revision 8543)
+++ src/plugins/compilergcc/compilerXML.cpp (working copy)
@@ -244,8 +244,9 @@
     }
     wxSetEnv(wxT("PATH"), origPath);
 
-    if (wxFileExists(m_MasterPath + wxFILE_SEP_PATH + wxT("bin") + wxFILE_SEP_PATH + m_Programs.C) ||
-        wxFileExists(m_MasterPath + wxFILE_SEP_PATH + m_Programs.C))
+    if (   wxFileExists(m_MasterPath + wxFILE_SEP_PATH + wxT("bin") + wxFILE_SEP_PATH + m_Programs.C)
+        || wxFileExists(m_MasterPath + wxFILE_SEP_PATH + m_Programs.C)
+        || m_MasterPath == wxT("-- No Compiler --")) // Special case so "No Compiler" is valid
     {
         return adrDetected;
     }
« Last Edit: November 11, 2012, 04:02:56 am by Alpha »