diff options
author | Marisa-Chan | 2014-06-13 21:43:04 +0700 |
---|---|---|
committer | Marisa-Chan | 2014-06-13 21:43:04 +0700 |
commit | 45589950c0fb1a449351e6a00ef10d42290d8bae (patch) | |
tree | 44e4eedcb7e69d5fc386155b000ed038af07251d /devtools/create_project | |
parent | 48360645dcd5f8fddb135b6e31ae5cae4be8d77f (diff) | |
parent | 5c005ad3a3f1df0bc968c85c1cf0fc48e36ab0b2 (diff) | |
download | scummvm-rg350-45589950c0fb1a449351e6a00ef10d42290d8bae.tar.gz scummvm-rg350-45589950c0fb1a449351e6a00ef10d42290d8bae.tar.bz2 scummvm-rg350-45589950c0fb1a449351e6a00ef10d42290d8bae.zip |
Merge remote-tracking branch 'upstream/master' into zvision
Conflicts:
engines/zvision/animation/rlf_animation.cpp
engines/zvision/animation_control.h
engines/zvision/core/console.cpp
engines/zvision/core/events.cpp
engines/zvision/cursors/cursor.cpp
engines/zvision/cursors/cursor_manager.cpp
engines/zvision/cursors/cursor_manager.h
engines/zvision/fonts/truetype_font.cpp
engines/zvision/graphics/render_manager.cpp
engines/zvision/graphics/render_manager.h
engines/zvision/inventory/inventory_manager.h
engines/zvision/inventory_manager.h
engines/zvision/meta_animation.h
engines/zvision/module.mk
engines/zvision/scripting/actions.cpp
engines/zvision/scripting/control.h
engines/zvision/scripting/controls/animation_control.cpp
engines/zvision/scripting/controls/animation_control.h
engines/zvision/scripting/controls/input_control.cpp
engines/zvision/scripting/controls/lever_control.cpp
engines/zvision/scripting/controls/timer_node.cpp
engines/zvision/scripting/controls/timer_node.h
engines/zvision/scripting/puzzle.h
engines/zvision/scripting/scr_file_handling.cpp
engines/zvision/scripting/script_manager.cpp
engines/zvision/scripting/script_manager.h
engines/zvision/sidefx.cpp
engines/zvision/sound/zork_raw.cpp
engines/zvision/sound/zork_raw.h
engines/zvision/video/video.cpp
engines/zvision/video/zork_avi_decoder.h
engines/zvision/zvision.cpp
engines/zvision/zvision.h
Diffstat (limited to 'devtools/create_project')
-rw-r--r-- | devtools/create_project/codeblocks.cpp | 1 | ||||
-rw-r--r-- | devtools/create_project/config.h | 3 | ||||
-rw-r--r-- | devtools/create_project/create_project.cpp | 227 | ||||
-rw-r--r-- | devtools/create_project/create_project.h | 50 | ||||
-rw-r--r-- | devtools/create_project/msbuild.cpp | 10 | ||||
-rw-r--r-- | devtools/create_project/scripts/install-natvis.bat | 41 | ||||
-rw-r--r-- | devtools/create_project/scripts/scummvm.natvis | 91 | ||||
-rw-r--r-- | devtools/create_project/visualstudio.cpp | 2 | ||||
-rw-r--r-- | devtools/create_project/xcode.cpp | 31 |
9 files changed, 365 insertions, 91 deletions
diff --git a/devtools/create_project/codeblocks.cpp b/devtools/create_project/codeblocks.cpp index ec003df2d5..442a2b0025 100644 --- a/devtools/create_project/codeblocks.cpp +++ b/devtools/create_project/codeblocks.cpp @@ -120,6 +120,7 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s "\t\t\t\t\t<Add directory=\"..\\..\\engines\" />\n" "\t\t\t\t\t<Add directory=\"..\\..\\common\" />\n" "\t\t\t\t\t<Add directory=\"..\\..\" />\n" + "\t\t\t\t\t<Add directory=\".\\\" />\n" "\t\t\t\t</Compiler>\n"; ////////////////////////////////////////////////////////////////////////// diff --git a/devtools/create_project/config.h b/devtools/create_project/config.h index 1a66edff93..63bf3dee26 100644 --- a/devtools/create_project/config.h +++ b/devtools/create_project/config.h @@ -27,11 +27,12 @@ #define PROJECT_NAME "scummvm" // Used for folders, icons, resources and project/solution name #define LIBS_DEFINE "SCUMMVM_LIBS" // Name of the include environment variable #define REVISION_DEFINE "SCUMMVM_INTERNAL_REVISION" +#define FIRST_ENGINE "scumm" // Name of the engine which should be sorted as first element #define ENABLE_LANGUAGE_EXTENSIONS "" // Comma separated list of projects that need language extensions #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 diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index e013377241..876c116b5c 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -43,6 +43,7 @@ #include <stack> #include <algorithm> #include <iomanip> +#include <iterator> #include <cstring> #include <cstdlib> @@ -59,6 +60,7 @@ #include <sys/param.h> #include <sys/stat.h> #include <dirent.h> +#include <errno.h> #endif namespace { @@ -81,22 +83,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<FSNode> FileList; } // End of anonymous namespace enum ProjectType { @@ -128,7 +114,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 +658,70 @@ void displayHelp(const char *exe) { } /** - * Try to parse a given line and create an engine definition - * out of the result. + * Parse the configure.engine file of a given engine directory and return a + * list of all defined engines. * - * This may take *any* input line, when the line is not used - * to define an engine the result of the function will be "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. * - * Note that the contents of "engine" are undefined, when this - * function returns "false". + * @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 compareFSNode(const CreateProjectTool::FSNode &left, const CreateProjectTool::FSNode &right); + +#ifdef FIRST_ENGINE +/** + * Compares two FSNode entries in a strict-weak fashion based on engine name + * order. * - * @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 compareEngineNames(const CreateProjectTool::FSNode &left, const CreateProjectTool::FSNode &right); +#endif } // 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; +#ifdef FIRST_ENGINE + // In case we want to sort an engine to the front of the list we will + // use some manual sorting predicate which assures that. + engineFiles.sort(&compareEngineNames); +#else + // Otherwise, we simply sort the file list alphabetically this allows + // for a nicer order in --list-engines output, for example. + engineFiles.sort(&compareFSNode); +#endif - 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 +786,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 +823,48 @@ 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; +} + +#ifdef FIRST_ENGINE +bool compareEngineNames(const CreateProjectTool::FSNode &left, const CreateProjectTool::FSNode &right) { + if (left.name == FIRST_ENGINE) { + return right.name != FIRST_ENGINE; + } else if (right.name == FIRST_ENGINE) { + return false; + } else { + return compareFSNode(left, right); + } +} +#endif } // End of anonymous namespace TokenList tokenize(const std::string &input, char separator) { @@ -1048,13 +1114,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 @@ -1095,6 +1154,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. @@ -1220,6 +1305,7 @@ void ProjectProvider::createProject(BuildSetup &setup) { createModuleList(setup.srcDir + "/audio", setup.defines, setup.testDirs, in, ex); createModuleList(setup.srcDir + "/audio/softsynth/mt32", setup.defines, setup.testDirs, in, ex); createModuleList(setup.srcDir + "/video", setup.defines, setup.testDirs, in, ex); + createModuleList(setup.srcDir + "/image", setup.defines, setup.testDirs, in, ex); // Resource files in.push_back(setup.srcDir + "/icons/" + setup.projectName + ".ico"); @@ -1242,6 +1328,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 +1661,37 @@ void ProjectProvider::createModuleList(const std::string &moduleDir, const Strin error("Malformed file " + moduleMkFile); } +void ProjectProvider::createEnginePluginsTable(const BuildSetup &setup) { + // First we need to create the "engines" directory. + createDirectory(setup.outputDir + "/engines"); + + // Then, we can generate the actual "plugins_table.h" file. + 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..459342a67d 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -102,16 +102,17 @@ struct EngineDesc { typedef std::list<EngineDesc> 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 @@ -263,6 +264,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<FSNode> FileList; + +/** * Gets a proper sequence of \t characters for the given * indentation level. * @@ -315,6 +332,22 @@ 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); + +/** + * 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 * the node. "children" does contain all the node's children. @@ -474,6 +507,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 diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 0d68b2e9c9..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<ClCompile>\n" "\t\t\t<DisableLanguageExtensions>true</DisableLanguageExtensions>\n" "\t\t\t<DisableSpecificWarnings>" << warnings << ";%(DisableSpecificWarnings)</DisableSpecificWarnings>\n" - "\t\t\t<AdditionalIncludeDirectories>$(" << LIBS_DEFINE << ")\\include;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n" + "\t\t\t<AdditionalIncludeDirectories>$(" << LIBS_DEFINE << ")\\include;.;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n" "\t\t\t<PreprocessorDefinitions>" << definesList << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n" "\t\t\t<ExceptionHandling>" << ((setup.devTools || setup.tests) ? "Sync" : "") << "</ExceptionHandling>\n"; @@ -434,8 +434,11 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b "\t\t\t<DebugInformationFormat>" << (isWin32 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n" // For x64 format Edit and continue is not supported, thus we default to Program Database "\t\t\t<EnablePREfast>" << (configuration == "Analysis" ? "true" : "false") << "</EnablePREfast>\n"; - if (configuration == "LLVM") - properties << "\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 %(AdditionalOptions)</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<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" @@ -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</CustomBuild>\n"; } 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 diff --git a/devtools/create_project/scripts/scummvm.natvis b/devtools/create_project/scripts/scummvm.natvis new file mode 100644 index 0000000000..995668690e --- /dev/null +++ b/devtools/create_project/scripts/scummvm.natvis @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- + Debug visualizers for a few common ScummVM types for Visual Studio 2012 and up. + + To use, copy this file into Documents\Visual Studio 20xx\Visualizers. + + Known issues: + + * Lists appear to be infinite (the same elements repeat over and over again). + Unfortunately, Lists don't store length information, and it's not possible to + detect whether a Node is the last one by the Node itself. + + * In HashMaps, missing and dummy nodes are shown along with the useful ones. +--> + +<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> + <UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" MenuName="Add to Image Watch"/> + + <Type Name="Graphics::Surface"> + <UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" /> + </Type> + + <Type Name="Graphics::Surface"> + <Expand> + <Synthetic Name="[type]"> + <DisplayString>UINT8</DisplayString> + </Synthetic> + <Item Name="[channels]" Condition="format.bytesPerPixel==1">1</Item> + <Item Name="[channels]" Condition="format.bytesPerPixel==2">2</Item> + <Synthetic Name="[channels]" Condition="format.bytesPerPixel==4"> + <DisplayString>RGBA</DisplayString> + </Synthetic> + <Item Name="[width]">w</Item> + <Item Name="[height]">h</Item> + <Item Name="[stride]">pitch</Item> + <Item Name="[data]">pixels</Item> + </Expand> + </Type> + + <Type Name="Common::Array<*>"> + <DisplayString>{{size = {_size}}}</DisplayString> + <Expand> + <Item Name="[size]">_size</Item> + <Item Name="[capacity]">_capacity</Item> + <ArrayItems> + <Size>_size</Size> + <ValuePointer>_storage</ValuePointer> + </ArrayItems> + </Expand> + </Type> + + <Type Name="Common::HashMap<*,*,*,*>"> + <DisplayString>{{ size = {_size} }}</DisplayString> + <Expand> + <Item Name="[size]">_size</Item> + <Item Name="[capacity]">_mask + 1</Item> + <Item Name="[deleted]">_deleted</Item> + <IndexListItems> + <Size>_mask + 1</Size> + <ValueNode Condition="_storage[$i] && _storage[$i] != (Common::HashMap<$T1,$T2,$T3,$T4>::Node *)1">*_storage[$i]</ValueNode> + </IndexListItems> + </Expand> + </Type> + + <Type Name="Common::List<*>"> + <DisplayString Condition="&_anchor == _anchor._next">{{ empty }}</DisplayString> + <DisplayString Condition="&_anchor != _anchor._next">{{ non-empty }}</DisplayString> + <Expand> + <LinkedListItems Condition="&_anchor != _anchor._next"> + <HeadPointer>_anchor._next</HeadPointer> + <NextPointer>_next</NextPointer> + <ValueNode>((Common::ListInternal::Node<$T1>*)this)->_data</ValueNode> + </LinkedListItems> + </Expand> + </Type> + + <Type Name="Common::String"> + <DisplayString>{_str,[_size]}</DisplayString> + <StringView>_str,[_size]</StringView> + <Expand> + <Item Name="[size]">_size</Item> + <Item Condition="_str != _storage" Name="[capacity]">_extern._capacity</Item> + <Item Condition="_str != _storage" Name="[refCount]">*_extern._refCount</Item> + <ArrayItems> + <Size>_size</Size> + <ValuePointer>_str</ValuePointer> + </ArrayItems> + </Expand> + </Type> +</AutoVisualizer> 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"; 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 <fstream> #include <algorithm> -#if defined(_WIN32) || defined(WIN32) -#include <windows.h> -#else -#include <sys/param.h> -#include <sys/stat.h> -#include <dirent.h> -#include <errno.h> -#endif - namespace CreateProjectTool { #define DEBUG_XCODE_HASH 0 @@ -88,27 +79,7 @@ XCodeProvider::XCodeProvider(StringList &global_warnings, std::map<std::string, void XCodeProvider::createWorkspace(const BuildSetup &setup) { // Create project folder std::string workspace = setup.outputDir + '/' + PROJECT_NAME ".xcodeproj"; - -#if defined(_WIN32) || defined(WIN32) - if (!CreateDirectory(workspace.c_str(), NULL)) - if (GetLastError() != ERROR_ALREADY_EXISTS) - error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\""); -#else - if (mkdir(workspace.c_str(), 0777) == -1) { - if (errno == EEXIST) { - // Try to open as a folder (might be a file / symbolic link) - DIR *dirp = opendir(workspace.c_str()); - if (dirp == NULL) { - error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\""); - } else { - // The folder exists, just close the stream and return - closedir(dirp); - } - } else { - error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\""); - } - } -#endif + createDirectory(workspace); // Setup global objects setupDefines(setup); |