[Scummvm-git-logs] scummvm master -> bb9dddcd04f6237a4708eac731b6b7e8ac3090cf

sev- sev at scummvm.org
Wed Jul 15 13:31:11 UTC 2020


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

Summary:
0de86d6fbf CREATE_PROJECT: Add option to use canonical library names
a23b1789db CREATE_PROJECT: Add ability to remove feature from setup
3d3b0124ad CREATE_PROJECT: Make MSVC project understand more architectures
e0505d5fbf COMMON: Add MSVC ARM64 support
eed727474f AUDIO: Fix linking with vcpkg-provided FLAC
6b1fb8fc8f CREATE_PROJECT: Sort libraries to be returned
c763e56d57 CREATE_PROJECT: Address review comments
7a5c4e6121 CREATE_PROJECT: Remove C++11
ef803ee080 CREATE_PROJECT: Old Visual Studio doesn't support ARM64
26591c1341 CREATE_PROJECT: Add missing is_open check
680da50b81 CREATE_PROJECT: Remove C++11
95d191e19a CREATE_PROJECT: Fix VS2008 property names
fb2a740dc7 JANITORIAL: Use C++03 standard in clang-format rules
bb9dddcd04 CREATE_PROJECT: JANITORIAL: Apply code formatting


Commit: 0de86d6fbf37c93980ec2f054df1f0a342e7c8ec
    https://github.com/scummvm/scummvm/commit/0de86d6fbf37c93980ec2f054df1f0a342e7c8ec
Author: Michał Janiszewski (janisozaur+scummvm at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: Add option to use canonical library names

This allows for easier plugging in of alternative providers of libraries

Changed paths:
    devtools/create_project/create_project.cpp
    devtools/create_project/create_project.h


diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 5b5b4271fe..bbfbc3fe3a 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -283,6 +283,8 @@ int main(int argc, char *argv[]) {
 			setup.tests = true;
 		} else if (!std::strcmp(argv[i], "--sdl1")) {
 			setup.useSDL2 = false;
+		} else if (!std::strcmp(argv[i], "--use-canonical-lib-names")) {
+			setup.useCanonicalLibNames = true;
 		} else {
 			std::cerr << "ERROR: Unknown parameter \"" << argv[i] << "\"\n";
 			return -1;
@@ -431,6 +433,12 @@ int main(int argc, char *argv[]) {
 		setup.libraries.push_back("sdl2");
 	}
 
+	if (setup.useCanonicalLibNames) {
+		for (auto& lib : setup.libraries) {
+			lib = getCanonicalLibName(lib);
+		}
+	}
+
 	// Add additional project-specific library
 #ifdef ADDITIONAL_LIBRARY
 	setup.libraries.push_back(ADDITIONAL_LIBRARY);
@@ -704,49 +712,52 @@ void displayHelp(const char *exe) {
 	        " Additionally there are the following switches for changing various settings:\n"
 	        "\n"
 	        "Project specific settings:\n"
-	        " --cmake                  build CMake project files\n"
-	        " --codeblocks             build Code::Blocks project files\n"
-	        " --msvc                   build Visual Studio project files\n"
-	        " --xcode                  build XCode project files\n"
-	        " --file-prefix prefix     allow overwriting of relative file prefix in the\n"
-	        "                          MSVC project files. By default the prefix is the\n"
-	        "                          \"path\\to\\source\" argument\n"
-	        " --output-dir path        overwrite path, where the project files are placed\n"
-	        "                          By default this is \".\", i.e. the current working\n"
-	        "                          directory\n"
+	        " --cmake                    build CMake project files\n"
+	        " --codeblocks               build Code::Blocks project files\n"
+	        " --msvc                     build Visual Studio project files\n"
+	        " --xcode                    build XCode project files\n"
+	        " --file-prefix prefix       allow overwriting of relative file prefix in the\n"
+	        "                            MSVC project files. By default the prefix is the\n"
+	        "                            \"path\\to\\source\" argument\n"
+	        " --output-dir path          overwrite path, where the project files are placed\n"
+	        "                            By default this is \".\", i.e. the current working\n"
+	        "                            directory\n"
 	        "\n"
 	        "MSVC specific settings:\n"
-	        " --msvc-version version   set the targeted MSVC version. Possible values:\n";
+	        " --msvc-version version     set the targeted MSVC version. Possible values:\n";
 
 	const MSVCList msvc = getAllMSVCVersions();
 	for (MSVCList::const_iterator i = msvc.begin(); i != msvc.end(); ++i)
 		cout << "                           " << i->version << " stands for \"" << i->name << "\"\n";
 
-	cout << "                           If no version is set, the latest installed version is used\n"
-	        " --build-events           Run custom build events as part of the build\n"
-	        "                          (default: false)\n"
-	        " --installer              Create installer after the build (implies --build-events)\n"
-	        "                          (default: false)\n"
-	        " --tools                  Create project files for the devtools\n"
-	        "                          (ignores --build-events and --installer, as well as engine settings)\n"
-	        "                          (default: false)\n"
-	        " --tests                  Create project files for the tests\n"
-	        "                          (ignores --build-events and --installer, as well as engine settings)\n"
-	        "                          (default: false)\n"
+	cout << "                            If no version is set, the latest installed version is used\n"
+	        " --build-events             Run custom build events as part of the build\n"
+	        "                            (default: false)\n"
+	        " --installer                Create installer after the build (implies --build-events)\n"
+	        "                            (default: false)\n"
+	        " --tools                    Create project files for the devtools\n"
+	        "                            (ignores --build-events and --installer, as well as engine settings)\n"
+	        "                            (default: false)\n"
+	        " --tests                    Create project files for the tests\n"
+	        "                            (ignores --build-events and --installer, as well as engine settings)\n"
+	        "                            (default: false)\n"
+            " --use-canonical-lib-names  Use canonical library names for linking. This makes it easy to use\n"
+            "                            e.g. vcpkg-provided libraries\n"
+	        "                            (default: false)\n"
 	        "\n"
 	        "Engines settings:\n"
-	        " --list-engines           list all available engines and their default state\n"
-	        " --enable-engine=<name>   enable building of the engine with the name \"name\"\n"
-	        " --disable-engine=<name>  disable building of the engine with the name \"name\"\n"
-	        " --enable-all-engines     enable building of all engines\n"
-	        " --disable-all-engines    disable building of all engines\n"
+	        " --list-engines             list all available engines and their default state\n"
+	        " --enable-engine=<name>     enable building of the engine with the name \"name\"\n"
+	        " --disable-engine=<name>    disable building of the engine with the name \"name\"\n"
+	        " --enable-all-engines       enable building of all engines\n"
+	        " --disable-all-engines      disable building of all engines\n"
 	        "\n"
 	        "Optional features settings:\n"
-	        " --enable-<name>          enable inclusion of the feature \"name\"\n"
-	        " --disable-<name>         disable inclusion of the feature \"name\"\n"
+	        " --enable-<name>            enable inclusion of the feature \"name\"\n"
+	        " --disable-<name>           disable inclusion of the feature \"name\"\n"
 	        "\n"
 	        "SDL settings:\n"
-	        " --sdl1                   link to SDL 1.2, instead of SDL 2.0\n"
+	        " --sdl1                     link to SDL 1.2, instead of SDL 2.0\n"
 	        "\n"
 	        " There are the following features available:\n"
 	        "\n";
@@ -1111,8 +1122,31 @@ const MSVCVersion s_msvc[] = {
 	{ 15,    "Visual Studio 2017",    "12.00",            "15",    "15.0",    "v141",    "llvm"        },
 	{ 16,    "Visual Studio 2019",    "12.00",    "Version 16",    "16.0",    "v142",    "llvm"        }
 };
+
+const std::map<std::string, std::string> s_canonical_lib_name_map = {
+	{ "jpeg-static", "jpeg" },
+	{ "libfaad", "faad" },
+	{ "libFLAC_static", "FLAC" },
+	{ "libfluidsynth", "fluidsynth" },
+	{ "libmad", "mad" },
+	{ "libmpeg2", "mpeg2" },
+	{ "libogg_static", "ogg" },
+	{ "libtheora_static", "theora" },
+	{ "libvorbis_static", "vorbis" },
+	{ "libvorbisfile_static", "vorbisfile" },
+	{ "SDL_net", "SDL2_net" }, // Only support SDL2
+	{ "win_utf8_io_static", "FLAC" }, // This is some FLAC-specific library not needed with vcpkg, but as there's '.lib' appended to each library, we can't set it to empty, so set it to FLAC again instead
+};
 } // End of anonymous namespace
 
+std::string getCanonicalLibName(std::string lib) {
+	auto it = s_canonical_lib_name_map.find(lib);
+	if (it != s_canonical_lib_name_map.end()) {
+		return it->second;
+	}
+	return lib;
+}
+
 FeatureList getAllFeatures() {
 	const size_t featureCount = sizeof(s_features) / sizeof(s_features[0]);
 
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index 19c2ba094b..9e2746a3ce 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -242,18 +242,20 @@ struct BuildSetup {
 	StringList libraries; ///< List of all external libraries required for the build.
 	StringList testDirs;  ///< List of all folders containing tests
 
-	bool devTools;         ///< Generate project files for the tools
-	bool tests;            ///< Generate project files for the tests
-	bool runBuildEvents;   ///< Run build events as part of the build (generate revision number and copy engine/theme data & needed files to the build folder
-	bool createInstaller;  ///< Create installer after the build
-	bool useSDL2;          ///< Whether to use SDL2 or not.
+	bool devTools;             ///< Generate project files for the tools
+	bool tests;                ///< Generate project files for the tests
+	bool runBuildEvents;       ///< Run build events as part of the build (generate revision number and copy engine/theme data & needed files to the build folder
+	bool createInstaller;      ///< Create installer after the build
+	bool useSDL2;              ///< Whether to use SDL2 or not.
+	bool useCanonicalLibNames; ///< Whether to use canonical libraries names or default ones
 
 	BuildSetup() {
-		devTools        = false;
-		tests           = false;
-		runBuildEvents  = false;
-		createInstaller = false;
-		useSDL2         = true;
+		devTools             = false;
+		tests                = false;
+		runBuildEvents       = false;
+		createInstaller      = false;
+		useSDL2              = true;
+		useCanonicalLibNames = false;
 	}
 };
 
@@ -316,6 +318,14 @@ const MSVCVersion *getMSVCVersion(int version);
  */
 int getInstalledMSVC();
 
+/**
+ * Return a "canonical" library name, so it is easier to integrate other providers of dependencies.
+ *
+ * @param lib The link library as provided by ScummVM libs.
+ * @return Canonical link library.
+ */
+std::string getCanonicalLibName(std::string lib);
+
 namespace CreateProjectTool {
 
 /**


Commit: a23b1789db78f0145cb210bb5683ec41baa02ec5
    https://github.com/scummvm/scummvm/commit/a23b1789db78f0145cb210bb5683ec41baa02ec5
Author: Michał Janiszewski (janisozaur+scummvm at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: Add ability to remove feature from setup

Changed paths:
    devtools/create_project/create_project.cpp
    devtools/create_project/create_project.h


diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index bbfbc3fe3a..998f5ab0e2 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1168,14 +1168,22 @@ StringList getFeatureDefines(const FeatureList &features) {
 	return defines;
 }
 
+StringList getFeatureLibraries(const Feature &feature) {
+	StringList libraries;
+
+	if (feature.enable && feature.libraries && feature.libraries[0]) {
+		StringList fLibraries = tokenize(feature.libraries);
+		libraries.splice(libraries.end(), fLibraries);
+	}
+
+	return libraries;
+}
+
 StringList getFeatureLibraries(const FeatureList &features) {
 	StringList libraries;
 
 	for (FeatureList::const_iterator i = features.begin(); i != features.end(); ++i) {
-		if (i->enable && i->libraries && i->libraries[0]) {
-			StringList fLibraries = tokenize(i->libraries);
-			libraries.splice(libraries.end(), fLibraries);
-		}
+		libraries.merge(getFeatureLibraries(*i));
 	}
 
 	return libraries;
@@ -1200,6 +1208,26 @@ bool getFeatureBuildState(const std::string &name, FeatureList &features) {
 	}
 }
 
+BuildSetup removeFeatureFromSetup(BuildSetup setup, const std::string &feature) {
+	for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) {
+		if (i->enable && feature == i->name) {
+			StringList fribidi_libs = getFeatureLibraries(*i);
+			for (auto& lib : fribidi_libs) {
+				if (setup.useCanonicalLibNames) {
+					lib = getCanonicalLibName(lib);
+				}
+				setup.libraries.remove(lib);
+			}
+			if (i->define && i->define[0]) {
+				setup.defines.remove(i->define);
+			}
+			setup.features.erase(i);
+			break;
+		}
+	}
+	return setup;
+}
+
 ToolList getAllTools() {
 	const size_t toolCount = sizeof(s_tools) / sizeof(s_tools[0]);
 
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index 9e2746a3ce..2537475082 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -200,6 +200,14 @@ StringList getFeatureDefines(const FeatureList &features);
  */
 StringList getFeatureLibraries(const FeatureList &features);
 
+/**
+ * Returns a list of all external library files, according to the
+ * feature passed.
+ *
+ * @param features Feature for the build (this may contain features, which are *not* enabled!)
+ */
+StringList getFeatureLibraries(const Feature& feature);
+
 /**
  * Sets the state of a given feature. This can be used to
  * either include or exclude an feature.
@@ -326,6 +334,15 @@ int getInstalledMSVC();
  */
 std::string getCanonicalLibName(std::string lib);
 
+/**
+ * Removes given feature from setup.
+ *
+ * @param setup The setup to be processed.
+ * @param feature The feature to be removed
+ * @return A copy of setup less feature.
+ */
+BuildSetup removeFeatureFromSetup(BuildSetup setup, const std::string &feature);
+
 namespace CreateProjectTool {
 
 /**


Commit: 3d3b0124ad8958dde4fed610e2b10f5a5746d89b
    https://github.com/scummvm/scummvm/commit/3d3b0124ad8958dde4fed610e2b10f5a5746d89b
Author: Michał Janiszewski (janisozaur+scummvm at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: Make MSVC project understand more architectures

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


diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 998f5ab0e2..0fc5a868ab 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1137,8 +1137,28 @@ const std::map<std::string, std::string> s_canonical_lib_name_map = {
 	{ "SDL_net", "SDL2_net" }, // Only support SDL2
 	{ "win_utf8_io_static", "FLAC" }, // This is some FLAC-specific library not needed with vcpkg, but as there's '.lib' appended to each library, we can't set it to empty, so set it to FLAC again instead
 };
+
+const std::map<MSVC_Architecture, std::string> s_msvc_arch_names = {
+	{ MSVC_Architecture::ARCH_ARM64, "arm64" },
+	{   MSVC_Architecture::ARCH_X86,   "x86" },
+	{ MSVC_Architecture::ARCH_AMD64,   "x64" },
+};
+
+const std::map<MSVC_Architecture, std::string> s_msvc_config_names = {
+	{ MSVC_Architecture::ARCH_ARM64, "arm64" },
+	{   MSVC_Architecture::ARCH_X86, "Win32" },
+	{ MSVC_Architecture::ARCH_AMD64,   "x64" },
+};
 } // End of anonymous namespace
 
+std::string getMSVCArchName(MSVC_Architecture arch) {
+	return s_msvc_arch_names.at(arch);
+}
+
+std::string getMSVCConfigName(MSVC_Architecture arch) {
+	return s_msvc_config_names.at(arch);
+}
+
 std::string getCanonicalLibName(std::string lib) {
 	auto it = s_canonical_lib_name_map.find(lib);
 	if (it != s_canonical_lib_name_map.end()) {
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index 2537475082..4ad3209cfe 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -304,6 +304,15 @@ struct MSVCVersion {
 };
 typedef std::list<MSVCVersion> MSVCList;
 
+enum class MSVC_Architecture {
+	ARCH_ARM64,
+	ARCH_X86,
+	ARCH_AMD64
+};
+
+std::string getMSVCArchName(MSVC_Architecture arch);
+std::string getMSVCConfigName(MSVC_Architecture arch);
+
 /**
  * Creates a list of all supported versions of Visual Studio.
  *
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 03aa61a0cc..c6d50c32ae 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -25,6 +25,7 @@
 
 #include <fstream>
 #include <algorithm>
+#include <array>
 
 namespace CreateProjectTool {
 
@@ -80,61 +81,67 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 	           "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
 	           "\t<ItemGroup Label=\"ProjectConfigurations\">\n";
 
-	outputConfiguration(project, "Debug", "Win32");
-	outputConfiguration(project, "Debug", "x64");
-	outputConfiguration(project, "Analysis", "Win32");
-	outputConfiguration(project, "Analysis", "x64");
-	outputConfiguration(project, "LLVM", "Win32");
-	outputConfiguration(project, "LLVM", "x64");
-	outputConfiguration(project, "Release", "Win32");
-	outputConfiguration(project, "Release", "x64");
+	std::array<MSVC_Architecture, 3> archs{ MSVC_Architecture::ARCH_X86, MSVC_Architecture::ARCH_AMD64, MSVC_Architecture::ARCH_ARM64 };
 
+	for (const auto& arch : archs) {
+		// NOTE: different order
+		outputConfiguration(project, "Debug", getMSVCConfigName(arch));
+		outputConfiguration(project, "Analysis", getMSVCConfigName(arch));
+		outputConfiguration(project, "LLVM", getMSVCConfigName(arch));
+		outputConfiguration(project, "Release", getMSVCConfigName(arch));
+	}
 	project << "\t</ItemGroup>\n";
 
 	// Project name & Guid
 	project << "\t<PropertyGroup Label=\"Globals\">\n"
-	           "\t\t<ProjectGuid>{" << uuid << "}</ProjectGuid>\n"
-	           "\t\t<RootNamespace>" << name << "</RootNamespace>\n"
-	           "\t\t<Keyword>Win32Proj</Keyword>\n"
-	           "\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n"
-	           "\t</PropertyGroup>\n";
+		"\t\t<ProjectGuid>{" << uuid << "}</ProjectGuid>\n"
+		"\t\t<RootNamespace>" << name << "</RootNamespace>\n"
+		"\t\t<Keyword>Win32Proj</Keyword>\n"
+		"\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n";
+
+	for (const auto& arch : archs) {
+		project << "\t\t<VcpkgTriplet Condition=\"'$(Platform)' == '" << getMSVCConfigName(arch) << "'\">" << getMSVCArchName(arch) << "-windows</VcpkgTriplet>";
+	}
+
+	project << "\t</PropertyGroup>\n";
 
 	// Shared configuration
 	project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n";
 
-	outputConfigurationType(setup, project, name, "Release|Win32", _msvcVersion.toolsetMSVC);
-	outputConfigurationType(setup, project, name, "Analysis|Win32", _msvcVersion.toolsetMSVC);
-	outputConfigurationType(setup, project, name, "LLVM|Win32", _msvcVersion.toolsetLLVM);
-	outputConfigurationType(setup, project, name, "Debug|Win32", _msvcVersion.toolsetMSVC);
-	outputConfigurationType(setup, project, name, "Release|x64", _msvcVersion.toolsetMSVC);
-	outputConfigurationType(setup, project, name, "LLVM|x64", _msvcVersion.toolsetLLVM);
-	outputConfigurationType(setup, project, name, "Analysis|x64", _msvcVersion.toolsetMSVC);
-	outputConfigurationType(setup, project, name, "Debug|x64", _msvcVersion.toolsetMSVC);
+	for (const auto& arch : archs) {
+		outputConfigurationType(setup, project, name, "Release|" + getMSVCConfigName(arch), _msvcVersion.toolsetMSVC);
+		outputConfigurationType(setup, project, name, "Analysis" + getMSVCConfigName(arch), _msvcVersion.toolsetMSVC);
+		outputConfigurationType(setup, project, name, "LLVM|" + getMSVCConfigName(arch), _msvcVersion.toolsetLLVM);
+		outputConfigurationType(setup, project, name, "Debug|" + getMSVCConfigName(arch), _msvcVersion.toolsetMSVC);
+	}
 
 	project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n"
 	           "\t<ImportGroup Label=\"ExtensionSettings\">\n"
 	           "\t</ImportGroup>\n";
 
-	outputProperties(project, "Release|Win32",  setup.projectDescription + "_Release.props");
-	outputProperties(project, "Analysis|Win32", setup.projectDescription + "_Analysis.props");
-	outputProperties(project, "LLVM|Win32",     setup.projectDescription + "_LLVM.props");
-	outputProperties(project, "Debug|Win32",    setup.projectDescription + "_Debug.props");
-	outputProperties(project, "Release|x64",    setup.projectDescription + "_Release64.props");
-	outputProperties(project, "Analysis|x64",   setup.projectDescription + "_Analysis64.props");
-	outputProperties(project, "LLVM|x64",       setup.projectDescription + "_LLVM64.props");
-	outputProperties(project, "Debug|x64",      setup.projectDescription + "_Debug64.props");
+	for (const auto& arch : archs) {
+		outputProperties(project, "Release|" + getMSVCConfigName(arch), setup.projectDescription + "_Release" + getMSVCArchName(arch) + ".props");
+		outputProperties(project, "Analysis|" + getMSVCConfigName(arch), setup.projectDescription + "_Analysis" + getMSVCArchName(arch) + ".props");
+		outputProperties(project, "LLVM|" + getMSVCConfigName(arch), setup.projectDescription + "_LLVM" + getMSVCArchName(arch) + ".props");
+		outputProperties(project, "Debug|" + getMSVCConfigName(arch), setup.projectDescription + "_Debug" + getMSVCArchName(arch) + ".props");
+	}
 
 	project << "\t<PropertyGroup Label=\"UserMacros\" />\n";
 
 	// Project-specific settings (analysis uses debug properties)
-	outputProjectSettings(project, name, setup, false, true, "Debug");
-	outputProjectSettings(project, name, setup, false, true, "Analysis");
-	outputProjectSettings(project, name, setup, false, true, "LLVM");
-	outputProjectSettings(project, name, setup, true, true, "Release");
-	outputProjectSettings(project, name, setup, false, false, "Debug");
-	outputProjectSettings(project, name, setup, false, false, "Analysis");
-	outputProjectSettings(project, name, setup, false, false, "LLVM");
-	outputProjectSettings(project, name, setup, true, false, "Release");
+	for (const auto &arch : archs) {
+		BuildSetup archsetup = setup;
+		auto disabled_features_it = s_arch_disabled_features.find(arch);
+		if (disabled_features_it != s_arch_disabled_features.end()) {
+			for (auto feature : disabled_features_it->second) {
+				archsetup = removeFeatureFromSetup(archsetup, feature);
+			}
+		}
+		outputProjectSettings(project, name, archsetup, false, arch, "Debug");
+		outputProjectSettings(project, name, archsetup, false, arch, "Analysis");
+		outputProjectSettings(project, name, archsetup, false, arch, "LLVM");
+		outputProjectSettings(project, name, archsetup, true, arch, "Release");
+	}
 
 	// Files
 	std::string modulePath;
@@ -256,7 +263,7 @@ void MSBuildProvider::writeReferences(const BuildSetup &setup, std::ofstream &ou
 	output << "\t</ItemGroup>\n";
 }
 
-void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration) {
+void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) {
 	// Check for project-specific warnings:
 	std::map<std::string, StringList>::iterator warningsIterator = _projectWarnings.find(name);
 	bool enableLanguageExtensions = find(_enableLanguageExtensions.begin(), _enableLanguageExtensions.end(), name) != _enableLanguageExtensions.end();
@@ -271,7 +278,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
 		for (StringList::const_iterator i = warningsIterator->second.begin(); i != warningsIterator->second.end(); ++i)
 			warnings +=  *i + ';';
 
-	project << "\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='" << configuration << "|" << (isWin32 ? "Win32" : "x64") << "'\">\n"
+	project << "\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='" << configuration << "|" << getMSVCConfigName(arch) << "'\">\n"
 	           "\t\t<ClCompile>\n";
 
 	// Language Extensions
@@ -311,7 +318,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
 			// Copy data files to the build folder
 			project << "\t\t<PostBuildEvent>\n"
 					   "\t\t\t<Message>Copy data files to the build folder</Message>\n"
-					   "\t\t\t<Command>" << getPostBuildEvent(isWin32, setup) << "</Command>\n"
+					   "\t\t\t<Command>" << getPostBuildEvent(arch, setup) << "</Command>\n"
 					   "\t\t</PostBuildEvent>\n";
 		} else if (setup.tests) {
 			project << "\t\t<PreBuildEvent>\n"
@@ -324,7 +331,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
 	project << "\t</ItemDefinitionGroup>\n";
 }
 
-void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents) {
+void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, MSVC_Architecture arch, const StringList &defines, const std::string &prefix, bool runBuildEvents) {
 
 	std::string warnings;
 	for (StringList::const_iterator i = _globalWarnings.begin(); i != _globalWarnings.end(); ++i)
@@ -342,11 +349,11 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
 	              "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
 	              "\t<PropertyGroup>\n"
 	              "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_Global</_PropertySheetDisplayName>\n"
-	              "\t\t<ExecutablePath>$(" << LIBS_DEFINE << ")\\bin;$(" << LIBS_DEFINE << ")\\bin\\" << (bits == 32 ? "x86" : "x64") << ";$(ExecutablePath)</ExecutablePath>\n"
-	              "\t\t<LibraryPath>$(" << LIBS_DEFINE << ")\\lib\\" << (bits == 32 ? "x86" : "x64") << ";$(" << LIBS_DEFINE << ")\\lib\\" << (bits == 32 ? "x86" : "x64") << "\\$(Configuration);$(LibraryPath)</LibraryPath>\n"
+	              "\t\t<ExecutablePath>$(" << LIBS_DEFINE << ")\\bin;$(" << LIBS_DEFINE << ")\\bin\\" << getMSVCArchName(arch) << ";$(" << LIBS_DEFINE << ")\\$(Configuration)\\bin;$(ExecutablePath)</ExecutablePath>\n"
+	              "\t\t<LibraryPath>$(" << LIBS_DEFINE << ")\\lib\\" << getMSVCArchName(arch) << ";$(" << LIBS_DEFINE << ")\\lib\\" << getMSVCArchName(arch) << "\\$(Configuration);$(" << LIBS_DEFINE << ")\\lib;$(" << LIBS_DEFINE << ")\\$(Configuration)\\lib;$(LibraryPath)</LibraryPath>\n"
 	              "\t\t<IncludePath>$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\" << (setup.useSDL2 ? "SDL2" : "SDL") << ";$(IncludePath)</IncludePath>\n"
-	              "\t\t<OutDir>$(Configuration)" << bits << "\\</OutDir>\n"
-	              "\t\t<IntDir>$(Configuration)" << bits << "\\$(ProjectName)\\</IntDir>\n"
+	              "\t\t<OutDir>$(Configuration)" << getMSVCArchName(arch) << "\\</OutDir>\n"
+	              "\t\t<IntDir>$(Configuration)" << getMSVCArchName(arch) << "\\$(ProjectName)\\</IntDir>\n"
 	              "\t</PropertyGroup>\n"
 	              "\t<ItemDefinitionGroup>\n"
 	              "\t\t<ClCompile>\n"
@@ -387,20 +394,20 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
 	properties.flush();
 }
 
-void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration) {
-	const std::string outputBitness = (isWin32 ? "32" : "64");
+void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) {
+	const std::string outputBitness = (arch == MSVC_Architecture::ARCH_X86 ? "32" : "64");
 
-	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
+	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension()).c_str());
 	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension() + "\" for writing");
 
 	properties << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
 	              "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
 	              "\t<ImportGroup Label=\"PropertySheets\">\n"
-	              "\t\t<Import Project=\"" << setup.projectDescription << "_Global" << (isWin32 ? "" : "64") << ".props\" />\n"
+	              "\t\t<Import Project=\"" << setup.projectDescription << "_Global" << getMSVCArchName(arch) << ".props\" />\n"
 	              "\t</ImportGroup>\n"
 	              "\t<PropertyGroup>\n"
-	              "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_" << configuration << outputBitness << "</_PropertySheetDisplayName>\n"
+	              "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_" << configuration << getMSVCArchName(arch) << "</_PropertySheetDisplayName>\n"
 	              "\t\t<LinkIncremental>" << (isRelease ? "false" : "true") << "</LinkIncremental>\n"
 	              "\t\t<GenerateManifest>false</GenerateManifest>\n"
 	              "\t</PropertyGroup>\n"
@@ -432,11 +439,11 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b
 		              "\t\t\t<FunctionLevelLinking>true</FunctionLevelLinking>\n"
 		              "\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n";
 		if (_version >= 14) {
-			// Since MSVC 2015 Edit and Continue is support for x64 too.
-			properties << "\t\t\t<DebugInformationFormat>" << "EditAndContinue" << "</DebugInformationFormat>\n";
+			// Since MSVC 2015 Edit and Continue is supported for x86 and x86-64, but not for ARM.
+			properties << "\t\t\t<DebugInformationFormat>" << (arch != MSVC_Architecture::ARCH_ARM64 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n";
 		} else {
 			// Older MSVC versions did not support Edit and Continue for x64, thus we do not use it.
-			properties << "\t\t\t<DebugInformationFormat>" << (isWin32 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n";
+			properties << "\t\t\t<DebugInformationFormat>" << (arch == MSVC_Architecture::ARCH_X86 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n";
 		}
 		properties << "\t\t\t<EnablePREfast>" << (configuration == "Analysis" ? "true" : "false") << "</EnablePREfast>\n";
 
diff --git a/devtools/create_project/msbuild.h b/devtools/create_project/msbuild.h
index cb01059f3f..bf9ddf4203 100644
--- a/devtools/create_project/msbuild.h
+++ b/devtools/create_project/msbuild.h
@@ -35,16 +35,16 @@ protected:
 	void createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir,
 	                       const StringList &includeList, const StringList &excludeList);
 
-	void outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration);
+	void outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration);
 
 	void writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation,
 	                            const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
 
 	void writeReferences(const BuildSetup &setup, std::ofstream &output);
 
-	void outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents);
+	void outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, MSVC_Architecture arch, const StringList &defines, const std::string &prefix, bool runBuildEvents) override;
 
-	void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration);
+	void createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) override;
 
 	const char *getProjectExtension();
 	const char *getPropertiesExtension();
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index fad2650a0f..9a2328ab5e 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -27,6 +27,17 @@
 #include <algorithm>
 #include <cstring>
 
+
+std::map<MSVC_Architecture, StringList> s_arch_disabled_features{
+	// NASM not supported for Windows on AMD64 target
+	{ MSVC_Architecture::ARCH_AMD64, { "nasm" } },
+
+	// NASM not supported for WoA target
+	// No OpenGL, OpenGL ES on Windows on ARM
+	// https://github.com/microsoft/vcpkg/issues/11248 [fribidi] Fribidi doesn't cross-compile on x86-64 to target arm/arm64
+	{ MSVC_Architecture::ARCH_ARM64, { "nasm", "opengl", "opengles", "fribidi" } },
+};
+
 namespace CreateProjectTool {
 
 //////////////////////////////////////////////////////////////////////////
@@ -86,6 +97,10 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) {
 	            "\t\tAnalysis|x64 = Analysis|x64\n"
 	            "\t\tLLVM|x64 = LLVM|x64\n"
 	            "\t\tRelease|x64 = Release|x64\n"
+	            "\t\tDebug|arm64 = Debug|arm64\n"
+	            "\t\tAnalysis|arm64 = Analysis|arm64\n"
+	            "\t\tLLVM|arm64 = LLVM|arm64\n"
+	            "\t\tRelease|arm64 = Release|arm64\n"
 	            "\tEndGlobalSection\n"
 	            "\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n";
 
@@ -105,7 +120,15 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) {
 		            "\t\t{" << i->second << "}.LLVM|x64.ActiveCfg = LLVM|x64\n"
 		            "\t\t{" << i->second << "}.LLVM|x64.Build.0 = LLVM|x64\n"
 		            "\t\t{" << i->second << "}.Release|x64.ActiveCfg = Release|x64\n"
-		            "\t\t{" << i->second << "}.Release|x64.Build.0 = Release|x64\n";
+		            "\t\t{" << i->second << "}.Release|x64.Build.0 = Release|x64\n"
+		            "\t\t{" << i->second << "}.Debug|arm64.ActiveCfg = Debug|arm64\n"
+		            "\t\t{" << i->second << "}.Debug|arm64.Build.0 = Debug|arm64\n"
+		            "\t\t{" << i->second << "}.Analysis|arm64.ActiveCfg = Analysis|arm64\n"
+		            "\t\t{" << i->second << "}.Analysis|arm64.Build.0 = Analysis|arm64\n"
+		            "\t\t{" << i->second << "}.LLVM|arm64.ActiveCfg = LLVM|arm64\n"
+		            "\t\t{" << i->second << "}.LLVM|arm64.Build.0 = LLVM|arm64\n"
+		            "\t\t{" << i->second << "}.Release|arm64.ActiveCfg = Release|arm64\n"
+		            "\t\t{" << i->second << "}.Release|arm64.Build.0 = Release|arm64\n";
 	}
 
 	solution << "\tEndGlobalSection\n"
@@ -121,14 +144,18 @@ void MSVCProvider::createOtherBuildFiles(const BuildSetup &setup) {
 
 	// Create the configuration property files (for Debug and Release with 32 and 64bits versions)
 	// Note: we use the debug properties for the analysis configuration
-	createBuildProp(setup, true, false, "Release");
-	createBuildProp(setup, true, true, "Release");
-	createBuildProp(setup, false, false, "Debug");
-	createBuildProp(setup, false, true, "Debug");
-	createBuildProp(setup, false, false, "Analysis");
-	createBuildProp(setup, false, true, "Analysis");
-	createBuildProp(setup, false, false, "LLVM");
-	createBuildProp(setup, false, true, "LLVM");
+	createBuildProp(setup, true, MSVC_Architecture::ARCH_AMD64, "Release");
+	createBuildProp(setup, true, MSVC_Architecture::ARCH_X86, "Release");
+	createBuildProp(setup, true, MSVC_Architecture::ARCH_ARM64, "Release");
+	createBuildProp(setup, false, MSVC_Architecture::ARCH_AMD64, "Debug");
+	createBuildProp(setup, false, MSVC_Architecture::ARCH_X86, "Debug");
+	createBuildProp(setup, false, MSVC_Architecture::ARCH_ARM64, "Debug");
+	createBuildProp(setup, false, MSVC_Architecture::ARCH_AMD64, "Analysis");
+	createBuildProp(setup, false, MSVC_Architecture::ARCH_X86, "Analysis");
+	createBuildProp(setup, false, MSVC_Architecture::ARCH_ARM64, "Analysis");
+	createBuildProp(setup, false, MSVC_Architecture::ARCH_AMD64, "LLVM");
+	createBuildProp(setup, false, MSVC_Architecture::ARCH_X86, "LLVM");
+	createBuildProp(setup, false, MSVC_Architecture::ARCH_ARM64, "LLVM");
 }
 
 void MSVCProvider::addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) {
@@ -137,27 +164,41 @@ void MSVCProvider::addResourceFiles(const BuildSetup &setup, StringList &include
 }
 
 void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
-	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_Global" + getPropertiesExtension()).c_str());
+	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_X86) + getPropertiesExtension()).c_str());
 	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getPropertiesExtension() + "\" for writing");
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_X86) + getPropertiesExtension() + "\" for writing");
 
-	outputGlobalPropFile(setup, properties, 32, setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
+	outputGlobalPropFile(setup, properties, MSVC_Architecture::ARCH_X86, setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
 	properties.close();
 
-	properties.open((setup.outputDir + '/' + setup.projectDescription + "_Global64" + getPropertiesExtension()).c_str());
+	properties.open((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_AMD64) + getPropertiesExtension()).c_str());
 	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global64" + getPropertiesExtension() + "\" for writing");
-
-	// HACK: We must disable the "nasm" feature for x64. To achieve that we must recreate the define list.
-	StringList x64Defines = setup.defines;
-	for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) {
-		if (i->enable && i->define && i->define[0] && !strcmp(i->name, "nasm")) {
-			x64Defines.remove(i->define);
-			break;
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_AMD64) + getPropertiesExtension() + "\" for writing");
+
+	BuildSetup amd64setup = setup;
+	auto amd64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_AMD64);
+	if (amd64_disabled_features_it != s_arch_disabled_features.end()) {
+		for (auto feature : amd64_disabled_features_it->second) {
+			amd64setup = removeFeatureFromSetup(amd64setup, feature);
 		}
 	}
 
-	outputGlobalPropFile(setup, properties, 64, x64Defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
+	outputGlobalPropFile(amd64setup, properties, MSVC_Architecture::ARCH_AMD64, amd64setup.defines, convertPathToWin(amd64setup.filePrefix), amd64setup.runBuildEvents);
+	properties.close();
+
+	properties.open((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_ARM64) + getPropertiesExtension()).c_str());
+	if (!properties)
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_ARM64) + getPropertiesExtension() + "\" for writing");
+
+	BuildSetup arm64setup = setup;
+	auto arm64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_ARM64);
+	if (arm64_disabled_features_it != s_arch_disabled_features.end()) {
+		for (auto feature : arm64_disabled_features_it->second) {
+			arm64setup = removeFeatureFromSetup(arm64setup, feature);
+		}
+	}
+	outputGlobalPropFile(arm64setup, properties, MSVC_Architecture::ARCH_ARM64, arm64setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
+	properties.close();
 }
 
 std::string MSVCProvider::getPreBuildEvent() const {
@@ -182,7 +223,7 @@ std::string MSVCProvider::getTestPreBuildEvent(const BuildSetup &setup) const {
 	return ""$(SolutionDir)../../test/cxxtest/cxxtestgen.py" --runner=ParenPrinter --no-std --no-eh -o "$(SolutionDir)test_runner.cpp"" + target;
 }
 
-std::string MSVCProvider::getPostBuildEvent(bool isWin32, const BuildSetup &setup) const {
+std::string MSVCProvider::getPostBuildEvent(MSVC_Architecture arch, const BuildSetup &setup) const {
 	std::string cmdLine = "";
 
 	cmdLine = "@echo off\n"
@@ -193,7 +234,7 @@ std::string MSVCProvider::getPostBuildEvent(bool isWin32, const BuildSetup &setu
 	cmdLine += (setup.useSDL2) ? "SDL2" : "SDL";
 
 	cmdLine += " "%" LIBS_DEFINE "%/lib/";
-	cmdLine += (isWin32) ? "x86" : "x64";
+	cmdLine += getMSVCArchName(arch);
 	cmdLine += "/$(Configuration)" ";
 
 	// Specify if installer needs to be built or not
diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h
index b10cb569d4..5e037e575d 100644
--- a/devtools/create_project/msvc.h
+++ b/devtools/create_project/msvc.h
@@ -25,6 +25,8 @@
 
 #include "create_project.h"
 
+extern std::map<MSVC_Architecture, StringList> s_arch_disabled_features;
+
 namespace CreateProjectTool {
 
 class MSVCProvider : public ProjectProvider {
@@ -64,17 +66,17 @@ protected:
 	 * @param prefix File prefix, used to add additional include paths.
 	 * @param runBuildEvents true if generating a revision number, false otherwise
 	 */
-	virtual void outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents) = 0;
+	virtual void outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, MSVC_Architecture arch, const StringList &defines, const std::string &prefix, bool runBuildEvents) = 0;
 
 	/**
 	 * Generates the project properties for debug and release settings.
 	 *
 	 * @param setup Description of the desired build setup.
 	 * @param isRelease       Type of property file
-	 * @param isWin32         Bitness of property file
+	 * @param arch            Target architecture
 	 * @param configuration   Name of property file
 	 */
-	virtual void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration) = 0;
+	virtual void createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) = 0;
 
 	/**
 	 * Get the file extension for property files
@@ -96,12 +98,12 @@ protected:
 	/**
 	 * Get the command line for copying data files to the build directory.
 	 *
-	 * @param	isWin32	Bitness of property file.
+	 * @param	arch	Target architecture
 	 * @param	setup	Description of the desired build setup.
 	 *
 	 * @return	The post build event.
 	 */
-	std::string getPostBuildEvent(bool isWin32, const BuildSetup &setup) const;
+	std::string getPostBuildEvent(MSVC_Architecture arch, const BuildSetup &setup) const;
 };
 
 } // End of CreateProjectTool namespace
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index ba0d103d40..f3170e143f 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -79,19 +79,19 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 			libraries += ' ' + *i + ".lib";
 
 		// Win32
