[Scummvm-cvs-logs] scummvm master -> b9262bd70c8bf9aa1660bd93a36f59253179bb7e

Littleboy littleboy22 at gmail.com
Fri Apr 22 20:48:28 CEST 2011


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1f660237a4 CREATE_PROJECT: Change build events to also be run in release builds
b9262bd70c MOHAWK: Silence MSVC warning (bug #3290528)


Commit: 1f660237a4c5b4e80af6515848e6cf0bcd7c74bc
    https://github.com/scummvm/scummvm/commit/1f660237a4c5b4e80af6515848e6cf0bcd7c74bc
Author: Littleboy (littleboy at users.sourceforge.net)
Date: 2011-04-22T11:45:12-07:00

Commit Message:
CREATE_PROJECT: Change build events to also be run in release builds

Unofficial builds using MSVC in release mode will benefit from having a revision number available

Changed paths:
    devtools/create_project/msbuild.cpp
    devtools/create_project/visualstudio.cpp



diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 7351121..070d7fe 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -267,13 +267,10 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
 		           "\t\t</Link>\n";
 
 		if (setup.runBuildEvents) {
-			// Only generate revision number in debug builds
-			if (!isRelease) {
-				project << "\t\t<PreBuildEvent>\n"
-						   "\t\t\t<Message>Generate internal_version.h</Message>\n"
-						   "\t\t\t<Command>" << getPreBuildEvent() << "</Command>\n"
-						   "\t\t</PreBuildEvent>\n";
-			}
+			project << "\t\t<PreBuildEvent>\n"
+			           "\t\t\t<Message>Generate internal_version_build.h</Message>\n"
+			           "\t\t\t<Command>" << getPreBuildEvent() << "</Command>\n"
+			           "\t\t</PreBuildEvent>\n";
 
 			// Copy data files to the build folder
 			project << "\t\t<PostBuildEvent>\n"
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index 2b7c890..390d0fb 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -57,13 +57,24 @@ int VisualStudioProvider::getVisualStudioVersion() {
 	error("Unsupported version passed to createScummVMSolution");
 }
 
-#define OUTPUT_CONFIGURATION_SCUMMVM(config, platform, props) { \
+#define OUTPUT_BUILD_EVENTS(isWin32) \
+	if (setup.runBuildEvents) { \
+		project << "\t\t\t<Tool\tName=\"VCPreBuildEventTool\"\n" \
+		           "\t\t\t\tCommandLine=\"" << getPreBuildEvent() << "\"\n" \
+		           "\t\t\t/>\n" \
+		           "\t\t\t<Tool\tName=\"VCPostBuildEventTool\"\n" \
+		           "\t\t\t\tCommandLine=\"" << getPostBuildEvent(isWin32) << "\"\n" \
+		           "\t\t\t/>\n"; \
+	}
+
+#define OUTPUT_CONFIGURATION_SCUMMVM(config, platform, props, isWin32) { \
 	project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_" << 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\tAdditionalDependencies=\"" << libraries << "\"\n" \
-	           "\t\t\t/>\n" \
-	           "\t\t</Configuration>\n"; \
+	           "\t\t\t/>\n"; \
+	OUTPUT_BUILD_EVENTS(isWin32) \
+	project << "\t\t</Configuration>\n"; \
 }
 
 #define OUTPUT_CONFIGURATION_SCUMMVM_DEBUG(config, platform, props, isWin32) { \
@@ -72,14 +83,7 @@ int VisualStudioProvider::getVisualStudioVersion() {
 	           "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" \
 	           "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" \
 	           "\t\t\t/>\n"; \
-	if (setup.runBuildEvents) { \
-		project << "\t\t\t<Tool\tName=\"VCPreBuildEventTool\"\n" \
-				   "\t\t\t\tCommandLine=\"" << getPreBuildEvent() << "\"\n" \
-				   "\t\t\t/>\n" \
-				   "\t\t\t<Tool\tName=\"VCPostBuildEventTool\"\n" \
-				   "\t\t\t\tCommandLine=\"" << getPostBuildEvent(isWin32) << "\"\n" \
-				   "\t\t\t/>\n"; \
-	} \
+	OUTPUT_BUILD_EVENTS(isWin32) \
 	project << "\t\t</Configuration>\n"; \
 }
 
@@ -127,15 +131,15 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 		// Win32
 		OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Debug", "Win32", "", true);
 		OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "Win32", "", true);
-		OUTPUT_CONFIGURATION_SCUMMVM("Release", "Win32", "");
+		OUTPUT_CONFIGURATION_SCUMMVM("Release", "Win32", "", true);
 
 		// 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_SCUMMVM_DEBUG("Debug", "x64", "64", false);
+		OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "x64", "64", false);
+		OUTPUT_CONFIGURATION_SCUMMVM("Release", "x64", "64", false);
 
 	} else {
 		std::string warnings = "";


Commit: b9262bd70c8bf9aa1660bd93a36f59253179bb7e
    https://github.com/scummvm/scummvm/commit/b9262bd70c8bf9aa1660bd93a36f59253179bb7e
Author: Littleboy (littleboy at users.sourceforge.net)
Date: 2011-04-22T11:45:14-07:00

Commit Message:
MOHAWK: Silence MSVC warning (bug #3290528)

Changed paths:
    engines/mohawk/livingbooks.cpp



diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 7f6c3cc..22ea8d0 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -2004,7 +2004,7 @@ LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::Seeka
 				size -= target.size() + 1;
 			}
 
-			if (size % 2 != oldAlign) {
+			if ((uint)(size % 2) != oldAlign) {
 				stream->skip(1);
 				size--;
 			}






More information about the Scummvm-git-logs mailing list