ide;GlobalSettingsDialog; renamed GCC Prefix to GNU Toolchain Prefix and Execution...
authorRejean Loyer <rejean.loyer@gmail.com>
Tue, 5 Mar 2013 02:32:54 +0000 (21:32 -0500)
committerJerome St-Louis <jerome@ecere.com>
Wed, 6 Mar 2013 13:19:59 +0000 (08:19 -0500)
ide/src/IDESettings.ec
ide/src/dialogs/GlobalSettingsDialog.ec
ide/src/project/Project.ec

index 3d86be2..d05df89 100644 (file)
@@ -756,11 +756,11 @@ public:
       get { return cxxCommand; }
       isset { return cxxCommand && cxxCommand[0]; }
    }
-   property char * execPrefixCommand
+   property char * execPrefixCommand // <-- old name for json ide settings file compatibility
    {
-      set { delete execPrefixCommand; if(value && value[0]) execPrefixCommand = CopyString(value); }
-      get { return execPrefixCommand; }
-      isset { return execPrefixCommand && execPrefixCommand[0]; }
+      set { delete executableLauncher; if(value && value[0]) executableLauncher = CopyString(value); }
+      get { return executableLauncher; }
+      isset { return executableLauncher && executableLauncher[0]; }
    }
    bool ccacheEnabled;
    bool distccEnabled;
@@ -777,11 +777,11 @@ public:
       get { return distccHosts; }
       isset { return distccHosts && distccHosts[0]; }
    }
