stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r453570 [2/3] - /incubator/stdcxx/trunk/etc/config/windows/
Date Fri, 06 Oct 2006 12:16:33 GMT
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=453570&r1=453569&r2=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/generate.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/generate.wsf Fri Oct  6 05:16:32 2006
@@ -1,7 +1,22 @@
 <?xml version="1.0" ?><!-- -*- SGML -*- -->
 <package>
     <comment>
-    PrimalCode wizard generated file.
+        Licensed to the Apache Software Foundation (ASF) under one
+        or more contributor license agreements.  See the NOTICE file
+        distributed with this work for additional information
+        regarding copyright ownership.  The ASF licenses this file
+        to you under the Apache License, Version 2.0 (the
+        "License"); you may not use this file except in compliance
+        with the License.  You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+        Unless required by applicable law or agreed to in writing,
+        software distributed under the License is distributed on an
+        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+        KIND, either express or implied.  See the License for the
+        specific language governing permissions and limitations
+        under the License.
     </comment>
     <job id="generate" prompt="no">
         <?job error="false" debug="false" ?>
@@ -17,6 +32,10 @@
                 name="BUILDDIR" required="true" type="string"/>
             <named helpstring="Copy dll to exe option" 
                 name="COPYDLL" required="false" type="string"/>
+            <named helpstring="Generate locales projects" 
+                name="LOCALES" required="false" type="string"/>
+            <named helpstring="Generate locales test projects" 
+                name="LOCALETESTS" required="false" type="string"/>
             <example>cscript generate.wsf /TOPDIR:"C:\stdcxx" 
                 /BUILDDIR:"C:\stdcxx\build" /CONFIG:msvc-7.1
             </example>
@@ -24,23 +43,26 @@
 Usage: cscript generate.wsf /CONFIG:@CONFIG 
 /BUILDDIR:@BUILDDIR [/TOPDIR:@TOPDIR] 
 [/BUILDTYPE:@BUILDTYPE] [/BUILDONLY:@BUILDONLY] [/COPYDLL:@COPYDLL]
+[/LOCALES:@LOCALES] [/LOCALETESTS:@LOCALETESTS]
 where
-@CONFIG is one of { msvc-7.1, msvc-8.0, icc-9.0 },
+@CONFIG is one of { msvc-7.0, msvc-7.1, msvc-8.0, msvcex-8.0, icc-9.0, icc-9.1 },
 @TOPDIR is the root of the stdcxx source tree,
 @BUILDDIR is the root of the build directory,
 @COPYDLL is one of { yes, no }; when yes, the stdcxx DLL will be copied
 into each directory containing an executable program built by the solution
+@LOCALES is one of { yes, no } - generate projects for build locales
+@LOCALETESTS is one of { yes, no } - generate projects for test locales
             </usage>
         </runtime>
         <object id="fso" progid="Scripting.FileSystemObject"/>
         <object id="WshShell" progid="WScript.Shell"/>
         <script language="JScript" src="config.js"/>
-        <script language="JScript" src="msvc-config_classes.js"/>
-        <script language="JScript" src="icc-config_classes.js"/>
         <script language="JScript" src="data.js"/>
-        <script language="JScript" src="msvc-config.js"/>
         <script language="JScript" src="utilities.js"/>
-        <script language="JScript" src="generate.js"/>
+        <script language="JScript" src="devenv_consts.js"/>
+        <script language="JScript" src="filterdef.js"/>
+        <script language="JScript" src="projectdef.js"/>
+        <script language="JScript" src="projects.js"/>
         <script id="generate" language="JScript">
 <![CDATA[
 //
@@ -55,23 +77,21 @@
 var logFile = "slngen.log";
 var logStream = null;
 var currentCfg = "";
-var buildType = "11d";
-var buildOnly = "";
 var copyDll = false;
-
-var binDir = "\\bin";
-var includeDir= "\\include";
-var examplesDir = "\\examples";
-var rwtestDir = "\\rwtest";
-var libsrcDir = "\\src";
-var libDir = "\\lib";
-var testsDir = "\\tests";
+var buildLocales = true;
+var testLocales = true;
 var winconfigDir = "\\etc\\config\\windows";
-var etcDir = "\\etc";
-var configDir = "\\etc\\config";
 
 var description = new generate; // run
 
+// print message to the stdout and out the message to the logfile
+function LogMessage(msg)
+{
+    WScript.Echo(msg);
+    logStream.WriteLine(msg);
+}
+
+// the main function of the script
 function generate()
 {
     WScript.Echo("Solution generation script");
@@ -82,77 +102,62 @@
     
     outDirBase = outDir;
     outDir += "\\" + currentCfg;
-    
-    if (srcDir[srcDir.length - 1] != "\\")
-        srcDir += "\\";
-            
-    if (outDir[outDir.length - 1] != "\\")
-        outDir += "\\";
-    
+
     WScript.Echo("Checking consistence...");
     logFile = currentCfg + logFile;
-    var logStream = fso.CreateTextFile(outDir + logFile, true, false);
+    logStream = fso.CreateTextFile(outDir + "\\" + logFile, true, false);
 
-    // get solution template
-    var solution = getSolution(currentCfg);
-    if (!solution)
-    {
-            WScript.StdErr.WriteLine(
-                "Generate: Solution with the name "
-                + currentCfg + " not found");
-            
-            logStream.WriteLine("Solution with the name "
-                + currentCfg + " not found");
-        
-            logStream.Close();
-            WScript.Quit(2);
-    }
+    cmnMacros = new Array(
+                    new Macro("%SOLUTION%", currentCfg),
+                    new Macro("%SRCDIR%", srcDir),
+                    new Macro("%BUILDDIR%", outDir));
+                        
+    // get solution object
+    InitVSObjects(currentCfg);
     
-    //ensure that it supports generation
-    if (!solution.generateSolution)
+    var solutionName = currentCfg + ".sln";
+
+    LogMessage("Creating projects definitions...");
+    var projectDefs = CreateProjectsDefs(copyDll, buildLocales, testLocales);
+
+    LogMessage("Creating projects...");
+    CreateProjects(projectDefs, LogMessage);
+
+    if (VERSION != "7")
     {
-            WScript.StdErr.WriteLine(
-                "Generate: Solution with the name "
-                + solution.name + " does not support IDE project generation");
-                
-            logStream.WriteLine("Solution with the name "
-                + solution.name + " does not support IDE project generation");
-                
-            logStream.Close();
-            WScript.Quit(2);        
+        LogMessage("Configuring project dependencies...");
+        ConfigureDependencies(projectDefs);
     }
-    
-    if (!solution.checkEnvironment(logStream))
+
+    LogMessage("Writing solution on disk...");
+    generateSolution(projectDefs, outDir, solutionName);
+
+    projectDefs = null;
+    VCProjectEngine = null;
+
+    if (CONVERT)
     {
-            WScript.StdErr.WriteLine(
-                "Generate: Environment for the " + solution.name + 
-                " solution generation is not configured");
-                
-            logStream.WriteLine(
-                "Generate: Environment for the " + solution.name + 
-                " solution generation is not configured");
-                
-            logStream.Close();
-            WScript.Quit(2);   
-    }
+        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");
+        }
+    }    
     
-    WScript.Echo("Creating projects...");
-   
-    //make solution structure
-    var fullSolution = 
-        fillSolutionTemplate(solution, srcDir, outDir, logStream);
-    
-    //save solution
-    WScript.Echo("Writing projects on disk...");
-    fullSolution.generateSolution(srcDir, outDir, logStream, true);
+    LogMessage("Generating build.bat...");
 
-    generateBuildBatch(srcDir, outDirBase, fullSolution);
-    generateUpdateBatch(srcDir, outDirBase);
+    generateBuildBatch(srcDir, outDirBase);
     
     logStream.WriteLine("Solution created");
     logStream.Close();
     
-    var logPath = outDir + currentCfg + "slngen.log";
+    var logPath = outDir + "\\" + currentCfg + "slngen.log";
     var resLogPath = "file://" + logPath.replace(/\\/mg, "/");
     
     WScript.Echo("Solution was generated successfully. See " + 
@@ -161,6 +166,7 @@
     WScript.Quit(0);
 }
 
+// performs checking of the script parameters
 function readAndCheckArguments()
 {
     if (!WScript.Arguments.Named.Exists("CONFIG"))
@@ -228,8 +234,27 @@
         if (copyOption == "yes" || copyOption == "y")
             copyDll = true;
     }
+
+    if (WScript.Arguments.Named.Exists("LOCALES"))
+    {
+        var option = WScript.Arguments.Named("LOCALES");
+        option = option.toLowerCase();
+        
+        if (option == "no" || option == "n")
+            buildLocales = false;
+    }
+
+    if (WScript.Arguments.Named.Exists("LOCALETESTS"))
+    {
+        var option = WScript.Arguments.Named("LOCALETESTS");
+        option = option.toLowerCase();
+        
+        if (option == "no" || option == "n")
+            testLocales = false;
+    }
 }
 
+// creates build directory tree
 function createBuildDirs()
 {
     try
@@ -262,33 +287,6 @@
         
         if (! fso.FolderExists(builddir))
             fso.CreateFolder(builddir); 
-            
-        if (! fso.FolderExists(builddir + includeDir))
-            fso.CreateFolder(builddir + includeDir);    
-            
-        if (! fso.FolderExists(builddir + examplesDir))
-            fso.CreateFolder(builddir + examplesDir);
-            
-        if (! fso.FolderExists(builddir + testsDir))
-            fso.CreateFolder(builddir + testsDir);
-            
-        if (! fso.FolderExists(builddir + libsrcDir))
-            fso.CreateFolder(builddir + libsrcDir);
-            
-        if (! fso.FolderExists(builddir + libDir))
-            fso.CreateFolder(builddir + libDir);
-            
-        if (! fso.FolderExists(builddir + etcDir))
-            fso.CreateFolder(builddir + etcDir);
-            
-        if (! fso.FolderExists(builddir + configDir))
-            fso.CreateFolder(builddir + configDir);
-            
-        if (! fso.FolderExists(builddir + winconfigDir))
-            fso.CreateFolder(builddir + winconfigDir);
-            
-        fso.CopyFile(topdir + winconfigDir + "\\*.*", 
-            builddir + winconfigDir);
         
         WScript.Echo("Building directory tree created");
     }
@@ -300,11 +298,14 @@
     }
 }
 