-		outputConfiguration(project, setup, libraries, "Debug", "Win32", "", true);
-		outputConfiguration(project, setup, libraries, "Analysis", "Win32", "", true);
-		outputConfiguration(project, setup, libraries, "LLVM", "Win32", "", true);
-		outputConfiguration(project, setup, libraries, "Release", "Win32", "", true);
+		outputConfiguration(project, setup, libraries, "Debug", MSVC_Architecture::ARCH_X86);
+		outputConfiguration(project, setup, libraries, "Analysis", MSVC_Architecture::ARCH_X86);
+		outputConfiguration(project, setup, libraries, "LLVM", MSVC_Architecture::ARCH_X86);
+		outputConfiguration(project, setup, libraries, "Release", MSVC_Architecture::ARCH_X86);
 
 		// 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!
-		outputConfiguration(project, setup, libraries, "Debug", "x64", "64", false);
-		outputConfiguration(project, setup, libraries, "Analysis", "x64", "64", false);
-		outputConfiguration(project, setup, libraries, "LLVM", "Win32", "64", false);
-		outputConfiguration(project, setup, libraries, "Release", "x64", "64", false);
+		outputConfiguration(project, setup, libraries, "Debug", MSVC_Architecture::ARCH_AMD64);
+		outputConfiguration(project, setup, libraries, "Analysis", MSVC_Architecture::ARCH_AMD64);
+		outputConfiguration(project, setup, libraries, "LLVM", MSVC_Architecture::ARCH_AMD64); // NOTE: it was win32-x64 here
+		outputConfiguration(project, setup, libraries, "Release", MSVC_Architecture::ARCH_AMD64);
 
 	} else {
 		bool enableLanguageExtensions = find(_enableLanguageExtensions.begin(), _enableLanguageExtensions.end(), name) != _enableLanguageExtensions.end();
@@ -142,13 +142,13 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 	           "</VisualStudioProject>\n";
 }
 
-void VisualStudioProvider::outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const std::string &platform, const std::string &props, const bool isWin32) {
-	project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\" << setup.projectDescription << "_" << config << props << ".vsprops\">\n"
+void VisualStudioProvider::outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const MSVC_Architecture arch) {
+	project << "\t\t<Configuration Name=\"" << config << "|" << getMSVCConfigName(arch) << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\" << setup.projectDescription << "_" << config << getMSVCArchName(arch) << ".vsprops\">\n"
 	           "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" DebugInformationFormat=\"3\" />\n"
 	           "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/" << setup.projectName << ".exe\"\n"
 	           "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n"
 	           "\t\t\t/>\n";
-	outputBuildEvents(project, setup, isWin32);
+	outputBuildEvents(project, setup, arch);
 	project << "\t\t</Configuration>\n";
 }
 
@@ -158,13 +158,13 @@ void VisualStudioProvider::outputConfiguration(const BuildSetup &setup, std::ost
 	           "\t\t</Configuration>\n";
 }
 
-void VisualStudioProvider::outputBuildEvents(std::ostream &project, const BuildSetup &setup, const bool isWin32) {
+void VisualStudioProvider::outputBuildEvents(std::ostream &project, const BuildSetup &setup, const MSVC_Architecture arch) {
 	if (!setup.devTools && !setup.tests && 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, setup) << "\"\n"
+		           "\t\t\t\tCommandLine=\"" << getPostBuildEvent(arch, setup) << "\"\n"
 		           "\t\t\t/>\n";
 	}
 
@@ -193,7 +193,7 @@ void VisualStudioProvider::writeReferences(const BuildSetup &setup, std::ofstrea
 	output << "\tEndProjectSection\n";
 }
 
-void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents) {
+void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, MSVC_Architecture arch, const StringList &defines, const std::string &prefix, bool runBuildEvents) {
 	std::string warnings;
 	for (StringList::const_iterator i = _globalWarnings.begin(); i != _globalWarnings.end(); ++i)
 		warnings +=  *i + ';';
@@ -214,8 +214,8 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
 	              "\tProjectType=\"Visual C++\"\n"
 	              "\tVersion=\"8.00\"\n"
 	              "\tName=\"" << setup.projectDescription << "_Global\"\n"
-	              "\tOutputDirectory=\"$(ConfigurationName)" << bits << "\"\n"
-	              "\tIntermediateDirectory=\"$(ConfigurationName)" << bits << "/$(ProjectName)\"\n"
+	              "\tOutputDirectory=\"$(ConfigurationName)" << getMSVCArchName(arch) << "\"\n"
+	              "\tIntermediateDirectory=\"$(ConfigurationName)" << getMSVCArchName(arch) << "/$(ProjectName)\"\n"
 	              "\t>\n"
 	              "\t<Tool\n"
 	              "\t\tName=\"VCCLCompilerTool\"\n"
@@ -247,7 +247,7 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
 	if (!setup.devTools && !setup.tests)
 		properties << "\t\tEntryPointSymbol=\"WinMainCRTStartup\"\n";
 
-	properties << "\t\tAdditionalLibraryDirectories=\"$(" << LIBS_DEFINE << ")\\lib\\" << ((bits == 32) ? "x86" : "x64") << "\"\n"
+	properties << "\t\tAdditionalLibraryDirectories=\"$(" << LIBS_DEFINE << ")\\lib\\" << getMSVCArchName(arch) << "\"\n"
 	              "\t/>\n"
 	              "\t<Tool\n"
 	              "\t\tName=\"VCResourceCompilerTool\"\n"
@@ -259,19 +259,18 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
 	properties.flush();
 }
 
-void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration) {
-	const std::string outputBitness = (isWin32 ? "32" : "64");
+void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) {
 
-	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
+	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCConfigName(arch) + getPropertiesExtension()).c_str());
 	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCConfigName(arch) + getPropertiesExtension() + "\" for writing");
 
 	properties << "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n"
 	              "<VisualStudioPropertySheet\n"
 	              "\tProjectType=\"Visual C++\"\n"
 	              "\tVersion=\"8.00\"\n"
-	              "\tName=\"" << setup.projectDescription << "_" << configuration << outputBitness << "\"\n"
-	              "\tInheritedPropertySheets=\".\\" << setup.projectDescription << "_Global" << (isWin32 ? "" : "64") << ".vsprops\"\n"
+	              "\tName=\"" << setup.projectDescription << "_" << configuration << getMSVCConfigName(arch) << "\"\n"
+	              "\tInheritedPropertySheets=\".\\" << setup.projectDescription << "_Global" << getMSVCConfigName(arch) << ".vsprops\"\n"
 	              "\t>\n"
 	              "\t<Tool\n"
 	              "\t\tName=\"VCCLCompilerTool\"\n";
@@ -300,7 +299,7 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea
 		              "\t\tRuntimeLibrary=\"1\"\n"
 		              "\t\tEnableFunctionLevelLinking=\"true\"\n"
 		              "\t\tWarnAsError=\"false\"\n"
-		              "\t\tDebugInformationFormat=\"" << (isWin32 ? "4" : "3") << "\"\n" // For x64 format "4" (Edit and continue) is not supported, thus we default to "3"
+		              "\t\tDebugInformationFormat=\"" << (arch == MSVC_Architecture::ARCH_X86 ? "3" : "4") << "\"\n" // For x64 format "4" (Edit and continue) is not supported, thus we default to "3"
 		              "\t\tAdditionalOption=\"" << (configuration == "Analysis" ? "/analyze" : "") << "\"\n"
 		              "\t/>\n"
 		              "\t<Tool\n"
