diff options
| author | Matthew Hoops | 2011-05-11 00:30:02 -0400 | 
|---|---|---|
| committer | Matthew Hoops | 2011-05-11 00:30:28 -0400 | 
| commit | a1d41da096c0bcf502a85919cb1cb1ee471719c5 (patch) | |
| tree | 8c51419daa486f1d4833757db4715dadab6c3497 /devtools/create_project/msvc.cpp | |
| parent | accb0c2a5d0c9e7b353cda4b74f511a498ed8073 (diff) | |
| parent | 33c3e19cea2a08fbf26ecbe940763e8ee1c37d28 (diff) | |
| download | scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.gz scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.bz2 scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.zip | |
Merge remote branch 'upstream/master' into t7g-ios
Conflicts:
	audio/decoders/qdm2.h
	common/util.cpp
	engines/groovie/music.cpp
	engines/groovie/resource.h
	video/qt_decoder.cpp
	video/qt_decoder.h
Diffstat (limited to 'devtools/create_project/msvc.cpp')
| -rw-r--r-- | devtools/create_project/msvc.cpp | 35 | 
1 files changed, 20 insertions, 15 deletions
| diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp index e2fff59c46..af3aa4a519 100644 --- a/devtools/create_project/msvc.cpp +++ b/devtools/create_project/msvc.cpp @@ -23,10 +23,10 @@   *   */ +#include "config.h"  #include "msvc.h"  #include <fstream> -  #include <algorithm>  namespace CreateProjectTool { @@ -39,23 +39,23 @@ MSVCProvider::MSVCProvider(StringList &global_warnings, std::map<std::string, St  }  void MSVCProvider::createWorkspace(const BuildSetup &setup) { -	UUIDMap::const_iterator svmUUID = _uuidMap.find("scummvm"); +	UUIDMap::const_iterator svmUUID = _uuidMap.find(PROJECT_NAME);  	if (svmUUID == _uuidMap.end()) -		error("No UUID for \"scummvm\" project created"); +		error("No UUID for \"" PROJECT_NAME "\" project created");  	const std::string svmProjectUUID = svmUUID->second;  	assert(!svmProjectUUID.empty());  	std::string solutionUUID = createUUID(); -	std::ofstream solution((setup.outputDir + '/' + "scummvm.sln").c_str()); +	std::ofstream solution((setup.outputDir + '/' + PROJECT_NAME ".sln").c_str());  	if (!solution) -		error("Could not open \"" + setup.outputDir + '/' + "scummvm.sln\" for writing"); +		error("Could not open \"" + setup.outputDir + '/' + PROJECT_NAME ".sln\" for writing");  	solution << "Microsoft Visual Studio Solution File, Format Version " << _version + 1 << ".00\n";  	solution << "# Visual Studio " << getVisualStudioVersion() << "\n"; -	solution << "Project(\"{" << solutionUUID << "}\") = \"scummvm\", \"scummvm" << getProjectExtension() << "\", \"{" << svmProjectUUID << "}\"\n"; +	solution << "Project(\"{" << solutionUUID << "}\") = \"" << PROJECT_NAME << "\", \"" << PROJECT_NAME << getProjectExtension() << "\", \"{" << svmProjectUUID << "}\"\n";  	// Project dependencies are moved to vcxproj files in Visual Studio 2010  	if (_version < 10) @@ -65,7 +65,7 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) {  	// Note we assume that the UUID map only includes UUIDs for enabled engines!  	for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) { -		if (i->first == "scummvm") +		if (i->first == PROJECT_NAME)  			continue;  		solution << "Project(\"{" << solutionUUID << "}\") = \"" << i->first << "\", \"" << i->first << getProjectExtension() << "\", \"{" << i->second << "}\"\n" @@ -120,16 +120,16 @@ void MSVCProvider::createOtherBuildFiles(const BuildSetup &setup) {  }  void MSVCProvider::createGlobalProp(const BuildSetup &setup) { -	std::ofstream properties((setup.outputDir + '/' + "ScummVM_Global" + getPropertiesExtension()).c_str()); +	std::ofstream properties((setup.outputDir + '/' + PROJECT_DESCRIPTION "_Global" + getPropertiesExtension()).c_str());  	if (!properties) -		error("Could not open \"" + setup.outputDir + '/' + "ScummVM_Global" + getPropertiesExtension() + "\" for writing"); +		error("Could not open \"" + setup.outputDir + '/' + PROJECT_DESCRIPTION "_Global" + getPropertiesExtension() + "\" for writing"); -	outputGlobalPropFile(properties, 32, setup.defines, convertPathToWin(setup.filePrefix)); +	outputGlobalPropFile(properties, 32, setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);  	properties.close(); -	properties.open((setup.outputDir + '/' + "ScummVM_Global64" + getPropertiesExtension()).c_str()); +	properties.open((setup.outputDir + '/' + PROJECT_DESCRIPTION "_Global64" + getPropertiesExtension()).c_str());  	if (!properties) -		error("Could not open \"" + setup.outputDir + '/' + "ScummVM_Global64" + getPropertiesExtension() + "\" for writing"); +		error("Could not open \"" + setup.outputDir + '/' + PROJECT_DESCRIPTION "_Global64" + getPropertiesExtension() + "\" for writing");  	// HACK: We must disable the "nasm" feature for x64. To achieve that we must duplicate the feature list and  	// recreate a define list. @@ -143,7 +143,7 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) {  	x64Defines.push_back("WIN32");  	x64Defines.push_back("SDL_BACKEND"); -	outputGlobalPropFile(properties, 64, x64Defines, convertPathToWin(setup.filePrefix)); +	outputGlobalPropFile(properties, 64, x64Defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);  }  std::string MSVCProvider::getPreBuildEvent() const { @@ -152,13 +152,13 @@ std::string MSVCProvider::getPreBuildEvent() const {  	cmdLine = "@echo off\n"  	          "echo Executing Pre-Build script...\n"  			  "echo.\n" -			  "@call "$(SolutionDir)../../devtools/create_project/scripts/prebuild.cmd" "$(SolutionDir)/../.."\n" +			  "@call "$(SolutionDir)../../devtools/create_project/scripts/prebuild.cmd" "$(SolutionDir)/../.."  "$(TargetDir)"\n"  	          "EXIT /B0";  	return cmdLine;  } -std::string MSVCProvider::getPostBuildEvent(bool isWin32) const { +std::string MSVCProvider::getPostBuildEvent(bool isWin32, bool createInstaller) const {  	std::string cmdLine = "";  	cmdLine = "@echo off\n" @@ -168,6 +168,11 @@ std::string MSVCProvider::getPostBuildEvent(bool isWin32) const {  	cmdLine += (isWin32) ? "x86" : "x64"; +	cmdLine += " %SCUMMVM_LIBS% "; + +	// Specify if installer needs to be built or not +	cmdLine += (createInstaller ? "1" : "0"); +  	cmdLine += "\n"  	           "EXIT /B0"; | 