-function generateBuildBatch(sourcesDir, buildDir, curSol)
+// creates the build.bat file
+// sourcesDir - main folder of the stdcxx sources
+// buildDir - folder for build output files
+function generateBuildBatch(sourcesDir, buildDir)
 {
     try
     {
-        var buildBatchFileName = buildDir + "\\" + "build.bat";
+        var buildBatchFileName = buildDir + "\\" + "build_" + currentCfg + ".bat";
         if (fso.FileExists(buildBatchFileName))
             return 1;
             
@@ -320,43 +321,20 @@
         buildBatchFile.WriteLine("set makelog=makelog.wsf");
         buildBatchFile.WriteLine("set cfg=");
         buildBatchFile.WriteLine("set cfgbrief=");
-        buildBatchFile.WriteLine("set useenv=");
-        buildBatchFile.WriteLine("");
-        
-        buildBatchFile.WriteLine("set config=%1");
-        buildBatchFile.WriteLine("");
-        
-        buildBatchFile.WriteLine(
-            "if \"%1\"==\"" + icc90SolutionName + "\" ("); 
-        buildBatchFile.WriteLine("set useenv=/useenv");
-        buildBatchFile.WriteLine(")");
-        buildBatchFile.WriteLine("");
-        
-        buildBatchFile.WriteLine(
-            "if \"%1\"==\"" + icc91SolutionName + "\" ("); 
-        buildBatchFile.WriteLine("set useenv=/useenv");
-        buildBatchFile.WriteLine(")");
-        buildBatchFile.WriteLine("");
-            
-        buildBatchFile.WriteLine("shift");
         buildBatchFile.WriteLine("");
         
-        buildBatchFile.WriteLine(":cfgloop");
+	    buildBatchFile.WriteLine(":cfgloop");
         buildBatchFile.WriteLine("if \"%1\"==\"\" goto continue");
         buildBatchFile.WriteLine("");
         
-        for (i in configsShortToLong)
+        for (var i = 0; i < confNames.length; ++i)
         {
-            var lcfg = configsShortToLong[i];
-            if (! lcfg)
-                continue;
-                
-            if (! curSol.configurations[lcfg])
-                continue;
+            var lcfg = confNames[i];
+            var scfg = configs.get(lcfg).out;
 
-            buildBatchFile.WriteLine("if \"%1\"==\"" + i + "\" ("); 
+            buildBatchFile.WriteLine("if \"%1\"==\"" + scfg + "\" ("); 
             buildBatchFile.WriteLine("set cfg=" + lcfg);
-            buildBatchFile.WriteLine("set cfgbrief=" + i);
+            buildBatchFile.WriteLine("set cfgbrief=" + scfg);
             buildBatchFile.WriteLine(")");
             buildBatchFile.WriteLine("");
         }
@@ -369,14 +347,15 @@
         buildBatchFile.WriteLine(")");
         buildBatchFile.WriteLine("");
         
-        buildBatchFile.WriteLine("devenv \"%builddir%\\%config%\\%config%.sln\"" 
-            + " %useenv% /build \"%cfg%\"");
+        buildBatchFile.WriteLine("\"" + DEVENV + "\" " + DEVENVFLAGS +
+            " \"%builddir%\\" + currentCfg +
+            "\\" + currentCfg + ".sln\" /build \"%cfg%\"");
             
         buildBatchFile.WriteLine("");
         buildBatchFile.WriteLine("cscript /nologo "
-            + "\"%topdir%%scriptdir%\\%makelog%\""
+            + "\"%topdir%\\%scriptdir%\\%makelog%\""
             + " /BUILDDIR:\"%builddir%\" /BUILDTYPE:%cfgbrief%"
-            + " /CONFIG:%config%");
+            + " /CONFIG:" + currentCfg);
         buildBatchFile.WriteLine("");
         
         buildBatchFile.WriteLine(":nextcfg");
@@ -397,52 +376,7 @@
         return 0;
     }
 }
-
-function generateUpdateBatch(sourcesDir, buildDir)
-{
-    try
-    {
-        var updateBatchFileName = buildDir + "\\" + "update.bat";
-        if (fso.FileExists(updateBatchFileName))
-            return 1;
-            
-        var updateBatchFile = fso.CreateTextFile(updateBatchFileName);
-        
-        updateBatchFile.WriteLine("@echo off");        
-        updateBatchFile.WriteLine("set ERRORLEVEL=0");
-        updateBatchFile.WriteLine("");
-        
-        updateBatchFile.WriteLine("set topdir=" + sourcesDir);
-        updateBatchFile.WriteLine("set builddir=" + buildDir);
-        updateBatchFile.WriteLine("set scriptdir=etc\\config\\windows");
-        updateBatchFile.WriteLine("set cupdate=update.wsf");
-        updateBatchFile.WriteLine("");
-        
-        updateBatchFile.WriteLine("set config=%1");
-        updateBatchFile.WriteLine("");
-                  
-        updateBatchFile.WriteLine("");
-        updateBatchFile.WriteLine("cscript /nologo "
-            + "\"%topdir%%scriptdir%\\%cupdate%\""
-            + " /TOPDIR:\"%topdir%\""
-            + " /BUILDDIR:\"%builddir%\\%config%\" /CONFIG:%config%");
-        updateBatchFile.WriteLine("");
-        
-        updateBatchFile.WriteLine("echo update complete");
-        updateBatchFile.WriteLine("");
-        
-        updateBatchFile.Close();
-        return 1;
-    }
-    catch(e)
-    {
-        WScript.Echo("error creating the update batch file");
-        return 0;
-    }
-}
-
 ]]>
         </script>
     </job>
 </package>
-

Added: incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config?view=auto&rev=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config (added)
+++ incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config Fri Oct  6 05:16:32 2006
@@ -0,0 +1,8 @@
+#include msvc-7.1
+DEVENVFLAGS=/useenv
+CPPFLAGS=
+LDFLAGS=
+CONVERT=1
+CXX=icl
+LD=icl
+AR=xilib

Propchange: incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config?view=auto&rev=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config (added)
+++ incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config Fri Oct  6 05:16:32 2006
@@ -0,0 +1,8 @@
+#include msvc-8.0
+DEVENVFLAGS=/useenv
+CPPFLAGS=
+LDFLAGS=
+CONVERT=1
+CXX=icl
+LD=icl
+AR=xilib

Propchange: incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/stdcxx/trunk/etc/config/windows/makelog.wsf
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/makelog.wsf?view=diff&rev=453570&r1=453569&r2=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/makelog.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/makelog.wsf Fri Oct  6 05:16:32 2006
@@ -1,7 +1,22 @@
 <?xml version="1.0" ?>
 <package>
     <comment>
-    PrimalCode wizard generated file.
+        Licensed to the Apache Software Foundation (ASF) under one
+        or more contributor license agreements.  See the NOTICE file
+        distributed with this work for additional information
+        regarding copyright ownership.  The ASF licenses this file
+        to you under the Apache License, Version 2.0 (the
+        "License"); you may not use this file except in compliance
+        with the License.  You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+        Unless required by applicable law or agreed to in writing,
+        software distributed under the License is distributed on an
+        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+        KIND, either express or implied.  See the License for the
+        specific language governing permissions and limitations
+        under the License.
     </comment>
     <job id="makelog" prompt="no">
         <?job error="false" debug="false" ?>
@@ -57,23 +72,28 @@
     
 var description = new makelog; // run
 
