private static void SetConfigurationParameters(ProjectStruct inProject) { SolutionStruct solutionData = SolutionAnalyzer.Get().solutionData; for (int i = 0; i < 4; ++i) { String Configuration = (i > 1) ? "Debug" : "Release"; String Plateform = (i % 2 == 0) ? "Win32" : "x64"; ProjLibrary.BeginXmlCategory("PropertyGroup", "Condition=\"'$(Configuration)|$(Platform)'=='" + Configuration + "|" + Plateform + "'\" Label=\"Configuration\""); { if (inProject.ProjectType == "StaticLibrary") { ProjLibrary.AddXmlValue("ConfigurationType", "StaticLibrary"); } if (Configuration == "Debug") { ProjLibrary.AddXmlValue("UseDebugLibraries", "true"); } if (Configuration != "Debug") { ProjLibrary.AddXmlValue("UseDebugLibraries", "false"); } ProjLibrary.AddXmlValue("PlatformToolset", solutionData.PlatformToolset); ProjLibrary.AddXmlValue("WholeProgramOptimization", "false"); ProjLibrary.AddXmlValue("CharacterSet", "MultiByte"); ProjLibrary.AddXmlValue("CharacterSet", "MultiByte"); } ProjLibrary.EndXmlCategory("PropertyGroup"); } }
private static void SetProjectConfigs(ProjectStruct inProject) { SolutionStruct solutionData = SolutionAnalyzer.Get().solutionData; ProjLibrary.BeginXmlCategory("PropertyGroup", "Label =\"Globals\""); { ProjLibrary.AddXmlValue("VCProjectVersion", solutionData.ToolVersion); ProjLibrary.AddXmlValue("ProjectGuid", inProject.ProjectName); ProjLibrary.AddXmlValue("RootNamespace", inProject.ProjectName); ProjLibrary.AddXmlValue("WindowsTargetPlatformVersion", solutionData.WindowTargetPlateformVersion); } ProjLibrary.EndXmlCategory("PropertyGroup"); }
private static void SetPropertyPath(ProjectStruct inProject) { SolutionStruct solutionData = SolutionAnalyzer.Get().solutionData; for (int i = 0; i < 4; ++i) { String Configuration = (i > 1) ? "Debug" : "Release"; String Plateform = (i % 2 == 0) ? "Win32" : "x64"; ProjLibrary.BeginXmlCategory("PropertyGroup", "Condition=\"'$(Configuration)|$(Platform)'=='" + Configuration + "|" + Plateform + "'\""); { ProjLibrary.AddXmlValue("IncludePath", SolutionAnalyzer.StackStringList(SolutionAnalyzer.Get().GetIncludes(inProject.ProjectName)) + "$(IncludePath)"); ProjLibrary.AddXmlValue("LibraryPath", "$(SolutionDir)" + solutionData.LibraryOutputFolder + "\\" + Configuration + "\\" + Plateform + "\\" + inProject.ProjectName + ";$(LibraryPath)"); ProjLibrary.AddXmlValue("OutDir", "$(SolutionDir)" + (inProject.ProjectType == "StaticLibrary" ? solutionData.LibraryOutputFolder : solutionData.ExecutableOutputFolder) + "\\" + Configuration + "\\" + Plateform + "\\" + inProject.ProjectName + "\\"); ProjLibrary.AddXmlValue("IntDir", "$(SolutionDir)" + solutionData.BinariesFolder + "\\" + Configuration + "\\" + Plateform + "\\" + inProject.ProjectName + "\\"); } ProjLibrary.EndXmlCategory("PropertyGroup"); } }
public static String BuildUserFileString(ProjectStruct inProject) { SolutionStruct solutionData = SolutionAnalyzer.Get().solutionData; ProjLibrary.BeginXmlEdition(); ProjLibrary.BeginXmlCategory("Project", "ToolsVersion=\"Current\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\""); { for (int i = 0; i < 4; ++i) { String Configuration = (i > 1) ? "Debug" : "Release"; String Plateform = (i % 2 == 0) ? "Win32" : "x64"; ProjLibrary.BeginXmlCategory("PropertyGroup", "Condition=\"'$(Configuration)|$(Platform)'=='" + Configuration + "|" + Plateform + "'\" Label=\"Configuration\""); { ProjLibrary.AddXmlValue("LocalDebuggerWorkingDirectory", "$(SolutionDir)" + solutionData.ExecutableOutputFolder + "\\" + Configuration + "\\" + Plateform + "\\" + inProject.ProjectName + "\\"); ProjLibrary.AddXmlValue("DebuggerFlavor", "WindowsLocalDebugger"); } ProjLibrary.EndXmlCategory("PropertyGroup"); } } ProjLibrary.EndXmlCategory("Project"); return(ProjLibrary.GetXmlString()); }
private static void SetCompilationValues(ProjectStruct inProject) { SolutionStruct solutionData = SolutionAnalyzer.Get().solutionData; for (int i = 0; i < 4; ++i) { String Configuration = (i > 1) ? "Debug" : "Release"; String Plateform = (i % 2 == 0) ? "Win32" : "x64"; ProjLibrary.BeginXmlCategory("ItemDefinitionGroup", "Condition=\"'$(Configuration)|$(Platform)' == '" + Configuration + "|" + Plateform + "'\""); { ProjLibrary.BeginXmlCategory("ClCompile"); { ProjLibrary.AddXmlValue("WarningLevel", "Level3"); ProjLibrary.AddXmlValue("Optimization", "Disabled"); ProjLibrary.AddXmlValue("SDLCheck", "true"); ProjLibrary.AddXmlValue("ConformanceMode", "true"); ProjLibrary.AddXmlValue("RuntimeLibrary", "MultiThreadedDebugDLL"); ProjLibrary.AddXmlValue("MultiProcessorCompilation", "true"); ProjLibrary.AddXmlValue("FavorSizeOrSpeed", "Speed"); } ProjLibrary.EndXmlCategory("ClCompile"); ProjLibrary.BeginXmlCategory("Link"); { try { ProjLibrary.AddXmlValue("AdditionalDependencies", SolutionAnalyzer.StackStringList(SolutionAnalyzer.Get().GetLibraries(inProject.ProjectName, Configuration, Plateform)) + "%(AdditionalDependencies)"); } catch (Exception e) { Console.WriteLine(e.Message + "\nBuild libraries then rebuild solution files before compiling executables"); } } ProjLibrary.EndXmlCategory("Link"); } ProjLibrary.EndXmlCategory("ItemDefinitionGroup"); } }