diff --git a/devtools/create_project/visualstudio.h b/devtools/create_project/visualstudio.h
index 29ef9da835..2e1448bcfd 100644
--- a/devtools/create_project/visualstudio.h
+++ b/devtools/create_project/visualstudio.h
@@ -40,16 +40,16 @@ protected:
 
 	void writeReferences(const BuildSetup &setup, std::ofstream &output);
 
-	void outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents);
+	void outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, MSVC_Architecture arch, const StringList &defines, const std::string &prefix, bool runBuildEvents);
 
-	void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration);
+	void createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration);
 
 	const char *getProjectExtension();
 	const char *getPropertiesExtension();
 
-	void outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const std::string &platform, const std::string &props, const bool isWin32);
+	void outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const MSVC_Architecture arch);
 	void outputConfiguration(const BuildSetup &setup, std::ostream &project, const std::string &toolConfig, const std::string &config, const std::string &platform, const std::string &props);
-	void outputBuildEvents(std::ostream &project, const BuildSetup &setup, const bool isWin32);
+	void outputBuildEvents(std::ostream &project, const BuildSetup &setup, const MSVC_Architecture arch);
 };
 
 } // End of CreateProjectTool namespace


Commit: e0505d5fbfa6d5a9d80d9c4378a06e6f156a97d8
    https://github.com/scummvm/scummvm/commit/e0505d5fbfa6d5a9d80d9c4378a06e6f156a97d8
