stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r525939 - in /incubator/stdcxx/trunk/etc/config/windows: build.wsf generate.wsf summary.js
Date Thu, 05 Apr 2007 19:28:51 GMT
Author: faridz
Date: Thu Apr  5 12:28:50 2007
New Revision: 525939

URL: http://svn.apache.org/viewvc?view=rev&rev=525939
Log:
2007-04-05 Farid Zaripov <Farid_Zaripov@epam.com>

	* build.wsf (BuildProject): Get real name of the project file
	instead of the predefined PrjName.vcproj.
	* generate.wsf (convertSolutions): New function to convert
	the solution(s) from MSVC to ICC format.
	(generate): Use convertSolutions() to convert the all
	created solutions.
	* summary.js (saveSummaryHeaderMulti): Close file to unlock
	it before delete.

Modified:
    incubator/stdcxx/trunk/etc/config/windows/build.wsf
    incubator/stdcxx/trunk/etc/config/windows/generate.wsf
    incubator/stdcxx/trunk/etc/config/windows/summary.js

Modified: incubator/stdcxx/trunk/etc/config/windows/build.wsf
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/build.wsf?view=diff&rev=525939&r1=525938&r2=525939
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/build.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/build.wsf Thu Apr  5 12:28:50 2007
@@ -110,8 +110,23 @@
 
 function BuildProject(solutionBuild, projectName)
 {
-    solutionBuild.BuildProject(longConfName, projectName, true);
-    return solutionBuild.LastBuildInfo;
+    var projectFile = null;
+    var projects = dte.Solution.Projects;
+    for (var i = 1; i <= projects.Count && null == projectFile; ++i)
+    {
+        var project = projects.Item(i);
+        if (project.Name == projectName)
+            projectFile = project.UniqueName;
+    }
+
+    if (null != projectFile)
+    {
+        solutionBuild.BuildProject(longConfName, projectFile, true);
+        return solutionBuild.LastBuildInfo;
+    }
+
+    WScript.Echo("Error: project " + projectName + " not found\n");
+    return 1;
 }
 
 // the main function of the script
@@ -189,7 +204,7 @@
         projectEngine.BuildLogging = true;
 
         WScript.Echo("Performing configure step...\n");
-        var res = BuildProject(solutionBuild, "Projects\\configure.vcproj");
+        var res = BuildProject(solutionBuild, ".configure");
         if (0 < res)
         {
             retCode = 3;
@@ -197,7 +212,7 @@
         }   
 
         WScript.Echo("Compiling stdlib library...\n");
-        res = BuildProject(solutionBuild, "Projects\\stdlib.vcproj");
+        res = BuildProject(solutionBuild, ".stdlib");
         if (0 < res)
         {
             retCode = 4;
@@ -205,22 +220,22 @@
         }   
 
         WScript.Echo("Compiling examples...\n");
-        BuildProject(solutionBuild, "Projects\\examples\\stdcxx_examples.vcproj");
+        BuildProject(solutionBuild, ".stdcxx_examples");
 
         WScript.Echo("Compiling rwtest library...\n");
-        res = BuildProject(solutionBuild, "Projects\\rwtest.vcproj");
+        res = BuildProject(solutionBuild, ".rwtest");
         if (0 == res)
         {
             runTests = true;
             WScript.Echo("Compiling tests...\n");
-            BuildProject(solutionBuild, "Projects\\tests\\stdcxx_tests.vcproj");
+            BuildProject(solutionBuild, ".stdcxx_tests");
         }
 
         WScript.Echo("Compiling utils...\n");
         // compile exec utility
-        var resExec = BuildProject(solutionBuild, "Projects\\util\\util_exec.vcproj");
+        var resExec = BuildProject(solutionBuild, "util_exec");
         // compile rest utils
-        var resUtils = BuildProject(solutionBuild, "Projects\\util\\stdcxx_utils.vcproj");
+        var resUtils = BuildProject(solutionBuild, ".stdcxx_utils");
         if (0 < resExec)
         {
             retCode = 5;
@@ -231,12 +246,12 @@
            break;
 
         WScript.Echo("Running examples...\n");
-        BuildProject(solutionBuild, "Projects\\examples\\stdcxx_runexamples.vcproj");
+        BuildProject(solutionBuild, ".stdcxx_runexamples");
 
         if (runTests)
         {
             WScript.Echo("Running tests...\n");
-            BuildProject(solutionBuild, "Projects\\tests\\stdcxx_runtests.vcproj");
+            BuildProject(solutionBuild, ".stdcxx_runtests");
         }
         
         if (0 < resUtils)
@@ -246,7 +261,7 @@
         }   
 
         WScript.Echo("Running locales tests...");
-        BuildProject(solutionBuild, "Projects\\locales\\stdcxx_testlocales.vcproj");
+        BuildProject(solutionBuild, ".stdcxx_testlocales");
     }
     while (false);
 

Modified: incubator/stdcxx/trunk/etc/config/windows/generate.wsf
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/generate.wsf?view=diff&rev=525939&r1=525938&r2=525939
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/generate.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/generate.wsf Thu Apr  5 12:28:50 2007
@@ -169,19 +169,10 @@
     VCProjectEngine = null;
 
     if (CONVERT)
-    {
-        try
-        {
-            LogMessage("Converting solution to ICC.");
-            var res = WshShell.Run(ICCCONVERT + " \"" + outDir + "\\" + solutionName + "\"
/IC", 0, true);
-            if (0 != res)
-                LogMessage("Conversion finished with code " + res);
-        }
-        catch(e)
-        {
-            LogMessage("Conversion failed");
-        }
-    }    
+        convertSolutions(new Array(solutionName, exsolutionName,
+                                   tstsolutionName, locsolutionName,
+                                   tstlocsolutionName, runsolutionName));
+    
     
     LogMessage("Generating build.bat...");
 
@@ -197,6 +188,28 @@
         resLogPath + " for details.");
         
     WScript.Quit(0);
+}
+
+// convert solution(s) from msvc to icc format
+function convertSolutions(solNames)
+{
+    if (typeof(solNames) == "string")
+        solNames = new Array(solNames);
+    for (var i = 0; i < solNames.length; ++i)
+    {
+        var solName = solNames[i];
+        try
+        {
+            LogMessage("Converting solution " + solName + " to ICC.");
+            var res = WshShell.Run(ICCCONVERT + " \"" + outDir + "\\" + solName + "\" /IC",
0, true);
+            if (0 != res)
+                LogMessage("Conversion finished with code " + res);
+        }
+        catch(e)
+        {
+            LogMessage("Conversion failed");
+        }
+    }
 }
 
 // performs checking of the script parameters

Modified: incubator/stdcxx/trunk/etc/config/windows/summary.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/summary.js?view=diff&rev=525939&r1=525938&r2=525939
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/summary.js (original)
+++ incubator/stdcxx/trunk/etc/config/windows/summary.js Thu Apr  5 12:28:50 2007
@@ -558,8 +558,12 @@
     if (fso.FileExists(lsumFileName))
     {
         var fileLSum = fso.OpenTextFile(lsumFileName);
-        var lsumData = fileLSum.ReadAll();
-        fSum.Write(lsumData);
+        if (!fileLSum.AtEndOfStream)
+        {
+            var lsumData = fileLSum.ReadAll();
+            fSum.Write(lsumData);
+        }
+        fileLSum.Close();
     }
     
     fSum.WriteLine("</table>");



Mime
View raw message