etc/config/windows/projectdef.js
// shiftOutDir - if true then add subfolder name to the OutDir path
if true then add subfolder name to the OutDir path
if true then add subfolder name to the OutDir path
function projectCreateProjectDefsFromFolder(startDir,
    inclFiles, exclDirs, exclFiles, shiftOutDir)
{
    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))
        {
            continue;
        }
        var newDefs = this.createProjectDefsFromFolder(subFolder.Path,
            inclFiles, exclDirs, exclFiles, shiftOutDir);
        if (shiftOutDir)
        {
            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))  
                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;
}
function projectCreateProjectDefsFromFolder ( startDir , inclFiles , exclDirs , exclFiles , shiftOutDir ) { 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 ) ) { continue ; } var newDefs = this . createProjectDefsFromFolder ( subFolder . Path , inclFiles , exclDirs , exclFiles , shiftOutDir ) ; if ( shiftOutDir ) { 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 ) ) 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 ; }
shiftOutDir - if true then add subfolder name to the OutDir path
shiftOutDir - if true then add subfolder name to the OutDir path
// skip excluded folder // we should exclude this file