Author: Michał Janiszewski (janisozaur+scummvm at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
COMMON: Add MSVC ARM64 support

Changed paths:
    common/scummsys.h


diff --git a/common/scummsys.h b/common/scummsys.h
index 979852047e..36fc8fdc10 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -457,7 +457,8 @@
 		  defined(_M_X64) || \
 		  defined(__ppc64__) || \
 		  defined(__powerpc64__) || \
-		  defined(__LP64__)
+		  defined(__LP64__) || \
+		  defined(_M_ARM64)
 
 typedef uint64 uintptr;
 


Commit: eed727474f8fa102d67fdecbd366e58538a1c8fd
    https://github.com/scummvm/scummvm/commit/eed727474f8fa102d67fdecbd366e58538a1c8fd
Author: Michał Janiszewski (janisozaur+scummvm at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
AUDIO: Fix linking with vcpkg-provided FLAC

Changed paths:
    audio/decoders/flac.cpp


diff --git a/audio/decoders/flac.cpp b/audio/decoders/flac.cpp
index e0205a40b5..6acf18ef96 100644
--- a/audio/decoders/flac.cpp
+++ b/audio/decoders/flac.cpp
@@ -355,8 +355,7 @@ int FLACStream::readBuffer(int16 *buffer, const int numSamples) {
 		break;
 	default:
 		decoderOk = false;
-		warning("FLACStream: An error occurred while decoding. DecoderState is: %s",
-			FLAC__StreamDecoderStateString[getStreamDecoderState()]);
+		warning("FLACStream: An error occurred while decoding. DecoderState is: %d", getStreamDecoderState());
 	}
 
 	// Compute how many samples we actually produced
@@ -668,8 +667,7 @@ inline void FLACStream::callbackMetadata(const ::FLAC__StreamMetadata *metadata)
 }
 inline void FLACStream::callbackError(::FLAC__StreamDecoderErrorStatus status) {
 	// some of these are non-critical-Errors
-	debug(1, "FLACStream: An error occurred while decoding. DecoderState is: %s",
-			FLAC__StreamDecoderErrorStatusString[status]);
+	debug(1, "FLACStream: An error occurred while decoding. DecoderStateError is: %d", status);
 }
 
 /* Static Callback Wrappers */


Commit: 6b1fb8fc8fa98b316edd43e7e291625e55c791bf
    https://github.com/scummvm/scummvm/commit/6b1fb8fc8fa98b316edd43e7e291625e55c791bf
Author: Michał Janiszewski (janisozaur at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: Sort libraries to be returned

Changed paths:
    devtools/create_project/create_project.cpp


diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 0fc5a868ab..47fd6ddefa 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1195,6 +1195,9 @@ StringList getFeatureLibraries(const Feature &feature) {
 		StringList fLibraries = tokenize(feature.libraries);
 		libraries.splice(libraries.end(), fLibraries);
 	}
+	// The libraries get sorted as they can get used in algorithms where ordering is a
+	// precondition, e.g. merge()
+	libraries.sort();
 
 	return libraries;
 }


Commit: c763e56d5757d0e21f37edc5f50e8bb3324c9e73
    https://github.com/scummvm/scummvm/commit/c763e56d5757d0e21f37edc5f50e8bb3324c9e73
Author: Michał Janiszewski (janisozaur at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: Address review comments

Changed paths:
    devtools/create_project/create_project.cpp
    devtools/create_project/create_project.h
    devtools/create_project/msbuild.cpp
    devtools/create_project/msvc.cpp


diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 47fd6ddefa..d8ab5b8261 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -434,8 +434,8 @@ int main(int argc, char *argv[]) {
 	}
 
 	if (setup.useCanonicalLibNames) {
-		for (auto& lib : setup.libraries) {
-			lib = getCanonicalLibName(lib);
+		for (StringList::iterator lib = setup.libraries.begin(); lib != setup.libraries.end(); ++lib) {
+			*lib = getCanonicalLibName(*lib);
 		}
 	}
 
@@ -741,8 +741,8 @@ void displayHelp(const char *exe) {
 	        " --tests                    Create project files for the tests\n"
 	        "                            (ignores --build-events and --installer, as well as engine settings)\n"
 	        "                            (default: false)\n"
-            " --use-canonical-lib-names  Use canonical library names for linking. This makes it easy to use\n"
-            "                            e.g. vcpkg-provided libraries\n"
+	        " --use-canonical-lib-names  Use canonical library names for linking. This makes it easy to use\n"
+	        "                            e.g. vcpkg-provided libraries\n"
 	        "                            (default: false)\n"
 	        "\n"
 	        "Engines settings:\n"
@@ -1160,8 +1160,8 @@ std::string getMSVCConfigName(MSVC_Architecture arch) {
 }
 
 std::string getCanonicalLibName(std::string lib) {
-	auto it = s_canonical_lib_name_map.find(lib);
-	if (it != s_canonical_lib_name_map.end()) {
+	std::map<std::string, std::string>::const_iterator it = s_canonical_lib_name_map.find(lib);
+	if (it != s_canonical_lib_name_map.cend()) {
 		return it->second;
 	}
 	return lib;
@@ -1234,12 +1234,12 @@ bool getFeatureBuildState(const std::string &name, FeatureList &features) {
 BuildSetup removeFeatureFromSetup(BuildSetup setup, const std::string &feature) {
 	for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) {
 		if (i->enable && feature == i->name) {
-			StringList fribidi_libs = getFeatureLibraries(*i);
-			for (auto& lib : fribidi_libs) {
+			StringList feature_libs = getFeatureLibraries(*i);
+			for (StringList::iterator lib = feature_libs.begin(); lib != feature_libs.end(); ++lib) {
 				if (setup.useCanonicalLibNames) {
-					lib = getCanonicalLibName(lib);
+					*lib = getCanonicalLibName(*lib);
 				}
-				setup.libraries.remove(lib);
+				setup.libraries.remove(*lib);
 			}
 			if (i->define && i->define[0]) {
 				setup.defines.remove(i->define);
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index 4ad3209cfe..6853b244f8 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -206,7 +206,7 @@ StringList getFeatureLibraries(const FeatureList &features);
  *
  * @param features Feature for the build (this may contain features, which are *not* enabled!)
  */
-StringList getFeatureLibraries(const Feature& feature);
+StringList getFeatureLibraries(const Feature &feature);
 
 /**
  * Sets the state of a given feature. This can be used to
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index c6d50c32ae..c8c6ec3f54 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -25,7 +25,6 @@
 
 #include <fstream>
 #include <algorithm>
-#include <array>
 
 namespace CreateProjectTool {
 
@@ -81,7 +80,10 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 	           "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
 	           "\t<ItemGroup Label=\"ProjectConfigurations\">\n";
 
-	std::array<MSVC_Architecture, 3> archs{ MSVC_Architecture::ARCH_X86, MSVC_Architecture::ARCH_AMD64, MSVC_Architecture::ARCH_ARM64 };
+	std::list<MSVC_Architecture> archs;
+	archs.push_back(MSVC_Architecture::ARCH_X86);
+	archs.push_back(MSVC_Architecture::ARCH_AMD64);
+	archs.push_back(MSVC_Architecture::ARCH_ARM64);
 
 	for (const auto& arch : archs) {
 		// NOTE: different order
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index 9a2328ab5e..90cc32e0d4 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -176,10 +176,10 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
 		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_AMD64) + getPropertiesExtension() + "\" for writing");
 
 	BuildSetup amd64setup = setup;
-	auto amd64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_AMD64);
+	std::map<MSVC_Architecture, StringList>::const_iterator amd64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_AMD64);
 	if (amd64_disabled_features_it != s_arch_disabled_features.end()) {
-		for (auto feature : amd64_disabled_features_it->second) {
-			amd64setup = removeFeatureFromSetup(amd64setup, feature);
+		for (StringList::const_iterator feature = amd64_disabled_features_it->second.begin(); feature != amd64_disabled_features_it->second.end(); ++feature) {
+			amd64setup = removeFeatureFromSetup(amd64setup, *feature);
 		}
 	}
 
@@ -191,10 +191,10 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
 		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_ARM64) + getPropertiesExtension() + "\" for writing");
 
 	BuildSetup arm64setup = setup;
-	auto arm64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_ARM64);
+	std::map<MSVC_Architecture, StringList>::const_iterator arm64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_ARM64);
 	if (arm64_disabled_features_it != s_arch_disabled_features.end()) {
-		for (auto feature : arm64_disabled_features_it->second) {
-			arm64setup = removeFeatureFromSetup(arm64setup, feature);
+		for (StringList::const_iterator feature = arm64_disabled_features_it->second.begin(); feature != arm64_disabled_features_it->second.end(); ++feature) {
+			arm64setup = removeFeatureFromSetup(arm64setup, *feature);
 		}
 	}
 	outputGlobalPropFile(arm64setup, properties, MSVC_Architecture::ARCH_ARM64, arm64setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);


Commit: 7a5c4e6121f2f6387fa353533de26334962f664f
    https://github.com/scummvm/scummvm/commit/7a5c4e6121f2f6387fa353533de26334962f664f
Author: SupSuper (supsuper at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: Remove C++11

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


diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index d8ab5b8261..b7f935dabf 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -45,6 +45,7 @@
 #include <algorithm>
 #include <iomanip>
 #include <iterator>
+#include <utility>
 
 #include <cstring>
 #include <cstdlib>
@@ -1123,46 +1124,40 @@ const MSVCVersion s_msvc[] = {
 	{ 16,    "Visual Studio 2019",    "12.00",    "Version 16",    "16.0",    "v142",    "llvm"        }
 };
 
-const std::map<std::string, std::string> s_canonical_lib_name_map = {
-	{ "jpeg-static", "jpeg" },
-	{ "libfaad", "faad" },
-	{ "libFLAC_static", "FLAC" },
-	{ "libfluidsynth", "fluidsynth" },
-	{ "libmad", "mad" },
-	{ "libmpeg2", "mpeg2" },
-	{ "libogg_static", "ogg" },
-	{ "libtheora_static", "theora" },
-	{ "libvorbis_static", "vorbis" },
-	{ "libvorbisfile_static", "vorbisfile" },
-	{ "SDL_net", "SDL2_net" }, // Only support SDL2
-	{ "win_utf8_io_static", "FLAC" }, // This is some FLAC-specific library not needed with vcpkg, but as there's '.lib' appended to each library, we can't set it to empty, so set it to FLAC again instead
+const std::pair<std::string, std::string> s_canonical_lib_name_map[] = {
+	std::make_pair("jpeg-static", "jpeg"),
+	std::make_pair("libfaad", "faad"),
+	std::make_pair("libFLAC_static", "FLAC"),
+	std::make_pair("libfluidsynth", "fluidsynth"),
+	std::make_pair("libmad", "mad"),
+	std::make_pair("libmpeg2", "mpeg2"),
+	std::make_pair("libogg_static", "ogg"),
+	std::make_pair("libtheora_static", "theora"),
+	std::make_pair("libvorbis_static", "vorbis"),
+	std::make_pair("libvorbisfile_static", "vorbisfile"),
+	std::make_pair("SDL_net", "SDL2_net"), // Only support SDL2
+	std::make_pair("win_utf8_io_static", "FLAC") // This is some FLAC-specific library not needed with vcpkg, but as there's '.lib' appended to each library, we can't set it to empty, so set it to FLAC again instead
 };
 
-const std::map<MSVC_Architecture, std::string> s_msvc_arch_names = {
-	{ MSVC_Architecture::ARCH_ARM64, "arm64" },
-	{   MSVC_Architecture::ARCH_X86,   "x86" },
-	{ MSVC_Architecture::ARCH_AMD64,   "x64" },
-};
-
-const std::map<MSVC_Architecture, std::string> s_msvc_config_names = {
-	{ MSVC_Architecture::ARCH_ARM64, "arm64" },
-	{   MSVC_Architecture::ARCH_X86, "Win32" },
-	{ MSVC_Architecture::ARCH_AMD64,   "x64" },
-};
+const char *s_msvc_arch_names[] = {"arm64", "x86", "x64"};
+const char *s_msvc_config_names[] = {"arm64", "Win32", "x64"};
 } // End of anonymous namespace
 
 std::string getMSVCArchName(MSVC_Architecture arch) {
-	return s_msvc_arch_names.at(arch);
+	return s_msvc_arch_names[arch];
 }
 
 std::string getMSVCConfigName(MSVC_Architecture arch) {
-	return s_msvc_config_names.at(arch);
+	return s_msvc_config_names[arch];
 }
 
-std::string getCanonicalLibName(std::string lib) {
-	std::map<std::string, std::string>::const_iterator it = s_canonical_lib_name_map.find(lib);
-	if (it != s_canonical_lib_name_map.cend()) {
-		return it->second;
+std::string getCanonicalLibName(const std::string &lib) {
+	const size_t libCount = sizeof(s_canonical_lib_name_map) / sizeof(s_canonical_lib_name_map[0]);
+
+	for (size_t i = 0; i < libCount; ++i) {
+		if (s_canonical_lib_name_map[i].first == lib) {
+			return s_canonical_lib_name_map[i].second;
+		}
 	}
 	return lib;
 }
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index 6853b244f8..0f0ce67e70 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -304,7 +304,7 @@ struct MSVCVersion {
 };
 typedef std::list<MSVCVersion> MSVCList;
 
-enum class MSVC_Architecture {
+enum MSVC_Architecture {
 	ARCH_ARM64,
 	ARCH_X86,
 	ARCH_AMD64
@@ -341,7 +341,7 @@ int getInstalledMSVC();
  * @param lib The link library as provided by ScummVM libs.
  * @return Canonical link library.
  */
-std::string getCanonicalLibName(std::string lib);
+std::string getCanonicalLibName(const std::string &lib);
 
 /**
  * Removes given feature from setup.
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index c8c6ec3f54..822bcabc58 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -34,6 +34,11 @@ namespace CreateProjectTool {
 
 MSBuildProvider::MSBuildProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version, const MSVCVersion& msvc)
 	: MSVCProvider(global_warnings, project_warnings, version, msvc) {
+
+	// NOTE: different order
+	_archs.push_back(ARCH_X86);
+	_archs.push_back(ARCH_AMD64);
+	_archs.push_back(ARCH_ARM64);
 }
 
 const char *MSBuildProvider::getProjectExtension() {
@@ -80,17 +85,11 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 	           "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
 	           "\t<ItemGroup Label=\"ProjectConfigurations\">\n";
 
-	std::list<MSVC_Architecture> archs;
-	archs.push_back(MSVC_Architecture::ARCH_X86);
-	archs.push_back(MSVC_Architecture::ARCH_AMD64);
-	archs.push_back(MSVC_Architecture::ARCH_ARM64);
-
-	for (const auto& arch : archs) {
-		// NOTE: different order
-		outputConfiguration(project, "Debug", getMSVCConfigName(arch));
-		outputConfiguration(project, "Analysis", getMSVCConfigName(arch));
-		outputConfiguration(project, "LLVM", getMSVCConfigName(arch));
-		outputConfiguration(project, "Release", getMSVCConfigName(arch));
+	for (std::list<MSVC_Architecture>::const_iterator i = _archs.begin(); i != _archs.end(); ++i) {
+		outputConfiguration(project, "Debug", getMSVCConfigName(*i));
+		outputConfiguration(project, "Analysis", getMSVCConfigName(*i));
+		outputConfiguration(project, "LLVM", getMSVCConfigName(*i));
+		outputConfiguration(project, "Release", getMSVCConfigName(*i));
 	}
 	project << "\t</ItemGroup>\n";
 
@@ -101,8 +100,8 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 		"\t\t<Keyword>Win32Proj</Keyword>\n"
 		"\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n";
 
-	for (const auto& arch : archs) {
-		project << "\t\t<VcpkgTriplet Condition=\"'$(Platform)' == '" << getMSVCConfigName(arch) << "'\">" << getMSVCArchName(arch) << "-windows</VcpkgTriplet>";
+	for (std::list<MSVC_Architecture>::const_iterator i = _archs.begin(); i != _archs.end(); ++i) {
+		project << "\t\t<VcpkgTriplet Condition=\"'$(Platform)' == '" << getMSVCConfigName(*i) << "'\">" << getMSVCArchName(*i) << "-windows</VcpkgTriplet>";
 	}
 
 	project << "\t</PropertyGroup>\n";
@@ -110,39 +109,39 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 	// Shared configuration
 	project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n";
 
-	for (const auto& arch : archs) {
-		outputConfigurationType(setup, project, name, "Release|" + getMSVCConfigName(arch), _msvcVersion.toolsetMSVC);
-		outputConfigurationType(setup, project, name, "Analysis" + getMSVCConfigName(arch), _msvcVersion.toolsetMSVC);
-		outputConfigurationType(setup, project, name, "LLVM|" + getMSVCConfigName(arch), _msvcVersion.toolsetLLVM);
-		outputConfigurationType(setup, project, name, "Debug|" + getMSVCConfigName(arch), _msvcVersion.toolsetMSVC);
+	for (std::list<MSVC_Architecture>::const_iterator i = _archs.begin(); i != _archs.end(); ++i) {
+		outputConfigurationType(setup, project, name, "Release|" + getMSVCConfigName(*i), _msvcVersion.toolsetMSVC);
+		outputConfigurationType(setup, project, name, "Analysis" + getMSVCConfigName(*i), _msvcVersion.toolsetMSVC);
+		outputConfigurationType(setup, project, name, "LLVM|" + getMSVCConfigName(*i), _msvcVersion.toolsetLLVM);
+		outputConfigurationType(setup, project, name, "Debug|" + getMSVCConfigName(*i), _msvcVersion.toolsetMSVC);
 	}
 
 	project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n"
 	           "\t<ImportGroup Label=\"ExtensionSettings\">\n"
 	           "\t</ImportGroup>\n";
 
-	for (const auto& arch : archs) {
-		outputProperties(project, "Release|" + getMSVCConfigName(arch), setup.projectDescription + "_Release" + getMSVCArchName(arch) + ".props");
-		outputProperties(project, "Analysis|" + getMSVCConfigName(arch), setup.projectDescription + "_Analysis" + getMSVCArchName(arch) + ".props");
-		outputProperties(project, "LLVM|" + getMSVCConfigName(arch), setup.projectDescription + "_LLVM" + getMSVCArchName(arch) + ".props");
-		outputProperties(project, "Debug|" + getMSVCConfigName(arch), setup.projectDescription + "_Debug" + getMSVCArchName(arch) + ".props");
+	for (std::list<MSVC_Architecture>::const_iterator i = _archs.begin(); i != _archs.end(); ++i) {
+		outputProperties(project, "Release|" + getMSVCConfigName(*i), setup.projectDescription + "_Release" + getMSVCArchName(*i) + ".props");
+		outputProperties(project, "Analysis|" + getMSVCConfigName(*i), setup.projectDescription + "_Analysis" + getMSVCArchName(*i) + ".props");
+		outputProperties(project, "LLVM|" + getMSVCConfigName(*i), setup.projectDescription + "_LLVM" + getMSVCArchName(*i) + ".props");
+		outputProperties(project, "Debug|" + getMSVCConfigName(*i), setup.projectDescription + "_Debug" + getMSVCArchName(*i) + ".props");
 	}
 
 	project << "\t<PropertyGroup Label=\"UserMacros\" />\n";
 
 	// Project-specific settings (analysis uses debug properties)
-	for (const auto &arch : archs) {
+	for (std::list<MSVC_Architecture>::const_iterator i = _archs.begin(); i != _archs.end(); ++i) {
 		BuildSetup archsetup = setup;
-		auto disabled_features_it = s_arch_disabled_features.find(arch);
-		if (disabled_features_it != s_arch_disabled_features.end()) {
-			for (auto feature : disabled_features_it->second) {
-				archsetup = removeFeatureFromSetup(archsetup, feature);
+		std::map<MSVC_Architecture, StringList>::const_iterator disabled_features_it = _arch_disabled_features.find(*i);
+		if (disabled_features_it != _arch_disabled_features.end()) {
+			for (StringList::const_iterator j = disabled_features_it->second.begin(); j != disabled_features_it->second.end(); ++j) {
+				archsetup = removeFeatureFromSetup(archsetup, *j);
 			}
 		}
-		outputProjectSettings(project, name, archsetup, false, arch, "Debug");
-		outputProjectSettings(project, name, archsetup, false, arch, "Analysis");
-		outputProjectSettings(project, name, archsetup, false, arch, "LLVM");
-		outputProjectSettings(project, name, archsetup, true, arch, "Release");
+		outputProjectSettings(project, name, archsetup, false, *i, "Debug");
+		outputProjectSettings(project, name, archsetup, false, *i, "Analysis");
+		outputProjectSettings(project, name, archsetup, false, *i, "LLVM");
+		outputProjectSettings(project, name, archsetup, true, *i, "Release");
 	}
 
 	// Files
@@ -397,7 +396,7 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
 }
 
 void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) {
-	const std::string outputBitness = (arch == MSVC_Architecture::ARCH_X86 ? "32" : "64");
+	const std::string outputBitness = (arch == ARCH_X86 ? "32" : "64");
 
 	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension()).c_str());
 	if (!properties)
@@ -442,10 +441,10 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, M
 		              "\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n";
 		if (_version >= 14) {
 			// Since MSVC 2015 Edit and Continue is supported for x86 and x86-64, but not for ARM.
-			properties << "\t\t\t<DebugInformationFormat>" << (arch != MSVC_Architecture::ARCH_ARM64 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n";
+			properties << "\t\t\t<DebugInformationFormat>" << (arch != ARCH_ARM64 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n";
 		} else {
 			// Older MSVC versions did not support Edit and Continue for x64, thus we do not use it.
-			properties << "\t\t\t<DebugInformationFormat>" << (arch == MSVC_Architecture::ARCH_X86 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n";
+			properties << "\t\t\t<DebugInformationFormat>" << (arch == ARCH_X86 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n";
 		}
 		properties << "\t\t\t<EnablePREfast>" << (configuration == "Analysis" ? "true" : "false") << "</EnablePREfast>\n";
 
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index 90cc32e0d4..687e2df5de 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -28,16 +28,6 @@
 #include <cstring>
 
 
-std::map<MSVC_Architecture, StringList> s_arch_disabled_features{
-	// NASM not supported for Windows on AMD64 target
-	{ MSVC_Architecture::ARCH_AMD64, { "nasm" } },
-
-	// NASM not supported for WoA target
-	// No OpenGL, OpenGL ES on Windows on ARM
-	// https://github.com/microsoft/vcpkg/issues/11248 [fribidi] Fribidi doesn't cross-compile on x86-64 to target arm/arm64
-	{ MSVC_Architecture::ARCH_ARM64, { "nasm", "opengl", "opengles", "fribidi" } },
-};
-
 namespace CreateProjectTool {
 
 //////////////////////////////////////////////////////////////////////////
@@ -48,6 +38,13 @@ MSVCProvider::MSVCProvider(StringList &global_warnings, std::map<std::string, St
 
 	_enableLanguageExtensions = tokenize(ENABLE_LANGUAGE_EXTENSIONS, ',');
 	_disableEditAndContinue   = tokenize(DISABLE_EDIT_AND_CONTINUE, ',');
+
+	// NASM not supported for Windows on AMD64 target
+	_arch_disabled_features[ARCH_AMD64] = {"nasm"};
+	// NASM not supported for WoA target
+	// No OpenGL, OpenGL ES on Windows on ARM
+	// https://github.com/microsoft/vcpkg/issues/11248 [fribidi] Fribidi doesn't cross-compile on x86-64 to target arm/arm64
+	_arch_disabled_features[ARCH_ARM64] = {"nasm", "opengl", "opengles", "fribidi"};
 }
 
 void MSVCProvider::createWorkspace(const BuildSetup &setup) {
@@ -144,18 +141,18 @@ void MSVCProvider::createOtherBuildFiles(const BuildSetup &setup) {
 
 	// Create the configuration property files (for Debug and Release with 32 and 64bits versions)
 	// Note: we use the debug properties for the analysis configuration
-	createBuildProp(setup, true, MSVC_Architecture::ARCH_AMD64, "Release");
-	createBuildProp(setup, true, MSVC_Architecture::ARCH_X86, "Release");
-	createBuildProp(setup, true, MSVC_Architecture::ARCH_ARM64, "Release");
-	createBuildProp(setup, false, MSVC_Architecture::ARCH_AMD64, "Debug");
-	createBuildProp(setup, false, MSVC_Architecture::ARCH_X86, "Debug");
-	createBuildProp(setup, false, MSVC_Architecture::ARCH_ARM64, "Debug");
-	createBuildProp(setup, false, MSVC_Architecture::ARCH_AMD64, "Analysis");
-	createBuildProp(setup, false, MSVC_Architecture::ARCH_X86, "Analysis");
-	createBuildProp(setup, false, MSVC_Architecture::ARCH_ARM64, "Analysis");
-	createBuildProp(setup, false, MSVC_Architecture::ARCH_AMD64, "LLVM");
-	createBuildProp(setup, false, MSVC_Architecture::ARCH_X86, "LLVM");
-	createBuildProp(setup, false, MSVC_Architecture::ARCH_ARM64, "LLVM");
+	createBuildProp(setup, true, ARCH_AMD64, "Release");
+	createBuildProp(setup, true, ARCH_X86, "Release");
+	createBuildProp(setup, true, ARCH_ARM64, "Release");
+	createBuildProp(setup, false, ARCH_AMD64, "Debug");
+	createBuildProp(setup, false, ARCH_X86, "Debug");
+	createBuildProp(setup, false, ARCH_ARM64, "Debug");
+	createBuildProp(setup, false, ARCH_AMD64, "Analysis");
+	createBuildProp(setup, false, ARCH_X86, "Analysis");
+	createBuildProp(setup, false, ARCH_ARM64, "Analysis");
+	createBuildProp(setup, false, ARCH_AMD64, "LLVM");
+	createBuildProp(setup, false, ARCH_X86, "LLVM");
+	createBuildProp(setup, false, ARCH_ARM64, "LLVM");
 }
 
 void MSVCProvider::addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) {
@@ -164,40 +161,40 @@ void MSVCProvider::addResourceFiles(const BuildSetup &setup, StringList &include
 }
 
 void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
-	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_X86) + getPropertiesExtension()).c_str());
+	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_X86) + getPropertiesExtension()).c_str());
 	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_X86) + getPropertiesExtension() + "\" for writing");
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_X86) + getPropertiesExtension() + "\" for writing");
 
-	outputGlobalPropFile(setup, properties, MSVC_Architecture::ARCH_X86, setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
+	outputGlobalPropFile(setup, properties, ARCH_X86, setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
 	properties.close();
 
-	properties.open((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_AMD64) + getPropertiesExtension()).c_str());
+	properties.open((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_AMD64) + getPropertiesExtension()).c_str());
 	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_AMD64) + getPropertiesExtension() + "\" for writing");
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_AMD64) + getPropertiesExtension() + "\" for writing");
 
 	BuildSetup amd64setup = setup;
-	std::map<MSVC_Architecture, StringList>::const_iterator amd64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_AMD64);
-	if (amd64_disabled_features_it != s_arch_disabled_features.end()) {
+	std::map<MSVC_Architecture, StringList>::const_iterator amd64_disabled_features_it = _arch_disabled_features.find(ARCH_AMD64);
+	if (amd64_disabled_features_it != _arch_disabled_features.end()) {
 		for (StringList::const_iterator feature = amd64_disabled_features_it->second.begin(); feature != amd64_disabled_features_it->second.end(); ++feature) {
 			amd64setup = removeFeatureFromSetup(amd64setup, *feature);
 		}
 	}
 
-	outputGlobalPropFile(amd64setup, properties, MSVC_Architecture::ARCH_AMD64, amd64setup.defines, convertPathToWin(amd64setup.filePrefix), amd64setup.runBuildEvents);
+	outputGlobalPropFile(amd64setup, properties, ARCH_AMD64, amd64setup.defines, convertPathToWin(amd64setup.filePrefix), amd64setup.runBuildEvents);
 	properties.close();
 
-	properties.open((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_ARM64) + getPropertiesExtension()).c_str());
+	properties.open((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_ARM64) + getPropertiesExtension()).c_str());
 	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(MSVC_Architecture::ARCH_ARM64) + getPropertiesExtension() + "\" for writing");
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_ARM64) + getPropertiesExtension() + "\" for writing");
 
 	BuildSetup arm64setup = setup;
-	std::map<MSVC_Architecture, StringList>::const_iterator arm64_disabled_features_it = s_arch_disabled_features.find(MSVC_Architecture::ARCH_ARM64);
-	if (arm64_disabled_features_it != s_arch_disabled_features.end()) {
+	std::map<MSVC_Architecture, StringList>::const_iterator arm64_disabled_features_it = _arch_disabled_features.find(ARCH_ARM64);
+	if (arm64_disabled_features_it != _arch_disabled_features.end()) {
 		for (StringList::const_iterator feature = arm64_disabled_features_it->second.begin(); feature != arm64_disabled_features_it->second.end(); ++feature) {
 			arm64setup = removeFeatureFromSetup(arm64setup, *feature);
 		}
 	}
-	outputGlobalPropFile(arm64setup, properties, MSVC_Architecture::ARCH_ARM64, arm64setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
+	outputGlobalPropFile(arm64setup, properties, ARCH_ARM64, arm64setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
 	properties.close();
 }
 
diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h
index 5e037e575d..b2eeed80dd 100644
--- a/devtools/create_project/msvc.h
+++ b/devtools/create_project/msvc.h
@@ -25,8 +25,6 @@
 
 #include "create_project.h"
 
-extern std::map<MSVC_Architecture, StringList> s_arch_disabled_features;
-
 namespace CreateProjectTool {
 
 class MSVCProvider : public ProjectProvider {
@@ -39,6 +37,9 @@ protected:
 	StringList _enableLanguageExtensions;
 	StringList _disableEditAndContinue;
 
+	std::list<MSVC_Architecture> _archs;
+	std::map<MSVC_Architecture, StringList> _arch_disabled_features;
+
 	void createWorkspace(const BuildSetup &setup);
 
 	void createOtherBuildFiles(const BuildSetup &setup);
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index f3170e143f..a94e19322c 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -79,19 +79,19 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 			libraries += ' ' + *i + ".lib";
 
 		// Win32
-		outputConfiguration(project, setup, libraries, "Debug", MSVC_Architecture::ARCH_X86);
-		outputConfiguration(project, setup, libraries, "Analysis", MSVC_Architecture::ARCH_X86);
-		outputConfiguration(project, setup, libraries, "LLVM", MSVC_Architecture::ARCH_X86);
-		outputConfiguration(project, setup, libraries, "Release", MSVC_Architecture::ARCH_X86);
+		outputConfiguration(project, setup, libraries, "Debug", ARCH_X86);
+		outputConfiguration(project, setup, libraries, "Analysis", ARCH_X86);
+		outputConfiguration(project, setup, libraries, "LLVM", ARCH_X86);
+		outputConfiguration(project, setup, libraries, "Release", ARCH_X86);
 
 		// 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!
-		outputConfiguration(project, setup, libraries, "Debug", MSVC_Architecture::ARCH_AMD64);
-		outputConfiguration(project, setup, libraries, "Analysis", MSVC_Architecture::ARCH_AMD64);
-		outputConfiguration(project, setup, libraries, "LLVM", MSVC_Architecture::ARCH_AMD64); // NOTE: it was win32-x64 here
-		outputConfiguration(project, setup, libraries, "Release", MSVC_Architecture::ARCH_AMD64);
+		outputConfiguration(project, setup, libraries, "Debug", ARCH_AMD64);
+		outputConfiguration(project, setup, libraries, "Analysis", ARCH_AMD64);
+		outputConfiguration(project, setup, libraries, "LLVM", ARCH_AMD64); // NOTE: it was win32-x64 here
+		outputConfiguration(project, setup, libraries, "Release", ARCH_AMD64);
 
 	} else {
 		bool enableLanguageExtensions = find(_enableLanguageExtensions.begin(), _enableLanguageExtensions.end(), name) != _enableLanguageExtensions.end();
@@ -299,7 +299,7 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea
 		              "\t\tRuntimeLibrary=\"1\"\n"
 		              "\t\tEnableFunctionLevelLinking=\"true\"\n"
 		              "\t\tWarnAsError=\"false\"\n"
-		              "\t\tDebugInformationFormat=\"" << (arch == MSVC_Architecture::ARCH_X86 ? "3" : "4") << "\"\n" // For x64 format "4" (Edit and continue) is not supported, thus we default to "3"
+		              "\t\tDebugInformationFormat=\"" << (arch == ARCH_X86 ? "3" : "4") << "\"\n" // For x64 format "4" (Edit and continue) is not supported, thus we default to "3"
 		              "\t\tAdditionalOption=\"" << (configuration == "Analysis" ? "/analyze" : "") << "\"\n"
 		              "\t/>\n"
 		              "\t<Tool\n"


Commit: ef803ee08057bd56fc8412fddd1dbdb7c3f4a15b
    https://github.com/scummvm/scummvm/commit/ef803ee08057bd56fc8412fddd1dbdb7c3f4a15b
Author: SupSuper (supsuper at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: Old Visual Studio doesn't support ARM64

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


diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 822bcabc58..397d76908c 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -35,7 +35,6 @@ namespace CreateProjectTool {
 MSBuildProvider::MSBuildProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version, const MSVCVersion& msvc)
 	: MSVCProvider(global_warnings, project_warnings, version, msvc) {
 
-	// NOTE: different order
 	_archs.push_back(ARCH_X86);
 	_archs.push_back(ARCH_AMD64);
 	_archs.push_back(ARCH_ARM64);
@@ -85,23 +84,23 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 	           "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
 	           "\t<ItemGroup Label=\"ProjectConfigurations\">\n";
 
-	for (std::list<MSVC_Architecture>::const_iterator i = _archs.begin(); i != _archs.end(); ++i) {
-		outputConfiguration(project, "Debug", getMSVCConfigName(*i));
-		outputConfiguration(project, "Analysis", getMSVCConfigName(*i));
-		outputConfiguration(project, "LLVM", getMSVCConfigName(*i));
-		outputConfiguration(project, "Release", getMSVCConfigName(*i));
+	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+		outputConfiguration(project, "Debug", getMSVCConfigName(*arch));
+		outputConfiguration(project, "Analysis", getMSVCConfigName(*arch));
+		outputConfiguration(project, "LLVM", getMSVCConfigName(*arch));
+		outputConfiguration(project, "Release", getMSVCConfigName(*arch));
 	}
 	project << "\t</ItemGroup>\n";
 
 	// Project name & Guid
 	project << "\t<PropertyGroup Label=\"Globals\">\n"
-		"\t\t<ProjectGuid>{" << uuid << "}</ProjectGuid>\n"
-		"\t\t<RootNamespace>" << name << "</RootNamespace>\n"
-		"\t\t<Keyword>Win32Proj</Keyword>\n"
-		"\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n";
+			   "\t\t<ProjectGuid>{" << uuid << "}</ProjectGuid>\n"
+			   "\t\t<RootNamespace>" << name << "</RootNamespace>\n"
+			   "\t\t<Keyword>Win32Proj</Keyword>\n"
+			   "\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n";
 
-	for (std::list<MSVC_Architecture>::const_iterator i = _archs.begin(); i != _archs.end(); ++i) {
-		project << "\t\t<VcpkgTriplet Condition=\"'$(Platform)' == '" << getMSVCConfigName(*i) << "'\">" << getMSVCArchName(*i) << "-windows</VcpkgTriplet>";
+	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+		project << "\t\t<VcpkgTriplet Condition=\"'$(Platform)' == '" << getMSVCConfigName(*arch) << "'\">" << getMSVCArchName(*arch) << "-windows</VcpkgTriplet>";
 	}
 
 	project << "\t</PropertyGroup>\n";
@@ -109,39 +108,39 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 	// Shared configuration
 	project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n";
 
-	for (std::list<MSVC_Architecture>::const_iterator i = _archs.begin(); i != _archs.end(); ++i) {
-		outputConfigurationType(setup, project, name, "Release|" + getMSVCConfigName(*i), _msvcVersion.toolsetMSVC);
-		outputConfigurationType(setup, project, name, "Analysis" + getMSVCConfigName(*i), _msvcVersion.toolsetMSVC);
-		outputConfigurationType(setup, project, name, "LLVM|" + getMSVCConfigName(*i), _msvcVersion.toolsetLLVM);
-		outputConfigurationType(setup, project, name, "Debug|" + getMSVCConfigName(*i), _msvcVersion.toolsetMSVC);
+	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+		outputConfigurationType(setup, project, name, "Release|" + getMSVCConfigName(*arch), _msvcVersion.toolsetMSVC);
+		outputConfigurationType(setup, project, name, "Analysis" + getMSVCConfigName(*arch), _msvcVersion.toolsetMSVC);
+		outputConfigurationType(setup, project, name, "LLVM|" + getMSVCConfigName(*arch), _msvcVersion.toolsetLLVM);
+		outputConfigurationType(setup, project, name, "Debug|" + getMSVCConfigName(*arch), _msvcVersion.toolsetMSVC);
 	}
 
 	project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n"
 	           "\t<ImportGroup Label=\"ExtensionSettings\">\n"
 	           "\t</ImportGroup>\n";
 
-	for (std::list<MSVC_Architecture>::const_iterator i = _archs.begin(); i != _archs.end(); ++i) {
-		outputProperties(project, "Release|" + getMSVCConfigName(*i), setup.projectDescription + "_Release" + getMSVCArchName(*i) + ".props");
-		outputProperties(project, "Analysis|" + getMSVCConfigName(*i), setup.projectDescription + "_Analysis" + getMSVCArchName(*i) + ".props");
-		outputProperties(project, "LLVM|" + getMSVCConfigName(*i), setup.projectDescription + "_LLVM" + getMSVCArchName(*i) + ".props");
-		outputProperties(project, "Debug|" + getMSVCConfigName(*i), setup.projectDescription + "_Debug" + getMSVCArchName(*i) + ".props");
+	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+		outputProperties(project, "Release|" + getMSVCConfigName(*arch), setup.projectDescription + "_Release" + getMSVCArchName(*arch) + ".props");
+		outputProperties(project, "Analysis|" + getMSVCConfigName(*arch), setup.projectDescription + "_Analysis" + getMSVCArchName(*arch) + ".props");
+		outputProperties(project, "LLVM|" + getMSVCConfigName(*arch), setup.projectDescription + "_LLVM" + getMSVCArchName(*arch) + ".props");
+		outputProperties(project, "Debug|" + getMSVCConfigName(*arch), setup.projectDescription + "_Debug" + getMSVCArchName(*arch) + ".props");
 	}
 
 	project << "\t<PropertyGroup Label=\"UserMacros\" />\n";
 
 	// Project-specific settings (analysis uses debug properties)
-	for (std::list<MSVC_Architecture>::const_iterator i = _archs.begin(); i != _archs.end(); ++i) {
+	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
 		BuildSetup archsetup = setup;
-		std::map<MSVC_Architecture, StringList>::const_iterator disabled_features_it = _arch_disabled_features.find(*i);
+		std::map<MSVC_Architecture, StringList>::const_iterator disabled_features_it = _arch_disabled_features.find(*arch);
 		if (disabled_features_it != _arch_disabled_features.end()) {
 			for (StringList::const_iterator j = disabled_features_it->second.begin(); j != disabled_features_it->second.end(); ++j) {
 				archsetup = removeFeatureFromSetup(archsetup, *j);
 			}
 		}
-		outputProjectSettings(project, name, archsetup, false, *i, "Debug");
-		outputProjectSettings(project, name, archsetup, false, *i, "Analysis");
-		outputProjectSettings(project, name, archsetup, false, *i, "LLVM");
-		outputProjectSettings(project, name, archsetup, true, *i, "Release");
+		outputProjectSettings(project, name, archsetup, false, *arch, "Debug");
+		outputProjectSettings(project, name, archsetup, false, *arch, "Analysis");
+		outputProjectSettings(project, name, archsetup, false, *arch, "LLVM");
+		outputProjectSettings(project, name, archsetup, true, *arch, "Release");
 	}
 
 	// Files
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index 687e2df5de..5f59d89302 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -85,47 +85,29 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) {
 	}
 
 	solution << "Global\n"
-	            "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n"
-	            "\t\tDebug|Win32 = Debug|Win32\n"
-	            "\t\tAnalysis|Win32 = Analysis|Win32\n"
-	            "\t\tLLVM|Win32 = LLVM|Win32\n"
-	            "\t\tRelease|Win32 = Release|Win32\n"
-	            "\t\tDebug|x64 = Debug|x64\n"
-	            "\t\tAnalysis|x64 = Analysis|x64\n"
-	            "\t\tLLVM|x64 = LLVM|x64\n"
-	            "\t\tRelease|x64 = Release|x64\n"
-	            "\t\tDebug|arm64 = Debug|arm64\n"
-	            "\t\tAnalysis|arm64 = Analysis|arm64\n"
-	            "\t\tLLVM|arm64 = LLVM|arm64\n"
-	            "\t\tRelease|arm64 = Release|arm64\n"
-	            "\tEndGlobalSection\n"
+	            "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n";
+
+	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+		solution << "\t\tDebug|" << getMSVCConfigName(*arch) << " = Debug|" << getMSVCConfigName(*arch) << "\n"
+					"\t\tAnalysis|" << getMSVCConfigName(*arch) << " = Analysis|" << getMSVCConfigName(*arch) << "\n"
+					"\t\tLLVM|" << getMSVCConfigName(*arch) << " = LLVM|" << getMSVCConfigName(*arch) << "\n"
+					"\t\tRelease|" << getMSVCConfigName(*arch) << " = Release|" << getMSVCConfigName(*arch) << "\n";
+	}
+
+	solution << "\tEndGlobalSection\n"
 	            "\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n";
 
 	for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
-		solution << "\t\t{" << i->second << "}.Debug|Win32.ActiveCfg = Debug|Win32\n"
-		            "\t\t{" << i->second << "}.Debug|Win32.Build.0 = Debug|Win32\n"
-		            "\t\t{" << i->second << "}.Analysis|Win32.ActiveCfg = Analysis|Win32\n"
-		            "\t\t{" << i->second << "}.Analysis|Win32.Build.0 = Analysis|Win32\n"
-		            "\t\t{" << i->second << "}.LLVM|Win32.ActiveCfg = LLVM|Win32\n"
-		            "\t\t{" << i->second << "}.LLVM|Win32.Build.0 = LLVM|Win32\n"
-		            "\t\t{" << i->second << "}.Release|Win32.ActiveCfg = Release|Win32\n"
-		            "\t\t{" << i->second << "}.Release|Win32.Build.0 = Release|Win32\n"
-		            "\t\t{" << i->second << "}.Debug|x64.ActiveCfg = Debug|x64\n"
-		            "\t\t{" << i->second << "}.Debug|x64.Build.0 = Debug|x64\n"
-		            "\t\t{" << i->second << "}.Analysis|x64.ActiveCfg = Analysis|x64\n"
-		            "\t\t{" << i->second << "}.Analysis|x64.Build.0 = Analysis|x64\n"
-		            "\t\t{" << i->second << "}.LLVM|x64.ActiveCfg = LLVM|x64\n"
-		            "\t\t{" << i->second << "}.LLVM|x64.Build.0 = LLVM|x64\n"
-		            "\t\t{" << i->second << "}.Release|x64.ActiveCfg = Release|x64\n"
-		            "\t\t{" << i->second << "}.Release|x64.Build.0 = Release|x64\n"
-		            "\t\t{" << i->second << "}.Debug|arm64.ActiveCfg = Debug|arm64\n"
-		            "\t\t{" << i->second << "}.Debug|arm64.Build.0 = Debug|arm64\n"
-		            "\t\t{" << i->second << "}.Analysis|arm64.ActiveCfg = Analysis|arm64\n"
-		            "\t\t{" << i->second << "}.Analysis|arm64.Build.0 = Analysis|arm64\n"
-		            "\t\t{" << i->second << "}.LLVM|arm64.ActiveCfg = LLVM|arm64\n"
-		            "\t\t{" << i->second << "}.LLVM|arm64.Build.0 = LLVM|arm64\n"
-		            "\t\t{" << i->second << "}.Release|arm64.ActiveCfg = Release|arm64\n"
-		            "\t\t{" << i->second << "}.Release|arm64.Build.0 = Release|arm64\n";
+		for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+			solution << "\t\t{" << i->second << "}.Debug|" << getMSVCConfigName(*arch) << ".ActiveCfg = Debug|" << getMSVCConfigName(*arch) << "\n"
+						"\t\t{" << i->second << "}.Debug|" << getMSVCConfigName(*arch) << ".Build.0 = Debug|" << getMSVCConfigName(*arch) << "\n"
+						"\t\t{" << i->second << "}.Analysis|" << getMSVCConfigName(*arch) << ".ActiveCfg = Analysis|" << getMSVCConfigName(*arch) << "\n"
+						"\t\t{" << i->second << "}.Analysis|" << getMSVCConfigName(*arch) << ".Build.0 = Analysis|" << getMSVCConfigName(*arch) << "\n"
+						"\t\t{" << i->second << "}.LLVM|" << getMSVCConfigName(*arch) << ".ActiveCfg = LLVM|" << getMSVCConfigName(*arch) << "\n"
+						"\t\t{" << i->second << "}.LLVM|" << getMSVCConfigName(*arch) << ".Build.0 = LLVM|" << getMSVCConfigName(*arch) << "\n"
+						"\t\t{" << i->second << "}.Release|" << getMSVCConfigName(*arch) << ".ActiveCfg = Release|" << getMSVCConfigName(*arch) << "\n"
+						"\t\t{" << i->second << "}.Release|" << getMSVCConfigName(*arch) << ".Build.0 = Release|" << getMSVCConfigName(*arch) << "\n";
+		}
 	}
 
 	solution << "\tEndGlobalSection\n"
@@ -141,18 +123,12 @@ void MSVCProvider::createOtherBuildFiles(const BuildSetup &setup) {
 
 	// Create the configuration property files (for Debug and Release with 32 and 64bits versions)
 	// Note: we use the debug properties for the analysis configuration
-	createBuildProp(setup, true, ARCH_AMD64, "Release");
-	createBuildProp(setup, true, ARCH_X86, "Release");
-	createBuildProp(setup, true, ARCH_ARM64, "Release");
-	createBuildProp(setup, false, ARCH_AMD64, "Debug");
-	createBuildProp(setup, false, ARCH_X86, "Debug");
-	createBuildProp(setup, false, ARCH_ARM64, "Debug");
-	createBuildProp(setup, false, ARCH_AMD64, "Analysis");
-	createBuildProp(setup, false, ARCH_X86, "Analysis");
-	createBuildProp(setup, false, ARCH_ARM64, "Analysis");
-	createBuildProp(setup, false, ARCH_AMD64, "LLVM");
-	createBuildProp(setup, false, ARCH_X86, "LLVM");
-	createBuildProp(setup, false, ARCH_ARM64, "LLVM");
+	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+		createBuildProp(setup, true, *arch, "Release");
+		createBuildProp(setup, false, *arch, "Debug");
+		createBuildProp(setup, false, *arch, "Analysis");
+		createBuildProp(setup, false, *arch, "LLVM");
+	}
 }
 
 void MSVCProvider::addResourceFiles(const BuildSetup &setup, StringList &includeList, StringList &excludeList) {
@@ -161,41 +137,22 @@ void MSVCProvider::addResourceFiles(const BuildSetup &setup, StringList &include
 }
 
 void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
-	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_X86) + getPropertiesExtension()).c_str());
-	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_X86) + getPropertiesExtension() + "\" for writing");
-
-	outputGlobalPropFile(setup, properties, ARCH_X86, setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
-	properties.close();
-
-	properties.open((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_AMD64) + getPropertiesExtension()).c_str());
-	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_AMD64) + getPropertiesExtension() + "\" for writing");
-
-	BuildSetup amd64setup = setup;
-	std::map<MSVC_Architecture, StringList>::const_iterator amd64_disabled_features_it = _arch_disabled_features.find(ARCH_AMD64);
-	if (amd64_disabled_features_it != _arch_disabled_features.end()) {
-		for (StringList::const_iterator feature = amd64_disabled_features_it->second.begin(); feature != amd64_disabled_features_it->second.end(); ++feature) {
-			amd64setup = removeFeatureFromSetup(amd64setup, *feature);
+	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+		std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(*arch) + getPropertiesExtension()).c_str());
+		if (!properties)
+			error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(*arch) + getPropertiesExtension() + "\" for writing");
+
+		BuildSetup archSetup = setup;
+		std::map<MSVC_Architecture, StringList>::const_iterator arch_disabled_features_it = _arch_disabled_features.find(*arch);
+		if (arch_disabled_features_it != _arch_disabled_features.end()) {
+			for (StringList::const_iterator feature = arch_disabled_features_it->second.begin(); feature != arch_disabled_features_it->second.end(); ++feature) {
+				archSetup = removeFeatureFromSetup(archSetup, *feature);
+			}
 		}
-	}
-
-	outputGlobalPropFile(amd64setup, properties, ARCH_AMD64, amd64setup.defines, convertPathToWin(amd64setup.filePrefix), amd64setup.runBuildEvents);
-	properties.close();
 
-	properties.open((setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_ARM64) + getPropertiesExtension()).c_str());
-	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global" + getMSVCArchName(ARCH_ARM64) + getPropertiesExtension() + "\" for writing");
-
-	BuildSetup arm64setup = setup;
-	std::map<MSVC_Architecture, StringList>::const_iterator arm64_disabled_features_it = _arch_disabled_features.find(ARCH_ARM64);
-	if (arm64_disabled_features_it != _arch_disabled_features.end()) {
-		for (StringList::const_iterator feature = arm64_disabled_features_it->second.begin(); feature != arm64_disabled_features_it->second.end(); ++feature) {
-			arm64setup = removeFeatureFromSetup(arm64setup, *feature);
-		}
+		outputGlobalPropFile(archSetup, properties, *arch, archSetup.defines, convertPathToWin(archSetup.filePrefix), archSetup.runBuildEvents);
+		properties.close();
 	}
-	outputGlobalPropFile(arm64setup, properties, ARCH_ARM64, arm64setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
-	properties.close();
 }
 
 std::string MSVCProvider::getPreBuildEvent() const {
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index a94e19322c..74ba72195e 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -34,6 +34,9 @@ namespace CreateProjectTool {
 
 VisualStudioProvider::VisualStudioProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version, const MSVCVersion& msvc)
 	: MSVCProvider(global_warnings, project_warnings, version, msvc) {
+
+	_archs.push_back(ARCH_X86);
+	_archs.push_back(ARCH_AMD64);
 }
 
 const char *VisualStudioProvider::getProjectExtension() {
@@ -63,10 +66,11 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 	project << "\tTargetFrameworkVersion=\"131072\"\n";
 
 	project << "\t>\n"
-	           "\t<Platforms>\n"
-	           "\t\t<Platform Name=\"Win32\" />\n"
-	           "\t\t<Platform Name=\"x64\" />\n"
-	           "\t</Platforms>\n"
+	           "\t<Platforms>\n";
+	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+		project << "\t\t<Platform Name=\"" << getMSVCConfigName(*arch) << "\" />\n";
+	}
+	project << "\t</Platforms>\n"
 	           "\t<Configurations>\n";
 
 	// Check for project-specific warnings:
@@ -78,20 +82,15 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 		for (StringList::const_iterator i = setup.libraries.begin(); i != setup.libraries.end(); ++i)
 			libraries += ' ' + *i + ".lib";
 
-		// Win32
-		outputConfiguration(project, setup, libraries, "Debug", ARCH_X86);
-		outputConfiguration(project, setup, libraries, "Analysis", ARCH_X86);
-		outputConfiguration(project, setup, libraries, "LLVM", ARCH_X86);
-		outputConfiguration(project, setup, libraries, "Release", ARCH_X86);
-
-		// 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!
-		outputConfiguration(project, setup, libraries, "Debug", ARCH_AMD64);
-		outputConfiguration(project, setup, libraries, "Analysis", ARCH_AMD64);
-		outputConfiguration(project, setup, libraries, "LLVM", ARCH_AMD64); // NOTE: it was win32-x64 here
-		outputConfiguration(project, setup, libraries, "Release", ARCH_AMD64);
+		for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+			outputConfiguration(project, setup, libraries, "Debug", *arch);
+			outputConfiguration(project, setup, libraries, "Analysis", *arch);
+			outputConfiguration(project, setup, libraries, "LLVM", *arch);
+			outputConfiguration(project, setup, libraries, "Release", *arch);
+		}
 
 	} else {
 		bool enableLanguageExtensions = find(_enableLanguageExtensions.begin(), _enableLanguageExtensions.end(), name) != _enableLanguageExtensions.end();
@@ -107,15 +106,13 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 		toolConfig += (disableEditAndContinue   ? "DebugInformationFormat=\"3\" " : "");
 		toolConfig += (enableLanguageExtensions ? "DisableLanguageExtensions=\"false\" " : "");
 
-		// Win32
-		outputConfiguration(setup, project, toolConfig, "Debug", "Win32", "");
-		outputConfiguration(setup, project, toolConfig, "Analysis", "Win32", "");
-		outputConfiguration(setup, project, toolConfig, "LLVM", "Win32", "");
-		outputConfiguration(setup, project, toolConfig, "Release", "Win32", "");
-		outputConfiguration(setup, project, toolConfig, "Debug", "x64", "64");
-		outputConfiguration(setup, project, toolConfig, "Analysis", "x64", "64");
-		outputConfiguration(setup, project, toolConfig, "LLVM", "x64", "64");
-		outputConfiguration(setup, project, toolConfig, "Release", "x64", "64");
+		for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+			const std::string outputBitness = (*arch == ARCH_X86 ? "" : "64");
+			outputConfiguration(setup, project, toolConfig, "Debug", getMSVCConfigName(*arch), outputBitness);
+			outputConfiguration(setup, project, toolConfig, "Analysis", getMSVCConfigName(*arch), outputBitness);
+			outputConfiguration(setup, project, toolConfig, "LLVM", getMSVCConfigName(*arch), outputBitness);
+			outputConfiguration(setup, project, toolConfig, "Release", getMSVCConfigName(*arch), outputBitness);
+		}
 	}
 
 	project << "\t</Configurations>\n"
@@ -336,6 +333,7 @@ void VisualStudioProvider::writeFileListToProject(const FileNode &dir, std::ofst
 				name += ".o";
 				std::transform(name.begin(), name.end(), name.begin(), tolower);
 				const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), name) != duplicate.end());
+				std::string filePath = convertPathToWin(filePrefix + node->name);
 
 				if (ext == "asm") {
 					std::string objFileName = "$(IntDir)\\";
@@ -346,41 +344,14 @@ void VisualStudioProvider::writeFileListToProject(const FileNode &dir, std::ofst
 					const std::string toolLine = indentString + "\t\t<Tool Name=\"VCCustomBuildTool\" CommandLine=\"nasm.exe -f win32 -g -o "" + objFileName + "" "$(InputPath)"&#x0D;&#x0A;\" Outputs=\"" + objFileName + "\" />\n";
 
 					// NASM is not supported for x64, thus we do not need to add additional entries here :-).
-					projectFile << indentString << "<File RelativePath=\"" << convertPathToWin(filePrefix + node->name) << "\">\n"
-					            << indentString << "\t<FileConfiguration Name=\"Debug|Win32\">\n"
-					            << toolLine
-					            << indentString << "\t</FileConfiguration>\n"
-					            << indentString << "\t<FileConfiguration Name=\"Analysis|Win32\">\n"
-					            << toolLine
-					            << indentString << "\t</FileConfiguration>\n"
-					            << indentString << "\t<FileConfiguration Name=\"Release|Win32\">\n"
-					            << toolLine
-					            << indentString << "\t</FileConfiguration>\n"
-					            << indentString << "</File>\n";
+					writeFileToProject(projectFile, filePath, ARCH_X86, indentString, toolLine);
 				} else {
 					if (isDuplicate) {
 						const std::string toolLine = indentString + "\t\t<Tool Name=\"VCCLCompilerTool\" ObjectFile=\"$(IntDir)\\" + objPrefix + "$(InputName).obj\" XMLDocumentationFileName=\"$(IntDir)\\" + objPrefix + "$(InputName).xdc\" />\n";
 
-						projectFile << indentString << "<File RelativePath=\"" << convertPathToWin(filePrefix + node->name) << "\">\n"
-						            << indentString << "\t<FileConfiguration Name=\"Debug|Win32\">\n"
-						            << toolLine
-						            << indentString << "\t</FileConfiguration>\n"
-						            << indentString << "\t<FileConfiguration Name=\"Analysis|Win32\">\n"
-						            << toolLine
-						            << indentString << "\t</FileConfiguration>\n"
-						            << indentString << "\t<FileConfiguration Name=\"Release|Win32\">\n"
-						            << toolLine
-						            << indentString << "\t</FileConfiguration>\n"
-						            << indentString << "\t<FileConfiguration Name=\"Debug|x64\">\n"
-						            << toolLine
-						            << indentString << "\t</FileConfiguration>\n"
-						            << indentString << "\t<FileConfiguration Name=\"Analysis|x64\">\n"
-						            << toolLine
-						            << indentString << "\t</FileConfiguration>\n"
-						            << indentString << "\t<FileConfiguration Name=\"Release|x64\">\n"
-						            << toolLine
-						            << indentString << "\t</FileConfiguration>\n"
-						            << indentString << "</File>\n";
+						for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
+							writeFileToProject(projectFile, filePath, *arch, indentString, toolLine);
+						}
 					} else {
 						projectFile << indentString << "<File RelativePath=\"" << convertPathToWin(filePrefix + node->name) << "\" />\n";
 					}
@@ -395,4 +366,22 @@ void VisualStudioProvider::writeFileListToProject(const FileNode &dir, std::ofst
 		projectFile << getIndent(indentation + 1) << "</Filter>\n";
 }
 
+void VisualStudioProvider::writeFileToProject(std::ofstream &projectFile, const std::string &filePath, MSVC_Architecture arch,
+											  const std::string &indentString, const std::string &toolLine) {
+	projectFile << indentString << "<File RelativePath=\"" << filePath << "\">\n"
+	            << indentString << "\t<FileConfiguration Name=\"Debug|" << getMSVCConfigName(arch) << "\">\n"
+	            << toolLine
+	            << indentString << "\t</FileConfiguration>\n"
+	            << indentString << "\t<FileConfiguration Name=\"Analysis|" << getMSVCConfigName(arch) << "\">\n"
+	            << toolLine
+	            << indentString << "\t</FileConfiguration>\n"
+	            << indentString << "\t<FileConfiguration Name=\"LLVM|" << getMSVCConfigName(arch) << "\">\n"
+	            << toolLine
+	            << indentString << "\t</FileConfiguration>\n"
+	            << indentString << "\t<FileConfiguration Name=\"Release|" << getMSVCConfigName(arch) << "\">\n"
+	            << toolLine
+	            << indentString << "\t</FileConfiguration>\n"
+	            << indentString << "</File>\n";
+}
+
 } // End of CreateProjectTool namespace
diff --git a/devtools/create_project/visualstudio.h b/devtools/create_project/visualstudio.h
index 2e1448bcfd..222eca069a 100644
--- a/devtools/create_project/visualstudio.h
+++ b/devtools/create_project/visualstudio.h
@@ -38,6 +38,9 @@ protected:
 	void writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation,
 	                            const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
 
+	void writeFileToProject(std::ofstream &projectFile, const std::string &filePath, MSVC_Architecture arch,
+							const std::string &indentString, const std::string &toolLine);
+
 	void writeReferences(const BuildSetup &setup, std::ofstream &output);
 
 	void outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, MSVC_Architecture arch, const StringList &defines, const std::string &prefix, bool runBuildEvents);


Commit: 26591c1341aefef91351a65cdc30c01440672277
    https://github.com/scummvm/scummvm/commit/26591c1341aefef91351a65cdc30c01440672277
Author: Michał Janiszewski (janisozaur at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: Add missing is_open check

This is to satisfy DeepCode warning on PR

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


diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 397d76908c..696447f652 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -77,8 +77,10 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
                                         const StringList &includeList, const StringList &excludeList) {
 	const std::string projectFile = setup.outputDir + '/' + name + getProjectExtension();
 	std::ofstream project(projectFile.c_str());
-	if (!project)
+	if (!project || !project.is_open()) {
 		error("Could not open \"" + projectFile + "\" for writing");
+		return;
+	}
 
 	project << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
 	           "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
@@ -207,8 +209,10 @@ void MSBuildProvider::createFiltersFile(const BuildSetup &setup, const std::stri
 
 	const std::string filtersFile = setup.outputDir + '/' + name + getProjectExtension() + ".filters";
 	std::ofstream filters(filtersFile.c_str());
-	if (!filters)
+	if (!filters || !filters.is_open()) {
 		error("Could not open \"" + filtersFile + "\" for writing");
+		return;
+	}
 
 	filters << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
 	           "<Project ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n";
@@ -398,8 +402,10 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, M
 	const std::string outputBitness = (arch == ARCH_X86 ? "32" : "64");
 
 	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension()).c_str());
-	if (!properties)
+	if (!properties || !properties.is_open()) {
 		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension() + "\" for writing");
+		return;
+	}
 
 	properties << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
 	              "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index 5f59d89302..fd9c3eab52 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -58,8 +58,10 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) {
 	std::string solutionUUID = createUUID(setup.projectName + ".sln");
 
 	std::ofstream solution((setup.outputDir + '/' + setup.projectName + ".sln").c_str());
-	if (!solution)
+	if (!solution || !solution.is_open()) {
 		error("Could not open \"" + setup.outputDir + '/' + setup.projectName + ".sln\" for writing");
+		return;
+	}
 
 	solution << "Microsoft Visual Studio Solution File, Format Version " << _msvcVersion.solutionFormat << "\n";
 	solution << "# Visual Studio " << _msvcVersion.solutionVersion << "\n";
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index 74ba72195e..572803af97 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -51,8 +51,10 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
                                              const StringList &includeList, const StringList &excludeList) {
 	const std::string projectFile = setup.outputDir + '/' + name + getProjectExtension();
 	std::ofstream project(projectFile.c_str());
-	if (!project)
+	if (!project || !project.is_open()) {
 		error("Could not open \"" + projectFile + "\" for writing");
+		return;
+	}
 
 	project << "<?xml version=\"1.0\" encoding=\"windows-1252\"?>\n"
 	           "<VisualStudioProject\n"
@@ -259,8 +261,10 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
 void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) {
 
 	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCConfigName(arch) + getPropertiesExtension()).c_str());
-	if (!properties)
+	if (!properties || !properties.is_open()) {
 		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCConfigName(arch) + getPropertiesExtension() + "\" for writing");
+		return;
+	}
 
 	properties << "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n"
 	              "<VisualStudioPropertySheet\n"


Commit: 680da50b817bd56279d26fba7604e3e4fba31ce3
    https://github.com/scummvm/scummvm/commit/680da50b817bd56279d26fba7604e3e4fba31ce3
Author: Michał Janiszewski (janisozaur at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: Remove C++11

Changed paths:
    devtools/create_project/create_project.cpp
    devtools/create_project/msvc.cpp


diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index b7f935dabf..6ebccc56a3 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1201,8 +1201,12 @@ StringList getFeatureLibraries(const FeatureList &features) {
 	StringList libraries;
 
 	for (FeatureList::const_iterator i = features.begin(); i != features.end(); ++i) {
-		libraries.merge(getFeatureLibraries(*i));
+		StringList fl = getFeatureLibraries(*i);
+		for (StringList::const_iterator flit = fl.begin(); flit != fl.end(); ++flit) {
+			libraries.push_back(*flit);
+		}
 	}
+	libraries.sort();
 
 	return libraries;
 }
@@ -1227,7 +1231,8 @@ bool getFeatureBuildState(const std::string &name, FeatureList &features) {
 }
 
 BuildSetup removeFeatureFromSetup(BuildSetup setup, const std::string &feature) {
-	for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) {
+	// TODO: use const_iterator in C++11
+	for (FeatureList::iterator i = setup.features.begin(); i != setup.features.end(); ++i) {
 		if (i->enable && feature == i->name) {
 			StringList feature_libs = getFeatureLibraries(*i);
 			for (StringList::iterator lib = feature_libs.begin(); lib != feature_libs.end(); ++lib) {
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index fd9c3eab52..80ac6d44b8 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -40,11 +40,18 @@ MSVCProvider::MSVCProvider(StringList &global_warnings, std::map<std::string, St
 	_disableEditAndContinue   = tokenize(DISABLE_EDIT_AND_CONTINUE, ',');
 
 	// NASM not supported for Windows on AMD64 target
-	_arch_disabled_features[ARCH_AMD64] = {"nasm"};
+	StringList amd64_disabled_features;
+	amd64_disabled_features.push_back("nasm");
+	_arch_disabled_features[ARCH_AMD64] = amd64_disabled_features;
 	// NASM not supported for WoA target
 	// No OpenGL, OpenGL ES on Windows on ARM
 	// https://github.com/microsoft/vcpkg/issues/11248 [fribidi] Fribidi doesn't cross-compile on x86-64 to target arm/arm64
-	_arch_disabled_features[ARCH_ARM64] = {"nasm", "opengl", "opengles", "fribidi"};
+	StringList arm64_disabled_features;
+	arm64_disabled_features.push_back("nasm");
+	arm64_disabled_features.push_back("opengl");
+	arm64_disabled_features.push_back("opengles");
+	arm64_disabled_features.push_back("fribidi");
+	_arch_disabled_features[ARCH_ARM64] = arm64_disabled_features;
 }
 
 void MSVCProvider::createWorkspace(const BuildSetup &setup) {


Commit: 95d191e19a2faa264d055d9e5db2818b589c2ac5
    https://github.com/scummvm/scummvm/commit/95d191e19a2faa264d055d9e5db2818b589c2ac5
Author: SupSuper (supsuper at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: Fix VS2008 property names

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


diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 696447f652..20c5396043 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -102,7 +102,7 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 			   "\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n";
 
 	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
-		project << "\t\t<VcpkgTriplet Condition=\"'$(Platform)' == '" << getMSVCConfigName(*arch) << "'\">" << getMSVCArchName(*arch) << "-windows</VcpkgTriplet>";
+		project << "\t\t<VcpkgTriplet Condition=\"'$(Platform)' == '" << getMSVCConfigName(*arch) << "'\">" << getMSVCArchName(*arch) << "-windows</VcpkgTriplet>\n";
 	}
 
 	project << "\t</PropertyGroup>\n";
@@ -399,8 +399,6 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
 }
 
 void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) {
-	const std::string outputBitness = (arch == ARCH_X86 ? "32" : "64");
-
 	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension()).c_str());
 	if (!properties || !properties.is_open()) {
 		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension() + "\" for writing");
@@ -455,6 +453,7 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, M
 
 		if (configuration == "LLVM") {
 			// FIXME The LLVM cl wrapper does not seem to work properly with the $(TargetDir) path so we hard-code the build folder until the issue is resolved
+			const std::string outputBitness = (arch == ARCH_X86 ? "32" : "64");
 			properties << "\t\t\t<AdditionalIncludeDirectories>" << configuration << outputBitness <<";%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
 		                  "\t\t\t<AdditionalOptions>-Wno-microsoft -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow -Wnon-virtual-dtor -Wwrite-strings -Wno-conversion -Wno-shorten-64-to-32 -Wno-sign-compare -Wno-four-char-constants -Wno-nested-anon-types -Qunused-arguments %(AdditionalOptions)</AdditionalOptions>\n";
 		}
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index 572803af97..761a62f75c 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -109,11 +109,10 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 		toolConfig += (enableLanguageExtensions ? "DisableLanguageExtensions=\"false\" " : "");
 
 		for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
-			const std::string outputBitness = (*arch == ARCH_X86 ? "" : "64");
-			outputConfiguration(setup, project, toolConfig, "Debug", getMSVCConfigName(*arch), outputBitness);
-			outputConfiguration(setup, project, toolConfig, "Analysis", getMSVCConfigName(*arch), outputBitness);
-			outputConfiguration(setup, project, toolConfig, "LLVM", getMSVCConfigName(*arch), outputBitness);
-			outputConfiguration(setup, project, toolConfig, "Release", getMSVCConfigName(*arch), outputBitness);
+			outputConfiguration(setup, project, toolConfig, "Debug", *arch);
+			outputConfiguration(setup, project, toolConfig, "Analysis", *arch);
+			outputConfiguration(setup, project, toolConfig, "LLVM", *arch);
+			outputConfiguration(setup, project, toolConfig, "Release", *arch);
 		}
 	}
 
@@ -151,8 +150,8 @@ void VisualStudioProvider::outputConfiguration(std::ostream &project, const Buil
 	project << "\t\t</Configuration>\n";
 }
 
-void VisualStudioProvider::outputConfiguration(const BuildSetup &setup, std::ostream &project, const std::string &toolConfig, const std::string &config, const std::string &platform, const std::string &props) {
-	project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\" << setup.projectDescription << "_" << config << props << ".vsprops\">\n"
+void VisualStudioProvider::outputConfiguration(const BuildSetup &setup, std::ostream &project, const std::string &toolConfig, const std::string &config, const MSVC_Architecture arch) {
+	project << "\t\t<Configuration Name=\"" << config << "|" << getMSVCConfigName(arch) << "\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\" << setup.projectDescription << "_" << config << getMSVCArchName(arch) << ".vsprops\">\n"
 	           "\t\t\t<Tool Name=\"VCCLCompilerTool\" "<< toolConfig << "/>\n"
 	           "\t\t</Configuration>\n";
 }
@@ -260,9 +259,9 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
 
 void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelease, MSVC_Architecture arch, const std::string &configuration) {
 
-	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCConfigName(arch) + getPropertiesExtension()).c_str());
+	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension()).c_str());
 	if (!properties || !properties.is_open()) {
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCConfigName(arch) + getPropertiesExtension() + "\" for writing");
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + getMSVCArchName(arch) + getPropertiesExtension() + "\" for writing");
 		return;
 	}
 
@@ -270,8 +269,8 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea
 	              "<VisualStudioPropertySheet\n"
 	              "\tProjectType=\"Visual C++\"\n"
 	              "\tVersion=\"8.00\"\n"
-	              "\tName=\"" << setup.projectDescription << "_" << configuration << getMSVCConfigName(arch) << "\"\n"
-	              "\tInheritedPropertySheets=\".\\" << setup.projectDescription << "_Global" << getMSVCConfigName(arch) << ".vsprops\"\n"
+	              "\tName=\"" << setup.projectDescription << "_" << configuration << getMSVCArchName(arch) << "\"\n"
+	              "\tInheritedPropertySheets=\".\\" << setup.projectDescription << "_Global" << getMSVCArchName(arch) << ".vsprops\"\n"
 	              "\t>\n"
 	              "\t<Tool\n"
 	              "\t\tName=\"VCCLCompilerTool\"\n";
diff --git a/devtools/create_project/visualstudio.h b/devtools/create_project/visualstudio.h
index 222eca069a..99c2819584 100644
--- a/devtools/create_project/visualstudio.h
+++ b/devtools/create_project/visualstudio.h
@@ -51,7 +51,7 @@ protected:
 	const char *getPropertiesExtension();
 
 	void outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const MSVC_Architecture arch);
-	void outputConfiguration(const BuildSetup &setup, std::ostream &project, const std::string &toolConfig, const std::string &config, const std::string &platform, const std::string &props);
+	void outputConfiguration(const BuildSetup &setup, std::ostream &project, const std::string &toolConfig, const std::string &config, const MSVC_Architecture arch);
 	void outputBuildEvents(std::ostream &project, const BuildSetup &setup, const MSVC_Architecture arch);
 };
 


Commit: fb2a740dc77d79447ca9a4964ad3a63150dcab3e
    https://github.com/scummvm/scummvm/commit/fb2a740dc77d79447ca9a4964ad3a63150dcab3e
Author: Michał Janiszewski (janisozaur at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
JANITORIAL: Use C++03 standard in clang-format rules

This mostly addresses the problem of ending double templates with `> >`
instead of `>>`, a feature only enabled in newer C++ standards.

Changed paths:
    .clang-format


diff --git a/.clang-format b/.clang-format
index c950f94445..8a5739e47f 100644
--- a/.clang-format
+++ b/.clang-format
@@ -19,4 +19,5 @@
     SpacesInAngles: false,
     SpacesInParentheses: false,
     SpacesInSquareBrackets: false,
+    Standard: c++03,
 }


Commit: bb9dddcd04f6237a4708eac731b6b7e8ac3090cf
    https://github.com/scummvm/scummvm/commit/bb9dddcd04f6237a4708eac731b6b7e8ac3090cf
Author: Michał Janiszewski (janisozaur at gmail.com)
Date: 2020-07-15T15:30:55+02:00

Commit Message:
CREATE_PROJECT: JANITORIAL: Apply code formatting

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


diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 6ebccc56a3..13990de923 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -28,27 +28,27 @@
 #undef main
 #endif // main
 
-#include "config.h"
 #include "create_project.h"
+#include "config.h"
 
 #include "cmake.h"
 #include "codeblocks.h"
+#include "msbuild.h"
 #include "msvc.h"
 #include "visualstudio.h"
-#include "msbuild.h"
 #include "xcode.h"
 
+#include <algorithm>
 #include <fstream>
+#include <iomanip>
 #include <iostream>
+#include <iterator>
 #include <sstream>
 #include <stack>
-#include <algorithm>
-#include <iomanip>
-#include <iterator>
 #include <utility>
 
-#include <cstring>
 #include <cstdlib>
+#include <cstring>
 #include <ctime>
 
 #if (defined(_WIN32) || defined(WIN32)) && !defined(__GNUC__)
@@ -58,11 +58,11 @@
 #if (defined(_WIN32) || defined(WIN32))
 #include <windows.h>
 #else
+#include <dirent.h>
+#include <errno.h>
 #include <sstream>
 #include <sys/param.h>
 #include <sys/stat.h>
-#include <dirent.h>
-#include <errno.h>
 #endif
 
 namespace {
@@ -134,7 +134,7 @@ int main(int argc, char *argv[]) {
 	setup.features = getAllFeatures();
 
 	ProjectType projectType = kProjectNone;
-	const MSVCVersion* msvc = NULL;
+	const MSVCVersion *msvc = NULL;
 	int msvcVersion = 0;
 
 	// Parse command line arguments
@@ -142,7 +142,7 @@ int main(int argc, char *argv[]) {
 	for (int i = 2; i < argc; ++i) {
 		if (!std::strcmp(argv[i], "--list-engines")) {
 			cout << " The following enables are available in the " PROJECT_DESCRIPTION " source distribution\n"
-			        " located at \"" << srcDir << "\":\n";
+			     << " located at \"" << srcDir << "\":\n";
 
 			cout << "   state  |       name      |     description\n\n";
 			cout.setf(std::ios_base::left, std::ios_base::adjustfield);
@@ -276,7 +276,7 @@ int main(int argc, char *argv[]) {
 		} else if (!std::strcmp(argv[i], "--build-events")) {
 			setup.runBuildEvents = true;
 		} else if (!std::strcmp(argv[i], "--installer")) {
-			setup.runBuildEvents  = true;
+			setup.runBuildEvents = true;
 			setup.createInstaller = true;
 		} else if (!std::strcmp(argv[i], "--tools")) {
 			setup.devTools = true;
@@ -484,7 +484,6 @@ int main(int argc, char *argv[]) {
 
 		provider = new CreateProjectTool::CodeBlocksProvider(globalWarnings, projectWarnings);
 
-
 		// Those libraries are automatically added by MSVC, but we need to add them manually with mingw
 		setup.libraries.push_back("ole32");
 		setup.libraries.push_back("uuid");
@@ -674,11 +673,11 @@ int main(int argc, char *argv[]) {
 	}
 
 	// Setup project name and description
-	setup.projectName        = PROJECT_NAME;
+	setup.projectName = PROJECT_NAME;
 	setup.projectDescription = PROJECT_DESCRIPTION;
 
 	if (setup.devTools) {
-		setup.projectName        += "-tools";
+		setup.projectName += "-tools";
 		setup.projectDescription += "Tools";
 	}
 
@@ -964,9 +963,12 @@ bool parseEngine(const std::string &line, EngineDesc &engine) {
 		return false;
 	++token;
 
-	engine.name = *token; ++token;
-	engine.desc = *token; ++token;
-	engine.enable = (*token == "yes"); ++token;
+	engine.name = *token;
+	++token;
+	engine.desc = *token;
+	++token;
+	engine.enable = (*token == "yes");
+	++token;
 	if (token != tokens.end()) {
 		engine.subEngines = tokenize(*token);
 		++token;
@@ -1055,6 +1057,7 @@ TokenList tokenize(const std::string &input, char separator) {
 }
 
 namespace {
+// clang-format off
 const Feature s_features[] = {
 	// Libraries
 	{      "libz",        "USE_ZLIB", "zlib",             true,  "zlib (compression) support" },
@@ -1141,6 +1144,7 @@ const std::pair<std::string, std::string> s_canonical_lib_name_map[] = {
 
 const char *s_msvc_arch_names[] = {"arm64", "x86", "x64"};
 const char *s_msvc_config_names[] = {"arm64", "Win32", "x64"};
+// clang-format on
 } // End of anonymous namespace
 
 std::string getMSVCArchName(MSVC_Architecture arch) {
@@ -1345,7 +1349,8 @@ void splitFilename(const std::string &fileName, std::string &name, std::string &
 
 std::string basename(const std::string &fileName) {
 	const std::string::size_type slash = fileName.find_last_of('/');
-	if (slash == std::string::npos) return fileName;
+	if (slash == std::string::npos)
+		return fileName;
 	return fileName.substr(slash + 1);
 }
 
@@ -1505,7 +1510,6 @@ void createDirectory(const std::string &dir) {
 		}
 	}
 #endif
-
 }
 
 /**
@@ -1570,7 +1574,7 @@ FileNode *scanFiles(const std::string &dir, const StringList &includeList, const
 // Project Provider methods
 //////////////////////////////////////////////////////////////////////////
 ProjectProvider::ProjectProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version)
-	: _version(version), _globalWarnings(global_warnings), _projectWarnings(project_warnings) {
+    : _version(version), _globalWarnings(global_warnings), _projectWarnings(project_warnings) {
 }
 
 void ProjectProvider::createProject(BuildSetup &setup) {
@@ -1596,7 +1600,8 @@ void ProjectProvider::createProject(BuildSetup &setup) {
 		if (i->first == setup.projectName)
 			continue;
 		// Retain the files between engines if we're creating a single project
-		in.clear(); ex.clear();
+		in.clear();
+		ex.clear();
 
 		const std::string moduleDir = setup.srcDir + targetFolder + i->first;
 
@@ -1606,7 +1611,8 @@ void ProjectProvider::createProject(BuildSetup &setup) {
 
 	if (setup.tests) {
 		// Create the main project file.
-		in.clear(); ex.clear();
+		in.clear();
+		ex.clear();
 		createModuleList(setup.srcDir + "/backends", setup.defines, setup.testDirs, in, ex);
 		createModuleList(setup.srcDir + "/backends/platform/sdl", setup.defines, setup.testDirs, in, ex);
 		createModuleList(setup.srcDir + "/base", setup.defines, setup.testDirs, in, ex);
@@ -1620,7 +1626,8 @@ void ProjectProvider::createProject(BuildSetup &setup) {
 		createProjectFile(setup.projectName, svmUUID, setup, setup.srcDir, in, ex);
 	} else if (!setup.devTools) {
 		// Last but not least create the main project file.
-		in.clear(); ex.clear();
+		in.clear();
+		ex.clear();
 		// File list for the Project file
 		createModuleList(setup.srcDir + "/backends", setup.defines, setup.testDirs, in, ex);
 		createModuleList(setup.srcDir + "/backends/platform/sdl", setup.defines, setup.testDirs, in, ex);
@@ -1713,8 +1720,10 @@ std::string ProjectProvider::createUUID() const {
 	for (int i = 0; i < kUUIDLen; ++i)
 		uuid[i] = (unsigned char)((std::rand() / (double)(RAND_MAX)) * 0xFF);
 
-	uuid[8] &= 0xBF; uuid[8] |= 0x80;
-	uuid[6] &= 0x4F; uuid[6] |= 0x40;
+	uuid[8] &= 0xBF;
+	uuid[8] |= 0x80;
+	uuid[6] &= 0x4F;
+	uuid[6] |= 0x40;
 
 	return UUIDToString(uuid);
 #endif
@@ -1726,7 +1735,7 @@ std::string ProjectProvider::createUUID(const std::string &name) const {
 	if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
 		error("CryptAcquireContext failed");
 	}
-	
+
 	// Use MD5 hashing algorithm
 	HCRYPTHASH hHash = NULL;
 	if (!CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash)) {
@@ -1736,7 +1745,7 @@ std::string ProjectProvider::createUUID(const std::string &name) const {
 
 	// Hash unique ScummVM namespace {5f5b43e8-35ff-4f1e-ad7e-a2a87e9b5254}
 	const BYTE uuidNs[kUUIDLen] =
-		{ 0x5f, 0x5b, 0x43, 0xe8, 0x35, 0xff, 0x4f, 0x1e, 0xad, 0x7e, 0xa2, 0xa8, 0x7e, 0x9b, 0x52, 0x54 };
+	    {0x5f, 0x5b, 0x43, 0xe8, 0x35, 0xff, 0x4f, 0x1e, 0xad, 0x7e, 0xa2, 0xa8, 0x7e, 0x9b, 0x52, 0x54};
 	if (!CryptHashData(hHash, uuidNs, kUUIDLen, 0)) {
 		CryptDestroyHash(hHash);
 		CryptReleaseContext(hProv, 0);
@@ -1760,8 +1769,10 @@ std::string ProjectProvider::createUUID(const std::string &name) const {
 	}
 
 	// Add version and variant
-	uuid[6] &= 0x0F; uuid[6] |= 0x30;
-	uuid[8] &= 0x3F; uuid[8] |= 0x80;
+	uuid[6] &= 0x0F;
+	uuid[6] |= 0x30;
+	uuid[8] &= 0x3F;
+	uuid[8] |= 0x80;
 
 	CryptDestroyHash(hHash);
 	CryptReleaseContext(hProv, 0);
@@ -1812,7 +1823,8 @@ void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &p
 			continue;
 
 		// Search for duplicates
-		StringList::const_iterator j = i; ++j;
+		StringList::const_iterator j = i;
+		++j;
 		for (; j != includeList.end(); ++j) {
 			std::string candidateFileName = getLastPathComponent(*j);
 			std::transform(candidateFileName.begin(), candidateFileName.end(), candidateFileName.begin(), tolower);
@@ -2083,7 +2095,7 @@ void ProjectProvider::createEnginePluginsTable(const BuildSetup &setup) {
 		                   << "#endif\n";
 	}
 }
-} // End of anonymous namespace
+} // namespace CreateProjectTool
 
 void error(const std::string &message) {
 	std::cerr << "ERROR: " << message << "!" << std::endl;
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index 0f0ce67e70..56eec93205 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -23,12 +23,12 @@
 #ifndef TOOLS_CREATE_PROJECT_H
 #define TOOLS_CREATE_PROJECT_H
 
-#ifndef __has_feature       // Optional of course.
-#define __has_feature(x) 0  // Compatibility with non-clang compilers.
+#ifndef __has_feature      // Optional of course.
+#define __has_feature(x) 0 // Compatibility with non-clang compilers.
 #endif
 
-#include <map>
 #include <list>
+#include <map>
 #include <string>
 
 #include <cassert>
@@ -156,12 +156,12 @@ StringList getEngineDefines(const EngineDescList &engines);
  * used to build ScummVM.
  */
 struct Feature {
-	const char *name;        ///< Name of the feature
-	const char *define;      ///< Define of the feature
+	const char *name;   ///< Name of the feature
+	const char *define; ///< Define of the feature
 
-	const char *libraries;   ///< Libraries, which need to be linked, for the feature
+	const char *libraries; ///< Libraries, which need to be linked, for the feature
 
-	bool enable;             ///< Whether the feature is enabled or not
+	bool enable; ///< Whether the feature is enabled or not
 
 	const char *description; ///< Human readable description of the feature
 
@@ -172,8 +172,8 @@ struct Feature {
 typedef std::list<Feature> FeatureList;
 
 struct Tool {
-	const char *name;        ///< Name of the tools
-	bool enable;             ///< Whether the tools is enabled or not
+	const char *name; ///< Name of the tools
+	bool enable;      ///< Whether the tools is enabled or not
 };
 typedef std::list<Tool> ToolList;
 
@@ -236,8 +236,8 @@ bool getFeatureBuildState(const std::string &name, FeatureList &features);
  * It also contains the path to the project source root.
  */
 struct BuildSetup {
-	std::string projectName;         ///< Project name
-	std::string projectDescription;  ///< Project description
+	std::string projectName;        ///< Project name
+	std::string projectDescription; ///< Project description
 
 	std::string srcDir;     ///< Path to the sources.
 	std::string filePrefix; ///< Prefix for the relative path arguments in the project files.
@@ -258,11 +258,11 @@ struct BuildSetup {
 	bool useCanonicalLibNames; ///< Whether to use canonical libraries names or default ones
 
 	BuildSetup() {
-		devTools             = false;
-		tests                = false;
-		runBuildEvents       = false;
-		createInstaller      = false;
-		useSDL2              = true;
+		devTools = false;
+		tests = false;
+		runBuildEvents = false;
+		createInstaller = false;
+		useSDL2 = true;
 		useCanonicalLibNames = false;
 	}
 };
@@ -273,17 +273,17 @@ struct BuildSetup {
  * @param message The error message to print to stderr.
  */
 #if defined(__GNUC__)
-	#define NORETURN_POST __attribute__((__noreturn__))
+#define NORETURN_POST __attribute__((__noreturn__))
 #elif defined(_MSC_VER)
-	#define NORETURN_PRE __declspec(noreturn)
+#define NORETURN_PRE __declspec(noreturn)
 #endif
 
 #ifndef NORETURN_PRE
-#define	NORETURN_PRE
+#define NORETURN_PRE
 #endif
 
 #ifndef NORETURN_POST
-#define	NORETURN_POST
+#define NORETURN_POST
 #endif
 void NORETURN_PRE error(const std::string &message) NORETURN_POST;
 
@@ -500,11 +500,11 @@ public:
 	static std::string getLastPathComponent(const std::string &path);
 
 protected:
-	const int _version;                                      ///< Target project version
-	StringList &_globalWarnings;                             ///< Global warnings
-	std::map<std::string, StringList> &_projectWarnings;     ///< Per-project warnings
+	const int _version;                                  ///< Target project version
+	StringList &_globalWarnings;                         ///< Global warnings
+	std::map<std::string, StringList> &_projectWarnings; ///< Per-project warnings
 
-	UUIDMap _uuidMap;                                        ///< List of (project name, UUID) pairs
+	UUIDMap _uuidMap; ///< List of (project name, UUID) pairs
 
 	/**
 	 *  Create workspace/solution file
@@ -626,7 +626,6 @@ protected:
 	std::string createUUID(const std::string &name) const;
 
 private:
-
 	/**
 	 * Returns the string representation of an existing UUID.
 	 *
@@ -644,6 +643,6 @@ private:
 	void createEnginePluginsTable(const BuildSetup &setup);
 };
 
-} // End of CreateProjectTool namespace
+} // namespace CreateProjectTool
 
 #endif // TOOLS_CREATE_PROJECT_H
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 20c5396043..6b44176e93 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -20,11 +20,11 @@
  *
  */
 
-#include "config.h"
 #include "msbuild.h"
+#include "config.h"
 
-#include <fstream>
 #include <algorithm>
+#include <fstream>
 
 namespace CreateProjectTool {
 
@@ -32,8 +32,8 @@ namespace CreateProjectTool {
 // MSBuild Provider (Visual Studio 2010 and later)
 //////////////////////////////////////////////////////////////////////////
 
-MSBuildProvider::MSBuildProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version, const MSVCVersion& msvc)
-	: MSVCProvider(global_warnings, project_warnings, version, msvc) {
+MSBuildProvider::MSBuildProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version, const MSVCVersion &msvc)
+    : MSVCProvider(global_warnings, project_warnings, version, msvc) {
 
 	_archs.push_back(ARCH_X86);
 	_archs.push_back(ARCH_AMD64);
@@ -52,23 +52,23 @@ namespace {
 
 inline void outputConfiguration(std::ostream &project, const std::string &config, const std::string &platform) {
 	project << "\t\t<ProjectConfiguration Include=\"" << config << "|" << platform << "\">\n"
-	           "\t\t\t<Configuration>" << config << "</Configuration>\n"
-	           "\t\t\t<Platform>" << platform << "</Platform>\n"
-	           "\t\t</ProjectConfiguration>\n";
+	        << "\t\t\t<Configuration>" << config << "</Configuration>\n"
+	        << "\t\t\t<Platform>" << platform << "</Platform>\n"
+	        << "\t\t</ProjectConfiguration>\n";
 }
 
 inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config, const std::string &toolset) {
 	project << "\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='" << config << "'\" Label=\"Configuration\">\n"
-	           "\t\t<ConfigurationType>" << ((name == setup.projectName || setup.devTools || setup.tests) ? "Application" : "StaticLibrary") << "</ConfigurationType>\n"
-	           "\t\t<PlatformToolset>" << toolset << "</PlatformToolset>\n"
-	           "\t</PropertyGroup>\n";
+	        << "\t\t<ConfigurationType>" << ((name == setup.projectName || setup.devTools || setup.tests) ? "Application" : "StaticLibrary") << "</ConfigurationType>\n"
+	        << "\t\t<PlatformToolset>" << toolset << "</PlatformToolset>\n"
+	        << "\t</PropertyGroup>\n";
 }
 
 inline void outputProperties(std::ostream &project, const std::string &config, const std::string &properties) {
 	project << "\t<ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='" << config << "'\" Label=\"PropertySheets\">\n"
-	           "\t\t<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n"
-	           "\t\t<Import Project=\"" << properties << "\" />\n"
-	           "\t</ImportGroup>\n";
+	        << "\t\t<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n"
+	        << "\t\t<Import Project=\"" << properties << "\" />\n"
+	        << "\t</ImportGroup>\n";
 }
 
 } // End of anonymous namespace
@@ -83,8 +83,8 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 	}
 
 	project << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
-	           "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
-	           "\t<ItemGroup Label=\"ProjectConfigurations\">\n";
+	        << "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
+	        << "\t<ItemGroup Label=\"ProjectConfigurations\">\n";
 
 	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
 		outputConfiguration(project, "Debug", getMSVCConfigName(*arch));
@@ -96,10 +96,10 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 
 	// Project name & Guid
 	project << "\t<PropertyGroup Label=\"Globals\">\n"
-			   "\t\t<ProjectGuid>{" << uuid << "}</ProjectGuid>\n"
-			   "\t\t<RootNamespace>" << name << "</RootNamespace>\n"
-			   "\t\t<Keyword>Win32Proj</Keyword>\n"
-			   "\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n";
+	        << "\t\t<ProjectGuid>{" << uuid << "}</ProjectGuid>\n"
+	        << "\t\t<RootNamespace>" << name << "</RootNamespace>\n"
+	        << "\t\t<Keyword>Win32Proj</Keyword>\n"
+	        << "\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n";
 
 	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
 		project << "\t\t<VcpkgTriplet Condition=\"'$(Platform)' == '" << getMSVCConfigName(*arch) << "'\">" << getMSVCArchName(*arch) << "-windows</VcpkgTriplet>\n";
@@ -118,8 +118,8 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 	}
 
 	project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n"
-	           "\t<ImportGroup Label=\"ExtensionSettings\">\n"
-	           "\t</ImportGroup>\n";
+	        << "\t<ImportGroup Label=\"ExtensionSettings\">\n"
+	        << "\t</ImportGroup>\n";
 
 	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
 		outputProperties(project, "Release|" + getMSVCConfigName(*arch), setup.projectDescription + "_Release" + getMSVCArchName(*arch) + ".props");
@@ -215,14 +215,14 @@ void MSBuildProvider::createFiltersFile(const BuildSetup &setup, const std::stri
 	}
 
 	filters << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
-	           "<Project ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n";
+	        << "<Project ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n";
 
 	// Output the list of filters
 	filters << "\t<ItemGroup>\n";
 	for (std::list<std::string>::iterator filter = _filters.begin(); filter != _filters.end(); ++filter) {
 		filters << "\t\t<Filter Include=\"" << *filter << "\">\n"
-		           "\t\t\t<UniqueIdentifier>" << createUUID() << "</UniqueIdentifier>\n"
-		           "\t\t</Filter>\n";
+		        << "\t\t\t<UniqueIdentifier>" << createUUID() << "</UniqueIdentifier>\n"
+		        << "\t\t</Filter>\n";
 	}
 	filters << "\t</ItemGroup>\n";
 
@@ -242,8 +242,8 @@ void MSBuildProvider::outputFilter(std::ostream &filters, const FileEntries &fil
 		for (FileEntries::const_iterator entry = files.begin(), end = files.end(); entry != end; ++entry) {
 			if ((*entry).filter != "") {
 				filters << "\t\t<" << action << " Include=\"" << (*entry).path << "\">\n"
-				           "\t\t\t<Filter>" << (*entry).filter << "</Filter>\n"
-				           "\t\t</" << action << ">\n";
+				        << "\t\t\t<Filter>" << (*entry).filter << "</Filter>\n"
+				        << "\t\t</" << action << ">\n";
 			} else {
 				filters << "\t\t<" << action << " Include=\"" << (*entry).path << "\" />\n";
 			}
@@ -260,8 +260,8 @@ void MSBuildProvider::writeReferences(const BuildSetup &setup, std::ofstream &ou
 			continue;
 
 		output << "\t<ProjectReference Include=\"" << i->first << ".vcxproj\">\n"
-		          "\t\t<Project>{" << i->second << "}</Project>\n"
-		          "\t</ProjectReference>\n";
+		       << "\t\t<Project>{" << i->second << "}</Project>\n"
+		       << "\t</ProjectReference>\n";
 	}
 
 	output << "\t</ItemGroup>\n";
@@ -280,10 +280,10 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
 	std::string warnings = "";
 	if (warningsIterator != _projectWarnings.end())
 		for (StringList::const_iterator i = warningsIterator->second.begin(); i != warningsIterator->second.end(); ++i)
-			warnings +=  *i + ';';
+			warnings += *i + ';';
 
 	project << "\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='" << configuration << "|" << getMSVCConfigName(arch) << "'\">\n"
-	           "\t\t<ClCompile>\n";
+	        << "\t\t<ClCompile>\n";
 
 	// Language Extensions
 	if (setup.devTools || setup.tests || name == setup.projectName || enableLanguageExtensions) {
@@ -309,26 +309,26 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
 			libraries += *i + ".lib;";
 
 		project << "\t\t<Link>\n"
-		           "\t\t\t<OutputFile>$(OutDir)" << ((setup.devTools || setup.tests) ? name : setup.projectName) << ".exe</OutputFile>\n"
-		           "\t\t\t<AdditionalDependencies>" << libraries << "%(AdditionalDependencies)</AdditionalDependencies>\n"
-		           "\t\t</Link>\n";
+		        << "\t\t\t<OutputFile>$(OutDir)" << ((setup.devTools || setup.tests) ? name : setup.projectName) << ".exe</OutputFile>\n"
+		        << "\t\t\t<AdditionalDependencies>" << libraries << "%(AdditionalDependencies)</AdditionalDependencies>\n"
+		        << "\t\t</Link>\n";
 
 		if (!setup.devTools && !setup.tests && setup.runBuildEvents) {
 			project << "\t\t<PreBuildEvent>\n"
-			           "\t\t\t<Message>Generate revision</Message>\n"
-			           "\t\t\t<Command>" << getPreBuildEvent() << "</Command>\n"
-			           "\t\t</PreBuildEvent>\n";
+			        << "\t\t\t<Message>Generate revision</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"
-					   "\t\t\t<Message>Copy data files to the build folder</Message>\n"
-					   "\t\t\t<Command>" << getPostBuildEvent(arch, setup) << "</Command>\n"
-					   "\t\t</PostBuildEvent>\n";
+			        << "\t\t\t<Message>Copy data files to the build folder</Message>\n"
+			        << "\t\t\t<Command>" << getPostBuildEvent(arch, setup) << "</Command>\n"
+			        << "\t\t</PostBuildEvent>\n";
 		} else if (setup.tests) {
 			project << "\t\t<PreBuildEvent>\n"
-			           "\t\t\t<Message>Generate runner.cpp</Message>\n"
-			           "\t\t\t<Command>" << getTestPreBuildEvent(setup) << "</Command>\n"
-			           "\t\t</PreBuildEvent>\n";
+			        << "\t\t\t<Message>Generate runner.cpp</Message>\n"
+			        << "\t\t\t<Command>" << getTestPreBuildEvent(setup) << "</Command>\n"
+			        << "\t\t</PreBuildEvent>\n";
 		}
 	}
 
@@ -339,7 +339,7 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
 
 	std::string warnings;
 	for (StringList::const_iterator i = _globalWarnings.begin(); i != _globalWarnings.end(); ++i)
-		warnings +=  *i + ';';
+		warnings += *i + ';';
 
 	std::string definesList;
 	for (StringList::const_iterator i = defines.begin(); i != defines.end(); ++i)
@@ -350,22 +350,22 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
 		definesList += REVISION_DEFINE ";";
 
 	properties << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
-	              "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
-	              "\t<PropertyGroup>\n"
-	              "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_Global</_PropertySheetDisplayName>\n"
-	              "\t\t<ExecutablePath>$(" << LIBS_DEFINE << ")\\bin;$(" << LIBS_DEFINE << ")\\bin\\" << getMSVCArchName(arch) << ";$(" << LIBS_DEFINE << ")\\$(Configuration)\\bin;$(ExecutablePath)</ExecutablePath>\n"
-	              "\t\t<LibraryPath>$(" << LIBS_DEFINE << ")\\lib\\" << getMSVCArchName(arch) << ";$(" << LIBS_DEFINE << ")\\lib\\" << getMSVCArchName(arch) << "\\$(Configuration);$(" << LIBS_DEFINE << ")\\lib;$(" << LIBS_DEFINE << ")\\$(Configuration)\\lib;$(LibraryPath)</LibraryPath>\n"
-	              "\t\t<IncludePath>$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\" << (setup.useSDL2 ? "SDL2" : "SDL") << ";$(IncludePath)</IncludePath>\n"
-	              "\t\t<OutDir>$(Configuration)" << getMSVCArchName(arch) << "\\</OutDir>\n"
-	              "\t\t<IntDir>$(Configuration)" << getMSVCArchName(arch) << "\\$(ProjectName)\\</IntDir>\n"
-	              "\t</PropertyGroup>\n"
-	              "\t<ItemDefinitionGroup>\n"
-	              "\t\t<ClCompile>\n"
-	              "\t\t\t<DisableLanguageExtensions>true</DisableLanguageExtensions>\n"
-	              "\t\t\t<DisableSpecificWarnings>" << warnings << ";%(DisableSpecificWarnings)</DisableSpecificWarnings>\n"
-	              "\t\t\t<AdditionalIncludeDirectories>.;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
-	              "\t\t\t<PreprocessorDefinitions>" << definesList << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
-	              "\t\t\t<ExceptionHandling>" << ((setup.devTools || setup.tests) ? "Sync" : "") << "</ExceptionHandling>\n";
+	           << "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
+	           << "\t<PropertyGroup>\n"
+	           << "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_Global</_PropertySheetDisplayName>\n"
+	           << "\t\t<ExecutablePath>$(" << LIBS_DEFINE << ")\\bin;$(" << LIBS_DEFINE << ")\\bin\\" << getMSVCArchName(arch) << ";$(" << LIBS_DEFINE << ")\\$(Configuration)\\bin;$(ExecutablePath)</ExecutablePath>\n"
+	           << "\t\t<LibraryPath>$(" << LIBS_DEFINE << ")\\lib\\" << getMSVCArchName(arch) << ";$(" << LIBS_DEFINE << ")\\lib\\" << getMSVCArchName(arch) << "\\$(Configuration);$(" << LIBS_DEFINE << ")\\lib;$(" << LIBS_DEFINE << ")\\$(Configuration)\\lib;$(LibraryPath)</LibraryPath>\n"
+	           << "\t\t<IncludePath>$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\" << (setup.useSDL2 ? "SDL2" : "SDL") << ";$(IncludePath)</IncludePath>\n"
+	           << "\t\t<OutDir>$(Configuration)" << getMSVCArchName(arch) << "\\</OutDir>\n"
+	           << "\t\t<IntDir>$(Configuration)" << getMSVCArchName(arch) << "\\$(ProjectName)\\</IntDir>\n"
+	           << "\t</PropertyGroup>\n"
+	           << "\t<ItemDefinitionGroup>\n"
+	           << "\t\t<ClCompile>\n"
+	           << "\t\t\t<DisableLanguageExtensions>true</DisableLanguageExtensions>\n"
+	           << "\t\t\t<DisableSpecificWarnings>" << warnings << ";%(DisableSpecificWarnings)</DisableSpecificWarnings>\n"
+	           << "\t\t\t<AdditionalIncludeDirectories>.;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
+	           << "\t\t\t<PreprocessorDefinitions>" << definesList << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
+	           << "\t\t\t<ExceptionHandling>" << ((setup.devTools || setup.tests) ? "Sync" : "") << "</ExceptionHandling>\n";
 
 #if NEEDS_RTTI
 	properties << "\t\t\t<RuntimeTypeInfo>true</RuntimeTypeInfo>\n";
@@ -374,26 +374,26 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
 #endif
 
 	properties << "\t\t\t<WarningLevel>Level4</WarningLevel>\n"
-	              "\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n"
-	              "\t\t\t<CompileAs>Default</CompileAs>\n"
-	              "\t\t\t<MultiProcessorCompilation>true</MultiProcessorCompilation>\n"
-	              "\t\t\t<ConformanceMode>true</ConformanceMode>\n"
-	              "\t\t\t<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>\n"
-	              "\t\t</ClCompile>\n"
-	              "\t\t<Link>\n"
-	              "\t\t\t<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n"
-	              "\t\t\t<SubSystem>Console</SubSystem>\n";
+	           << "\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n"
+	           << "\t\t\t<CompileAs>Default</CompileAs>\n"
+	           << "\t\t\t<MultiProcessorCompilation>true</MultiProcessorCompilation>\n"
+	           << "\t\t\t<ConformanceMode>true</ConformanceMode>\n"
+	           << "\t\t\t<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>\n"
+	           << "\t\t</ClCompile>\n"
+	           << "\t\t<Link>\n"
+	           << "\t\t\t<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n"
+	           << "\t\t\t<SubSystem>Console</SubSystem>\n";
 
 	if (!setup.devTools && !setup.tests)
 		properties << "\t\t\t<EntryPointSymbol>WinMainCRTStartup</EntryPointSymbol>\n";
 
 	properties << "\t\t</Link>\n"
-	              "\t\t<ResourceCompile>\n"
-	              "\t\t\t<AdditionalIncludeDirectories>.;" << prefix << ";%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
-	              "\t\t\t<PreprocessorDefinitions>" << definesList << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
-	              "\t\t</ResourceCompile>\n"
-	              "\t</ItemDefinitionGroup>\n"
-	              "</Project>\n";
+	           << "\t\t<ResourceCompile>\n"
+	           << "\t\t\t<AdditionalIncludeDirectories>.;" << prefix << ";%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
+	           << "\t\t\t<PreprocessorDefinitions>" << definesList << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
+	           << "\t\t</ResourceCompile>\n"
+	           << "\t</ItemDefinitionGroup>\n"
+	           << "</Project>\n";
 
 	properties.flush();
 }
@@ -406,44 +406,44 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, M
 	}
 
 	properties << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
-	              "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
-	              "\t<ImportGroup Label=\"PropertySheets\">\n"
-	              "\t\t<Import Project=\"" << setup.projectDescription << "_Global" << getMSVCArchName(arch) << ".props\" />\n"
-	              "\t</ImportGroup>\n"
-	              "\t<PropertyGroup>\n"
-	              "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_" << configuration << getMSVCArchName(arch) << "</_PropertySheetDisplayName>\n"
-	              "\t\t<LinkIncremental>" << (isRelease ? "false" : "true") << "</LinkIncremental>\n"
-	              "\t\t<GenerateManifest>false</GenerateManifest>\n"
-	              "\t</PropertyGroup>\n"
-	              "\t<ItemDefinitionGroup>\n"
-	              "\t\t<ClCompile>\n";
+	           << "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << _msvcVersion.project << "\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
+	           << "\t<ImportGroup Label=\"PropertySheets\">\n"
+	           << "\t\t<Import Project=\"" << setup.projectDescription << "_Global" << getMSVCArchName(arch) << ".props\" />\n"
+	           << "\t</ImportGroup>\n"
+	           << "\t<PropertyGroup>\n"
+	           << "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_" << configuration << getMSVCArchName(arch) << "</_PropertySheetDisplayName>\n"
+	           << "\t\t<LinkIncremental>" << (isRelease ? "false" : "true") << "</LinkIncremental>\n"
+	           << "\t\t<GenerateManifest>false</GenerateManifest>\n"
+	           << "\t</PropertyGroup>\n"
+	           << "\t<ItemDefinitionGroup>\n"
+	           << "\t\t<ClCompile>\n";
 
 	if (isRelease) {
 		properties << "\t\t\t<IntrinsicFunctions>true</IntrinsicFunctions>\n"
-		              "\t\t\t<WholeProgramOptimization>true</WholeProgramOptimization>\n"
-		              "\t\t\t<PreprocessorDefinitions>WIN32;RELEASE_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
-		              "\t\t\t<StringPooling>true</StringPooling>\n"
-		              "\t\t\t<BufferSecurityCheck>false</BufferSecurityCheck>\n"
-		              "\t\t\t<DebugInformationFormat></DebugInformationFormat>\n"
-		              "\t\t\t<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n"
-		              "\t\t\t<EnablePREfast>" << (configuration == "Analysis" ? "true" : "false") << "</EnablePREfast>\n"
-		              "\t\t</ClCompile>\n"
-		              "\t\t<Lib>\n"
-		              "\t\t\t<LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>\n"
-		              "\t\t</Lib>\n"
-		              "\t\t<Link>\n"
-		              "\t\t\t<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>\n"
-		              "\t\t\t<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n"
-		              "\t\t\t<SetChecksum>true</SetChecksum>\n";
+		           << "\t\t\t<WholeProgramOptimization>true</WholeProgramOptimization>\n"
+		           << "\t\t\t<PreprocessorDefinitions>WIN32;RELEASE_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
+		           << "\t\t\t<StringPooling>true</StringPooling>\n"
+		           << "\t\t\t<BufferSecurityCheck>false</BufferSecurityCheck>\n"
+		           << "\t\t\t<DebugInformationFormat></DebugInformationFormat>\n"
+		           << "\t\t\t<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n"
+		           << "\t\t\t<EnablePREfast>" << (configuration == "Analysis" ? "true" : "false") << "</EnablePREfast>\n"
+		           << "\t\t</ClCompile>\n"
+		           << "\t\t<Lib>\n"
+		           << "\t\t\t<LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>\n"
+		           << "\t\t</Lib>\n"
+		           << "\t\t<Link>\n"
+		           << "\t\t\t<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>\n"
+		           << "\t\t\t<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n"
+		           << "\t\t\t<SetChecksum>true</SetChecksum>\n";
 	} else {
 		properties << "\t\t\t<Optimization>Disabled</Optimization>\n"
-		              "\t\t\t<PreprocessorDefinitions>WIN32;" << (configuration == "LLVM" ? "_CRT_SECURE_NO_WARNINGS;" : "") << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
-		              "\t\t\t<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n"
-		              "\t\t\t<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n"
-		              "\t\t\t<FunctionLevelLinking>true</FunctionLevelLinking>\n"
-		              "\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n";
+		           << "\t\t\t<PreprocessorDefinitions>WIN32;" << (configuration == "LLVM" ? "_CRT_SECURE_NO_WARNINGS;" : "") << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
+		           << "\t\t\t<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n"
+		           << "\t\t\t<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n"
+		           << "\t\t\t<FunctionLevelLinking>true</FunctionLevelLinking>\n"
+		           << "\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n";
 		if (_version >= 14) {
-			// Since MSVC 2015 Edit and Continue is supported for x86 and x86-64, but not for ARM.
+			// Since<<SVC 2015 Edit and Continue is supported for x86 and x86-64, but not for ARM.
 			properties << "\t\t\t<DebugInformationFormat>" << (arch != ARCH_ARM64 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n";
 		} else {
 			// Older MSVC versions did not support Edit and Continue for x64, thus we do not use it.
@@ -454,19 +454,19 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, M
 		if (configuration == "LLVM") {
 			// FIXME The LLVM cl wrapper does not seem to work properly with the $(TargetDir) path so we hard-code the build folder until the issue is resolved
 			const std::string outputBitness = (arch == ARCH_X86 ? "32" : "64");
-			properties << "\t\t\t<AdditionalIncludeDirectories>" << configuration << outputBitness <<";%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
-		                  "\t\t\t<AdditionalOptions>-Wno-microsoft -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow -Wnon-virtual-dtor -Wwrite-strings -Wno-conversion -Wno-shorten-64-to-32 -Wno-sign-compare -Wno-four-char-constants -Wno-nested-anon-types -Qunused-arguments %(AdditionalOptions)</AdditionalOptions>\n";
+			properties << "\t\t\t<AdditionalIncludeDirectories>" << configuration << outputBitness << ";%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
+			           << "\t\t\t<AdditionalOptions>-Wno-microsoft -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow -Wnon-virtual-dtor -Wwrite-strings -Wno-conversion -Wno-shorten-64-to-32 -Wno-sign-compare -Wno-four-char-constants -Wno-nested-anon-types -Qunused-arguments %(AdditionalOptions)</AdditionalOptions>\n";
 		}
 
 		properties << "\t\t</ClCompile>\n"
-		              "\t\t<Link>\n"
-		              "\t\t\t<GenerateDebugInformation>true</GenerateDebugInformation>\n"
-		              "\t\t\t<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>\n";
+		           << "\t\t<Link>\n"
+		           << "\t\t\t<GenerateDebugInformation>true</GenerateDebugInformation>\n"
+		           << "\t\t\t<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>\n";
 	}
 
 	properties << "\t\t</Link>\n"
-	              "\t</ItemDefinitionGroup>\n"
-	              "</Project>\n";
+	           << "\t</ItemDefinitionGroup>\n"
+	           << "</Project>\n";
 
 	properties.flush();
 	properties.close();
@@ -474,7 +474,7 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, M
 
 bool hasEnding(std::string const &fullString, std::string const &ending) {
 	if (fullString.length() > ending.length()) {
-		return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending));
+		return (0 == fullString.compare(fullString.length() - ending.length(), ending.length(), ending));
 	} else {
 		return false;
 	}
@@ -484,7 +484,7 @@ namespace {
 
 inline void outputNasmCommand(std::ostream &projectFile, const std::string &config, const std::string &prefix) {
 	projectFile << "\t\t\t<Command Condition=\"'$(Configuration)|$(Platform)'=='" << config << "|Win32'\">nasm.exe -f win32 -g -o \"$(IntDir)" << prefix << "%(Filename).obj\" \"%(FullPath)\"</Command>\n"
-	               "\t\t\t<Outputs Condition=\"'$(Configuration)|$(Platform)'=='" << config << "|Win32'\">$(IntDir)" << prefix << "%(Filename).obj;%(Outputs)</Outputs>\n";
+	            << "\t\t\t<Outputs Condition=\"'$(Configuration)|$(Platform)'=='" << config << "|Win32'\">$(IntDir)" << prefix << "%(Filename).obj;%(Outputs)</Outputs>\n";
 }
 
 } // End of anonymous namespace
@@ -502,7 +502,7 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream
 	// Compute the list of files
 	_filters.push_back(""); // init filters
 	computeFileList(dir, duplicate, objPrefix, filePrefix);
-	_filters.pop_back();    // remove last empty filter
+	_filters.pop_back(); // remove last empty filter
 
 	// Output compile files
 	if (!_compileFiles.empty()) {
@@ -515,7 +515,7 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream
 			// Deal with duplicated file names
 			if (isDuplicate) {
 				projectFile << "\t\t<ClCompile Include=\"" << (*entry).path << "\">\n"
-							   "\t\t\t<ObjectFileName>$(IntDir)" << (*entry).prefix << "%(Filename).obj</ObjectFileName>\n";
+				            << "\t\t\t<ObjectFileName>$(IntDir)" << (*entry).prefix << "%(Filename).obj</ObjectFileName>\n";
 
 				projectFile << "\t\t</ClCompile>\n";
 			} else {
@@ -538,7 +538,7 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream
 			const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), (*entry).name + ".o") != duplicate.end());
 
 			projectFile << "\t\t<CustomBuild Include=\"" << (*entry).path << "\">\n"
-			               "\t\t\t<FileType>Document</FileType>\n";
+			            << "\t\t\t<FileType>Document</FileType>\n";
 
 			outputNasmCommand(projectFile, "Debug", (isDuplicate ? (*entry).prefix : ""));
 			outputNasmCommand(projectFile, "Analysis", (isDuplicate ? (*entry).prefix : ""));
@@ -599,4 +599,4 @@ void MSBuildProvider::computeFileList(const FileNode &dir, const StringList &dup
 	}
 }
 
-} // End of CreateProjectTool namespace
+} // namespace CreateProjectTool
diff --git a/devtools/create_project/msbuild.h b/devtools/create_project/msbuild.h
index bf9ddf4203..12c2b25e57 100644
--- a/devtools/create_project/msbuild.h
+++ b/devtools/create_project/msbuild.h
@@ -56,8 +56,8 @@ private:
 		std::string filter;
 		std::string prefix;
 
-		bool operator<(const FileEntry& rhs) const {
-			return path.compare(rhs.path) == -1;   // Not exactly right for alphabetical order, but good enough
+		bool operator<(const FileEntry &rhs) const {
+			return path.compare(rhs.path) == -1; // Not exactly right for alphabetical order, but good enough
 		}
 	};
 	typedef std::list<FileEntry> FileEntries;
@@ -76,6 +76,6 @@ private:
 	void outputFiles(std::ostream &projectFile, const FileEntries &files, const std::string &action);
 };
 
-} // End of CreateProjectTool namespace
+} // namespace CreateProjectTool
 
 #endif // TOOLS_CREATE_PROJECT_MSBUILD_H
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index 80ac6d44b8..701173aee6 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -20,13 +20,12 @@
  *
  */
 
-#include "config.h"
 #include "msvc.h"
+#include "config.h"
 
-#include <fstream>
 #include <algorithm>
 #include <cstring>
-
+#include <fstream>
 
 namespace CreateProjectTool {
 
@@ -34,10 +33,10 @@ namespace CreateProjectTool {
 // MSVC Provider (Base class)
 //////////////////////////////////////////////////////////////////////////
 MSVCProvider::MSVCProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version, const MSVCVersion &msvc)
-	: ProjectProvider(global_warnings, project_warnings, version), _msvcVersion(msvc) {
+    : ProjectProvider(global_warnings, project_warnings, version), _msvcVersion(msvc) {
 
 	_enableLanguageExtensions = tokenize(ENABLE_LANGUAGE_EXTENSIONS, ',');
-	_disableEditAndContinue   = tokenize(DISABLE_EDIT_AND_CONTINUE, ',');
+	_disableEditAndContinue = tokenize(DISABLE_EDIT_AND_CONTINUE, ',');
 
 	// NASM not supported for Windows on AMD64 target
 	StringList amd64_disabled_features;
@@ -98,9 +97,9 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) {
 
 	for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
 		solution << "\t\tDebug|" << getMSVCConfigName(*arch) << " = Debug|" << getMSVCConfigName(*arch) << "\n"
-					"\t\tAnalysis|" << getMSVCConfigName(*arch) << " = Analysis|" << getMSVCConfigName(*arch) << "\n"
-					"\t\tLLVM|" << getMSVCConfigName(*arch) << " = LLVM|" << getMSVCConfigName(*arch) << "\n"
-					"\t\tRelease|" << getMSVCConfigName(*arch) << " = Release|" << getMSVCConfigName(*arch) << "\n";
+		         << "\t\tAnalysis|" << getMSVCConfigName(*arch) << " = Analysis|" << getMSVCConfigName(*arch) << "\n"
+		         << "\t\tLLVM|" << getMSVCConfigName(*arch) << " = LLVM|" << getMSVCConfigName(*arch) << "\n"
+		         << "\t\tRelease|" << getMSVCConfigName(*arch) << " = Release|" << getMSVCConfigName(*arch) << "\n";
 	}
 
 	solution << "\tEndGlobalSection\n"
@@ -109,21 +108,21 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) {
 	for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
 		for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
 			solution << "\t\t{" << i->second << "}.Debug|" << getMSVCConfigName(*arch) << ".ActiveCfg = Debug|" << getMSVCConfigName(*arch) << "\n"
-						"\t\t{" << i->second << "}.Debug|" << getMSVCConfigName(*arch) << ".Build.0 = Debug|" << getMSVCConfigName(*arch) << "\n"
-						"\t\t{" << i->second << "}.Analysis|" << getMSVCConfigName(*arch) << ".ActiveCfg = Analysis|" << getMSVCConfigName(*arch) << "\n"
-						"\t\t{" << i->second << "}.Analysis|" << getMSVCConfigName(*arch) << ".Build.0 = Analysis|" << getMSVCConfigName(*arch) << "\n"
-						"\t\t{" << i->second << "}.LLVM|" << getMSVCConfigName(*arch) << ".ActiveCfg = LLVM|" << getMSVCConfigName(*arch) << "\n"
-						"\t\t{" << i->second << "}.LLVM|" << getMSVCConfigName(*arch) << ".Build.0 = LLVM|" << getMSVCConfigName(*arch) << "\n"
-						"\t\t{" << i->second << "}.Release|" << getMSVCConfigName(*arch) << ".ActiveCfg = Release|" << getMSVCConfigName(*arch) << "\n"
-						"\t\t{" << i->second << "}.Release|" << getMSVCConfigName(*arch) << ".Build.0 = Release|" << getMSVCConfigName(*arch) << "\n";
+			         << "\t\t{" << i->second << "}.Debug|" << getMSVCConfigName(*arch) << ".Build.0 = Debug|" << getMSVCConfigName(*arch) << "\n"
+			         << "\t\t{" << i->second << "}.Analysis|" << getMSVCConfigName(*arch) << ".ActiveCfg = Analysis|" << getMSVCConfigName(*arch) << "\n"
+			         << "\t\t{" << i->second << "}.Analysis|" << getMSVCConfigName(*arch) << ".Build.0 = Analysis|" << getMSVCConfigName(*arch) << "\n"
+			         << "\t\t{" << i->second << "}.LLVM|" << getMSVCConfigName(*arch) << ".ActiveCfg = LLVM|" << getMSVCConfigName(*arch) << "\n"
+			         << "\t\t{" << i->second << "}.LLVM|" << getMSVCConfigName(*arch) << ".Build.0 = LLVM|" << getMSVCConfigName(*arch) << "\n"
+			         << "\t\t{" << i->second << "}.Release|" << getMSVCConfigName(*arch) << ".ActiveCfg = Release|" << getMSVCConfigName(*arch) << "\n"
+			         << "\t\t{" << i->second << "}.Release|" << getMSVCConfigName(*arch) << ".Build.0 = Release|" << getMSVCConfigName(*arch) << "\n";
 		}
 	}
 
 	solution << "\tEndGlobalSection\n"
-	            "\tGlobalSection(SolutionProperties) = preSolution\n"
-	            "\t\tHideSolutionNode = FALSE\n"
-	            "\tEndGlobalSection\n"
-	            "EndGlobal\n";
+	         << "\tGlobalSection(SolutionProperties) = preSolution\n"
+	         << "\t\tHideSolutionNode = FALSE\n"
+	         << "\tEndGlobalSection\n"
+	         << "EndGlobal\n";
 }
 
 void MSVCProvider::createOtherBuildFiles(const BuildSetup &setup) {
@@ -209,4 +208,4 @@ std::string MSVCProvider::getPostBuildEvent(MSVC_Architecture arch, const BuildS
 	return cmdLine;
 }
 
-} // End of CreateProjectTool namespace
+} // namespace CreateProjectTool
diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h
index b2eeed80dd..f711f165f4 100644
--- a/devtools/create_project/msvc.h
+++ b/devtools/create_project/msvc.h
@@ -107,6 +107,6 @@ protected:
 	std::string getPostBuildEvent(MSVC_Architecture arch, const BuildSetup &setup) const;
 };
 
-} // End of CreateProjectTool namespace
+} // namespace CreateProjectTool
 
 #endif // TOOLS_CREATE_PROJECT_MSVC_H
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index 761a62f75c..53dc811796 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -20,11 +20,11 @@
  *
  */
 
-#include "config.h"
 #include "visualstudio.h"
+#include "config.h"
 
-#include <fstream>
 #include <algorithm>
+#include <fstream>
 
 namespace CreateProjectTool {
 
@@ -32,8 +32,8 @@ namespace CreateProjectTool {
 // Visual Studio Provider (Visual Studio 2008)
 //////////////////////////////////////////////////////////////////////////
 
-VisualStudioProvider::VisualStudioProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version, const MSVCVersion& msvc)
-	: MSVCProvider(global_warnings, project_warnings, version, msvc) {
+VisualStudioProvider::VisualStudioProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version, const MSVCVersion &msvc)
+    : MSVCProvider(global_warnings, project_warnings, version, msvc) {
 
 	_archs.push_back(ARCH_X86);
 	_archs.push_back(ARCH_AMD64);
@@ -57,13 +57,13 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 	}
 
 	project << "<?xml version=\"1.0\" encoding=\"windows-1252\"?>\n"
-	           "<VisualStudioProject\n"
-	           "\tProjectType=\"Visual C++\"\n"
-	           "\tVersion=\"" << _version << ".00\"\n"
-	           "\tName=\"" << name << "\"\n"
-	           "\tProjectGUID=\"{" << uuid << "}\"\n"
-	           "\tRootNamespace=\"" << name << "\"\n"
-	           "\tKeyword=\"Win32Proj\"\n";
+	        << "<VisualStudioProject\n"
+	        << "\tProjectType=\"Visual C++\"\n"
+	        << "\tVersion=\"" << _version << ".00\"\n"
+	        << "\tName=\"" << name << "\"\n"
+	        << "\tProjectGUID=\"{" << uuid << "}\"\n"
+	        << "\tRootNamespace=\"" << name << "\"\n"
+	        << "\tKeyword=\"Win32Proj\"\n";
 
 	project << "\tTargetFrameworkVersion=\"131072\"\n";
 
@@ -73,10 +73,10 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 		project << "\t\t<Platform Name=\"" << getMSVCConfigName(*arch) << "\" />\n";
 	}
 	project << "\t</Platforms>\n"
-	           "\t<Configurations>\n";
+	        << "\t<Configurations>\n";
 
 	// Check for project-specific warnings:
-	std::map< std::string, std::list<std::string> >::iterator warningsIterator = _projectWarnings.find(name);
+	std::map<std::string, std::list<std::string> >::iterator warningsIterator = _projectWarnings.find(name);
 
 	if (setup.devTools || setup.tests || name == setup.projectName) {
 		std::string libraries;
@@ -101,11 +101,11 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 		std::string warnings = "";
 		if (warningsIterator != _projectWarnings.end())
 			for (StringList::const_iterator i = warningsIterator->second.begin(); i != warningsIterator->second.end(); ++i)
-				warnings +=  *i + ';';
+				warnings += *i + ';';
 
 		std::string toolConfig;
-		toolConfig  = (!warnings.empty() ? "DisableSpecificWarnings=\"" + warnings + "\"" : "");
-		toolConfig += (disableEditAndContinue   ? "DebugInformationFormat=\"3\" " : "");
+		toolConfig = (!warnings.empty() ? "DisableSpecificWarnings=\"" + warnings + "\"" : "");
+		toolConfig += (disableEditAndContinue ? "DebugInformationFormat=\"3\" " : "");
 		toolConfig += (enableLanguageExtensions ? "DisableLanguageExtensions=\"false\" " : "");
 
 		for (std::list<MSVC_Architecture>::const_iterator arch = _archs.begin(); arch != _archs.end(); ++arch) {
@@ -117,7 +117,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 	}
 
 	project << "\t</Configurations>\n"
-	           "\t<Files>\n";
+	        << "\t<Files>\n";
 
 	std::string modulePath;
 	if (!moduleDir.compare(0, setup.srcDir.size(), setup.srcDir)) {
@@ -137,44 +137,44 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 	}
 
 	project << "\t</Files>\n"
-	           "</VisualStudioProject>\n";
+	        << "</VisualStudioProject>\n";
 }
 
 void VisualStudioProvider::outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const MSVC_Architecture arch) {
 	project << "\t\t<Configuration Name=\"" << config << "|" << getMSVCConfigName(arch) << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\" << setup.projectDescription << "_" << config << getMSVCArchName(arch) << ".vsprops\">\n"
-	           "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" DebugInformationFormat=\"3\" />\n"
-	           "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/" << setup.projectName << ".exe\"\n"
-	           "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n"
-	           "\t\t\t/>\n";
+	        << "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" DebugInformationFormat=\"3\" />\n"
+	        << "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/" << setup.projectName << ".exe\"\n"
+	        << "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n"
+	        << "\t\t\t/>\n";
 	outputBuildEvents(project, setup, arch);
 	project << "\t\t</Configuration>\n";
 }
 
 void VisualStudioProvider::outputConfiguration(const BuildSetup &setup, std::ostream &project, const std::string &toolConfig, const std::string &config, const MSVC_Architecture arch) {
 	project << "\t\t<Configuration Name=\"" << config << "|" << getMSVCConfigName(arch) << "\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\" << setup.projectDescription << "_" << config << getMSVCArchName(arch) << ".vsprops\">\n"
-	           "\t\t\t<Tool Name=\"VCCLCompilerTool\" "<< toolConfig << "/>\n"
-	           "\t\t</Configuration>\n";
+	        << "\t\t\t<Tool Name=\"VCCLCompilerTool\" " << toolConfig << "/>\n"
+	        << "\t\t</Configuration>\n";
 }
 
 void VisualStudioProvider::outputBuildEvents(std::ostream &project, const BuildSetup &setup, const MSVC_Architecture arch) {
 	if (!setup.devTools && !setup.tests && 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(arch, setup) << "\"\n"
-		           "\t\t\t/>\n";
+		        << "\t\t\t\tCommandLine=\"" << getPreBuildEvent() << "\"\n"
+		        << "\t\t\t/>\n"
+		        << "\t\t\t<Tool\tName=\"VCPostBuildEventTool\"\n"
+		        << "\t\t\t\tCommandLine=\"" << getPostBuildEvent(arch, setup) << "\"\n"
+		        << "\t\t\t/>\n";
 	}
 
 	// Generate runner file before build for tests
 	if (setup.tests) {
 		project << "\t\t\t<Tool\tName=\"VCPreBuildEventTool\"\n"
-			"\t\t\t\tCommandLine=\"" << getTestPreBuildEvent(setup) << "\"\n"
-			"\t\t\t/>\n";
+		        << "\t\t\t\tCommandLine=\"" << getTestPreBuildEvent(setup) << "\"\n"
+		        << "\t\t\t/>\n";
 
 		project << "\t\t\t<Tool\tName=\"VCPostBuildEventTool\"\n"
-			"\t\t\t\tCommandLine=\"$(TargetPath)\" IgnoreExitCode=\"true\"\n"
-			"\t\t\t/>\n";
+		        << "\t\t\t\tCommandLine=\"$(TargetPath)\" IgnoreExitCode=\"true\"\n"
+		        << "\t\t\t/>\n";
 	}
 }
 
@@ -194,7 +194,7 @@ void VisualStudioProvider::writeReferences(const BuildSetup &setup, std::ofstrea
 void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, MSVC_Architecture arch, const StringList &defines, const std::string &prefix, bool runBuildEvents) {
 	std::string warnings;
 	for (StringList::const_iterator i = _globalWarnings.begin(); i != _globalWarnings.end(); ++i)
-		warnings +=  *i + ';';
+		warnings += *i + ';';
 
 	std::string definesList;
 	for (StringList::const_iterator i = defines.begin(); i != defines.end(); ++i) {
@@ -208,20 +208,20 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
 		definesList += REVISION_DEFINE ";";
 
 	properties << "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n"
-	              "<VisualStudioPropertySheet\n"
-	              "\tProjectType=\"Visual C++\"\n"
-	              "\tVersion=\"8.00\"\n"
-	              "\tName=\"" << setup.projectDescription << "_Global\"\n"
-	              "\tOutputDirectory=\"$(ConfigurationName)" << getMSVCArchName(arch) << "\"\n"
-	              "\tIntermediateDirectory=\"$(ConfigurationName)" << getMSVCArchName(arch) << "/$(ProjectName)\"\n"
-	              "\t>\n"
-	              "\t<Tool\n"
-	              "\t\tName=\"VCCLCompilerTool\"\n"
-	              "\t\tDisableLanguageExtensions=\"" << (setup.devTools ? "false" : "true") << "\"\n"
-	              "\t\tDisableSpecificWarnings=\"" << warnings << "\"\n"
-	              "\t\tAdditionalIncludeDirectories=\".\\;" << prefix << ";" << prefix << "\\engines;$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\SDL;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "\"\n"
-	              "\t\tPreprocessorDefinitions=\"" << definesList << "\"\n"
-	              "\t\tExceptionHandling=\"" << ((setup.devTools || setup.tests || _version == 14) ? "1" : "0") << "\"\n";
+	           << "<VisualStudioPropertySheet\n"
+	           << "\tProjectType=\"Visual C++\"\n"
+	           << "\tVersion=\"8.00\"\n"
+	           << "\tName=\"" << setup.projectDescription << "_Global\"\n"
+	           << "\tOutputDirectory=\"$(ConfigurationName)" << getMSVCArchName(arch) << "\"\n"
+	           << "\tIntermediateDirectory=\"$(ConfigurationName)" << getMSVCArchName(arch) << "/$(ProjectName)\"\n"
+	           << "\t>\n"
+	           << "\t<Tool\n"
+	           << "\t\tName=\"VCCLCompilerTool\"\n"
+	           << "\t\tDisableLanguageExtensions=\"" << (setup.devTools ? "false" : "true") << "\"\n"
+	           << "\t\tDisableSpecificWarnings=\"" << warnings << "\"\n"
+	           << "\t\tAdditionalIncludeDirectories=\".\\;" << prefix << ";" << prefix << "\\engines;$(" << LIBS_DEFINE << ")\\include;$(" << LIBS_DEFINE << ")\\include\\SDL;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "\"\n"
+	           << "\t\tPreprocessorDefinitions=\"" << definesList << "\"\n"
+	           << "\t\tExceptionHandling=\"" << ((setup.devTools || setup.tests || _version == 14) ? "1" : "0") << "\"\n";
 
 #if NEEDS_RTTI
 	properties << "\t\tRuntimeTypeInfo=\"true\"\n";
@@ -230,29 +230,29 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
 #endif
 
 	properties << "\t\tWarningLevel=\"4\"\n"
-	              "\t\tWarnAsError=\"false\"\n"
-	              "\t\tCompileAs=\"0\"\n"
-	              "\t\t/>\n"
-	              "\t<Tool\n"
-	              "\t\tName=\"VCLibrarianTool\"\n"
-	              "\t\tIgnoreDefaultLibraryNames=\"\"\n"
-	              "\t/>\n"
-	              "\t<Tool\n"
-	              "\t\tName=\"VCLinkerTool\"\n"
-	              "\t\tIgnoreDefaultLibraryNames=\"\"\n"
-	              "\t\tSubSystem=\"1\"\n";
+	           << "\t\tWarnAsError=\"false\"\n"
+	           << "\t\tCompileAs=\"0\"\n"
+	           << "\t\t/>\n"
+	           << "\t<Tool\n"
+	           << "\t\tName=\"VCLibrarianTool\"\n"
+	           << "\t\tIgnoreDefaultLibraryNames=\"\"\n"
+	           << "\t/>\n"
+	           << "\t<Tool\n"
+	           << "\t\tName=\"VCLinkerTool\"\n"
+	           << "\t\tIgnoreDefaultLibraryNames=\"\"\n"
+	           << "\t\tSubSystem=\"1\"\n";
 
 	if (!setup.devTools && !setup.tests)
 		properties << "\t\tEntryPointSymbol=\"WinMainCRTStartup\"\n";
 
 	properties << "\t\tAdditionalLibraryDirectories=\"$(" << LIBS_DEFINE << ")\\lib\\" << getMSVCArchName(arch) << "\"\n"
-	              "\t/>\n"
-	              "\t<Tool\n"
-	              "\t\tName=\"VCResourceCompilerTool\"\n"
-	              "\t\tAdditionalIncludeDirectories=\".\\;" << prefix << "\"\n"
-	              "\t\tPreprocessorDefinitions=\"" << definesList << "\"\n"
-	              "\t/>\n"
-	              "</VisualStudioPropertySheet>\n";
+	           << "\t/>\n"
+	           << "\t<Tool\n"
+	           << "\t\tName=\"VCResourceCompilerTool\"\n"
+	           << "\t\tAdditionalIncludeDirectories=\".\\;" << prefix << "\"\n"
+	           << "\t\tPreprocessorDefinitions=\"" << definesList << "\"\n"
+	           << "\t/>\n"
+	           << "</VisualStudioPropertySheet>\n";
 
 	properties.flush();
 }
@@ -266,52 +266,52 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea
 	}
 
 	properties << "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n"
-	              "<VisualStudioPropertySheet\n"
-	              "\tProjectType=\"Visual C++\"\n"
-	              "\tVersion=\"8.00\"\n"
-	              "\tName=\"" << setup.projectDescription << "_" << configuration << getMSVCArchName(arch) << "\"\n"
-	              "\tInheritedPropertySheets=\".\\" << setup.projectDescription << "_Global" << getMSVCArchName(arch) << ".vsprops\"\n"
-	              "\t>\n"
-	              "\t<Tool\n"
-	              "\t\tName=\"VCCLCompilerTool\"\n";
+	           << "<VisualStudioPropertySheet\n"
+	           << "\tProjectType=\"Visual C++\"\n"
+	           << "\tVersion=\"8.00\"\n"
+	           << "\tName=\"" << setup.projectDescription << "_" << configuration << getMSVCArchName(arch) << "\"\n"
+	           << "\tInheritedPropertySheets=\".\\" << setup.projectDescription << "_Global" << getMSVCArchName(arch) << ".vsprops\"\n"
+	           << "\t>\n"
+	           << "\t<Tool\n"
+	           << "\t\tName=\"VCCLCompilerTool\"\n";
 
 	if (isRelease) {
 		properties << "\t\tEnableIntrinsicFunctions=\"true\"\n"
-		              "\t\tWholeProgramOptimization=\"true\"\n"
-		              "\t\tPreprocessorDefinitions=\"WIN32;RELEASE_BUILD\"\n"
-		              "\t\tStringPooling=\"true\"\n"
-		              "\t\tBufferSecurityCheck=\"false\"\n"
-		              "\t\tDebugInformationFormat=\"0\"\n"
-		              "\t\tRuntimeLibrary=\"0\"\n"
-		              "\t\tAdditionalOption=\"" << (configuration == "Analysis" ? "/analyze" : "") << "\"\n"
-		              "\t/>\n"
-		              "\t<Tool\n"
-		              "\t\tName=\"VCLinkerTool\"\n"
-		              "\t\tLinkIncremental=\"1\"\n"
-		              "\t\tGenerateManifest=\"false\"\n"
-		              "\t\tIgnoreDefaultLibraryNames=\"\"\n"
-		              "\t\tSetChecksum=\"true\"\n";
+		           << "\t\tWholeProgramOptimization=\"true\"\n"
+		           << "\t\tPreprocessorDefinitions=\"WIN32;RELEASE_BUILD\"\n"
+		           << "\t\tStringPooling=\"true\"\n"
+		           << "\t\tBufferSecurityCheck=\"false\"\n"
+		           << "\t\tDebugInformationFormat=\"0\"\n"
+		           << "\t\tRuntimeLibrary=\"0\"\n"
+		           << "\t\tAdditionalOption=\"" << (configuration == "Analysis" ? "/analyze" : "") << "\"\n"
+		           << "\t/>\n"
+		           << "\t<Tool\n"
+		           << "\t\tName=\"VCLinkerTool\"\n"
+		           << "\t\tLinkIncremental=\"1\"\n"
+		           << "\t\tGenerateManifest=\"false\"\n"
+		           << "\t\tIgnoreDefaultLibraryNames=\"\"\n"
+		           << "\t\tSetChecksum=\"true\"\n";
 	} else {
 		properties << "\t\tOptimization=\"0\"\n"
-		              "\t\tPreprocessorDefinitions=\"WIN32\"\n"
-		              "\t\tMinimalRebuild=\"true\"\n"
-		              "\t\tBasicRuntimeChecks=\"3\"\n"
-		              "\t\tRuntimeLibrary=\"1\"\n"
-		              "\t\tEnableFunctionLevelLinking=\"true\"\n"
-		              "\t\tWarnAsError=\"false\"\n"
-		              "\t\tDebugInformationFormat=\"" << (arch == ARCH_X86 ? "3" : "4") << "\"\n" // For x64 format "4" (Edit and continue) is not supported, thus we default to "3"
-		              "\t\tAdditionalOption=\"" << (configuration == "Analysis" ? "/analyze" : "") << "\"\n"
-		              "\t/>\n"
-		              "\t<Tool\n"
-		              "\t\tName=\"VCLinkerTool\"\n"
-		              "\t\tLinkIncremental=\"2\"\n"
-		              "\t\tGenerateManifest=\"false\"\n"
-		              "\t\tGenerateDebugInformation=\"true\"\n"
-		              "\t\tIgnoreDefaultLibraryNames=\"libcmt.lib\"\n";
+		           << "\t\tPreprocessorDefinitions=\"WIN32\"\n"
+		           << "\t\tMinimalRebuild=\"true\"\n"
+		           << "\t\tBasicRuntimeChecks=\"3\"\n"
+		           << "\t\tRuntimeLibrary=\"1\"\n"
+		           << "\t\tEnableFunctionLevelLinking=\"true\"\n"
+		           << "\t\tWarnAsError=\"false\"\n"
+		           << "\t\tDebugInformationFormat=\"" << (arch == ARCH_X86 ? "3" : "4") << "\"\n" // For x64 format "4" (Edit and continue) is not supported, thus we default to "3"
+		           << "\t\tAdditionalOption=\"" << (configuration == "Analysis" ? "/analyze" : "") << "\"\n"
+		           << "\t/>\n"
+		           << "\t<Tool\n"
+		           << "\t\tName=\"VCLinkerTool\"\n"
+		           << "\t\tLinkIncremental=\"2\"\n"
+		           << "\t\tGenerateManifest=\"false\"\n"
+		           << "\t\tGenerateDebugInformation=\"true\"\n"
+		           << "\t\tIgnoreDefaultLibraryNames=\"libcmt.lib\"\n";
 	}
 
 	properties << "\t/>\n"
-	              "</VisualStudioPropertySheet>\n";
+	           << "</VisualStudioPropertySheet>\n";
 
 	properties.flush();
 	properties.close();
@@ -370,7 +370,7 @@ void VisualStudioProvider::writeFileListToProject(const FileNode &dir, std::ofst
 }
 
 void VisualStudioProvider::writeFileToProject(std::ofstream &projectFile, const std::string &filePath, MSVC_Architecture arch,
-											  const std::string &indentString, const std::string &toolLine) {
+                                              const std::string &indentString, const std::string &toolLine) {
 	projectFile << indentString << "<File RelativePath=\"" << filePath << "\">\n"
 	            << indentString << "\t<FileConfiguration Name=\"Debug|" << getMSVCConfigName(arch) << "\">\n"
 	            << toolLine
@@ -387,4 +387,4 @@ void VisualStudioProvider::writeFileToProject(std::ofstream &projectFile, const
 	            << indentString << "</File>\n";
 }
 
-} // End of CreateProjectTool namespace
+} // namespace CreateProjectTool
diff --git a/devtools/create_project/visualstudio.h b/devtools/create_project/visualstudio.h
index 99c2819584..6d9f37fac9 100644
--- a/devtools/create_project/visualstudio.h
+++ b/devtools/create_project/visualstudio.h
@@ -29,7 +29,7 @@ namespace CreateProjectTool {
 
 class VisualStudioProvider : public MSVCProvider {
 public:
-	VisualStudioProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version, const MSVCVersion& msvc);
+	VisualStudioProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version, const MSVCVersion &msvc);
 
 protected:
 	void createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir,
@@ -39,7 +39,7 @@ protected:
 	                            const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
 
 	void writeFileToProject(std::ofstream &projectFile, const std::string &filePath, MSVC_Architecture arch,
-							const std::string &indentString, const std::string &toolLine);
+	                        const std::string &indentString, const std::string &toolLine);
 
 	void writeReferences(const BuildSetup &setup, std::ofstream &output);
 
@@ -55,6 +55,6 @@ protected:
 	void outputBuildEvents(std::ostream &project, const BuildSetup &setup, const MSVC_Architecture arch);
 };
 
-} // End of CreateProjectTool namespace
+} // namespace CreateProjectTool
 
 #endif // TOOLS_CREATE_PROJECT_VISUALSTUDIO_H




More information about the Scummvm-git-logs mailing list