updated create_project tool for residual, but not tested yet

This commit is contained in:
Pawel Kolodziejski
2011-04-16 13:15:33 +02:00
parent 251d332674
commit f5e687ac0e
8 changed files with 601 additions and 100 deletions
+23 -23
View File
@@ -54,22 +54,22 @@ int VisualStudioProvider::getVisualStudioVersion() {
if (_version == 8)
return 2005;
error("Unsupported version passed to createScummVMSolution");
error("Unsupported version passed to createResidualSolution");
}
#define OUTPUT_CONFIGURATION_SCUMMVM(config, platform, props) { \
project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_" << config << props << ".vsprops\">\n" \
#define OUTPUT_CONFIGURATION_RESIDUAL(config, platform, props) { \
project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\Residual_" << config << props << ".vsprops\">\n" \
"\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n" \
"\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" \
"\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/residual.exe\"\n" \
"\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" \
"\t\t\t/>\n" \
"\t\t</Configuration>\n"; \
}
#define OUTPUT_CONFIGURATION_SCUMMVM_DEBUG(config, platform, props, isWin32) { \
project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_" << config << props << ".vsprops\">\n" \
#define OUTPUT_CONFIGURATION_RESIDUAL_DEBUG(config, platform, props, isWin32) { \
project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\Residual_" << config << props << ".vsprops\">\n" \
"\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n" \
"\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" \
"\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/residual.exe\"\n" \
"\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" \
"\t\t\t/>\n"; \
if (setup.runBuildEvents) { \
@@ -84,7 +84,7 @@ int VisualStudioProvider::getVisualStudioVersion() {
}
#define OUTPUT_CONFIGURATION(config, platform, props) { \
project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_" << config << props << ".vsprops\">\n" \
project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\Residual_" << config << props << ".vsprops\">\n" \
"\t\t\t<Tool Name=\"VCCLCompilerTool\" "<< toolConfig << "/>\n" \
"\t\t</Configuration>\n"; \
}
@@ -118,24 +118,24 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
// Check for project-specific warnings:
std::map< std::string, std::list<std::string> >::iterator warningsIterator = _projectWarnings.find(name);
if (name == "scummvm") {
if (name == "residual") {
std::string libraries;
for (StringList::const_iterator i = setup.libraries.begin(); i != setup.libraries.end(); ++i)
libraries += ' ' + *i + ".lib";
// Win32
OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Debug", "Win32", "", true);
OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "Win32", "", true);
OUTPUT_CONFIGURATION_SCUMMVM("Release", "Win32", "");
OUTPUT_CONFIGURATION_RESIDUAL_DEBUG("Debug", "Win32", "", true);
OUTPUT_CONFIGURATION_RESIDUAL_DEBUG("Analysis", "Win32", "", true);
OUTPUT_CONFIGURATION_RESIDUAL("Release", "Win32", "");
// x64
// For 'x64' we must disable NASM support. Usually we would need to disable the "nasm" feature for that and
// re-create the library list, BUT since NASM doesn't link any additional libraries, we can just use the
// libraries list created for IA-32. If that changes in the future, we need to adjust this part!
OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Debug", "x64", "64", true);
OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "x64", "64", true);
OUTPUT_CONFIGURATION_SCUMMVM("Release", "x64", "64");
OUTPUT_CONFIGURATION_RESIDUAL_DEBUG("Debug", "x64", "64", true);
OUTPUT_CONFIGURATION_RESIDUAL_DEBUG("Analysis", "x64", "64", true);
OUTPUT_CONFIGURATION_RESIDUAL("Release", "x64", "64");
} else {
std::string warnings = "";
@@ -180,7 +180,7 @@ void VisualStudioProvider::writeReferences(std::ofstream &output) {
output << "\tProjectSection(ProjectDependencies) = postProject\n";
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
if (i->first == "scummvm")
if (i->first == "residual")
continue;
output << "\t\t{" << i->second << "} = {" << i->second << "}\n";
@@ -205,7 +205,7 @@ void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int b
"<VisualStudioPropertySheet\n"
"\tProjectType=\"Visual C++\"\n"
"\tVersion=\"8.00\"\n"
"\tName=\"ScummVM_Global\"\n"
"\tName=\"Residual_Global\"\n"
"\tOutputDirectory=\"$(ConfigurationName)" << bits << "\"\n"
"\tIntermediateDirectory=\"$(ConfigurationName)" << bits << "/$(ProjectName)\"\n"
"\t>\n"
@@ -213,7 +213,7 @@ void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int b
"\t\tName=\"VCCLCompilerTool\"\n"
"\t\tDisableLanguageExtensions=\"true\"\n"
"\t\tDisableSpecificWarnings=\"" << warnings << "\"\n"
"\t\tAdditionalIncludeDirectories=\"" << prefix << ";" << prefix << "\\engines;$(SCUMMVM_LIBS)\\include\"\n"
"\t\tAdditionalIncludeDirectories=\"" << prefix << ";" << prefix << "\\engines;$(RESIDUAL_LIBS)\\include\"\n"
"\t\tPreprocessorDefinitions=\"" << definesList << "\"\n"
"\t\tExceptionHandling=\"0\"\n"
"\t\tRuntimeTypeInfo=\"false\"\n"
@@ -230,7 +230,7 @@ void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int b
"\t\tIgnoreDefaultLibraryNames=\"\"\n"
"\t\tSubSystem=\"1\"\n"
"\t\tEntryPointSymbol=\"WinMainCRTStartup\"\n"
"\t\tAdditionalLibraryDirectories=\"$(SCUMMVM_LIBS)\\lib\\" << ((bits == 32) ? "x86" : "x64") << "\"\n"
"\t\tAdditionalLibraryDirectories=\"$(RESIDUAL_LIBS)\\lib\\" << ((bits == 32) ? "x86" : "x64") << "\"\n"
"\t/>\n"
"\t<Tool\n"
"\t\tName=\"VCResourceCompilerTool\"\n"
@@ -246,16 +246,16 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea
const std::string outputType = (enableAnalysis ? "Analysis" : (isRelease ? "Release" : "Debug"));
const std::string outputBitness = (isWin32 ? "32" : "64");
std::ofstream properties((setup.outputDir + '/' + "ScummVM_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
std::ofstream properties((setup.outputDir + '/' + "Residual_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
if (!properties)
error("Could not open \"" + setup.outputDir + '/' + "ScummVM_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
error("Could not open \"" + setup.outputDir + '/' + "Residual_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
properties << "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n"
"<VisualStudioPropertySheet\n"
"\tProjectType=\"Visual C++\"\n"
"\tVersion=\"8.00\"\n"
"\tName=\"ScummVM_" << outputType << outputBitness << "\"\n"
"\tInheritedPropertySheets=\".\\ScummVM_Global" << (isWin32 ? "" : "64") << ".vsprops\"\n"
"\tName=\"Residual_" << outputType << outputBitness << "\"\n"
"\tInheritedPropertySheets=\".\\Residual_Global" << (isWin32 ? "" : "64") << ".vsprops\"\n"
"\t>\n"
"\t<Tool\n"
"\t\tName=\"VCCLCompilerTool\"\n";