From 987bb6d454a89fb1b2469303d7cb6c65b88d16a3 Mon Sep 17 00:00:00 2001 From: Kirben Date: Fri, 27 Sep 2013 15:50:36 +1000 Subject: SCUMM: Add US Windows preview of Humongous Catalog. --- devtools/scumm-md5.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'devtools') diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index 0dbcbf4792..a52bbaecf8 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -598,6 +598,7 @@ catalog Humongous Interactive Catalog a56e8d9d4281c53c3f63c9bd22a59e21 10978342 en All HE CUP Preview George Kormendi 74da3494fbe1a7d20213b0afe0954755 10841544 fr All HE CUP Preview - George Kormendi 4c4820518e16e1a0e3616a3b021a04f3 10927456 de All HE CUP Preview - Kirben + 288fb75b24389733c29fa107fe8d44e8 10795148 us All HE CUP Preview - Kirben airport Let's Explore the Airport with Buzzy d6334a5a9b61afe18c368540fdf522ca -1 en Mac - - - Joachim Eberhard -- cgit v1.2.3 From ca5804a253c0e654ec6d6210aea9ee2574aad367 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 27 Sep 2013 12:28:25 +0300 Subject: DEVTOOLS: Make Coverity happy. This is mainly due to unhandled clang __has_featrure() buit-in. I do not like this hack, but Coverity proved to be a very good tool for us. --- devtools/convbdf.cpp | 4 ++++ devtools/create_mortdat/create_mortdat.cpp | 4 ---- devtools/create_neverhood/create_neverhood.cpp | 2 +- devtools/create_project/create_project.h | 4 ++++ devtools/create_translations/create_translations.cpp | 3 ++- devtools/create_translations/create_translations.h | 4 ++++ 6 files changed, 15 insertions(+), 6 deletions(-) (limited to 'devtools') diff --git a/devtools/convbdf.cpp b/devtools/convbdf.cpp index c8b1fb7d6d..69728eb9fd 100644 --- a/devtools/convbdf.cpp +++ b/devtools/convbdf.cpp @@ -20,6 +20,10 @@ * */ +#ifndef __has_feature // Optional of course. + #define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif + #include #include #include diff --git a/devtools/create_mortdat/create_mortdat.cpp b/devtools/create_mortdat/create_mortdat.cpp index 5a491eea2f..0065407daa 100644 --- a/devtools/create_mortdat/create_mortdat.cpp +++ b/devtools/create_mortdat/create_mortdat.cpp @@ -33,10 +33,6 @@ #undef main #endif // main -#include -#include -#include - #include "common/endian.h" #include "create_mortdat.h" #include "enginetext.h" diff --git a/devtools/create_neverhood/create_neverhood.cpp b/devtools/create_neverhood/create_neverhood.cpp index 446ee5ec3b..a37ff99ca9 100644 --- a/devtools/create_neverhood/create_neverhood.cpp +++ b/devtools/create_neverhood/create_neverhood.cpp @@ -30,8 +30,8 @@ #undef main #endif // main -#include #include "create_neverhood.h" +#include #include "md5.h" #include "tables.h" diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index 5325bf6d1b..2f27cc2f61 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -23,6 +23,10 @@ #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. +#endif + #include #include #include diff --git a/devtools/create_translations/create_translations.cpp b/devtools/create_translations/create_translations.cpp index a153632c47..a8b04a7a52 100644 --- a/devtools/create_translations/create_translations.cpp +++ b/devtools/create_translations/create_translations.cpp @@ -22,6 +22,8 @@ * The generated files is used by ScummVM to propose translation of its GUI. */ +#include "create_translations.h" + #include #include #include @@ -34,7 +36,6 @@ #undef main #endif // main -#include "create_translations.h" #include "po_parser.h" #include "cp_parser.h" diff --git a/devtools/create_translations/create_translations.h b/devtools/create_translations/create_translations.h index 9ccbd39b2b..1df01e6333 100644 --- a/devtools/create_translations/create_translations.h +++ b/devtools/create_translations/create_translations.h @@ -28,4 +28,8 @@ typedef unsigned short uint16; typedef unsigned int uint32; typedef signed short int16; +#ifndef __has_feature // Optional of course. + #define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif + #endif /* CREATE_TRANSLATIONS_H */ -- cgit v1.2.3 From fed85464440fbe08e8f99edfddb018519b680a69 Mon Sep 17 00:00:00 2001 From: uruk Date: Sun, 6 Oct 2013 01:20:20 +0200 Subject: AVALANCHE: Update credit files. --- devtools/credits.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 45018a5633..50efb42a55 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -541,6 +541,11 @@ begin_credits("Credits"); add_person("Oliver Kiehl", "olki", "(retired)"); add_person("Ludvig Strigeus", "ludde", "(retired)"); end_section(); + + begin_section("AVALANCHE"); + add_person("Peter Bozsó", "uruk", ""); + add_person("Arnaud Boutonné", "Strangerke", ""); + end_section(); begin_section("CGE"); add_person("Arnaud Boutonné", "Strangerke", ""); -- cgit v1.2.3 From 303261482de2f2c1bf1f1fb4d2e016b0555ba715 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 6 Oct 2013 21:02:38 -0400 Subject: CREDITS: Add Keith for some pegasus patches --- devtools/credits.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 45018a5633..ecb543b832 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -1063,6 +1063,7 @@ begin_credits("Credits"); add_person("Janne Huttunen", "", "V3 actor mask support, Dig/FT SMUSH audio"); add_person("Kovács Endre János", "", "Several fixes for Simon1"); add_person("Jeroen Janssen", "japj", "Numerous readability and bugfix patches"); + add_person("Keith Kaisershot", "blitter", "Several Pegasus Prime patches"); add_person("Andreas Karlsson", "Sprawl", "Initial port for SymbianOS"); add_person("Claudio Matsuoka", "", "Daily Linux builds"); add_person("Thomas Mayer", "", "PSP port contributions"); -- cgit v1.2.3 From 8e8e5af0ec3ee4760e83beff095a0bf76a80e5f6 Mon Sep 17 00:00:00 2001 From: RichieSams Date: Tue, 8 Oct 2013 09:49:28 -0500 Subject: ZVISION: Add an entry in credits.pl for ZVision --- devtools/credits.pl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 45018a5633..133eba5e93 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -754,6 +754,10 @@ begin_credits("Credits"); begin_section("Wintermute"); add_person("Einar Johan T. Sømåen", "somaen", ""); end_section(); + + begin_section("ZVision"); + add_person("Adrian Astley", "RichieSams", ""); + end_section(); end_section(); -- cgit v1.2.3 From ef87ba54b446346eb528bd1115578b5a99df0b9c Mon Sep 17 00:00:00 2001 From: RichieSams Date: Tue, 8 Oct 2013 09:50:20 -0500 Subject: ZVISION: Add an entry in credits.pl for Marisa Chan / Zidane --- devtools/credits.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 133eba5e93..57336e2895 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -1158,6 +1158,7 @@ begin_credits("Credits"); add_person("Jimmi Thøgersen", "", "For ScummRev, and much obscure code/documentation"); add_person("", "Tristan", "For additional work on the original MT-32 emulator"); add_person("James Woodcock", "", "Soundtrack enhancements"); + add_person("Anton Yartsev", "Zidane", "For the original re-implementation of the ZVison engine"); end_persons(); add_paragraph( -- cgit v1.2.3 From 7a97c992de67152514886f80f3cf4f2f3686d3d4 Mon Sep 17 00:00:00 2001 From: RichieSams Date: Tue, 8 Oct 2013 10:08:09 -0500 Subject: ZVISION: Use credits.pl to update AUTHORS and credits.h --- devtools/credits.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 57336e2895..e7828d8b18 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -1158,7 +1158,7 @@ begin_credits("Credits"); add_person("Jimmi Thøgersen", "", "For ScummRev, and much obscure code/documentation"); add_person("", "Tristan", "For additional work on the original MT-32 emulator"); add_person("James Woodcock", "", "Soundtrack enhancements"); - add_person("Anton Yartsev", "Zidane", "For the original re-implementation of the ZVison engine"); + add_person("Anton Yartsev", "Zidane", "For the original re-implementation of the ZVision engine"); end_persons(); add_paragraph( -- cgit v1.2.3 From 748ba2475a2486196484246dc461d435c2564aba Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 17 Oct 2013 22:32:49 +0200 Subject: AVALANCHE: Fix broken xml entity in credits --- devtools/credits.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 50efb42a55..f652773b33 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -543,7 +543,7 @@ begin_credits("Credits"); end_section(); begin_section("AVALANCHE"); - add_person("Peter Bozsó", "uruk", ""); + add_person("Peter Bozsó", "uruk", ""); add_person("Arnaud Boutonné", "Strangerke", ""); end_section(); -- cgit v1.2.3 From 1fc5d52e906186bdde6e5c46e84268b9c958691c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 23 Oct 2013 23:45:58 +0200 Subject: DEVTOOLS: Enable RTTI in create_project generated project files. --- devtools/create_project/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/create_project/config.h b/devtools/create_project/config.h index 1a66edff93..a8313a3755 100644 --- a/devtools/create_project/config.h +++ b/devtools/create_project/config.h @@ -32,6 +32,6 @@ #define DISABLE_EDIT_AND_CONTINUE "tinsel,tony,scummvm" // 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 +#define NEEDS_RTTI 1 // Enable RTTI globally #endif // TOOLS_CREATE_PROJECT_CONFIG_H -- cgit v1.2.3 From 0d20acf8de696111a1514e1b3ca01bd21f0a8a72 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 30 Oct 2013 21:56:16 +0000 Subject: CREDITS: Add credits for game translations --- devtools/credits.pl | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index fda6f4782e..03e086ce99 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 = 23; # The maximal width of a name. + $max_name_width = 28; # The maximal width of a name. } elsif ($mode eq "CPP") { $Text::Wrap::columns = 48; # Approx. } @@ -60,6 +60,7 @@ sub html_entities_to_ascii { # For now we hardcode these mappings # á -> a # é -> e + # í -> i # ì -> i # ó -> o # ø -> o @@ -72,8 +73,10 @@ sub html_entities_to_ascii { # ł -> l # ś -> s # Š -> S + # ñ -> n $text =~ s/á/a/g; $text =~ s/é/e/g; + $text =~ s/í/i/g; $text =~ s/ì/i/g; $text =~ s/ó/o/g; $text =~ s/ø/o/g; @@ -81,6 +84,7 @@ sub html_entities_to_ascii { $text =~ s/ś/s/g; $text =~ s/Š/S/g; $text =~ s/å/aa/g; + $text =~ s/ñ/n/g; $text =~ s/ä/a/g; $text =~ s/ë/e/g; @@ -101,6 +105,7 @@ sub html_entities_to_cpp { # The numerical values are octal! $text =~ s/á/\\341/g; $text =~ s/é/\\351/g; + $text =~ s/í/\\355/g; $text =~ s/ì/\\354/g; $text =~ s/ó/\\363/g; $text =~ s/ø/\\370/g; @@ -108,6 +113,7 @@ sub html_entities_to_cpp { $text =~ s/ś/s/g; $text =~ s/Š/S/g; $text =~ s/å/\\345/g; + $text =~ s/ñ/\\361/g; $text =~ s/ä/\\344/g; $text =~ s/ë/\\353/g; @@ -126,6 +132,7 @@ sub html_entities_to_rtf { $text =~ s/á/\\'87/g; $text =~ s/é/\\'8e/g; + $text =~ s/í/\\'92/g; $text =~ s/ì/\\'93/g; $text =~ s/ó/\\'97/g; $text =~ s/ø/\\'bf/g; @@ -135,6 +142,8 @@ sub html_entities_to_rtf { $text =~ s/Š/\\uc0\\u540 /g; # Back to hex numbers + $text =~ s/ñ/\\'96/g; + $text =~ s/ä/\\'8a/g; $text =~ s/ë/\\'eb/g; $text =~ s/ö/\\'9a/g; @@ -151,12 +160,14 @@ sub html_entities_to_tex { $text =~ s/á/\\'a/g; $text =~ s/é/\\'e/g; + $text =~ s/í/\\'i/g; $text =~ s/ì/\\`\\i/g; $text =~ s/ó/\\'o/g; $text =~ s/ø/{\\o}/g; $text =~ s/å/\\aa /g; $text =~ s/ł/{\\l}/g; $text =~ s/Š/{\\v S}/g; + $text =~ s/ñ/\\˜n/g; $text =~ s/ä/\\"a/g; $text =~ s/ö/\\"o/g; @@ -984,7 +995,7 @@ begin_credits("Credits"); end_section(); end_section(); - begin_section("Translations"); + begin_section("GUI Translations"); begin_persons(); add_person("Thierry Crozat", "criezy", "Translation Lead"); end_persons(); @@ -1049,6 +1060,20 @@ begin_credits("Credits"); add_person("Lubomyr Lisen", "", ""); end_section(); end_section(); + begin_section("Game Translations"); + begin_section("CGE"); + add_person("Dan Serban", "nutron", "Soltys English translation"); + add_person("Víctor González", "IlDucci", "Soltys Spanish translation"); + add_person("Alejandro Gómez de la Muñoza", "TheFireRed", "Soltys Spanish translation"); + end_section(); + begin_section("Drascula"); + add_person("Thierry Crozat", "criezy", "Improve French translation"); + end_section(); + begin_section("Mortevielle"); + add_person("Hugo Labrande", "", "Improve English translation"); + add_person("Thierry Crozat", "criezy", "Improve English translation"); + end_section(); + end_section(); begin_section("Websites (design)"); begin_persons(); -- cgit v1.2.3 From d594f626625ef78c659e3bd5936816ffba1886b7 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 30 Oct 2013 23:33:38 +0100 Subject: TOOLS: Create Mortdat - Fix CID 1063349 --- devtools/create_mortdat/create_mortdat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/create_mortdat/create_mortdat.cpp b/devtools/create_mortdat/create_mortdat.cpp index 0065407daa..693e277b91 100644 --- a/devtools/create_mortdat/create_mortdat.cpp +++ b/devtools/create_mortdat/create_mortdat.cpp @@ -210,7 +210,7 @@ void writeMenuData(const char *menuData, int languageId) { outputFile.writeByte(languageId); // Write each 8-characters block as a byte (one bit per character) // ' ' -> 0, anything else -> 1 - byte value; + byte value = 0; int valueCpt = 0; const char* str = menuData; while (*str != 0) { -- cgit v1.2.3 From 39bbcfa59e89f065757d418d4406fe7f42acde57 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 30 Oct 2013 23:46:05 +0100 Subject: TOOLS: Extract_mort - FIX CID 1060932, 1060933 --- devtools/extract_mort/extract_mort.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'devtools') diff --git a/devtools/extract_mort/extract_mort.cpp b/devtools/extract_mort/extract_mort.cpp index 4346f1f4bf..a52458f9b2 100644 --- a/devtools/extract_mort/extract_mort.cpp +++ b/devtools/extract_mort/extract_mort.cpp @@ -104,9 +104,9 @@ public: return ftell(f); } uint32 size() { - int position = ftell(f); + uint32 position = ftell(f); fseek (f, 0, SEEK_END); - int end = ftell (f); + uint32 end = ftell(f); fseek (f, position, SEEK_SET); return end; -- cgit v1.2.3 From 6e29e1abeefb998c97df14c6971c69822ead7959 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: DEVTOOLS: Adapt create_project for new configure.engine files. I could not try any generated project files since I do not have access to the IDEs. --- devtools/create_project/create_project.cpp | 165 ++++++++++++++++++++--------- devtools/create_project/create_project.h | 43 +++++++- 2 files changed, 151 insertions(+), 57 deletions(-) (limited to 'devtools') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index e013377241..ad3160d778 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -81,22 +81,6 @@ std::string unifyPath(const std::string &path); * @param exe Name of the executable. */ void displayHelp(const char *exe); - -/** - * Structure for describing an FSNode. This is a very minimalistic - * description, which includes everything we need. - * It only contains the name of the node and whether it is a directory - * or not. - */ -struct FSNode { - FSNode() : name(), isDirectory(false) {} - FSNode(const std::string &n, bool iD) : name(n), isDirectory(iD) {} - - std::string name; ///< Name of the file system node - bool isDirectory; ///< Whether it is a directory or not -}; - -typedef std::list FileList; } // End of anonymous namespace enum ProjectType { @@ -128,7 +112,7 @@ int main(int argc, char *argv[]) { setup.filePrefix = setup.srcDir; setup.outputDir = '.'; - setup.engines = parseConfigure(setup.srcDir); + setup.engines = parseEngines(setup.srcDir); if (setup.engines.empty()) { std::cout << "WARNING: No engines found in configure file or configure file missing in \"" << setup.srcDir << "\"\n"; @@ -672,47 +656,51 @@ void displayHelp(const char *exe) { } /** - * Try to parse a given line and create an engine definition - * out of the result. - * - * This may take *any* input line, when the line is not used - * to define an engine the result of the function will be "false". + * Parse the configure.engine file of a given engine directory and return a + * list of all defined engines. * - * Note that the contents of "engine" are undefined, when this - * function returns "false". + * @param engineDir The directory of the engine. + * @return The list of all defined engines. + */ +EngineDescList parseEngineConfigure(const std::string &engineDir); + +/** + * Compares two FSNode entries in a strict-weak fashion based on the name. * - * @param line Text input line. - * @param engine Reference to an object, where the engine information - * is to be stored in. - * @return "true", when parsing succeeded, "false" otherwise. + * @param left The first operand. + * @param right The second operand. + * @return "true" when the name of the left operand is strictly smaller than + * the name of the second operand. "false" otherwise. */ -bool parseEngine(const std::string &line, EngineDesc &engine); +bool compareFSNode(const CreateProjectTool::FSNode &left, const CreateProjectTool::FSNode &right); } // End of anonymous namespace -EngineDescList parseConfigure(const std::string &srcDir) { - std::string configureFile = srcDir + "/engines/configure.engines"; +EngineDescList parseEngines(const std::string &srcDir) { + using CreateProjectTool::FileList; + using CreateProjectTool::listDirectory; - std::ifstream configure(configureFile.c_str()); - if (!configure) - return EngineDescList(); + EngineDescList engineList; - std::string line; - EngineDescList engines; + FileList engineFiles = listDirectory(srcDir + "/engines/"); - for (;;) { - std::getline(configure, line); - if (configure.eof()) - break; + // Sort file list alphabetically this allows for a nicer order in + // --list-engines output, for example. + engineFiles.sort(&compareFSNode); - if (configure.fail()) - error("Failed while reading from " + configureFile); + for (FileList::const_iterator i = engineFiles.begin(), end = engineFiles.end(); i != end; ++i) { + // Each engine requires its own sub directory thus we will skip all + // non directory file nodes here. + if (!i->isDirectory) { + continue; + } - EngineDesc desc; - if (parseEngine(line, desc)) - engines.push_back(desc); + // Retrieve all engines defined in this sub directory and add them to + // the list of all engines. + EngineDescList list = parseEngineConfigure(srcDir + "/engines/" + i->name); + engineList.splice(engineList.end(), list); } - return engines; + return engineList; } bool isSubEngine(const std::string &name, const EngineDescList &engines) { @@ -777,6 +765,21 @@ StringList getEngineDefines(const EngineDescList &engines) { } namespace { +/** + * Try to parse a given line and create an engine definition + * out of the result. + * + * This may take *any* input line, when the line is not used + * to define an engine the result of the function will be "false". + * + * Note that the contents of "engine" are undefined, when this + * function returns "false". + * + * @param line Text input line. + * @param engine Reference to an object, where the engine information + * is to be stored in. + * @return "true", when parsing succeeded, "false" otherwise. + */ bool parseEngine(const std::string &line, EngineDesc &engine) { // Format: // add_engine engine_name "Readable Description" enable_default ["SubEngineList"] @@ -799,6 +802,36 @@ bool parseEngine(const std::string &line, EngineDesc &engine) { return true; } + +EngineDescList parseEngineConfigure(const std::string &engineDir) { + std::string configureFile = engineDir + "/configure.engine"; + + std::ifstream configure(configureFile.c_str()); + if (!configure) + return EngineDescList(); + + std::string line; + EngineDescList engines; + + for (;;) { + std::getline(configure, line); + if (configure.eof()) + break; + + if (configure.fail()) + error("Failed while reading from " + configureFile); + + EngineDesc desc; + if (parseEngine(line, desc)) + engines.push_back(desc); + } + + return engines; +} + +bool compareFSNode(const CreateProjectTool::FSNode &left, const CreateProjectTool::FSNode &right) { + return left.name < right.name; +} } // End of anonymous namespace TokenList tokenize(const std::string &input, char separator) { @@ -1048,13 +1081,6 @@ bool compareNodes(const FileNode *l, const FileNode *r) { } } -/** - * Returns a list of all files and directories in the specified - * path. - * - * @param dir Directory which should be listed. - * @return List of all children. - */ FileList listDirectory(const std::string &dir) { FileList result; #ifdef USE_WIN32_API @@ -1242,6 +1268,12 @@ void ProjectProvider::createProject(BuildSetup &setup) { // Create other misc. build files createOtherBuildFiles(setup); + + // In case we create the main ScummVM project files we will need to + // generate engines/plugins_table.h too. + if (!setup.tests && !setup.devTools) { + createEnginePluginsTable(setup); + } } ProjectProvider::UUIDMap ProjectProvider::createUUIDMap(const BuildSetup &setup) const { @@ -1569,6 +1601,33 @@ void ProjectProvider::createModuleList(const std::string &moduleDir, const Strin error("Malformed file " + moduleMkFile); } +void ProjectProvider::createEnginePluginsTable(const BuildSetup &setup) { + const std::string enginePluginsTableFile = setup.outputDir + "/engines/plugins_table.h"; + std::ofstream enginePluginsTable(enginePluginsTableFile.c_str()); + if (!enginePluginsTable) { + error("Could not open \"" + enginePluginsTableFile + "\" for writing"); + } + + enginePluginsTable << "/* This file is automatically generated by create_project */\n" + << "/* DO NOT EDIT MANUALLY */\n" + << "// This file is being included by \"base/plugins.cpp\"\n"; + + for (EngineDescList::const_iterator i = setup.engines.begin(), end = setup.engines.end(); i != end; ++i) { + // We ignore all sub engines here because they require no special + // handling. + if (isSubEngine(i->name, setup.engines)) { + continue; + } + + // Make the engine name all uppercase. + std::string engineName; + std::transform(i->name.begin(), i->name.end(), std::back_inserter(engineName), toupper); + + enginePluginsTable << "#if PLUGIN_ENABLED_STATIC(" << engineName << ")\n" + << "LINK_PLUGIN(" << engineName << ")\n" + << "#endif\n"; + } +} } // End of anonymous namespace void error(const std::string &message) { diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index 2f27cc2f61..69ed551151 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -102,16 +102,17 @@ struct EngineDesc { typedef std::list EngineDescList; /** - * This function parses the project configure file and creates a list - * of available engines. + * This function parses the project directory and creates a list of + * available engines. * * It will also automatically setup the default build state (enabled - * or disabled) to the state specified in the "configure" file. + * or disabled) to the state specified in the individual configure.engine + * files. * * @param srcDir Path to the root of the project source. * @return List of available engines. */ -EngineDescList parseConfigure(const std::string &srcDir); +EngineDescList parseEngines(const std::string &srcDir); /** * Checks whether the specified engine is a sub engine. To determine this @@ -262,6 +263,22 @@ void NORETURN_PRE error(const std::string &message) NORETURN_POST; namespace CreateProjectTool { +/** + * Structure for describing an FSNode. This is a very minimalistic + * description, which includes everything we need. + * It only contains the name of the node and whether it is a directory + * or not. + */ +struct FSNode { + FSNode() : name(), isDirectory(false) {} + FSNode(const std::string &n, bool iD) : name(n), isDirectory(iD) {} + + std::string name; ///< Name of the file system node + bool isDirectory; ///< Whether it is a directory or not +}; + +typedef std::list FileList; + /** * Gets a proper sequence of \t characters for the given * indentation level. @@ -314,6 +331,15 @@ bool producesObjectFile(const std::string &fileName); */ std::string toString(int num); +/** + * Returns a list of all files and directories in the specified + * path. + * + * @param dir Directory which should be listed. + * @return List of all children. + */ +FileList listDirectory(const std::string &dir); + /** * Structure representing a file tree. This contains two * members: name and children. "name" holds the name of @@ -474,6 +500,15 @@ protected: * @return A new UUID as string. */ std::string createUUID() const; + +private: + /** + * This creates the engines/plugins_table.h file required for building + * ScummVM. + * + * @param setup Description of the desired build. + */ + void createEnginePluginsTable(const BuildSetup &setup); }; } // End of CreateProjectTool namespace -- cgit v1.2.3 From c00ab00f250205dc76890965562f5b661055826a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 7 Nov 2013 12:58:35 +0100 Subject: DEVTOOLS: Factor out function to create directories in create_project. --- devtools/create_project/create_project.cpp | 27 ++++++++++++++++++++++++++ devtools/create_project/create_project.h | 7 +++++++ devtools/create_project/xcode.cpp | 31 +----------------------------- 3 files changed, 35 insertions(+), 30 deletions(-) (limited to 'devtools') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index ad3160d778..026cbe07a4 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -59,6 +59,7 @@ #include #include #include +#include #endif namespace { @@ -1121,6 +1122,32 @@ FileList listDirectory(const std::string &dir) { return result; } +void createDirectory(const std::string &dir) { +#if defined(_WIN32) || defined(WIN32) + if (!CreateDirectory(dir.c_str(), NULL)) { + if (GetLastError() != ERROR_ALREADY_EXISTS) { + error("Could not create folder \"" + dir + "\""); + } + } +#else + if (mkdir(dir.c_str(), 0777) == -1) { + if (errno == EEXIST) { + // Try to open as a folder (might be a file / symbolic link) + DIR *dirp = opendir(dir.c_str()); + if (dirp == NULL) { + error("Could not create folder \"" + dir + "\""); + } else { + // The folder exists, just close the stream and return + closedir(dirp); + } + } else { + error("Could not create folder \"" + dir + "\""); + } + } +#endif + +} + /** * Scans the specified directory against files, which should be included * in the project files. It will not include files present in the exclude list. diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index 69ed551151..459342a67d 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -340,6 +340,13 @@ std::string toString(int num); */ FileList listDirectory(const std::string &dir); +/** + * Create a directory at the given path. + * + * @param dir The path to create. + */ +void createDirectory(const std::string &dir); + /** * Structure representing a file tree. This contains two * members: name and children. "name" holds the name of diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index a9b8e7a752..d95bf3e9ee 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -26,15 +26,6 @@ #include #include -#if defined(_WIN32) || defined(WIN32) -#include -#else -#include -#include -#include -#include -#endif - namespace CreateProjectTool { #define DEBUG_XCODE_HASH 0 @@ -88,27 +79,7 @@ XCodeProvider::XCodeProvider(StringList &global_warnings, std::map\n" "\t\t\t\t\t\n" "\t\t\t\t\t\n" + "\t\t\t\t\t\n" "\t\t\t\t\n"; ////////////////////////////////////////////////////////////////////////// diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 0d68b2e9c9..07ae20e7dc 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -360,7 +360,7 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea "\t\t\n" "\t\t\ttrue\n" "\t\t\t" << warnings << ";%(DisableSpecificWarnings)\n" - "\t\t\t$(" << LIBS_DEFINE << ")\\include;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir);%(AdditionalIncludeDirectories)\n" + "\t\t\t$(" << LIBS_DEFINE << ")\\include;.\\;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir);%(AdditionalIncludeDirectories)\n" "\t\t\t" << definesList << "%(PreprocessorDefinitions)\n" "\t\t\t" << ((setup.devTools || setup.tests) ? "Sync" : "") << "\n"; diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index 438e0772f9..84bc674f9a 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -232,7 +232,7 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of "\t\tName=\"VCCLCompilerTool\"\n" "\t\tDisableLanguageExtensions=\"" << (setup.devTools ? "false" : "true") << "\"\n" "\t\tDisableSpecificWarnings=\"" << warnings << "\"\n" - "\t\tAdditionalIncludeDirectories=\"" << prefix << ";" << prefix << "\\engines;$(" << LIBS_DEFINE << ")\\include;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir)\"\n" + "\t\tAdditionalIncludeDirectories=\".\\;" << prefix << ";" << prefix << "\\engines;$(" << LIBS_DEFINE << ")\\include;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir)\"\n" "\t\tPreprocessorDefinitions=\"" << definesList << "\"\n" "\t\tExceptionHandling=\"" << ((setup.devTools || setup.tests) ? "1" : "0") << "\"\n"; -- cgit v1.2.3 From 441ebc04b0afd2ba768c454c9a20b6320b4cf6a2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 27 Nov 2013 23:07:57 +0100 Subject: DEVTOOLS: Include 'iterator' for std::back_inserter. --- devtools/create_project/create_project.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'devtools') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 16b8e1d166..9d7ed532cb 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From aff3412479aaf081cc4cdd99f0bcca3a894b663f Mon Sep 17 00:00:00 2001 From: Роман Донченко Date: Sat, 7 Dec 2013 01:39:49 +0400 Subject: DEVTOOLS: Add debug visualization files for Visual Studio 2012+ --- devtools/create_project/scripts/scummvm.natvis | 68 ++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 devtools/create_project/scripts/scummvm.natvis (limited to 'devtools') diff --git a/devtools/create_project/scripts/scummvm.natvis b/devtools/create_project/scripts/scummvm.natvis new file mode 100644 index 0000000000..ffeced7cff --- /dev/null +++ b/devtools/create_project/scripts/scummvm.natvis @@ -0,0 +1,68 @@ + + + + + + + {{size = {_size}}} + + _size + _capacity + + _size + _storage + + + + + + {{ size = {_size} }} + + _size + _mask + 1 + _deleted + + _mask + 1 + *_storage[$i] + + + + + + {{ empty }} + {{ non-empty }} + + + _anchor._next + _next + ((Common::ListInternal::Node<$T1>*)this)->_data + + + + + + {_str,[_size]} + _str,[_size] + + _size + _extern._capacity + *_extern._refCount + + _size + _str + + + + -- cgit v1.2.3 From 6aed305ac9ff783b7f667e0e18731964acdb81b2 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Thu, 28 Nov 2013 01:15:49 -0500 Subject: CREATE_PROJECT: Ignore unused cl arguments when compiling with LLVM --- devtools/create_project/msbuild.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 07ae20e7dc..8e97c0b9e9 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -435,7 +435,7 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b "\t\t\t" << (configuration == "Analysis" ? "true" : "false") << "\n"; if (configuration == "LLVM") - properties << "\t\t\t-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 %(AdditionalOptions)\n"; + properties << "\t\t\t-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)\n"; properties << "\t\t\n" "\t\t\n" -- cgit v1.2.3 From ac781bd4697ede6fe10656927768d61ff4d660ab Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 6 Dec 2013 15:36:47 -0500 Subject: CREATE_PROJECT: Fix issues breaking compilation with LLVM - Current folder include - Build folder include (needs to be hardcoded) - NASM compilation directives --- devtools/create_project/msbuild.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'devtools') diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 8e97c0b9e9..018a04370f 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -360,7 +360,7 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea "\t\t\n" "\t\t\ttrue\n" "\t\t\t" << warnings << ";%(DisableSpecificWarnings)\n" - "\t\t\t$(" << LIBS_DEFINE << ")\\include;.\\;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir);%(AdditionalIncludeDirectories)\n" + "\t\t\t$(" << LIBS_DEFINE << ")\\include;.;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir);%(AdditionalIncludeDirectories)\n" "\t\t\t" << definesList << "%(PreprocessorDefinitions)\n" "\t\t\t" << ((setup.devTools || setup.tests) ? "Sync" : "") << "\n"; @@ -434,8 +434,11 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b "\t\t\t" << (isWin32 ? "EditAndContinue" : "ProgramDatabase") << "\n" // For x64 format Edit and continue is not supported, thus we default to Program Database "\t\t\t" << (configuration == "Analysis" ? "true" : "false") << "\n"; - if (configuration == "LLVM") - properties << "\t\t\t-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)\n"; + 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 + properties << "\t\t\t" << configuration << outputBitness <<";%(AdditionalIncludeDirectories)\n" + "\t\t\t-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)\n"; + } properties << "\t\t\n" "\t\t\n" @@ -521,6 +524,7 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream outputNasmCommand(projectFile, "Debug", (isDuplicate ? (*entry).prefix : "")); outputNasmCommand(projectFile, "Analysis", (isDuplicate ? (*entry).prefix : "")); outputNasmCommand(projectFile, "Release", (isDuplicate ? (*entry).prefix : "")); + outputNasmCommand(projectFile, "LLVM", (isDuplicate ? (*entry).prefix : "")); projectFile << "\t\t\n"; } -- cgit v1.2.3 From 60f6e9ee9328901cc4448c0fddb2b85a227be32d Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 8 Dec 2013 08:45:48 -0500 Subject: CREATE_PROJECT: Add batch file to install natvis file --- devtools/create_project/scripts/install-natvis.bat | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 devtools/create_project/scripts/install-natvis.bat (limited to 'devtools') diff --git a/devtools/create_project/scripts/install-natvis.bat b/devtools/create_project/scripts/install-natvis.bat new file mode 100644 index 0000000000..62186df7bf --- /dev/null +++ b/devtools/create_project/scripts/install-natvis.bat @@ -0,0 +1,41 @@ +@echo off +echo Installing Visual Studio debugger integration... + +REM On 2000 & XP, the folder is "My Documents" but VS 2012 is not supported on those OSes +SET DOCUMENTS="%USERPROFILE%\Documents" +set FOUND=0 + +REM Set current folder +cd /d %~dp0 + +:INSTALL_VS11 +SET FOLDER="%DOCUMENTS%\Visual Studio 2012" +IF EXIST %FOLDER% ( + echo Visual Studio 2012 + copy scummvm.natvis %FOLDER%\Visualizers + IF NOT %ERRORLEVEL% == 0 GOTO FAILED + SET FOUND=1 +) + +:INSTALL_VS12 +SET FOLDER="%DOCUMENTS%\Visual Studio 2013" +IF EXIST %FOLDER% ( + echo Visual Studio 2013 + copy scummvm.natvis %FOLDER%\Visualizers + IF NOT %ERRORLEVEL% == 0 GOTO FAILED + SET FOUND=1 +) + +IF %FOUND% == 1 goto SUCCESS +echo Failed to find Visual Studio user folder. + +:SUCCESS +echo. +echo Done! +goto END + +:FAILED +echo Failed to install visualization file + +:END +pause -- cgit v1.2.3 From fa9eb119c076e46cae9eebe93b9aabc4fd76713f Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 8 Dec 2013 08:46:16 -0500 Subject: CREATE_PROJECT: Add Graphics::Surface to natvis and register for Image Watch --- devtools/create_project/scripts/scummvm.natvis | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'devtools') diff --git a/devtools/create_project/scripts/scummvm.natvis b/devtools/create_project/scripts/scummvm.natvis index ffeced7cff..995668690e 100644 --- a/devtools/create_project/scripts/scummvm.natvis +++ b/devtools/create_project/scripts/scummvm.natvis @@ -15,6 +15,29 @@ --> + + + + + + + + + + UINT8 + + 1 + 2 + + RGBA + + w + h + pitch + pixels + + + {{size = {_size}}} -- cgit v1.2.3 From ab98e22c3b208ef4f6321e0c675fcb02667372a5 Mon Sep 17 00:00:00 2001 From: uruk Date: Wed, 15 Jan 2014 11:28:44 +0100 Subject: AVALANCHE: Repair credits.pl --- devtools/credits.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/credits.pl b/devtools/credits.pl index 03e086ce99..53f0d11307 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -553,7 +553,7 @@ begin_credits("Credits"); add_person("Ludvig Strigeus", "ludde", "(retired)"); end_section(); - begin_section("AVALANCHE"); + begin_section("Avalanche"); add_person("Peter Bozsó", "uruk", ""); add_person("Arnaud Boutonné", "Strangerke", ""); end_section(); -- cgit v1.2.3