-   property char * gccPrefix
+   property char * gccPrefix // <-- old name for json ide settings file compatibility
    {
-      set { delete gccPrefix; if(value && value[0]) gccPrefix = CopyString(value); }
-      get { return gccPrefix; }
-      isset { return gccPrefix && gccPrefix[0]; }
+      set { delete gnuToolchainPrefix; if(value && value[0]) gnuToolchainPrefix = CopyString(value); }
+      get { return gnuToolchainPrefix; }
+      isset { return gnuToolchainPrefix && gnuToolchainPrefix[0]; }
    }
    property char * sysroot
    {
@@ -906,10 +906,10 @@ private:
    char * cppCommand;
    char * ccCommand;
    char * cxxCommand;
-   char * execPrefixCommand;
+   char * executableLauncher;
    char * distccHosts;
    bool supportsBitDepth;
-   char * gccPrefix;
+   char * gnuToolchainPrefix;
    char * sysroot;
    /*union
    {
@@ -928,9 +928,9 @@ private:
       delete ccCommand;
       delete cxxCommand;
       delete makeCommand;
-      delete execPrefixCommand;
+      delete executableLauncher;
       delete distccHosts;
-      delete gccPrefix;
+      delete gnuToolchainPrefix;
       delete sysroot;
       if(environmentVars) environmentVars.Free();
       if(includeDirs) { includeDirs.Free(); }
@@ -957,12 +957,12 @@ private:
          cppCommand,
          ccCommand,
          cxxCommand,
-         execPrefixCommand,
+         executableLauncher,
          ccacheEnabled,
          distccEnabled,
          supportsBitDepth,
          distccHosts,
-         gccPrefix,
+         gnuToolchainPrefix,
          sysroot
       };
       for(s : includeDirs) copy.includeDirs.Add(CopyString(s));
index 8b061d6..c010500 100644 (file)
@@ -682,72 +682,75 @@ class CompilerToolchainTab : CompilersSubTab
    background = formColor;
    text = $"Toolchain";
 
+   int margin;
+   margin = 130;
+
    Label ecpLabel { this, position = { 8, 12 }, labeledWindow = ecp, tabCycle = false, inactive = true };
    PathBox ecp
    {
-      this, anchor = { left = 120, top = 8, right = 8 };
+      this, anchor = { left = margin, top = 8, right = 8 };
       text = $"eC Precompiler", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label eccLabel { this, position = { 8, 38 }, labeledWindow = ecc, tabCycle = false, inactive = true };
    PathBox ecc
    {
-      this, anchor = { left = 120, top = 34, right = 8 };
+      this, anchor = { left = margin, top = 34, right = 8 };
       text = $"eC Compiler", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label ecsLabel { this, position = { 8, 64 }, labeledWindow = ecs, tabCycle = false, inactive = true };
    PathBox ecs
    {
-      this, anchor = { left = 120, top = 60, right = 8 };
+      this, anchor = { left = margin, top = 60, right = 8 };
       text = $"eC Symbol Loader", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label earLabel { this, position = { 8, 90 }, labeledWindow = ear, tabCycle = false, inactive = true };
    PathBox ear
    {
-      this, anchor = { left = 120, top = 86, right = 8 };
+      this, anchor = { left = margin, top = 86, right = 8 };
       text = $"Ecere Archiver", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label cppLabel { this, position = { 8, 116 }, labeledWindow = cpp, tabCycle = false, inactive = true };
    PathBox cpp
    {
-      this, anchor = { left = 120, top = 112, right = 8 };
+      this, anchor = { left = margin, top = 112, right = 8 };
       text = $"C Preprocessor", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label ccLabel { this, position = { 8, 142 }, labeledWindow = cc, tabCycle = false, inactive = true };
    PathBox cc
    {
-      this, anchor = { left = 120, top = 138, right = 8 };
+      this, anchor = { left = margin, top = 138, right = 8 };
       text = $"C Compiler", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label cxxLabel { this, position = { 8, 168 }, labeledWindow = cxx, tabCycle = false, inactive = true };
    PathBox cxx
    {
-      this, anchor = { left = 120, top = 164, right = 8 };
+      this, anchor = { left = margin, top = 164, right = 8 };
       text = $"C++ Compiler", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label makeLabel { this, position = { 8, 194 }, labeledWindow = make, tabCycle = false, inactive = true };
    PathBox make
    {
-      this, anchor = { left = 120, top = 190, right = 8 };
+      this, anchor = { left = margin, top = 190, right = 8 };
       text = $"GNU Make", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
-   Label execPrefixLabel { this, position = { 8, 220 }, labeledWindow = execPrefix, tabCycle = false, inactive = true };
-   PathBox execPrefix
-   {
-      this, anchor = { left = 120, top = 216, right = 8 };
-      text = $"Execution Prefix", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
-   };
-   Label gccPrefixLabel { this, position = { 8, 246 }, labeledWindow = gccPrefix, tabCycle = false, inactive = true };
-   PathBox gccPrefix
+   Label gnuToolchainPrefixLabel { this, position = { 8, 220 }, labeledWindow = gnuToolchainPrefix, tabCycle = false, inactive = true };
+   PathBox gnuToolchainPrefix
    {
-      this, anchor = { left = 120, top = 242, right = 8 };
-      text = $"GCC Prefix", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
+      this, anchor = { left = margin, top = 216, right = 8 };
+      text = $"GNU Toolchain Prefix", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
-   Label sysrootLabel { this, position = { 8, 272 }, labeledWindow = sysroot, tabCycle = false, inactive = true };
+   Label sysrootLabel { this, position = { 8, 246 }, labeledWindow = sysroot, tabCycle = false, inactive = true };
    PathBox sysroot
    {
-      this, anchor = { left = 120, top = 268, right = 8 };
+      this, anchor = { left = margin, top = 242, right = 8 };
       text = $"SYSROOT", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
+   Label executableLauncherLabel { this, position = { 8, 272 }, labeledWindow = executableLauncher, tabCycle = false, inactive = true };
+   PathBox executableLauncher
+   {
+      this, anchor = { left = margin, top = 268, right = 8 };
+      text = $"Executable Launcher", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
+   };
 
    bool NotifyModifiedDocument(PathBox pathBox)
    {
@@ -770,9 +773,9 @@ class CompilerToolchainTab : CompilersSubTab
             compiler.cxxCommand = pathBox.slashPath;
          else if(pathBox == make)
             compiler.makeCommand = pathBox.slashPath;
-         else if(pathBox == execPrefix)
+         else if(pathBox == executableLauncher)
             compiler.execPrefixCommand = pathBox.slashPath;
-         else if(pathBox == gccPrefix)
+         else if(pathBox == gnuToolchainPrefix)
             compiler.gccPrefix = pathBox.slashPath;
          else if(pathBox == sysroot)
             compiler.sysroot = pathBox.slashPath;
@@ -797,8 +800,8 @@ class CompilerToolchainTab : CompilersSubTab
          cc.path = compiler.ccCommand;
          cxx.path = compiler.cxxCommand;
          make.path = compiler.makeCommand;
-         execPrefix.path = compiler.execPrefixCommand;
-         gccPrefix.path = compiler.gccPrefix;
+         executableLauncher.path = compiler.executableLauncher;
+         gnuToolchainPrefix.path = compiler.gnuToolchainPrefix;
          sysroot.path = compiler.sysroot;
 
          ecpLabel.disabled = ecp.disabled = disabled;
@@ -809,8 +812,8 @@ class CompilerToolchainTab : CompilersSubTab
          cxxLabel.disabled = cxx.disabled = isVC || disabled;
          ccLabel.disabled = cc.disabled = isVC || disabled;
          makeLabel.disabled = make.disabled = disabled;
-         execPrefixLabel.disabled = execPrefix.disabled = disabled;
-         gccPrefixLabel.disabled = gccPrefix.disabled = disabled;
+         executableLauncherLabel.disabled = executableLauncher.disabled = disabled;
+         gnuToolchainPrefixLabel.disabled = gnuToolchainPrefix.disabled = disabled;
          sysrootLabel.disabled = sysroot.disabled = disabled;
       }
       modifiedDocument = false;
index 5914cac..6b2db7f 100644 (file)
@@ -1394,7 +1394,7 @@ private:
       int lenMakeCommand = strlen(compiler.makeCommand);
       int testLen = 0;
 
-      char * gccPrefix = compiler.gccPrefix ? compiler.gccPrefix : "";
+      char * gnuToolchainPrefix = compiler.gnuToolchainPrefix ? compiler.gnuToolchainPrefix : "";
 
       DynamicString test { };
       DynamicString ecp { };
@@ -1416,14 +1416,14 @@ private:
       prefix.concatx(
             compiler.ccacheEnabled ? "ccache " : "",
             compiler.distccEnabled ? "distcc " : "",
-            gccPrefix);
+            gnuToolchainPrefix);
 
       cpp.concatx((String)prefix, compiler.cppCommand, " ");
       cc.concatx((String)prefix, compiler.ccCommand,  " ");
       cxx.concatx((String)prefix, compiler.cxxCommand, " ");
 
-      strip.concatx(gccPrefix, "strip ");
-      ar.concatx(gccPrefix, "ar rcs");
+      strip.concatx(gnuToolchainPrefix, "strip ");
+      ar.concatx(gnuToolchainPrefix, "ar rcs");
 
       testLen = Max(testLen, ecp.size);
       testLen = Max(testLen, ecc.size);
@@ -1954,6 +1954,7 @@ private:
    {   
       String target = new char[maxPathLen];
       char oldDirectory[MAX_LOCATION];
+      char * executableLauncher = compiler.executableLauncher;
       DirExpression targetDirExp = GetTargetDir(compiler, config);
       PathBackup pathBackup { };
 
@@ -1980,11 +1981,11 @@ private:
          ChangeWorkingDir(topNode.path);
       // ChangeWorkingDir(topNode.path);
       SetPath(true, compiler, config);
-      if(compiler.execPrefixCommand)
+      if(executableLauncher)
       {
-         char * prefixedTarget = new char[strlen(compiler.execPrefixCommand) + strlen(target) + 2];
+         char * prefixedTarget = new char[strlen(executableLauncher) + strlen(target) + 2];
          prefixedTarget[0] = '\0';
-         strcat(prefixedTarget, compiler.execPrefixCommand);
+         strcat(prefixedTarget, executableLauncher);
          strcat(prefixedTarget, " ");
          strcat(prefixedTarget, target);
          Execute(prefixedTarget);
@@ -2080,6 +2081,7 @@ private:
       char * name;
       char * compilerName;
       bool gccCompiler = compiler.ccCommand && (strstr(compiler.ccCommand, "gcc") != null || strstr(compiler.ccCommand, "g++") != null);
+      char * gnuToolchainPrefix = compiler.gnuToolchainPrefix ? compiler.gnuToolchainPrefix : "";
       Platform platform = compiler.targetPlatform;
 
       compilerName = CopyString(compiler.name);
@@ -2120,9 +2122,9 @@ private:
             f.Puts("# TOOLCHAIN\n");
             f.Puts("\n");
 
-            if(compiler.gccPrefix && compiler.gccPrefix[0])
+            if(gnuToolchainPrefix && gnuToolchainPrefix[0])
             {
-               f.Printf("GCC_PREFIX := %s\n", compiler.gccPrefix);
+               f.Printf("GCC_PREFIX := %s\n", gnuToolchainPrefix);
                f.Puts("\n");
             }
             if(compiler.sysroot && compiler.sysroot[0])