From 9821f3022433a0cc6f55733e6609fb2b11afc005 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 5 Sep 2012 07:54:33 -0400 Subject: CREATE_PROJECT: Add config option to disable language extensions and edit and continue (per-project) --- devtools/create_project/config.h | 7 +++++-- devtools/create_project/create_project.cpp | 28 ++-------------------------- devtools/create_project/create_project.h | 24 ++++++++++++++++++++++++ devtools/create_project/msbuild.cpp | 21 ++++++++++++--------- devtools/create_project/msvc.cpp | 17 ++++++++++------- devtools/create_project/msvc.h | 2 ++ devtools/create_project/visualstudio.cpp | 8 +++++--- 7 files changed, 60 insertions(+), 47 deletions(-) (limited to 'devtools') diff --git a/devtools/create_project/config.h b/devtools/create_project/config.h index 20c1391cef..de4703a47d 100644 --- a/devtools/create_project/config.h +++ b/devtools/create_project/config.h @@ -28,7 +28,10 @@ #define LIBS_DEFINE "SCUMMVM_LIBS" // Name of the include environment variable #define REVISION_DEFINE "SCUMMVM_INTERNAL_REVISION" -//#define ADDITIONAL_LIBRARY "" -#define NEEDS_RTTI 0 +#define ENABLE_LANGUAGE_EXTENSIONS "" // Comma separated list of projects that need language extensions +#define DISABLE_EDIT_AND_CONTINUE "tinsel,tony" // Comma separated list of projects that need Edit&Continue to be disabled for co-routine support (the main project is automatically added) + +//#define ADDITIONAL_LIBRARY "" // Add a single library to the list of externally linked libraries +#define NEEDS_RTTI 0 // Enable RTTI globally #endif // TOOLS_CREATE_PROJECT_CONFIG_H diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 8499fec400..a8e09ff5eb 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -97,30 +97,6 @@ struct FSNode { }; typedef std::list FileList; - -typedef StringList TokenList; - -/** - * Takes a given input line and creates a list of tokens out of it. - * - * A token in this context is separated by whitespaces. A special case - * are quotation marks though. A string inside quotation marks is treated - * as single token, even when it contains whitespaces. - * - * Thus for example the input: - * foo bar "1 2 3 4" ScummVM - * will create a list with the following entries: - * "foo", "bar", "1 2 3 4", "ScummVM" - * As you can see the quotation marks will get *removed* too. - * - * You can also use this with non-whitespace by passing another separator - * character (e.g. ','). - * - * @param input The text to be tokenized. - * @param separator The token separator. - * @return A list of tokens. - */ -TokenList tokenize(const std::string &input, char separator = ' '); } // End of anonymous namespace enum ProjectType { @@ -526,7 +502,7 @@ int main(int argc, char *argv[]) { projectWarnings["agos"].push_back("4511"); projectWarnings["dreamweb"].push_back("4355"); - + projectWarnings["lure"].push_back("4189"); projectWarnings["lure"].push_back("4355"); @@ -787,6 +763,7 @@ bool parseEngine(const std::string &line, EngineDesc &engine) { return true; } +} // End of anonymous namespace TokenList tokenize(const std::string &input, char separator) { TokenList result; @@ -819,7 +796,6 @@ TokenList tokenize(const std::string &input, char separator) { return result; } -} // End of anonymous namespace namespace { const Feature s_features[] = { diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index b4eda8f8d2..de77793ee7 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -31,6 +31,30 @@ typedef std::list StringList; +typedef StringList TokenList; + +/** + * Takes a given input line and creates a list of tokens out of it. + * + * A token in this context is separated by whitespaces. A special case + * are quotation marks though. A string inside quotation marks is treated + * as single token, even when it contains whitespaces. + * + * Thus for example the input: + * foo bar "1 2 3 4" ScummVM + * will create a list with the following entries: + * "foo", "bar", "1 2 3 4", "ScummVM" + * As you can see the quotation marks will get *removed* too. + * + * You can also use this with non-whitespace by passing another separator + * character (e.g. ','). + * + * @param input The text to be tokenized. + * @param separator The token separator. + * @return A list of tokens. + */ +TokenList tokenize(const std::string &input, char separator = ' '); + /** * Structure to describe a game engine to be built into ScummVM. * diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index c797770955..0f77d91852 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -241,9 +241,11 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s // Check for project-specific warnings: std::map::iterator warningsIterator = _projectWarnings.find(name); + bool enableLanguageExtensions = find(_enableLanguageExtensions.begin(), _enableLanguageExtensions.end(), name) != _enableLanguageExtensions.end(); + bool disableEditAndContinue = find(_disableEditAndContinue.begin(), _disableEditAndContinue.end(), name) != _disableEditAndContinue.end(); // Nothing to add here, move along! - if (!setup.devTools && name != setup.projectName && name != "sword25" && name != "scummvm" && name != "grim" && warningsIterator == _projectWarnings.end()) + if (!setup.devTools && name != setup.projectName && !enableLanguageExtensions && !disableEditAndContinue && warningsIterator == _projectWarnings.end()) return; std::string warnings = ""; @@ -254,16 +256,17 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s project << "\t\n" "\t\t\n"; - // Compile configuration - if (setup.devTools || name == setup.projectName || name == "sword25" || name == "grim") { + // Language Extensions + if (setup.devTools || name == setup.projectName || enableLanguageExtensions) project << "\t\t\tfalse\n"; - if (name == setup.projectName && !isRelease) - project << "\t\t\tProgramDatabase\n"; - } else { - if (warningsIterator != _projectWarnings.end()) - project << "\t\t\t" << warnings << ";%(DisableSpecificWarnings)\n"; - } + // Edit and Continue + if ((name == setup.projectName || disableEditAndContinue) && !isRelease) + project << "\t\t\tProgramDatabase\n"; + + // Warnings + if (warningsIterator != _projectWarnings.end()) + project << "\t\t\t" << warnings << ";%(DisableSpecificWarnings)\n"; project << "\t\t\n"; diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp index 96eaf643d1..f995c108c7 100644 --- a/devtools/create_project/msvc.cpp +++ b/devtools/create_project/msvc.cpp @@ -33,6 +33,9 @@ namespace CreateProjectTool { ////////////////////////////////////////////////////////////////////////// MSVCProvider::MSVCProvider(StringList &global_warnings, std::map &project_warnings, const int version) : ProjectProvider(global_warnings, project_warnings, version) { + + _enableLanguageExtensions = tokenize(ENABLE_LANGUAGE_EXTENSIONS, ','); + _disableEditAndContinue = tokenize(DISABLE_EDIT_AND_CONTINUE, ','); } void MSVCProvider::createWorkspace(const BuildSetup &setup) { @@ -75,10 +78,10 @@ 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\tAnalysis|Win32 = Analysis|Win32\n" "\t\tRelease|Win32 = Release|Win32\n" "\t\tDebug|x64 = Debug|x64\n" - "\t\tAnalysis|x64 = Analysis|x64\n" + "\t\tAnalysis|x64 = Analysis|x64\n" "\t\tRelease|x64 = Release|x64\n" "\tEndGlobalSection\n" "\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n"; @@ -86,14 +89,14 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) { 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 << "}.Analysis|Win32.ActiveCfg = Analysis|Win32\n" + "\t\t{" << i->second << "}.Analysis|Win32.Build.0 = Analysis|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 << "}.Analysis|x64.ActiveCfg = Analysis|x64\n" + "\t\t{" << i->second << "}.Analysis|x64.Build.0 = Analysis|x64\n" "\t\t{" << i->second << "}.Release|x64.ActiveCfg = Release|x64\n" "\t\t{" << i->second << "}.Release|x64.Build.0 = Release|x64\n"; } @@ -139,7 +142,7 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) { StringList x64EngineDefines = getEngineDefines(setup.engines); x64Defines.splice(x64Defines.end(), x64EngineDefines); - // HACK: This definitly should not be here, but otherwise we would not define SDL_BACKEND for x64. + // HACK: This definitely should not be here, but otherwise we would not define SDL_BACKEND for x64. x64Defines.push_back("WIN32"); x64Defines.push_back("SDL_BACKEND"); diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h index 0a994667fa..5a854b596a 100644 --- a/devtools/create_project/msvc.h +++ b/devtools/create_project/msvc.h @@ -32,6 +32,8 @@ public: MSVCProvider(StringList &global_warnings, std::map &project_warnings, const int version); protected: + StringList _enableLanguageExtensions; + StringList _disableEditAndContinue; void createWorkspace(const BuildSetup &setup); diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index c301e78ad1..de2df96d78 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -103,6 +103,9 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: outputConfiguration(project, setup, libraries, "Release", "x64", "64", false); } else { + bool enableLanguageExtensions = find(_enableLanguageExtensions.begin(), _enableLanguageExtensions.end(), name) != _enableLanguageExtensions.end(); + bool disableEditAndContinue = find(_disableEditAndContinue.begin(), _disableEditAndContinue.end(), name) != _disableEditAndContinue.end(); + std::string warnings = ""; if (warningsIterator != _projectWarnings.end()) for (StringList::const_iterator i = warningsIterator->second.begin(); i != warningsIterator->second.end(); ++i) @@ -110,9 +113,8 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: std::string toolConfig; toolConfig = (!warnings.empty() ? "DisableSpecificWarnings=\"" + warnings + "\"" : ""); - toolConfig += (name == setup.projectName ? "DebugInformationFormat=\"3\" " : ""); - toolConfig += (name == "sword25" ? "DisableLanguageExtensions=\"false\" " : ""); - toolConfig += (name == "grim" ? "DisableLanguageExtensions=\"false\" " : ""); + toolConfig += (disableEditAndContinue ? "DebugInformationFormat=\"3\" " : ""); + toolConfig += (enableLanguageExtensions ? "DisableLanguageExtensions=\"false\" " : ""); // Win32 outputConfiguration(setup, project, toolConfig, "Debug", "Win32", ""); -- cgit v1.2.3 From 754a4bb8e422251b82175adef246d92bc33f83df Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 5 Sep 2012 07:56:23 -0400 Subject: CREATE_PROJECT: Remove hardcoded define for post-build event --- devtools/create_project/msvc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp index f995c108c7..b8d2401af9 100644 --- a/devtools/create_project/msvc.cpp +++ b/devtools/create_project/msvc.cpp @@ -171,7 +171,7 @@ std::string MSVCProvider::getPostBuildEvent(bool isWin32, bool createInstaller) cmdLine += (isWin32) ? "x86" : "x64"; - cmdLine += " %SCUMMVM_LIBS% "; + cmdLine += " %" LIBS_DEFINE "% "; // Specify if installer needs to be built or not cmdLine += (createInstaller ? "1" : "0"); -- cgit v1.2.3 From b6534b2784a713237758bcb7c0a1ea9c7861cc82 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 5 Sep 2012 20:27:46 -0400 Subject: CREATE_PROJECT: Copy translations.dat in postbuild step --- devtools/create_project/scripts/postbuild.cmd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd index d78119d058..8b70ec3dd8 100644 --- a/devtools/create_project/scripts/postbuild.cmd +++ b/devtools/create_project/scripts/postbuild.cmd @@ -24,8 +24,10 @@ echo Copying data files echo. xcopy /F /Y "%~4/lib/%~3/SDL.dll" "%~2" 1>NUL 2>&1 -xcopy /F /Y "%~4/lib/%~3/freetype6.dll" "%~2" 1>NUL 2>&1 +xcopy /F /Y "%~4/lib/%~3/freetype6.dll" "%~2" 1>NUL 2>&1 xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" "%~2" 1>NUL 2>&1 +xcopy /F /Y "%~1/gui/themes/translations.dat" "%~2" 1>NUL 2>&1 + if "%~5"=="0" goto done -- cgit v1.2.3 From f607112da03d56329cfd0a62e47db6f4b9e145e1 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Thu, 6 Sep 2012 16:47:33 +0200 Subject: CREDITS: Add myself to credits for the Wintermute-engine --- devtools/credits.pl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 7ce17a9df6..b1a73caad7 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -697,6 +697,10 @@ begin_credits("Credits"); add_person("Gregory Montoir", "cyx", "(retired)"); end_section(); + begin_section("Wintermute"); + add_person("Einar Johan T. Sømåen", "somaen", ""); + end_section(); + end_section(); -- cgit v1.2.3 From 3513f3870de3d99fafd7625120e5bf68436dd15d Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Thu, 6 Sep 2012 16:53:01 +0200 Subject: CREDITS: Thank Jan Nedoma (Mnemonic) for sources/assistance with WME. --- devtools/credits.pl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index b1a73caad7..e022e1a4dc 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -1147,6 +1147,10 @@ begin_credits("Credits"); "Janusz Wiśniewski and Miroslaw Liminowicz from Laboratorium Komputerowe Avalon ". "for providing full source code for Sołtys and letting us to redistribute the game."); + add_paragraph( + "Jan Nedoma for providing the sources to the Wintermute-engine, and for providing ". + "support while porting the engine to ScummVM"); + end_section(); end_credits(); -- cgit v1.2.3 From 1ea69b53cec1ed1dffab05a20d8df6bae074c2bb Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 6 Sep 2012 17:19:22 +0200 Subject: CREDITS: Minor tweaks --- devtools/credits.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index e022e1a4dc..1fd40dbab2 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -1145,11 +1145,11 @@ begin_credits("Credits"); add_paragraph( "Janusz Wiśniewski and Miroslaw Liminowicz from Laboratorium Komputerowe Avalon ". - "for providing full source code for Sołtys and letting us to redistribute the game."); + "for providing full source code for Sołtys and letting us redistribute the game."); add_paragraph( - "Jan Nedoma for providing the sources to the Wintermute-engine, and for providing ". - "support while porting the engine to ScummVM"); + "Jan Nedoma for providing the sources to the Wintermute-engine, and for his ". + "support while porting the engine to ScummVM."); end_section(); -- cgit v1.2.3 From 033e75e6260c4cb42317c1e965d1610b6dde331b Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 6 Sep 2012 17:44:52 +0200 Subject: CREDITS: Output warning if name is too wide for text output --- devtools/credits.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 1fd40dbab2..e8cb1154e7 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -359,6 +359,9 @@ sub add_person { my $min_name_width = length $desc > 0 ? $max_name_width : 0; $name = $nick if $name eq ""; $name = html_entities_to_ascii($name); + if (length $name > $max_name_width) { + print STDERR "Warning: max_name_width is too small (" . $max_name_width . " < " . (length $name) . " for \"" . $name. "\")\n"; + } $desc = html_entities_to_ascii($desc); $tab = " " x ($section_level * 2 + 1); -- cgit v1.2.3 From 952a41abe2911500fe9c3d2663b5cac9b4f9b3dd Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 6 Sep 2012 17:45:44 +0200 Subject: CREDITS: Reshuffle special thanks --- devtools/credits.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index e8cb1154e7..b993bb12f3 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -1087,6 +1087,7 @@ begin_credits("Credits"); add_person("Ivan Dubrov", "", "For contributing the initial version of the Gobliiins engine"); add_person("Henrik Engqvist", "qvist", "For generously providing hosting for our buildbot, SVN repository, planet and doxygen sites as well as tons of HD space"); add_person("DOSBox Team", "", "For their awesome OPL2 and OPL3 emulator"); + add_person("Yusuke Kamiyamane", "", "For contributing some GUI icons "); add_person("Till Kresslein", "Krest", "For design of modern ScummVM GUI"); add_person("", "Jezar", "For his freeverb filter implementation"); add_person("Jim Leiterman", "", "Various info on his FM-TOWNS/Marty SCUMM ports"); @@ -1097,8 +1098,6 @@ begin_credits("Credits"); add_person("James Woodcock", "", "Soundtrack enhancements"); end_persons(); - add_paragraph("Some icons by Yusuke Kamiyamane"); - add_paragraph( "Tony Warriner and everyone at Revolution Software Ltd. for sharing ". "with us the source of some of their brilliant games, allowing us to ". -- cgit v1.2.3 From 6fada6722eaceccdf02a925556ff032795ccd17f Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 6 Sep 2012 17:46:28 +0200 Subject: CREDITS: Increase name widths to avoid cut off names Unfortunately this does introduce extra line breaks. --- devtools/credits.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index b993bb12f3..f7efa59d2f 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -48,7 +48,7 @@ if ($mode eq "") { $Text::Wrap::unexpand = 0; if ($mode eq "TEXT") { $Text::Wrap::columns = 78; - $max_name_width = 21; # The maximal width of a name. + $max_name_width = 23; # The maximal width of a name. } elsif ($mode eq "CPP") { $Text::Wrap::columns = 48; # Approx. } @@ -1074,7 +1074,7 @@ begin_credits("Credits"); # HACK! - $max_name_width = 16; + $max_name_width = 17; begin_section("Special thanks to"); begin_persons(); -- cgit v1.2.3