hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java
author katleman
Thu, 29 Dec 2011 15:14:45 -0800
changeset 11330 084a13b20cf3
parent 10284 17533dd1b807
child 13892 9ba13acea673
permissions -rw-r--r--
Added tag jdk8-b19 for changeset d0ec48636c58
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8860
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
     1
import java.io.File;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
     2
import java.io.FileNotFoundException;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
     3
import java.io.IOException;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
     4
import java.io.PrintWriter;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
     5
import java.io.UnsupportedEncodingException;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
     6
import java.util.Hashtable;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
     7
import java.util.Iterator;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
     8
import java.util.TreeSet;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
     9
import java.util.UUID;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    10
import java.util.Vector;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    11
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    12
public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    13
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    14
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    15
    protected String getProjectExt() {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    16
        return ".vcxproj";
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    17
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    18
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    19
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    20
    public void writeProjectFile(String projectFileName, String projectName,
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    21
            Vector<BuildConfig> allConfigs) throws IOException {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    22
        System.out.println();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    23
        System.out.print("    Writing .vcxproj file: " + projectFileName);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    24
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    25
        String projDir = Util.normalize(new File(projectFileName).getParent());
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    26
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    27
        printWriter = new PrintWriter(projectFileName, "UTF-8");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    28
        printWriter.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    29
        startTag("Project",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    30
                "DefaultTargets", "Build",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    31
                "ToolsVersion", "4.0",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    32
                "xmlns", "http://schemas.microsoft.com/developer/msbuild/2003");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    33
        startTag("ItemGroup",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    34
                "Label", "ProjectConfigurations");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    35
        for (BuildConfig cfg : allConfigs) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    36
            startTag("ProjectConfiguration",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    37
                    "Include", cfg.get("Name"));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    38
            tagData("Configuration", cfg.get("Id"));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    39
            tagData("Platform", cfg.get("PlatformName"));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    40
            endTag("ProjectConfiguration");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    41
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    42
        endTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    43
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    44
        startTag("PropertyGroup", "Label", "Globals");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    45
        tagData("ProjectGuid", "{8822CB5C-1C41-41C2-8493-9F6E1994338B}");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    46
        tag("SccProjectName");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    47
        tag("SccLocalPath");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    48
        endTag("PropertyGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    49
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    50
        tag("Import", "Project", "$(VCTargetsPath)\\Microsoft.Cpp.Default.props");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    51
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    52
        for (BuildConfig cfg : allConfigs) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    53
            startTag(cfg, "PropertyGroup", "Label", "Configuration");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    54
            tagData("ConfigurationType", "DynamicLibrary");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    55
            tagData("UseOfMfc", "false");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    56
            endTag("PropertyGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    57
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    58
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    59
        tag("Import", "Project", "$(VCTargetsPath)\\Microsoft.Cpp.props");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    60
        startTag("ImportGroup", "Label", "ExtensionSettings");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    61
        endTag("ImportGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    62
        for (BuildConfig cfg : allConfigs) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    63
            startTag(cfg, "ImportGroup", "Label", "PropertySheets");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    64
            tag("Import",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    65
                    "Project", "$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    66
                    "Condition", "exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    67
                    "Label", "LocalAppDataPlatform");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    68
            endTag("ImportGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    69
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    70
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    71
        tag("PropertyGroup", "Label", "UserMacros");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    72
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    73
        startTag("PropertyGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    74
        tagData("_ProjectFileVersion", "10.0.30319.1");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    75
        for (BuildConfig cfg : allConfigs) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    76
            tagData(cfg, "OutDir", cfg.get("OutputDir") + Util.sep);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    77
            tagData(cfg, "IntDir", cfg.get("OutputDir") + Util.sep);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    78
            tagData(cfg, "LinkIncremental", "false");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    79
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    80
        for (BuildConfig cfg : allConfigs) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    81
            tagData(cfg, "CodeAnalysisRuleSet", "AllRules.ruleset");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    82
            tag(cfg, "CodeAnalysisRules");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    83
            tag(cfg, "CodeAnalysisRuleAssemblies");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    84
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    85
        endTag("PropertyGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    86
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    87
        for (BuildConfig cfg : allConfigs) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    88
            startTag(cfg, "ItemDefinitionGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    89
            startTag("ClCompile");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    90
            tagV(cfg.getV("CompilerFlags"));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    91
            endTag("ClCompile");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    92
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    93
            startTag("Link");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    94
            tagV(cfg.getV("LinkerFlags"));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    95
            endTag("Link");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    96
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    97
            startTag("PostBuildEvent");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    98
            tagData("Message", BuildConfig.getFieldString(null, "PostbuildDescription"));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
    99
            tagData("Command", cfg.expandFormat(BuildConfig.getFieldString(null, "PostbuildCommand").replace("\t", "\r\n")));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   100
            endTag("PostBuildEvent");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   101
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   102
            startTag("PreLinkEvent");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   103
            tagData("Message", BuildConfig.getFieldString(null, "PrelinkDescription"));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   104
            tagData("Command", cfg.expandFormat(BuildConfig.getFieldString(null, "PrelinkCommand").replace("\t", "\r\n")));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   105
            endTag("PreLinkEvent");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   106
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   107
            endTag("ItemDefinitionGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   108
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   109
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   110
        writeFiles(allConfigs, projDir);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   111
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   112
        tag("Import", "Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   113
        startTag("ImportGroup", "Label", "ExtensionTargets");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   114
        endTag("ImportGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   115
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   116
        endTag("Project");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   117
        printWriter.close();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   118
        System.out.println("    Done.");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   119
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   120
        writeFilterFile(projectFileName, projectName, allConfigs, projDir);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   121
        writeUserFile(projectFileName, allConfigs);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   122
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   123
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   124
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   125
    private void writeUserFile(String projectFileName, Vector<BuildConfig> allConfigs) throws FileNotFoundException, UnsupportedEncodingException {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   126
        String userFileName = projectFileName + ".user";
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   127
        if (new File(userFileName).exists()) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   128
            return;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   129
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   130
        System.out.print("    Writing .vcxproj.user file: " + userFileName);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   131
        printWriter = new PrintWriter(userFileName, "UTF-8");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   132
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   133
        printWriter.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   134
        startTag("Project",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   135
                "ToolsVersion", "4.0",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   136
                "xmlns", "http://schemas.microsoft.com/developer/msbuild/2003");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   137
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   138
        for (BuildConfig cfg : allConfigs) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   139
            startTag(cfg, "PropertyGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   140
            tagData("LocalDebuggerCommand", "$(TargetDir)/hotspot.exe");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   141
            endTag("PropertyGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   142
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   143
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   144
        endTag("Project");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   145
        printWriter.close();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   146
        System.out.println("    Done.");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   147
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   148
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   149
    private void writeFilterFile(String projectFileName, String projectName,
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   150
            Vector<BuildConfig> allConfigs, String base) throws FileNotFoundException, UnsupportedEncodingException {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   151
        String filterFileName = projectFileName + ".filters";
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   152
        System.out.print("    Writing .vcxproj.filters file: " + filterFileName);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   153
        printWriter = new PrintWriter(filterFileName, "UTF-8");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   154
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   155
        printWriter.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   156
        startTag("Project",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   157
                "ToolsVersion", "4.0",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   158
                "xmlns", "http://schemas.microsoft.com/developer/msbuild/2003");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   159
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   160
        Hashtable<String, FileAttribute> allFiles = computeAttributedFiles(allConfigs);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   161
        TreeSet<FileInfo> sortedFiles = sortFiles(allFiles);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   162
        Vector<NameFilter> filters = makeFilters(sortedFiles);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   163
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   164
        // first all filters
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   165
        startTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   166
        for (NameFilter filter : filters) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   167
            doWriteFilter(filter, "");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   168
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   169
        startTag("Filter", "Include", "Resource Files");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   170
        UUID uuid = UUID.randomUUID();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   171
        tagData("UniqueIdentifier", "{" + uuid.toString() + "}");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   172
        tagData("Extensions", "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   173
        endTag("Filter");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   174
        endTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   175
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   176
        // then all cpp files
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   177
        startTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   178
        for (NameFilter filter : filters) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   179
            doWriteFiles(sortedFiles, filter, "", "ClCompile", new Evaluator() {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   180
                public boolean pick(FileInfo fi) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   181
                    return fi.isCpp();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   182
                }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   183
            }, base);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   184
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   185
        endTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   186
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   187
        // then all header files
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   188
        startTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   189
        for (NameFilter filter : filters) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   190
            doWriteFiles(sortedFiles, filter, "", "ClInclude", new Evaluator() {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   191
                public boolean pick(FileInfo fi) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   192
                    return fi.isHeader();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   193
                }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   194
            }, base);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   195
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   196
        endTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   197
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   198
        // then all other files
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   199
        startTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   200
        for (NameFilter filter : filters) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   201
            doWriteFiles(sortedFiles, filter, "", "None", new Evaluator() {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   202
                public boolean pick(FileInfo fi) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   203
                    return true;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   204
                }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   205
            }, base);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   206
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   207
        endTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   208
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   209
        endTag("Project");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   210
        printWriter.close();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   211
        System.out.println("    Done.");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   212
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   213
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   214
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   215
    private void doWriteFilter(NameFilter filter, String start) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   216
        startTag("Filter", "Include", start + filter.fname);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   217
        UUID uuid = UUID.randomUUID();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   218
        tagData("UniqueIdentifier", "{" + uuid.toString() + "}");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   219
        endTag("Filter");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   220
        if (filter instanceof ContainerFilter) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   221
            Iterator i = ((ContainerFilter)filter).babies();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   222
            while (i.hasNext()) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   223
                doWriteFilter((NameFilter)i.next(), start + filter.fname + "\\");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   224
            }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   225
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   226
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   227
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   228
    interface Evaluator {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   229
        boolean pick(FileInfo fi);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   230
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   231
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   232
    private void doWriteFiles(TreeSet<FileInfo> allFiles, NameFilter filter, String start, String tool, Evaluator eval, String base) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   233
        if (filter instanceof ContainerFilter) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   234
            Iterator i = ((ContainerFilter)filter).babies();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   235
            while (i.hasNext()) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   236
                doWriteFiles(allFiles, (NameFilter)i.next(), start + filter.fname + "\\", tool, eval, base);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   237
            }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   238
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   239
        else {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   240
            Iterator i = allFiles.iterator();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   241
            while (i.hasNext()) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   242
                FileInfo fi = (FileInfo)i.next();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   243
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   244
                if (!filter.match(fi)) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   245
                    continue;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   246
                }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   247
                if (eval.pick(fi)) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   248
                    startTag(tool, "Include", rel(fi.full, base));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   249
                    tagData("Filter", start + filter.fname);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   250
                    endTag(tool);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   251
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   252
                    // we not gonna look at this file anymore (sic!)
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   253
                    i.remove();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   254
                }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   255
            }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   256
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   257
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   258
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   259
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   260
    void writeFiles(Vector<BuildConfig> allConfigs, String projDir) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   261
        Hashtable<String, FileAttribute> allFiles = computeAttributedFiles(allConfigs);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   262
        TreeSet<FileInfo> sortedFiles = sortFiles(allFiles);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   263
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   264
        // first cpp-files
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   265
        startTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   266
        for (FileInfo fi : sortedFiles) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   267
            if (!fi.isCpp()) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   268
                continue;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   269
            }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   270
            writeFile("ClCompile", allConfigs, fi, projDir);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   271
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   272
        endTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   273
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   274
        // then header-files
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   275
        startTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   276
        for (FileInfo fi : sortedFiles) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   277
            if (!fi.isHeader()) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   278
                continue;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   279
            }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   280
            writeFile("ClInclude", allConfigs, fi, projDir);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   281
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   282
        endTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   283
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   284
        // then others
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   285
        startTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   286
        for (FileInfo fi : sortedFiles) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   287
            if (fi.isHeader() || fi.isCpp()) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   288
                continue;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   289
            }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   290
            writeFile("None", allConfigs, fi, projDir);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   291
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   292
        endTag("ItemGroup");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   293
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   294
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   295
    /**
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   296
     * Make "path" into a relative path using "base" as the base.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   297
     *
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   298
     * path and base are assumed to be normalized with / as the file separator.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   299
     * returned path uses "\\" as file separator
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   300
     */
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   301
    private String rel(String path, String base)
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   302
    {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   303
        if(!base.endsWith("/")) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   304
                base += "/";
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   305
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   306
        String[] pathTok = path.split("/");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   307
        String[] baseTok = base.split("/");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   308
        int pi = 0;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   309
        int bi = 0;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   310
        StringBuilder newPath = new StringBuilder();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   311
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   312
        // first step past all path components that are the same
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   313
        while (pi < pathTok.length &&
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   314
                bi < baseTok.length &&
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   315
                pathTok[pi].equals(baseTok[bi])) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   316
            pi++;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   317
            bi++;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   318
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   319
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   320
        // for each path component left in base, add "../"
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   321
        while (bi < baseTok.length) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   322
            bi++;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   323
                newPath.append("..\\");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   324
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   325
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   326
        // now add everything left in path
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   327
        while (pi < pathTok.length) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   328
                newPath.append(pathTok[pi]);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   329
                pi++;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   330
            if (pi != pathTok.length) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   331
                newPath.append("\\");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   332
            }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   333
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   334
        return newPath.toString();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   335
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   336
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   337
    private void writeFile(String tool, Vector<BuildConfig> allConfigs, FileInfo fi, String base) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   338
        if (fi.attr.configs == null && fi.attr.pchRoot == false && fi.attr.noPch == false) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   339
            tag(tool, "Include", rel(fi.full, base));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   340
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   341
        else {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   342
            startTag(tool, "Include", rel(fi.full, base));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   343
            for (BuildConfig cfg : allConfigs) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   344
                if (fi.attr.configs != null && !fi.attr.configs.contains(cfg.get("Name"))) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   345
                    tagData(cfg, "ExcludedFromBuild", "true");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   346
                }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   347
                if (fi.attr.pchRoot) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   348
                        tagData(cfg, "PrecompiledHeader", "Create");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   349
                }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   350
                if (fi.attr.noPch) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   351
                        startTag(cfg, "PrecompiledHeader");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   352
                        endTag("PrecompiledHeader");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   353
                }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   354
            }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   355
            endTag(tool);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   356
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   357
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   358
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   359
    String buildCond(BuildConfig cfg) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   360
        return "'$(Configuration)|$(Platform)'=='"+cfg.get("Name")+"'";
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   361
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   362
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   363
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   364
    void tagV(Vector<String> v) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   365
        Iterator<String> i = v.iterator();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   366
        while(i.hasNext()) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   367
            String name = i.next();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   368
            String data = i.next();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   369
            tagData(name, data);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   370
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   371
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   372
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   373
    void tagData(BuildConfig cfg, String name, String data) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   374
        tagData(name, data, "Condition", buildCond(cfg));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   375
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   376
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   377
    void tag(BuildConfig cfg, String name, String... attrs) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   378
        String[] ss = new String[attrs.length + 2];
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   379
        ss[0] = "Condition";
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   380
        ss[1] = buildCond(cfg);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   381
        System.arraycopy(attrs, 0, ss, 2, attrs.length);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   382
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   383
        tag(name, ss);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   384
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   385
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   386
    void startTag(BuildConfig cfg, String name, String... attrs) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   387
        String[] ss = new String[attrs.length + 2];
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   388
        ss[0] = "Condition";
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   389
        ss[1] = buildCond(cfg);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   390
        System.arraycopy(attrs, 0, ss, 2, attrs.length);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   391
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   392
        startTag(name, ss);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   393
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   394
}
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   395
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   396
class CompilerInterfaceVC10 extends CompilerInterface {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   397
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   398
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   399
    Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   400
        Vector rv = new Vector();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   401
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   402
        addAttr(rv, "AdditionalIncludeDirectories", Util.join(";", includes));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   403
        addAttr(rv, "PreprocessorDefinitions",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   404
                Util.join(";", defines).replace("\\\"", "\""));
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   405
        addAttr(rv, "PrecompiledHeaderFile", "precompiled.hpp");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   406
        addAttr(rv, "PrecompiledHeaderOutputFile", outDir+Util.sep+"vm.pch");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   407
        addAttr(rv, "AssemblerListingLocation", outDir);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   408
        addAttr(rv, "ObjectFileName", outDir+Util.sep);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   409
        addAttr(rv, "ProgramDataBaseFileName", outDir+Util.sep+"jvm.pdb");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   410
        // Set /nologo option
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   411
        addAttr(rv, "SuppressStartupBanner", "true");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   412
        // Surpass the default /Tc or /Tp.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   413
        addAttr(rv, "CompileAs", "Default");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   414
        // Set /W3 option.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   415
        addAttr(rv, "WarningLevel", "Level3");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   416
        // Set /WX option,
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   417
        addAttr(rv, "TreatWarningAsError", "true");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   418
        // Set /GS option
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   419
        addAttr(rv, "BufferSecurityCheck", "false");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   420
        // Set /Zi option.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   421
        addAttr(rv, "DebugInformationFormat", "ProgramDatabase");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   422
        // Set /Yu option.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   423
        addAttr(rv, "PrecompiledHeader", "Use");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   424
        // Set /EHsc- option
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   425
        addAttr(rv, "ExceptionHandling", "");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   426
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   427
        addAttr(rv, "MultiProcessorCompilation", "true");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   428
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   429
        return rv;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   430
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   431
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   432
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   433
    Vector getDebugCompilerFlags(String opt) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   434
        Vector rv = new Vector();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   435
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   436
        // Set /On option
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   437
        addAttr(rv, "Optimization", opt);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   438
        // Set /FR option.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   439
        addAttr(rv, "BrowseInformation", "true");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   440
        addAttr(rv, "BrowseInformationFile", "$(IntDir)");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   441
        // Set /MD option.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   442
        addAttr(rv, "RuntimeLibrary", "MultiThreadedDLL");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   443
        // Set /Oy- option
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   444
        addAttr(rv, "OmitFramePointers", "false");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   445
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   446
        return rv;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   447
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   448
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   449
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   450
    Vector getProductCompilerFlags() {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   451
        Vector rv = new Vector();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   452
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   453
        // Set /O2 option.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   454
        addAttr(rv, "Optimization", "MaxSpeed");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   455
        // Set /Oy- option
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   456
        addAttr(rv, "OmitFramePointers", "false");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   457
        // Set /Ob option.  1 is expandOnlyInline
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   458
        addAttr(rv, "InlineFunctionExpansion", "OnlyExplicitInline");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   459
        // Set /GF option.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   460
        addAttr(rv, "StringPooling", "true");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   461
        // Set /MD option. 2 is rtMultiThreadedDLL
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   462
        addAttr(rv, "RuntimeLibrary", "MultiThreadedDLL");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   463
        // Set /Gy option
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   464
        addAttr(rv, "FunctionLevelLinking", "true");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   465
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   466
        return rv;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   467
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   468
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   469
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   470
    Vector getBaseLinkerFlags(String outDir, String outDll, String platformName) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   471
        Vector rv = new Vector();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   472
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   473
        addAttr(rv, "AdditionalOptions",
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   474
                "/export:JNI_GetDefaultJavaVMInitArgs " +
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   475
                "/export:JNI_CreateJavaVM " +
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   476
                "/export:JVM_FindClassFromBootLoader "+
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   477
                "/export:JNI_GetCreatedJavaVMs "+
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   478
                "/export:jio_snprintf /export:jio_printf "+
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   479
                "/export:jio_fprintf /export:jio_vfprintf "+
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   480
                "/export:jio_vsnprintf "+
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   481
                "/export:JVM_GetVersionInfo "+
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   482
                "/export:JVM_GetThreadStateNames "+
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   483
                "/export:JVM_GetThreadStateValues "+
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   484
                "/export:JVM_InitAgentProperties");
10284
17533dd1b807 7082220: Visual Studio projects broken after change 7016797: Hotspot: securely/restrictive load dlls and new
brutisso
parents: 9131
diff changeset
   485
        addAttr(rv, "AdditionalDependencies", "kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;Wsock32.lib;winmm.lib;psapi.lib");
8860
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   486
        addAttr(rv, "OutputFile", outDll);
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   487
        addAttr(rv, "SuppressStartupBanner", "true");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   488
        addAttr(rv, "ModuleDefinitionFile", outDir+Util.sep+"vm.def");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   489
        addAttr(rv, "ProgramDatabaseFile", outDir+Util.sep+"jvm.pdb");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   490
        addAttr(rv, "SubSystem", "Windows");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   491
        addAttr(rv, "BaseAddress", "0x8000000");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   492
        addAttr(rv, "ImportLibrary", outDir+Util.sep+"jvm.lib");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   493
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   494
        if(platformName.equals("Win32")) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   495
            addAttr(rv, "TargetMachine", "MachineX86");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   496
        } else {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   497
            addAttr(rv, "TargetMachine", "MachineX64");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   498
        }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   499
9131
b41df1504406 7034625: Product builds in Visual Studio projects should produce full symbol information
brutisso
parents: 8860
diff changeset
   500
        // We always want the /DEBUG option to get full symbol information in the pdb files
b41df1504406 7034625: Product builds in Visual Studio projects should produce full symbol information
brutisso
parents: 8860
diff changeset
   501
        addAttr(rv, "GenerateDebugInformation", "true");
b41df1504406 7034625: Product builds in Visual Studio projects should produce full symbol information
brutisso
parents: 8860
diff changeset
   502
8860
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   503
        return rv;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   504
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   505
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   506
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   507
    Vector getDebugLinkerFlags() {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   508
        Vector rv = new Vector();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   509
9131
b41df1504406 7034625: Product builds in Visual Studio projects should produce full symbol information
brutisso
parents: 8860
diff changeset
   510
        // Empty now that /DEBUG option is used by all configs
8860
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   511
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   512
        return rv;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   513
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   514
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   515
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   516
    Vector getProductLinkerFlags() {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   517
        Vector rv = new Vector();
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   518
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   519
        // Set /OPT:REF option.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   520
        addAttr(rv, "OptimizeReferences", "true");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   521
        // Set /OPT:ICF option.
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   522
        addAttr(rv, "EnableCOMDATFolding", "true");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   523
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   524
        return rv;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   525
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   526
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   527
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   528
    void getAdditionalNonKernelLinkerFlags(Vector rv) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   529
        extAttr(rv, "AdditionalOptions", " /export:AsyncGetCallTrace");
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   530
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   531
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   532
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   533
    String getOptFlag() {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   534
        return "MaxSpeed";
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   535
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   536
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   537
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   538
    String getNoOptFlag() {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   539
        return "Disabled";
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   540
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   541
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   542
    @Override
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   543
    String makeCfgName(String flavourBuild, String platform) {
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   544
        return  flavourBuild + "|" + platform;
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   545
    }
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   546
98a7ff20acf0 7031571: Generate native VS2010 project files
sla
parents:
diff changeset
   547
}