+// the main function of the script
 function makelog()
 {
     readAndCheckArguments();
+
+    getCompilerOpts(buildCfg);
     
+    var useUnicode = UNICODELOG;
+
+    if (useUnicode)
+        buildLogUnicode = -1;
+
     // check for build failures
-    var sumTempFileNameEx = buildDir + "\\" + examplesBuildDir + "\\" +
-        buildType + "\\" + summaryFileName;
-    
-    var useUnicode = (buildCfg == "msvc-8.0") ? true : false;
-    checkForFailures(buildDir + "\\" + examplesBuildDir, buildType,
-        buildlogFile, sumTempFileNameEx, htmFolderName, false, useUnicode);
-    
-    var sumTempFileNameTst = buildDir + "\\" + testsBuildDir + "\\" +
-        buildType + "\\" + summaryFileName;
-        
-    checkForFailures(buildDir + "\\" + testsBuildDir, buildType,
-        buildlogFile, sumTempFileNameTst, htmFolderName, false, useUnicode);
+    var sumTempFileNameEx = buildDir + "\\" + buildType + "\\" +
+        examplesBuildDir + "\\" + summaryFileName;
+    checkForFailures(buildDir + "\\" + buildType + "\\" + examplesBuildDir, buildType,
+        buildlogFile, sumTempFileNameEx, htmFolderName, true, useUnicode);
+    
+    var sumTempFileNameTst = buildDir + "\\" + buildType + "\\" +
+        testsBuildDir + "\\" + summaryFileName;
+    checkForFailures(buildDir + "\\" + buildType + "\\" + testsBuildDir, buildType,
+        buildlogFile, sumTempFileNameTst, htmFolderName, true, useUnicode);
         
     // make build summary log file
     var fSum = makeSummaryLog(buildDirBase, buildSummaryPrefix, buildType);
@@ -82,21 +102,22 @@
     
     // read information about library
     var libInfo = new ItemBuildInfo(".stdlib");
-    getLibraryBuildInfo(buildDir + "\\" + libBuildDir, buildType, libInfo);
+    getLibraryBuildInfo(buildDir + "\\" + buildType +
+        "\\" + libBuildDir, libInfo);
     
     // and test driver
     var rwtestInfo = new ItemBuildInfo(".rwtest");
-    getTestDriverBuildInfo(buildDir + "\\" + rwtestBuildDir, 
-        buildType, rwtestInfo);
+    getTestDriverBuildInfo(buildDir + "\\" + buildType +
+        "\\" + rwtestBuildDir, rwtestInfo);
         
     // save headers for library and test driver
     saveSummaryHeaderLib(fSum, libInfo, hdrLibrary);
     saveSummaryHeaderTestDriver(fSum, rwtestInfo, hdrTestDriver);
     
     // save headers for examples and tests
-    saveSummaryHeaderMulti(fSum, buildDir + "\\" + examplesBuildDir, 
+    saveSummaryHeaderMulti(fSum, buildDir + "\\" + buildType + "\\" + examplesBuildDir, 
         buildType, hdrExamples);
-    saveSummaryHeaderMulti(fSum, buildDir + "\\" + testsBuildDir, 
+    saveSummaryHeaderMulti(fSum, buildDir + "\\" + buildType + "\\" + testsBuildDir, 
         buildType, hdrTests);
 
     // save build summary for library and test driver       
@@ -104,13 +125,11 @@
     saveBuildSummarySingle(fSum, rwtestInfo, hdrTestDriver);
     
     // save build summary for examples and tests
-    saveBuildSummaryMulti(fSum, buildDir + "\\" + examplesBuildDir, 
-        buildType);
-    saveBuildSummaryMulti(fSum, buildDir + "\\" + testsBuildDir, 
-        buildType);
+    saveBuildSummaryMulti(fSum, buildDir + "\\" + buildType + "\\" + examplesBuildDir);
+    saveBuildSummaryMulti(fSum, buildDir + "\\" + buildType + "\\" + testsBuildDir);
         
     closeSummaryLog(fSum);
-    
+
     deleteTemporaryFiles();
     
     var resLogPath = logPath.replace(/\\/mg, "/");  
@@ -119,6 +138,7 @@
     WScript.Quit(0);
 }
 
+// performs checking of the script parameters
 function readAndCheckArguments()
 {
     if (!WScript.Arguments.Named.Exists("BUILDDIR"))
@@ -156,18 +176,17 @@
             
         WScript.Quit(3);
     }
-    
-    if (buildCfg == "msvc-8.0" || buildCfg == "icc-9.1")
-        buildLogUnicode = -1;
 }
 
-function getLibraryBuildInfo(libDir, bType, libInfo)
+// collects information about build process of the stdlib library
+// libDir - output directory for the stdlib library
+// libInfo - ItemBuildInfo object to hold the collected information
+function getLibraryBuildInfo(libDir, libInfo)
 {   
-    var logDir = libDir + "\\" + bType;
-    if (! fso.FolderExists(logDir))
+    if (! fso.FolderExists(libDir))
         return;
         
-    var blogFilePath = logDir + "\\" + buildlogFile;
+    var blogFilePath = libDir + "\\" + buildlogFile;
     if (! fso.FileExists(blogFilePath))
         return;
         
@@ -179,13 +198,15 @@
     posTmp = getBuildSummaryInfo(libInfo, blogData, posTmp);
 }
 
-function getTestDriverBuildInfo(rwTestDir, bType, rwtestInfo)
+// collects information about build process of the rwtest library
+// rwtestDir - output directory for the rwtest library
+// rwtestInfo - ItemBuildInfo object to hold the collected information
+function getTestDriverBuildInfo(rwTestDir, rwtestInfo)
 {
-    var logDir = rwTestDir + "\\" + bType;
-    if (! fso.FolderExists(logDir))
+    if (! fso.FolderExists(rwTestDir))
         return;
         
-    var blogFilePath = logDir + "\\" + buildlogFile;
+    var blogFilePath = rwTestDir + "\\" + buildlogFile;
     if (! fso.FileExists(blogFilePath))
         return;
         
@@ -197,30 +218,30 @@
     posTmp = getBuildSummaryInfo(rwtestInfo, blogData, posTmp);
 }
 
+// removes the temporary files created by this script and by run_all.wsf script
 function deleteTemporaryFiles()
 {
     // delete temphtm folders
-    deleteTempFolders(buildDir + "\\" + examplesBuildDir, 
-        buildType, htmFolderName);
+    deleteTempFolders(buildDir + "\\" + buildType + "\\" + examplesBuildDir, htmFolderName);
         
-    deleteTempFolders(buildDir + "\\" + testsBuildDir, 
-        buildType, htmFolderName);
+    deleteTempFolders(buildDir + "\\" + buildType + "\\" + testsBuildDir, htmFolderName);
     
     // delete Summary.htm files
-    var sumTempFileNameEx = buildDir + "\\" + examplesBuildDir + "\\" +
-        buildType + "\\" + summaryFileName;
+    var sumTempFileNameEx = buildDir + "\\" + buildType + "\\" + examplesBuildDir + "\\" + summaryFileName;
         
     if (fso.FileExists(sumTempFileNameEx))
         fso.DeleteFile(sumTempFileNameEx);
         
-    var sumTempFileNameTst = buildDir + "\\" + testsBuildDir + "\\" +
-        buildType + "\\" + summaryFileName;
+    var sumTempFileNameTst = buildDir + "\\" + buildType + "\\" + testsBuildDir + "\\" + summaryFileName;
         
     if (fso.FileExists(sumTempFileNameTst))
         fso.DeleteFile(sumTempFileNameTst);
 }
 
-function deleteTempFolders(startDir, bType, tempName)
+// removes the subfolders with the specified name in specified folder
+// startDir - starting folder
+// tempName - name of the folder with temporary files
+function deleteTempFolders(startDir, tempName)
 {
     var startFolder = fso.GetFolder(startDir);
     if (! startFolder)
@@ -232,7 +253,7 @@
         var htmFName = enumHtmSubFolders.item().Name;
         var htmParent = enumHtmSubFolders.item().ParentFolder.Name;
         
-        if (htmFName == tempName && htmParent == bType)
+        if (htmFName == tempName)
         {
             try
             {
@@ -246,8 +267,7 @@
         }
         else
         {
-            deleteTempFolders(startDir + "\\" + htmFName, 
-                bType, tempName);
+            deleteTempFolders(startDir + "\\" + htmFName, tempName);
         }
     }
 }

Added: incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config?view=auto&rev=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config (added)
+++ incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config Fri Oct  6 05:16:32 2006
@@ -0,0 +1,62 @@
+// Version of the used MS VisualStudio:
+// 7 for MS VisualStudio .NET
+// 7.1 for MS VisualStudio .NET 2003
+// 8 for MS VisualStudio 2005 and MSVC 2005 Express Edition
+VERSION=7
+
+// Path to the MS VisualStudio IDE executable:
+// devenv.exe for MS VisualStudio
+// VCExpress.exe for MSVC 2005 Express Edition
+// if empty it will be tried to be detected automatically
+DEVENV=
+
+// Additional flags for devenv.exe
+DEVENVFLAGS=
+
+// Path to the WinDiff utility:
+// if empty it will be tried to be detected automatically
+WINDIFF=
+
+// Path to the ICProjConvert90.exe utility:
+// if empty it will be tried to be detected automatically
+ICCCONVERT=
+
+// Convert solution to ICC format
+// 0 for all MSVC
+// 1 for all ICC
+CONVERT=0
+
+// additional flags for the compiler
+CPPFLAGS=
+// additional flags for the linker
+LDFLAGS=
+
+// CXX, LD, AD used only at configure build step
+// CXX - command invoked to compile the test source file
+// LD - command invoked to link the test
+// AR - command invoked to make library
+CXX=cl
+LD=cl
+AR=lib
+
+// Use singlethreaded or mutlithreaded CRT in 11s, 11d solution configurations
+// 0 for MS VisualStudio .NET and MS VisualStudio .NET 2003
+// 1 for MS VisualStudio 2005 and MSVC 2005 Express Edition
+NOSTCRT=0
+
+// Version of the solution file format:
+// 7.00 for MS VisualStudio .NET
+// 8.00 for MS VisualStudio .NET 2003
+// 9.00 for MS VisualStudio 2005 and MSVC 2005 Express Edition
+SLNVER=7.00
+
+// Comment in produced solution file:
+// empty for MS VisualStudio .NET and MS VisualStudio .NET 2003
+// Visual Studio 2005 - for MS VisualStudio 2005
+// Visual C++ Express 2005 - for MSVC 2005 Express Edition
+SLNCOMMENT=
+
+// Type of produced file buildlog.htm:
+// 0 - non-unicode
+// 1 - unicode
+UNICODELOG=0

Propchange: incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/etc/config/windows/msvc-7.1.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/msvc-7.1.config?view=auto&rev=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/msvc-7.1.config (added)
+++ incubator/stdcxx/trunk/etc/config/windows/msvc-7.1.config Fri Oct  6 05:16:32 2006
@@ -0,0 +1,5 @@
+#include msvc-7.0
+VERSION=7.1
+CPPFLAGS=
+LDFLAGS=
+SLNVER=8.00

Propchange: incubator/stdcxx/trunk/etc/config/windows/msvc-7.1.config
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/etc/config/windows/msvc-7.1.config
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/etc/config/windows/msvc-8.0.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/msvc-8.0.config?view=auto&rev=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/msvc-8.0.config (added)
+++ incubator/stdcxx/trunk/etc/config/windows/msvc-8.0.config Fri Oct  6 05:16:32 2006
@@ -0,0 +1,8 @@
+#include msvc-7.0
+VERSION=8.0
+CPPFLAGS=/D_CRT_SECURE_NO_DEPRECATE
+LDFLAGS=
+SLNVER=9.00
+SLNCOMMENT=Visual Studio 2005
+UNICODELOG=1
+NOSTCRT=1

Propchange: incubator/stdcxx/trunk/etc/config/windows/msvc-8.0.config
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/etc/config/windows/msvc-8.0.config
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config?view=auto&rev=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config (added)
+++ incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config Fri Oct  6 05:16:32 2006
@@ -0,0 +1,3 @@
+#include msvc-8.0
+DEVENV=VCExpress.exe
+SLNCOMMENT=Visual C++ Express 2005

Propchange: incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/etc/config/windows/projectdef.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projectdef.js?view=auto&rev=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/projectdef.js (added)
+++ incubator/stdcxx/trunk/etc/config/windows/projectdef.js Fri Oct  6 05:16:32 2006
@@ -0,0 +1,793 @@
+//
+// $Id$
+//
+// projectdef.js - ProjectDef class definition
+//
+//////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software  Foundation (ASF) under one or more
+// contributor  license agreements.  See  the NOTICE  file distributed
+// with  this  work  for  additional information  regarding  copyright
+// ownership.   The ASF  licenses this  file to  you under  the Apache
+// License, Version  2.0 (the  "License"); you may  not use  this file
+// except in  compliance with the License.   You may obtain  a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the  License is distributed on an  "AS IS" BASIS,
+// WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+// implied.   See  the License  for  the  specific language  governing
+// permissions and limitations under the License.
+// 
+//////////////////////////////////////////////////////////////////////
+
+var TristateUseDefault = -2;
+var TristateTrue = -1;
+var TristateFalse = 0;
+
+var VCProjectEngine = null;
+var ICConvertTool = "ICProjConvert90.exe";
+
+// test availability of utility file
+// returns true if utility is available
+// otherwise returns false 
+function TestUtil(cmd)
+{
+    try
+    {
+        return (0 == WshShell.Run(cmd + " /?", 0, true));
+    }
+    catch (e) {}
+    
+    return false;
+}
+
+// init VisualStudio objects using specified configuration
+// config - name of configuration (e.g. msvc-7.0)
+function InitVSObjects(config)
+{
+    getCompilerOpts(config);
+
+    var dte = null;
+
+    try
+    {
+        dte = WScript.CreateObject("VisualStudio.DTE." + VERSION);
+        if (DEVENV == "")
+            DEVENV = dte.FullName;
+    }
+    catch (e) {}
+
+    if (CONVERT)
+    {
+        var ICConvertTool = ICCCONVERT;
+
+        var arrPath = new Array(ICConvertTool);
+
+        if (ICConvertTool == "")
+        {
+            ICConvertTool = "ICProjConvert90.exe";
+            arrPath[0] = ICConvertTool;
+            if (null != dte)
+            {
+                try
+                {
+                    var isettings = dte.GetObject("IntelOptions");
+                    var icompiler = isettings.Compiler(isettings.CurrentCompilerIndex);
+                    var path = icompiler.ExecutablePath.split(";");
+                    for (var i = 0; i < path.length; ++i)
+                        arrPath.push("\"" + path[i] + "\\" + ICConvertTool + "\"");
+                    icompiler = null;
+                    isettings = null;
+                }
+                catch (e) {}
+            }
+        }
+
+        var success = false;
+        
+        for (var i = 0; i < arrPath.length; ++i)
+            if (TestUtil(arrPath[i]))
+            {
+                success = true;
+                ICCCONVERT = arrPath[i];
+                break;
+            }
+            
+        if (!success)
+        {
+            WScript.StdErr.WriteLine(ICCCONVERT + " conversion utility not found");
+            WScript.Quit(3);
+        }
+    }
+
+    if (null != dte)
+    {
+        dte.Quit();
+        dte = null;
+    }
+
+    try
+    {
+        VCProjectEngine = WScript.CreateObject("VisualStudio.VCProjectEngine." + VERSION);
+    }
+    catch (e)
+    {
+        WScript.StdErr.WriteLine("Unable to create VCProjectEngine object: " + e.message);
+        WScript.Quit(3);
+    }
+}
+
+//------------------------------------------------
+// ProjectDef class
+//------------------------------------------------
+
+// ProjectDef .ctor
+function ProjectDef(name, type)
+{
+    this.Name = name;
+    this.Type = type;
+    this.SubSystem = typeGeneric == type ? null :
+        (typeApplication == type ? subSystemConsole : subSystemWindows);
+    this.RTTI = false;
+    this.VCProjDir = "%BUILDDIR%";
+    this.FilterDefs = new Array();
+    this.Defines = null;
+    this.Includes = null;
+    this.PrepOpts = null
+    this.CppOpts = null;
+    this.LnkOpts = null;
+    this.LibOpts = null;
+    this.OutDir = null;
+    this.IntDir = null;
+    this.Libs = null;
+    this.OutFile = null;
+    this.CustomBuildFile = null;
+    this.CustomBuildDesc = null;
+    this.CustomBuildCmd = null;
+    this.CustomBuildOut = null;
+    this.CustomBuildDeps = null;
+    this.PreLinkDesc = null;
+    this.PreLinkCmd = null;
+    this.PreBuildDesc = null;
+    this.PreBuildCmd = null;
+    this.PostBuildDesc = null;
+    this.PostBuildCmd = null;
+    this.VSProject = null;
+    this.PrjRefs = new Array();
+    this.PrjDeps = new Array();
+}
+
+ProjectDef.prototype.clone = projectCloneDef;
+ProjectDef.prototype.createVCProject = projectCreateVCProject;
+ProjectDef.prototype.createProjectDefsFromFolder = projectCreateProjectDefsFromFolder;
+ProjectDef.prototype.createLocaleDefs = projectCreateLocaleDefs;
+ProjectDef.prototype.createTestLocaleDefs = projectCreateTestLocaleDefs;
+
+// returns copy of ProjectDef object
+function projectCloneDef()
+{
+    var clone = new ProjectDef(this.Name, this.Type);
+
+    clone.SubSystem = this.SubSystem;
+    clone.RTTI = this.RTTI;
+    clone.VCProjDir = this.VCProjDir;
+    clone.FilterDefs = this.FilterDefs.concat(new Array());
+    clone.Defines = this.Defines;
+    clone.Includes = this.Includes;
+    clone.PrepOpts = this.PrepOpts;
+    clone.CppOpts = this.CppOpts;
+    clone.LnkOpts = this.LnkOpts;
+    clone.LibOpts = this.LibOpts;
+    clone.OutDir = this.OutDir;
+    clone.IntDir = this.IntDir;
+    clone.Libs = this.Libs;
+    clone.OutFile = this.OutFile;
+    clone.CustomBuildFile = this.CustomBuildFile;
+    clone.CustomBuildDesc = this.CustomBuildDesc;
+    clone.CustomBuildCmd = this.CustomBuildCmd;
+    clone.CustomBuildOut = this.CustomBuildOut;
+    clone.CustomBuildDeps = this.CustomBuildDeps;
+    clone.PreLinkDesc = this.PreLinkDesc;
+    clone.PreLinkCmd = this.PreLinkCmd;
+    clone.PreBuildDesc = this.PreBuildDesc;
+    clone.PreBuildCmd = this.PreBuildCmd;
+    clone.PostBuildDesc = this.PostBuildDesc;
+    clone.PostBuildCmd = this.PostBuildCmd;
+    clone.VSProject = this.VSProject;
+    clone.PrjRefs = this.PrjRefs.concat(new Array());
+    clone.PrjDeps = this.PrjDeps.concat(new Array());
+
+   return clone;
+}
+
+// preprocess defines using info about selected configuration
+// defines - string with compiler defines, separated by ';'
+//           the define syntax can contain ?: construction
+//           supported conditions: debug, dll, mt
+//           i.e. "debug?_RWSTD_DEBUG:_RWSTD_RELEASE"
+//           will be replaced to "_RWSTD_DEBUG" in debug configurations
+//           and to "_RWSTD_RELEASE" in non-debug configurations
+// confInfo - configuration info object
+function processDefines(defines, confInfo)
+{
+    var arr = defines.split(";");
+    var res = new Array();
+    for (var i = 0; i < arr.length; ++i)
+    {
+        var str = arr[i];
+        var pos1 = str.indexOf("?");
+        if (pos1 > 0)
+        {
+            var pos2 = str.indexOf(":", pos1 + 1);
+            if (pos2 < 0)
+                pos2 = str.length;
+            var s1 = str.substring(0, pos1);
+            var s2 = str.substring(pos1 + 1, pos2);
+            var s3 = pos2 < str.length ? str.substr(pos2 + 1) : "";
+            
+            switch (s1)
+            {
+            case "debug":
+                str = confInfo.debug ? s2 : s3;
+                break;
+            case "dll":
+                str = confInfo.dll ? s2 : s3;
+                break;
+            case "mt":
+                str = confInfo.mt ? s2 : s3;
+                break;
+            }
+        }
+        if (str.length > 0)
+            res.push(str);
+    }
+    return res.join(";");
+}
+
+// returns string with list of files in VCFiles of VCFilters collection
+// files - source VCFiles or VCFilters collection
+// delim - delimiter
+function combFiles(files, delim)
+{
+    var ret = "";
+    for (var i = 1; i <= files.Count; ++i)
+    {
+        if (ret != "")
+            ret += delim;
+        ret += files.Item(i).RelativePath;
+    }
+    return ret;
+}
+
+// returns string with list of files in VCFilter object
+// filter - source VCFilter object
+// delim - delimiter
+function combFilter(filter, delim)
+{
+    var ret = combFiles(filter.Files, delim);
+    if (ret != "")
+        ret += delim;
+    ret += combFilters(filter.Filters, delim);
+    return ret;
+}
+
+// returns string with list of files in VCFilters collection
+// filters - VCFilters collection
+// delim - delimiter
+function combFilters(filters, delim)
+{
+    var ret = "";
+    for (var i = 1; i <= filters.Count; ++i)
+    {
+        if (ret != "")
+            ret += delim;
+        ret += combFilter(filters.Item(i), delim);
+    }
+    return ret;
+}
+
+// create VCProject object from ProjectDef
+// engine - VCProjectEngine object
+// report - callback function to report progress
+function projectCreateVCProject(engine, report)
+{
+    if (typeof(report) != "undefined" && null != report)
+        report("  Creating " + this.Name + "...");
+    
+    var PrjName = removeLeadingDot(this.Name);
+    
+    var prjMacros = cmnMacros.concat();
+    prjMacros.push(new Macro("%PRJNAME%", PrjName));
+        
+    var VCProject = engine.CreateProject(this.Name);
+    
+    VCProject.Name = this.Name;
+    var PrjDir = ReplaceMacros(this.VCProjDir, prjMacros);
+    var PrjFile = PrjDir + "\\" + PrjName + ".vcproj";
+    VCProject.ProjectFile = PrjFile;
+    VCProject.ProjectGUID = createUUID();
+    
+    VCProject.AddPlatform(platformWin32Name);
+    
+    for (var i = 0; i < confNames.length; ++i)
+        VCProject.AddConfiguration(confNames[i]);
+        
+    var OutDir = this.OutDir != null ?
+        ReplaceMacros(this.OutDir, prjMacros) : "%CONFIG%";
+    var IntDir = this.IntDir != null ?
+        ReplaceMacros(this.IntDir, prjMacros) : OutDir + "\\" + PrjName;
+
+    // add files
+    for (var i = 0; i < this.FilterDefs.length; ++i)
+        this.FilterDefs[i].createVCFilter(VCProject);
+
+    prjMacros.push(new Macro("%FILES%", combFiles(VCProject.Files, ";")));
+    
+    var VCCustomFile = null;
+    if (null != this.CustomBuildFile)
+        VCCustomFile = VCProject.Files(this.CustomBuildFile);
+    
+    // set common configuration settings
+    for (var i = 1; i <= VCProject.Configurations.Count; ++i)
+    {
+        var conf = VCProject.Configurations.Item(i);
+        var confInfo = configs.get(conf.ConfigurationName);
+
+        var cfgMacros = new Array(
+                            new Macro("%CONFIG%", confInfo.out),
+                            new Macro("%CFGNAME%", conf.ConfigurationName));
+
+        conf.CharacterSet = charSetMBCS;
+        conf.IntermediateDirectory = ReplaceMacros(IntDir, cfgMacros);
+        conf.OutputDirectory = ReplaceMacros(OutDir, cfgMacros);
+        conf.ConfigurationType = (typeLibrary != this.Type) ?
+            this.Type :
+            (confInfo.dll ? typeDynamicLibrary : typeStaticLibrary);
+
+        var ext = "";
+        switch (conf.ConfigurationType)
+        {
+        case typeApplication:
+            ext = ".exe";
+            break;
+        case typeDynamicLibrary:
+            ext = ".dll";
+            break;
+        case typeStaticLibrary:
+            ext = ".lib";
+            break;
+        }
+        cfgMacros.push(new Macro("%EXT%", ext));
+
+        var allMacros = prjMacros.concat(cfgMacros);
+
+        var compiler = conf.Tools.Item("VCCLCompilerTool");
+        if (null != compiler)
+        {
+            if (null != this.Includes)
+                compiler.AdditionalIncludeDirectories =
+                    ReplaceMacros(this.Includes, allMacros);
+
+            this.LnkOpts = null;
+            this.LibOpts = null;
+            compiler.AdditionalOptions = CPPFLAGS + " " +
+                (null != this.CppOpts ? this.CppOpts : "");
+            if (null != this.PrepOpts)
+                compiler.GeneratePreprocessedFile = this.PrepOpts;
+            compiler.DebugInformationFormat = debugEnabled;
+            compiler.SuppressStartupBanner = true;
+            compiler.WarningLevel = warningLevel_3;
+            compiler.Detect64BitPortabilityProblems = false;
+            
+            if (null != this.Defines)
+                compiler.PreprocessorDefinitions = processDefines(this.Defines, confInfo);
+            
+            if (confInfo.debug)
+            {
+                compiler.Optimization = optimizeDisabled;
+                compiler.MinimalRebuild = true;
+                //compiler.SmallerTypeCheck = true;
+                compiler.BasicRuntimeChecks = runtimeBasicCheckAll;
+                compiler.BufferSecurityCheck = true;
+            }
+            else
+            {
+                if (typeApplication == conf.ConfigurationType)
+                {
+                    try
+                    {
+                        compiler.OptimizeForWindowsApplication = true;
+                    }
+                    catch (e)
+                    {
+                        compiler.AdditionalOptions += " /GA";
+                    }
+                }
+                compiler.Optimization = optimizeMinSpace;
+                compiler.MinimalRebuild = false;
+                compiler.SmallerTypeCheck = false;
+                compiler.BasicRuntimeChecks = runtimeBasicCheckNone;
+                compiler.BufferSecurityCheck = false;
+            }
+            
+            compiler.ExceptionHandling = cppExceptionHandlingYes;
+            compiler.RuntimeTypeInfo = this.RTTI;
+            
+            if (confInfo.mt)
+            {
+                if (confInfo.dll)
+                    compiler.RuntimeLibrary = confInfo.debug ?
+                        rtMultiThreadedDebugDLL : rtMultiThreadedDLL;
+                else
+                    compiler.RuntimeLibrary = confInfo.debug ?
+                        rtMultiThreadedDebug : rtMultiThreaded;
+            }
+            else
+            {
+                if (!NOSTCRT)
+                    // use singlethreaded runtimes
+                    compiler.RuntimeLibrary = confInfo.debug ?
+                        rtSingleThreadedDebug : rtSingleThreaded;
+                else
+                    // the singlethreaded runtimes are not present
+                    // use the multithreaded instead
+                    compiler.RuntimeLibrary = confInfo.debug ?
+                        rtMultiThreadedDebug : rtMultiThreaded;
+            }
+            
+            compiler.UsePrecompiledHeader = pchNone;
+        }
+
+        var linker = conf.Tools.Item("VCLinkerTool");
+        if (null != linker)
+        {
+            linker.AdditionalOptions = LDFLAGS + " " +
+                (null != this.LnkOpts ? this.LnkOpts : "");
+
+            linker.LinkIncremental = linkIncrementalNo;
+            linker.SuppressStartupBanner = true;
+            linker.GenerateDebugInformation = true;
+            linker.TargetMachine = machineX86;
+            linker.AdditionalDependencies = "kernel32.lib user32.lib";
+            linker.IgnoreDefaultLibraryNames = "libcp.lib;libcpd.lib;" +
+                                               "libcpmt.lib;libcpmtd.lib;" +
+                                               "msvcprt.lib;msvcprtd.lib";
+            linker.SubSystem = this.SubSystem;
+            if (confInfo.debug)
+            {
+                linker.OptimizeReferences = optReferencesDefault;
+                linker.EnableCOMDATFolding = optFoldingDefault;
+            }
+            else
+            {
+                linker.OptimizeReferences = optReferences;
+                linker.EnableCOMDATFolding = optFolding;
+            }
+
+            if (this.OutFile != null)
+                linker.OutputFile = ReplaceMacros(this.OutFile, allMacros);
+            else
+                linker.OutputFile = "$(OutDir)\\" + PrjName + ext;
+
+            linker.ProgramDatabaseFile = changeFileExt(linker.OutputFile, "pdb");
+
+            if (this.Type != typeApplication)
+                linker.ImportLibrary = changeFileExt(linker.OutputFile, "lib");
+        }
+
+        var librarian = conf.Tools.Item("VCLibrarianTool");
+        if (null != librarian)
+        {
+            if (null != this.LibOpts)
+                linker.AdditionalOptions = this.LibOpts;
+                
+            librarian.SuppressStartupBanner = true;
+            if (this.OutFile != null)
+                librarian.OutputFile = ReplaceMacros(this.OutFile, allMacros);
+            else
+                librarian.OutputFile = "$(OutDir)\\" + PrjName + ".lib";
+        }
+
+        if (null != this.PreLinkCmd)
+        {
+            var tool = conf.Tools.Item("VCPreLinkEventTool");
+            tool.CommandLine = ReplaceMacros(this.PreLinkCmd, allMacros);
+            if (null != this.PreLinkDesc)
+                tool.Description = ReplaceMacros(this.PreLinkDesc, allMacros);
+        }
+
+        if (null != this.PreBuildCmd)
+        {
+            var tool = conf.Tools.Item("VCPreBuildEventTool");
+            tool.CommandLine = ReplaceMacros(this.PreBuildCmd, allMacros);
+            if (null != this.PreBuildDesc)
+                tool.Description = ReplaceMacros(this.PreBuildDesc, allMacros);
+        }
+
+        if (null != this.PostBuildCmd)
+        {
+            var tool = conf.Tools.Item("VCPostBuildEventTool");
+            tool.CommandLine = ReplaceMacros(this.PostBuildCmd, allMacros);
+            if (null != this.PostBuildDesc)
+                tool.Description = ReplaceMacros(this.PostBuildDesc, allMacros);
+        }
+
+        if (null != this.CustomBuildCmd)
+        {
+            var tool = (null == VCCustomFile) ? conf.Tools.Item("VCCustomBuildTool") :
+                VCCustomFile.FileConfigurations.Item(conf.ConfigurationName).Tool;
+            
+            var cmd = ReplaceMacros(this.CustomBuildCmd, allMacros);
+            if (null != VCCustomFile)
+                cmd = cmd.replace(/(%CUSTOMFILE%)/g, VCCustomFile.FullPath);
+            tool.CommandLine = cmd;
+            tool.Outputs = null != this.CustomBuildOut ?
+                ReplaceMacros(this.CustomBuildOut, allMacros) : "";
+            if (null != this.PostBuildDesc)
+                tool.Description = ReplaceMacros(this.CustomBuildDesc, allMacros);
+            if (null != this.CustomBuildDeps)
+                tool.AdditionalDependencies = ReplaceMacros(this.CustomBuildDeps, allMacros);
+        }
+    }
+    
+    if (!fso.FolderExists(PrjDir))
+        fso.CreateFolder(PrjDir);
+    
+    VCProject.Save();
+    
+    this.VSProject = VCProject;
+}
+
+// create array of ProjectDef objects (one object for each file)
+// startDir - start folder
+// inclFiles - regular expression to define include files
+// exclDirs - regular expression to define exclude folder
+// exclFiles - regular expression to define exclude files
+function projectCreateProjectDefsFromFolder(startDir, inclFiles, exclDirs, exclFiles)
+{
+    var projectDefs = new Array();
+    
+    var folder = fso.GetFolder(ReplaceMacros(startDir, cmnMacros));
+        
+    var enumSubFolders = new Enumerator(folder.SubFolders);
+    for (; !enumSubFolders.atEnd(); enumSubFolders.moveNext())
+    {
+        var subFolder = enumSubFolders.item();
+        if (exclDirs.test(subFolder.Name))
+        {
+            // skip excluded folder
+            continue;
+        }
+        
+        var newDefs = this.createProjectDefsFromFolder(
+            subFolder.Path, inclFiles, exclDirs, exclFiles);
+
+        for (var i = 0; i < newDefs.length; ++i)
+            newDefs[i].OutDir += "\\" + subFolder.Name;
+        
+        projectDefs = projectDefs.concat(newDefs);
+    }
+
+    var enumFiles = new Enumerator(folder.Files);
+    for (; !enumFiles.atEnd(); enumFiles.moveNext())
+    {
+        var file = enumFiles.item();
+        if (inclFiles.test(file.Name))
+        {
+            if (exclFiles.test(file.Name))  // we should exclude this file
+                continue;
+            
+            var lastPoint = file.Name.lastIndexOf(".");
+            var prjName = file.Name.substr(0, lastPoint);
+            
+            var projectDef = this.clone();
+            projectDef.Name = prjName;
+            projectDef.FilterDefs.push(
+                new FilterDef(sourceFilterName, sourceFilterUuid,
+                              "cpp;c;cxx;s;cc", eFileTypeCppCode, false).
+                addFiles(null, new Array(file.Path)));
+            
+            projectDefs.push(projectDef);
+        }   
+    }
+    
+    return projectDefs;
+}
+
+//------------------------------------------------
+// Locale class
+//------------------------------------------------
+
+// Locale .ctor
+function Locale(name, cmname, srcname)
+{
+    this.Name = name;
+    this.cmName = cmname;
+    this.srcName = srcname;
+}
+
+// returns array of Locale objects parsing the gen_list file
+// nlsDir - folder containing file "gen_list"
+function initLocalesList(nlsDir)
+{
+    var listFileName = nlsDir + "\\gen_list";
+    if (!fso.FileExists(listFileName))
+    {
+        WScript.StdErr.WriteLine("Generate: Fatal error: "
+            + "File "+ listFileName + " does not exist");
+        WScript.Quit(3);
+    }
+    
+    var ForReading = 1;
+    var stream = fso.OpenTextFile(listFileName, ForReading);
+    if (!stream)
+    {
+        WScript.StdErr.WriteLine("Generate: Fatal error: "
+            + "Cannot open file "+ listFileName);
+        WScript.Quit(3);
+    }
+
+    var arrLocales = new Array();
+    
+    while (!stream.AtEndOfStream)
+    {
+        var line = stream.ReadLine();
+
+        var name = line.replace(new RegExp("^\([^ ]*\) *\([^ ]*\)"),
+                                "$1\.$2")
+                       .replace(new RegExp("\([^.]*\)\(.euro\)\([^ ]*\)"),
+                                "$1$3@euro")
+                       .replace(new RegExp("\([^.]*\)\(.cyrillic\)\([^ ]*\)"),
+                                "$1$3@cyrillic");
+        var pos = name.indexOf(" ");
+        if (0 <= pos)
+            name = name.substr(0, pos);
+
+        var srcname = name.replace(new RegExp("\([^.]*\)\.\([^@]*\)\(.*\)"),
+                                 "$1$3")
+                        .replace("@", ".");
+
+        var cmname = name.replace(new RegExp("\([^.]*\)\.\([^@]*\)\(.*\)"),
+                                 "$2");
+
+        arrLocales.push(new Locale(name, cmname, srcname));
+    }
+    
+    return arrLocales;
+}
+
+// create array of ProjectDef objects for build locales
+// (one object for each locale)
+// nlsDir - folder containing locale source files
+function projectCreateLocaleDefs(nlsDir)
+{
+    nlsDir = ReplaceMacros(nlsDir, cmnMacros);
+
+    if (typeof(this.arrLocales) == "undefined")
+        ProjectDef.prototype.arrLocales = initLocalesList(nlsDir);
+        
+    var projectDefs = new Array();
+
+    for (var i = 0; i < this.arrLocales.length; ++i)
+    {
+        var locale = this.arrLocales[i];
+                        
+        srcFileName = nlsDir + "\\src\\" + locale.srcName;
+        cmFileName = nlsDir + "\\charmaps\\" + locale.cmName;
+
+        var cmFile;
+        var srcFile;
+        
+        try
+        {
+            cmFile = fso.GetFile(cmFileName);
+        }
+        catch (e)
+        {
+            WScript.StdErr.WriteLine("Generate: Fatal error: File " +
+                cmFileName + " not found");
+            WScript.Quit(3);
+        }
+
+        try
+        {
+            srcFile = fso.GetFile(srcFileName);
+        }
+        catch (e)
+        {
+            WScript.StdErr.WriteLine("Generate: Fatal error: File " +
+                srcFileName + " not found");
+            WScript.Quit(3);
+        }
+
+        var projectDef = this.clone();
+        projectDef.Name = locale.Name;
+        projectDef.FilterDefs.push(
+            new FilterDef("Charmap", null, "cm", eFileTypeText, false).
+            addFiles(null, new Array(cmFile.Path)));
+        projectDef.FilterDefs.push(
+            new FilterDef("Src", null, "", eFileTypeText, false).
+            addFiles(null, new Array(srcFile.Path)));
+        projectDef.FilterDefs.push(
+            new FilterDef("Script Files", null, "js;wsf", eFileTypeScript, false).
+            addFiles("%SRCDIR%\\etc\\config\\windows", new Array("run_locale_utils.wsf")));
+        projectDef.CustomBuildCmd =
+            "\"$(SolutionDir)%CONFIG%\\bin\\localedef.exe\" -w -c" +
+            " -f \"" + cmFileName + "\"" + " -i \"" + srcFileName + "\"" +
+            " \"$(OutDir)\\" + locale.Name + "\"";
+        projectDef.CustomBuildOut = "$(OutDir)\\" + locale.Name;
+        
+        projectDefs.push(projectDef);
+    }    
+
+    return projectDefs;
+}
+
+// create array of ProjectDef objects for test locales
+// (one object for each locale)
+// nlsDir - folder containing locale source files
+function projectCreateTestLocaleDefs(nlsDir)
+{
+    nlsDir = ReplaceMacros(nlsDir, cmnMacros);
+
+    if (typeof(this.arrLocales) == "undefined")
+        this.prototype.arrLocales = initLocalesList(nlsDir);
+        
+    var projectDefs = new Array();
+
+    for (var i = 0; i < this.arrLocales.length; ++i)
+    {
+        var locale = this.arrLocales[i];
+        srcFileName = nlsDir + "\\src\\" + locale.srcName;
+        cmFileName = nlsDir + "\\charmaps\\" + locale.cmName;
+
+        var cmFile;
+        var srcFile;
+        
+        try
+        {
+            cmFile = fso.GetFile(cmFileName);
+        }
+        catch (e)
+        {
+            WScript.StdErr.WriteLine("Generate: Fatal error: File " +
+                cmFileName + " not found");
+            WScript.Quit(3);
+        }
+
+        try
+        {
+            srcFile = fso.GetFile(srcFileName);
+        }
+        catch (e)
+        {
+            WScript.StdErr.WriteLine("Generate: Fatal error: File " +
+                srcFileName + " not found");
+            WScript.Quit(3);
+        }
+
+        var projectDef = this.clone();
+        projectDef.Name = "test_" + locale.Name;
+        projectDef.FilterDefs.push(
+            new FilterDef("Charmap", null, "cm", eFileTypeText, false).
+            addFiles(null, new Array(cmFile.Path)));
+        projectDef.FilterDefs.push(
+            new FilterDef("Src", null, "", eFileTypeText, false).
+            addFiles(null, new Array(srcFile.Path)));
+        projectDef.FilterDefs.push(
+            new FilterDef("Script Files", null, "js;wsf", eFileTypeScript, false).
+            addFiles("%SRCDIR%\\etc\\config\\windows", new Array("run_locale_utils.wsf")));
+        projectDef.CustomBuildCmd =
+            "cscript /nologo \"%SRCDIR%\\etc\\config\\windows\\run_locale_utils.wsf\"" +
+            " /b:\"$(SolutionDir)%CONFIG%\\bin\" /f" +
+            " /i:\"" + nlsDir + "\"" + " /l:" + locale.Name;
+        projectDef.CustomBuildOut = " ";
+        
+        projectDefs.push(projectDef);
+    }    
+
+    return projectDefs;
+}

Propchange: incubator/stdcxx/trunk/etc/config/windows/projectdef.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/etc/config/windows/projectdef.js
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/etc/config/windows/projects.js
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?view=auto&rev=453570
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/projects.js (added)
+++ incubator/stdcxx/trunk/etc/config/windows/projects.js Fri Oct  6 05:16:32 2006
@@ -0,0 +1,478 @@
+//
+// $Id$
+//
+// projects.js - Definitions of the solution projects
+//
+//////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software  Foundation (ASF) under one or more
+// contributor  license agreements.  See  the NOTICE  file distributed
+// with  this  work  for  additional information  regarding  copyright
+// ownership.   The ASF  licenses this  file to  you under  the Apache
+// License, Version  2.0 (the  "License"); you may  not use  this file
+// except in  compliance with the License.   You may obtain  a copy of
+// the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the  License is distributed on an  "AS IS" BASIS,
+// WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+// implied.   See  the License  for  the  specific language  governing
+// permissions and limitations under the License.
+// 
+//////////////////////////////////////////////////////////////////////
+
+var commonDefines = "_RWSTD_USE_CONFIG;debug?_RWSTDDEBUG;dll?_RWSHARED";
+var commonIncludes = "$(SolutionDir)%CONFIG%\\include";
+var stdlibIncludes = "%SRCDIR%\\include;%SRCDIR%\\include\\ansi;" + commonIncludes;
+var rwtestIncludes = "%SRCDIR%\\tests\\include;" + stdlibIncludes;
+var commonLibs = "kernel32.lib user32.lib";
+
+var ProjectsDir = "%BUILDDIR%\\Projects";
+
+// projects which requires RTTI support
+var RTTIProjects = new Array("18.exception");
+
+var rxExcludedFolders = 
+    new RegExp("^(?:\\.svn|Release.*|Debug.*|in|out|CVS)$","i");
+
+// fill and return array of ProjectDef objects
+// with definitions of the solution projects
+// copyDll - if true then stdlib and rwtest dlls will be copied
+//           to the target folder after build
+// buildLocales - if true then generate projects for build locales
+// testLocales - if true then generate projects for test locales
+function CreateProjectsDefs(copyDll, buildLocales, testLocales)
+{
+    var projectDefs = new Array();
+ 
+ ///////////////////////////////////////////////////////////////////////////////   
+    var configureDef = new ProjectDef(".configure", typeGeneric);
+    configureDef.VCProjDir = ProjectsDir;
+    configureDef.FilterDefs.push(
+        new FilterDef(sourceFilterName, sourceFilterUuid, ".cpp;.c;.cxx;.s;.cc", eFileTypeCppCode, false).
+            addFilesByMask("%SRCDIR%\\etc\\config\\src", rxExcludedFolders, null));
+    configureDef.FilterDefs.push(
+        new FilterDef(headerFilterName, headerFilterUuid, ".h;.hpp;.hxx", eFileTypeCppHeader, false).
+            addFilesByMask("%SRCDIR%\\etc\\config\\src", rxExcludedFolders, null));
+    configureDef.FilterDefs.push(
+        new FilterDef("Script Files", null, ".js;.wsf", eFileTypeScript, false).
+            addFiles("%SRCDIR%\\etc\\config\\windows",
+                new Array("configure.wsf", "config.js", "data.js", "utilities.js")));
+    configureDef.OutDir = "$(SolutionDir)%CONFIG%\\include";
+    configureDef.IntDir = configureDef.OutDir;
+    configureDef.CustomBuildFile = "configure.wsf";
+    configureDef.CustomBuildCmd = "cscript /nologo \"%CUSTOMFILE%\"" +
+        " /SolutionName:\"%SOLUTION%\"" +
+        " /ConfigurationName:\"%CFGNAME%\"" +
+        " /SrcDir:\"%SRCDIR%\\etc\\config\\src\\\"" +
+        " /IncludeDir:\"%SRCDIR%\\include\"" +
+        " /OutDir:\"$(OutDir)\"" +
+        " /OutFile:\"$(OutDir)\\config.h\"" +
+        " /LogFile:\"$(OutDir)\\config.log\"";
+    configureDef.CustomBuildOut = "$(OutDir)\\config.h";
+    configureDef.CustomBuildDeps = "%FILES%";
+
+    projectDefs.push(configureDef);
+
+///////////////////////////////////////////////////////////////////////////////   
+    var stdlibDef = new ProjectDef(".stdlib", typeLibrary);
+    stdlibDef.VCProjDir = ProjectsDir;
+    stdlibDef.FilterDefs.push(
+        new FilterDef(sourceFilterName, sourceFilterUuid, sourceFilterExts, eFileTypeCppCode, false).
+            addFilesByMask("%SRCDIR%\\src", rxExcludedFolders, null));
+    stdlibDef.FilterDefs.push(
+        new FilterDef(headerFilterName, headerFilterUuid, headerFilterExts, eFileTypeCppHeader, true).
+            addFilesByMask("%SRCDIR%\\src", rxExcludedFolders, null).
+            addFilter(new FilterDef("Include", headerFilterUuid, headerFilterExts + ";.", eFileTypeCppHeader, true).
+                addFilesByMask("%SRCDIR%\\include", rxExcludedFolders, null)));
+    stdlibDef.Defines = commonDefines;
+    stdlibDef.Includes = stdlibIncludes;
+    stdlibDef.OutDir = "$(SolutionDir)lib";
+    stdlibDef.IntDir = "$(SolutionDir)%CONFIG%\\src";
+    stdlibDef.Libs = commonLibs;
+    stdlibDef.OutFile = "$(OutDir)\\stdlib%CONFIG%%EXT%";
+    stdlibDef.PrjDeps.push(configureDef);
+
+    projectDefs.push(stdlibDef);
+
+///////////////////////////////////////////////////////////////////////////////   
+    var rwtestDef = new ProjectDef(".rwtest", typeLibrary);
+    rwtestDef.VCProjDir = ProjectsDir;
+    rwtestDef.FilterDefs.push(
+        new FilterDef(sourceFilterName, sourceFilterUuid, sourceFilterExts, eFileTypeCppCode, false).
+            addFilesByMask("%SRCDIR%\\tests\\src", rxExcludedFolders, null));
+    rwtestDef.FilterDefs.push(
+        new FilterDef(headerFilterName, headerFilterUuid, headerFilterExts, eFileTypeCppHeader, true).
+            addFilesByMask("%SRCDIR%\\tests\\src", rxExcludedFolders, null).
+            addFilter(new FilterDef("Include", headerFilterUuid, headerFilterExts, eFileTypeCppHeader, true).
+                addFilesByMask("%SRCDIR%\\tests\\include", rxExcludedFolders, null)));
+    rwtestDef.Defines = commonDefines;
+    rwtestDef.Includes = rwtestIncludes;
+    rwtestDef.OutDir = "$(SolutionDir)%CONFIG%\\tests";
+    rwtestDef.IntDir = rwtestDef.OutDir + "\\src";
+    rwtestDef.PrjRefs.push(stdlibDef);
+
+    projectDefs.push(rwtestDef);
+
+///////////////////////////////////////////////////////////////////////////////   
+    var execDef = new ProjectDef("util_exec", typeApplication);
+    execDef.VCProjDir = ProjectsDir + "\\util";
+    execDef.FilterDefs.push(
+        new FilterDef(sourceFilterName, sourceFilterUuid, sourceFilterExts, eFileTypeCppCode, false).
+            addFiles("%SRCDIR%\\util",
+                new Array("cmdopt.cpp", "display.cpp", "exec.cpp", "output.cpp", "runall.cpp", "util.cpp")));
+    execDef.FilterDefs.push(
+        new FilterDef(headerFilterName, headerFilterUuid, headerFilterExts, eFileTypeCppHeader, true).
+            addFiles("%SRCDIR%\\util",
+                new Array("cmdopt.h", "display.h", "exec.h", "output.h", "target.h", "util.h")));
+    execDef.Defines = "_RWSTD_USE_CONFIG";
+    execDef.Includes = commonIncludes;
+    execDef.OutDir = "$(SolutionDir)%CONFIG%\\bin";
+    execDef.Libs = commonLibs;
+    execDef.OutFile = "$(OutDir)\\exec.exe";
+    execDef.PrjDeps.push(configureDef);
+
+    projectDefs.push(execDef);
+
+///////////////////////////////////////////////////////////////////////////////   
+    var localedefDef = new ProjectDef("util_localedef", typeApplication);
+    localedefDef.VCProjDir = ProjectsDir + "\\util";
+    localedefDef.FilterDefs.push(
+        new FilterDef(sourceFilterName, sourceFilterUuid, sourceFilterExts, eFileTypeCppCode, false).
+            addFiles("%SRCDIR%\\util",
+                new Array("aliases.cpp", "charmap.cpp", "codecvt.cpp",
+                          "collate.cpp", "ctype.cpp", "def.cpp",
+                          "diagnostic.cpp", "localedef.cpp", "messages.cpp",
+                          "monetary.cpp", "numeric.cpp", "path.cpp",
+                          "scanner.cpp", "time.cpp")));
+    localedefDef.FilterDefs.push(
+        new FilterDef(headerFilterName, headerFilterUuid, headerFilterExts, eFileTypeCppHeader, true).
+            addFiles("%SRCDIR%\\util",
+                new Array("aliases.h", "charmap.h", "def.h", "diagnostic.h",
+                "loc_exception.h", "localedef.h", "path.h", "scanner.h")));
+    localedefDef.Defines = commonDefines;
+    localedefDef.Includes = stdlibIncludes;
+    localedefDef.OutDir = "$(SolutionDir)%CONFIG%\\bin";
+    localedefDef.Libs = commonLibs;
+    localedefDef.OutFile = "$(OutDir)\\localedef.exe";
+    localedefDef.PrjRefs.push(stdlibDef);
+
+    projectDefs.push(localedefDef);
+
+///////////////////////////////////////////////////////////////////////////////   
+    var localeDef = new ProjectDef("util_locale", typeApplication);
+    localeDef.VCProjDir = ProjectsDir + "\\util";
+    localeDef.FilterDefs.push(
+        new FilterDef(sourceFilterName, sourceFilterUuid, sourceFilterExts, eFileTypeCppCode, false).
+            addFiles("%SRCDIR%\\util",
+                new Array("aliases.cpp", "charmap.cpp", "codecvt.cpp",
+                          "collate.cpp", "ctype.cpp", "def.cpp",
+                          "diagnostic.cpp", "locale.cpp", "memchk.cpp",
+                          "messages.cpp", "monetary.cpp", "numeric.cpp",
+                          "path.cpp", "scanner.cpp", "time.cpp")));
+    localeDef.FilterDefs.push(
+        new FilterDef(headerFilterName, headerFilterUuid, headerFilterExts, eFileTypeCppHeader, true).
+            addFiles("%SRCDIR%\\util",
+                new Array("aliases.h", "charmap.h", "def.h", "diagnostic.h",
+                "loc_exception.h", "memchk.h", "path.h", "scanner.h")));
+    localeDef.Defines = commonDefines;
+    localeDef.Includes = stdlibIncludes;
+    localeDef.OutDir = "$(SolutionDir)%CONFIG%\\bin";
+    localeDef.Libs = commonLibs;
+    localeDef.OutFile = "$(OutDir)\\locale.exe";
+    localeDef.PrjRefs.push(stdlibDef);
+
+    projectDefs.push(localeDef);
+
+///////////////////////////////////////////////////////////////////////////////   
+    var utilsDef = new ProjectDef(".stdlib_utils", typeGeneric);
+    utilsDef.VCProjDir = ProjectsDir + "\\util";
+    utilsDef.OutDir = "$(SolutionDir)%CONFIG%\\bin";
+    utilsDef.IntDir = utilsDef.OutDir;
+    utilsDef.PrjDeps.push(execDef);
+    utilsDef.PrjDeps.push(localedefDef);
+    utilsDef.PrjDeps.push(localeDef);
+
+    projectDefs.push(utilsDef);
+
+///////////////////////////////////////////////////////////////////////////////   
+    var exampleTplDef = new ProjectDef(null, typeApplication);
+    exampleTplDef.VCProjDir = ProjectsDir + "\\examples";
+    exampleTplDef.Defines = commonDefines;
+    exampleTplDef.Includes = "%SRCDIR%\\examples\\include;" + stdlibIncludes;
+    exampleTplDef.OutDir = "$(SolutionDir)%CONFIG%\\examples";
+    exampleTplDef.Libs = commonLibs;
+    exampleTplDef.PrjRefs.push(stdlibDef);
+    
+    var exampleDefs = exampleTplDef.createProjectDefsFromFolder(
+        "%SRCDIR%\\examples",
+        new RegExp("^.+\\.(?:cpp)$", "i"),
+        new RegExp("^(?:\\.svn|Release.*|Debug.*|in|out|CVS)$", "i"),
+        new RegExp("^(?:rwstdmessages.cpp)$", "i"));
+
+    projectDefs = projectDefs.concat(exampleDefs);
+    
+///////////////////////////////////////////////////////////////////////////////   
+    var runexamplesDef = new ProjectDef(".stdlib_examples", typeGeneric);
+    runexamplesDef.VCProjDir = ProjectsDir + "\\examples";
+    runexamplesDef.FilterDefs.push(
+        new FilterDef("Script Files", null, ".js;.wsf", eFileTypeScript, false).
+            addFiles("%SRCDIR%\\etc\\config\\windows",
+                new Array("runall.wsf", "config.js", "utilities.js",
+                          "summary.js")));
+    runexamplesDef.OutDir = "$(SolutionDir)%CONFIG%\\examples";
+    runexamplesDef.IntDir = runexamplesDef.OutDir;
+    runexamplesDef.PreBuildCmd =
+        "if exist \"$(OutDir)\\summary.htm del\" \"$(OutDir)\\summary.htm\"\r\n" +
+        "if exist \"$(OutDir)\\runexamples.log\" del \"$(OutDir)\\runexamples.log\"";
+    runexamplesDef.CustomBuildFile = "runall.wsf";
+    runexamplesDef.CustomBuildCmd = "cscript /nologo \"%CUSTOMFILE%\"" +
+        " /INOUTDIR:\"%SRCDIR%\\examples\"" +
+        " /EXEDIR:\"$(OutDir)\"" +
+        " /BUILDTYPE:\"%CONFIG%\"" +
+        " /CONFIG:\"%SOLUTION%\"" +
+        " /LOGFILE:\"runexamples.log\"" +
+        " /COPYDLL:" + (copyDll ? "false" : "true") +
+        " /LIBDIR:\"$(SolutionDir)lib\"";
+    runexamplesDef.CustomBuildOut = "$(OutDir)\\runexamples.log";
+    runexamplesDef.CustomBuildDeps = "%FILES%";
+    runexamplesDef.PrjDeps = exampleDefs;
+    runexamplesDef.PrjDeps.push(execDef);
+
+    projectDefs.push(runexamplesDef);
+
+///////////////////////////////////////////////////////////////////////////////   
+    var testTplDef = new ProjectDef(null, typeApplication);
+    testTplDef.VCProjDir = ProjectsDir + "\\tests";
+    testTplDef.Defines = commonDefines;
+    testTplDef.Includes = rwtestIncludes;
+    testTplDef.OutDir = "$(SolutionDir)%CONFIG%\\tests";
+    testTplDef.Libs = commonLibs;
+    testTplDef.PrjRefs.push(stdlibDef);
+    testTplDef.PrjRefs.push(rwtestDef);
+    
+    var testDefs = testTplDef.createProjectDefsFromFolder(
+        "%SRCDIR%\\tests",
+        new RegExp("^.+\\.(?:cpp)$", "i"),
+        new RegExp("^(?:\\.svn|Release.*|Debug.*|in|out|CVS|src|include)$","i"),
+        new RegExp("^(?:rwstdmessages.cpp)$","i"));
+
+    projectDefs = projectDefs.concat(testDefs);
+    
+///////////////////////////////////////////////////////////////////////////////   
+    var runtestsDef = new ProjectDef(".stdlib_tests", typeGeneric);
+    runtestsDef.VCProjDir = ProjectsDir + "\\tests";
+    runtestsDef.FilterDefs.push(
+        new FilterDef("Script Files", null, ".js;.wsf", eFileTypeScript, false).
+            addFiles("%SRCDIR%\\etc\\config\\windows",
+                new Array("runall.wsf", "config.js", "utilities.js",
+                          "summary.js")));
+    runtestsDef.OutDir = "$(SolutionDir)%CONFIG%\\tests";
+    runtestsDef.IntDir = runtestsDef.OutDir;
+    runtestsDef.PreBuildCmd =
+        "if exist \"$(OutDir)\\summary.htm\" del \"$(OutDir)\\summary.htm\"\r\n" +
+        "if exist \"$(OutDir)\\runtests.log\" del \"$(OutDir)\\runtests.log\"";
+    runtestsDef.CustomBuildFile = "runall.wsf";
+    runtestsDef.CustomBuildCmd = "cscript /nologo \"%CUSTOMFILE%\"" +
+        " /INOUTDIR:\"%SRCDIR%\\tests\"" +
+        " /EXEDIR:\"$(OutDir)\"" +
+        " /BUILDTYPE:\"%CONFIG%\"" +
+        " /CONFIG:\"%SOLUTION%\"" +
+        " /LOGFILE:\"runtests.log\"" +
+        " /COPYDLL:" + (copyDll ? "false" : "true") +
+        " /COPYRWTESTDLL:" + (copyDll ? "false" : "true") +
+        " /LIBDIR:\"$(SolutionDir)lib\"";
+    runtestsDef.CustomBuildOut = "$(OutDir)\\runtests.log";
+    runtestsDef.CustomBuildDeps = "%FILES%";
+    runtestsDef.PrjDeps = testDefs;
+    runtestsDef.PrjDeps.push(execDef);
+
+    projectDefs.push(runtestsDef);
+
+///////////////////////////////////////////////////////////////////////////////   
+    if (buildLocales)
+    {
+        var localeTplDef = new ProjectDef(null, typeGeneric);
+        localeTplDef.VCProjDir = ProjectsDir + "\\locales";
+        localeTplDef.OutDir = "$(SolutionDir)nls";
+        localeTplDef.IntDir = localeTplDef.OutDir + "\\Build\\$(ProjectName)";
+        localeTplDef.CustomBuildDeps = "%FILES%";
+        localeTplDef.PrjDeps.push(localedefDef);
+        if (!copyDll)
+        {
+            // copy stdlibxxx.dll to the bin directory
+            // before executing localedef.exe utility
+            // and finally delete the copied file
+            var libname = "stdlib%CONFIG%.dll";
+            var src = "\"$(SolutionDir)lib\\" + libname + "\"";
+            var dst = "\"$(SolutionDir)%CONFIG%\\bin\\" + libname + "\"";
+            localeTplDef.PreBuildCmd = "if exist " + src + " if not exist " + dst +
+                                       " copy /Y " + src + " " + dst;
+            localeTplDef.PostBuildCmd = "if exist " + dst + " del " + dst;
+        }
+    
+        var localeDefs = localeTplDef.createLocaleDefs("%SRCDIR%\\etc\\nls");
+    
+        projectDefs = projectDefs.concat(localeDefs);
+        
+        var localesDef = new ProjectDef(".stdlib_locales", typeGeneric);
+        localesDef.VCProjDir = ProjectsDir + "\\locales";
+        localesDef.OutDir = "$(SolutionDir)nls";
+        localesDef.IntDir = localesDef.OutDir;
+        localesDef.PrjDeps = localeDefs;
+    
+        projectDefs.push(localesDef);
+    }
+
+///////////////////////////////////////////////////////////////////////////////
+    if (testLocales)
+    {
+        var testlocaleTplDef = new ProjectDef(null, typeGeneric);
+        testlocaleTplDef.VCProjDir = ProjectsDir + "\\locales";
+        testlocaleTplDef.OutDir = "$(SolutionDir)bin";
+        testlocaleTplDef.IntDir = testlocaleTplDef.OutDir + "\\Build\\$(ProjectName)";
+        testlocaleTplDef.CustomBuildDeps = "%FILES%";
+        testlocaleTplDef.PrjDeps.push(localeDef);
+        testlocaleTplDef.PrjDeps.push(localedefDef);
+        if (!copyDll)
+        {
+            // copy stdlibxxx.dll to the bin directory
+            // before executing run_locale_utils.wsf script
+            // and finally delete the copied file
+            var libname = "stdlib%CONFIG%.dll";
+            var src = "\"$(SolutionDir)lib\\" + libname + "\"";
+            var dst = "\"$(SolutionDir)%CONFIG%\\bin\\" + libname + "\"";
+            testlocaleTplDef.PreBuildCmd = "if exist " + src + " if not exist " + dst +
+                                           " copy /Y " + src + " " + dst;
+            testlocaleTplDef.PostBuildCmd = "if exist " + dst + " del " + dst;
+        }
+        
+        var testlocaleDefs = testlocaleTplDef.createTestLocaleDefs("%SRCDIR%\\etc\\nls");
+    
+        projectDefs = projectDefs.concat(testlocaleDefs);
+        
+        var testlocalesDef = new ProjectDef(".stdlib_testlocales", typeGeneric);
+        testlocalesDef.VCProjDir = ProjectsDir + "\\locales";
+        testlocalesDef.OutDir = "$(SolutionDir)bin";
+        testlocalesDef.IntDir = localesDef.OutDir;
+        testlocalesDef.PrjDeps = testlocaleDefs;
+    
+        projectDefs.push(testlocalesDef);
+    }
+    
+///////////////////////////////////////////////////////////////////////////////   
+    if (copyDll)
+    {
+        // if project type is application and
+        //   if it depends on stdlib project then
+        //     copy stdlibxxx.dll to project output directory
+        //   if it depends on rwtest project then
+        //     copy rwtest.dll to project output directory
+        for (var i = 0; i < projectDefs.length; ++i)
+        {
+            var projectDef = projectDefs[i];
+
+            if (projectDef.Type != typeApplication)
+                continue;
+
+            var arrDeps = projectDef.PrjRefs.concat(projectDef.PrjDeps);
+            var command = "";
+
+            if (0 <= arrayIndexOf(arrDeps, stdlibDef))
+            {
+                var libname = "stdlib%CONFIG%.dll";
+                var src = "\"$(SolutionDir)lib\\" + libname + "\"";
+                var dst = "\"$(OutDir)\\" + libname + "\"";
+                var cmd = "if exist " + src + " if not exist " + dst +
+                      " copy /Y " + src + " " + dst;
+                if (0 == command.length)
+                    command = cmd;
+                else
+                    command += "\r\n" + cmd;
+            }
+
+            if (0 <= arrayIndexOf(arrDeps, rwtestDef))
+            {
+                var libname = "rwtest.dll";
+                var src = "\"$(SolutionDir)%CONFIG%\\tests\\" + libname + "\"";
+                var dst = "\"$(OutDir)\\" + libname + "\"";
+                var cmd = "if exist " + src + " if not exist " + dst +
+                          " copy /Y " + src + " " + dst;
+                if (0 == command.length)
+                    command = cmd;
+                else
+                    command += "\r\n" + cmd;
+            }
+
+            if (null == projectDef.PostBuildCmd || "" == projectDef.PostBuildCmd)
+                projectDef.PostBuildCmd = command;
+            else
+                projectDef.PostBuildCmd = command + "\r\n" + projectDef.PostBuildCmd;
+        }
+    }
+
+    return projectDefs;
+}
+
+// create VCProject's using ProjectDed definitions
+// projectDefs - array with project definitions
+// report - callback function to report progress
+function CreateProjects(projectDefs, report)
+{
+    for (var i = 0; i < projectDefs.length; ++i)
+    {
+        var projectDef = projectDefs[i];
+
+        // turn on RTTI support if project in RTTIProjects array
+        if (0 <= arrayIndexOf(RTTIProjects, projectDef.Name))
+            projectDef.RTTI = true;
+
+        projectDef.createVCProject(VCProjectEngine, report);
+    }
+}
+
+// configure dependencies between projects
+// (insert <References> section to the .vcproj file)
+// projectDefs - array with project definitions
+function ConfigureDependencies(projectDefs)
+{
+    for (var i = 0; i < projectDefs.length; ++i)
+    {
+        var projectDef = projectDefs[i];
+        var VCProject = projectDef.VSProject;
+
+        var prjrefs = projectDef.PrjRefs;
+        if (0 == prjrefs.length)
+            continue;
+
+        var file = fso.OpenTextFile(VCProject.ProjectFile, 1, false);
+        var text = file.ReadAll();
+        file.Close();
+        var refs = "";
+        for (var j = 0; j < prjrefs.length; ++j)
+        {
+            refs += "\t\t<ProjectReference\n";
+            refs += "\t\t\tReferencedProjectIdentifier=\"" +
+                    prjrefs[j].VSProject.ProjectGUID + "\"\n";
+            refs += "\t\t/>\n";
+        }
+        var pos = text.indexOf("\t</References>");
+        if (0 > pos)
+        {
+            var str = "\t</Configurations>";
+            pos = text.indexOf(str);
+            if (0 <= pos)
+            {
+                refs = "\n\t<References>\n" + refs + "\t</References>";
+                pos += str.length;
+            }
+        }
+        text = text.substr(0, pos) + refs + text.substr(pos);
+        text.replace("\t</References>", refs);
+        file = fso.CreateTextFile(VCProject.ProjectFile, true, false);
+        file.Write(text);
+        file.Close();
+    }
+}

Propchange: incubator/stdcxx/trunk/etc/config/windows/projects.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/etc/config/windows/projects.js
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message