diff options
author | D G Turner | 2012-07-16 01:24:40 +0100 |
---|---|---|
committer | D G Turner | 2012-07-16 01:24:40 +0100 |
commit | e73dffa57cbe65ffb10af4f2a5b47f644269caab (patch) | |
tree | 191c3e8e2ebdf81dec58d4006a98ca20a688120b /devtools/create_project | |
parent | 9669b73ca811af9672215748e92acb3f77805b75 (diff) | |
parent | 1fffbe40ceb82bec77479c56176abeff0d2bd5e5 (diff) | |
download | scummvm-rg350-e73dffa57cbe65ffb10af4f2a5b47f644269caab.tar.gz scummvm-rg350-e73dffa57cbe65ffb10af4f2a5b47f644269caab.tar.bz2 scummvm-rg350-e73dffa57cbe65ffb10af4f2a5b47f644269caab.zip |
Merge branch 'master' into teenagentRefactor
Conflicts:
engines/teenagent/resources.cpp
Diffstat (limited to 'devtools/create_project')
-rw-r--r-- | devtools/create_project/create_project.cpp | 29 | ||||
-rw-r--r-- | devtools/create_project/create_project.h | 8 | ||||
-rw-r--r-- | devtools/create_project/msbuild.cpp | 33 | ||||
-rw-r--r-- | devtools/create_project/msvc11/create_project.sln | 20 | ||||
-rw-r--r-- | devtools/create_project/msvc11/create_project.vcxproj | 131 | ||||
-rw-r--r-- | devtools/create_project/msvc11/create_project.vcxproj.filters | 71 | ||||
-rw-r--r-- | devtools/create_project/scripts/postbuild.cmd | 1 | ||||
-rw-r--r-- | devtools/create_project/visualstudio.cpp | 2 | ||||
-rw-r--r-- | devtools/create_project/xcode.cpp | 36 |
9 files changed, 293 insertions, 38 deletions
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index df220f0934..8499fec400 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -76,14 +76,6 @@ namespace { std::string unifyPath(const std::string &path); /** - * Returns the last path component. - * - * @param path Path string. - * @return Last path component. - */ -std::string getLastPathComponent(const std::string &path); - -/** * Display the help text for the program. * * @param exe Name of the executable. @@ -221,7 +213,7 @@ int main(int argc, char *argv[]) { msvcVersion = atoi(argv[++i]); - if (msvcVersion != 8 && msvcVersion != 9 && msvcVersion != 10) { + if (msvcVersion != 8 && msvcVersion != 9 && msvcVersion != 10 && msvcVersion != 11) { std::cerr << "ERROR: Unsupported version: \"" << msvcVersion << "\" passed to \"--msvc-version\"!\n"; return -1; } @@ -606,14 +598,6 @@ std::string unifyPath(const std::string &path) { return result; } -std::string getLastPathComponent(const std::string &path) { - std::string::size_type pos = path.find_last_of('/'); - if (pos == std::string::npos) - return path; - else - return path.substr(pos + 1); -} - void displayHelp(const char *exe) { using std::cout; @@ -643,6 +627,7 @@ void displayHelp(const char *exe) { " 8 stands for \"Visual Studio 2005\"\n" " 9 stands for \"Visual Studio 2008\"\n" " 10 stands for \"Visual Studio 2010\"\n" + " 11 stands for \"Visual Studio 2012\"\n" " The default is \"9\", thus \"Visual Studio 2008\"\n" " --build-events Run custom build events as part of the build\n" " (default: false)\n" @@ -1000,7 +985,7 @@ bool isInList(const std::string &dir, const std::string &fileName, const StringL continue; } - const std::string lastPathComponent = getLastPathComponent(*i); + const std::string lastPathComponent = ProjectProvider::getLastPathComponent(*i); if (extensionName == "o") { return false; } else if (!producesObjectFile(fileName) && extensionName != "h") { @@ -1303,6 +1288,14 @@ std::string ProjectProvider::createUUID() const { #endif } +std::string ProjectProvider::getLastPathComponent(const std::string &path) { + std::string::size_type pos = path.find_last_of('/'); + if (pos == std::string::npos) + return path; + else + return path.substr(pos + 1); +} + void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &projectFile, const StringList &includeList, const StringList &excludeList, const std::string &filePrefix) { diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index 8719143f4a..b4eda8f8d2 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -317,6 +317,14 @@ public: */ void createProject(const BuildSetup &setup); + /** + * Returns the last path component. + * + * @param path Path string. + * @return Last path component. + */ + static std::string getLastPathComponent(const std::string &path); + protected: const int _version; ///< Target project version StringList &_globalWarnings; ///< Global warnings diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index dfd3f1d1c7..c797770955 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -46,7 +46,13 @@ const char *MSBuildProvider::getPropertiesExtension() { } int MSBuildProvider::getVisualStudioVersion() { - return 2010; + if (_version == 10) + return 2010; + + if (_version == 11) + return 2012; + + error("Unsupported version passed to getVisualStudioVersion"); } namespace { @@ -58,9 +64,10 @@ inline void outputConfiguration(std::ostream &project, const std::string &config "\t\t</ProjectConfiguration>\n"; } -inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config) { +inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config, int version) { project << "\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='" << config << "'\" Label=\"Configuration\">\n" "\t\t<ConfigurationType>" << ((name == setup.projectName || setup.devTools) ? "Application" : "StaticLibrary") << "</ConfigurationType>\n" + "\t\t<PlatformToolset>v" << version << "0</PlatformToolset>\n" "\t</PropertyGroup>\n"; } @@ -98,17 +105,18 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri "\t\t<ProjectGuid>{" << uuid << "}</ProjectGuid>\n" "\t\t<RootNamespace>" << name << "</RootNamespace>\n" "\t\t<Keyword>Win32Proj</Keyword>\n" + "\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath11)</VCTargetsPath>\n" "\t</PropertyGroup>\n"; // Shared configuration project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n"; - outputConfigurationType(setup, project, name, "Release|Win32"); - outputConfigurationType(setup, project, name, "Analysis|Win32"); - outputConfigurationType(setup, project, name, "Debug|Win32"); - outputConfigurationType(setup, project, name, "Release|x64"); - outputConfigurationType(setup, project, name, "Analysis|x64"); - outputConfigurationType(setup, project, name, "Debug|x64"); + outputConfigurationType(setup, project, name, "Release|Win32", _version); + outputConfigurationType(setup, project, name, "Analysis|Win32", _version); + outputConfigurationType(setup, project, name, "Debug|Win32", _version); + outputConfigurationType(setup, project, name, "Release|x64", _version); + outputConfigurationType(setup, project, name, "Analysis|x64", _version); + outputConfigurationType(setup, project, name, "Debug|x64", _version); project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n" "\t<ImportGroup Label=\"ExtensionSettings\">\n" @@ -249,11 +257,11 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s // Compile configuration if (setup.devTools || name == setup.projectName || name == "sword25" || name == "grim") { project << "\t\t\t<DisableLanguageExtensions>false</DisableLanguageExtensions>\n"; - } else { - if (name == "scummvm" && !isRelease) - project << "\t\t\t<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n"; - if (warningsIterator != _projectWarnings.end()) + if (name == setup.projectName && !isRelease) + project << "\t\t\t<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n"; + } else { + if (warningsIterator != _projectWarnings.end()) project << "\t\t\t<DisableSpecificWarnings>" << warnings << ";%(DisableSpecificWarnings)</DisableSpecificWarnings>\n"; } @@ -395,6 +403,7 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b "\t\t</ClCompile>\n" "\t\t<Link>\n" "\t\t\t<GenerateDebugInformation>true</GenerateDebugInformation>\n" + "\t\t\t<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>\n" "\t\t\t<IgnoreSpecificDefaultLibraries>libcmt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n"; } diff --git a/devtools/create_project/msvc11/create_project.sln b/devtools/create_project/msvc11/create_project.sln new file mode 100644 index 0000000000..1552c9f502 --- /dev/null +++ b/devtools/create_project/msvc11/create_project.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "create_project", "create_project.vcxproj", "{CF177559-077D-4A08-AABE-BE0FD35F6C63}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|Win32.ActiveCfg = Debug|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|Win32.Build.0 = Debug|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|Win32.ActiveCfg = Release|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/devtools/create_project/msvc11/create_project.vcxproj b/devtools/create_project/msvc11/create_project.vcxproj new file mode 100644 index 0000000000..c87461c049 --- /dev/null +++ b/devtools/create_project/msvc11/create_project.vcxproj @@ -0,0 +1,131 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{CF177559-077D-4A08-AABE-BE0FD35F6C63}</ProjectGuid> + <RootNamespace>create_project</RootNamespace> + <VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''">$(VCTargetsPath11)</VCTargetsPath> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>MultiByte</CharacterSet> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + <DisableSpecificWarnings>4003;4512;4127</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies> + <GenerateDebugInformation>true</GenerateDebugInformation> + <TargetMachine>MachineX86</TargetMachine> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> + <PostBuildEvent> + <Command>@echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <IntrinsicFunctions>true</IntrinsicFunctions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <DisableSpecificWarnings>4003;4512;4127</DisableSpecificWarnings> + </ClCompile> + <Link> + <AdditionalDependencies>Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies> + <GenerateDebugInformation>true</GenerateDebugInformation> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <TargetMachine>MachineX86</TargetMachine> + </Link> + <PostBuildEvent> + <Command>@echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command> + </PostBuildEvent> + <PreBuildEvent> + <Command> + </Command> + </PreBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="..\codeblocks.cpp" /> + <ClCompile Include="..\create_project.cpp" /> + <ClCompile Include="..\msbuild.cpp" /> + <ClCompile Include="..\msvc.cpp" /> + <ClCompile Include="..\visualstudio.cpp" /> + <ClCompile Include="..\xcode.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\codeblocks.h" /> + <ClInclude Include="..\config.h" /> + <ClInclude Include="..\create_project.h" /> + <ClInclude Include="..\msbuild.h" /> + <ClInclude Include="..\msvc.h" /> + <ClInclude Include="..\visualstudio.h" /> + <ClInclude Include="..\xcode.h" /> + </ItemGroup> + <ItemGroup> + <None Include="..\scripts\installer.vbs" /> + <None Include="..\scripts\postbuild.cmd" /> + <None Include="..\scripts\prebuild.cmd" /> + <None Include="..\scripts\revision.vbs" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/devtools/create_project/msvc11/create_project.vcxproj.filters b/devtools/create_project/msvc11/create_project.vcxproj.filters new file mode 100644 index 0000000000..b4f0b18774 --- /dev/null +++ b/devtools/create_project/msvc11/create_project.vcxproj.filters @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Header Files"> + <UniqueIdentifier>{2e3580c8-ec3a-4c81-8351-b668c668db2a}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files"> + <UniqueIdentifier>{31aaf58c-d3cb-4ed6-8eca-163b4a9b31a6}</UniqueIdentifier> + </Filter> + <Filter Include="scripts"> + <UniqueIdentifier>{f980f6fb-41b6-4161-b035-58b200c85cad}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\codeblocks.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\create_project.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\msvc.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\msbuild.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\visualstudio.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\xcode.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\config.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\codeblocks.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\create_project.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\msvc.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\msbuild.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\visualstudio.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\xcode.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <None Include="..\scripts\prebuild.cmd"> + <Filter>scripts</Filter> + </None> + <None Include="..\scripts\revision.vbs"> + <Filter>scripts</Filter> + </None> + <None Include="..\scripts\postbuild.cmd"> + <Filter>scripts</Filter> + </None> + <None Include="..\scripts\installer.vbs"> + <Filter>scripts</Filter> + </None> + </ItemGroup> +</Project> diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd index dd52c0217c..d78119d058 100644 --- a/devtools/create_project/scripts/postbuild.cmd +++ b/devtools/create_project/scripts/postbuild.cmd @@ -24,6 +24,7 @@ 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 "%~1/backends/vkeybd/packs/vkeybd_default.zip" "%~2" 1>NUL 2>&1
if "%~5"=="0" goto done
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index 62b30ddcd0..c301e78ad1 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -110,7 +110,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: std::string toolConfig; toolConfig = (!warnings.empty() ? "DisableSpecificWarnings=\"" + warnings + "\"" : ""); - toolConfig += (name == "scummvm" ? "DebugInformationFormat=\"3\" " : ""); + toolConfig += (name == setup.projectName ? "DebugInformationFormat=\"3\" " : ""); toolConfig += (name == "sword25" ? "DisableLanguageExtensions=\"false\" " : ""); toolConfig += (name == "grim" ? "DisableLanguageExtensions=\"false\" " : ""); diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 9784bb0bf5..0574814e02 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -202,18 +202,38 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p // Init root group _groups.comment = "PBXGroup"; - Object *group = new Object(this, "PBXGroup", "PBXGroup", "PBXGroup", "", ""); - //Property children; - //children.flags = SettingsAsList; - //group->properties["children"] = children; - group->addProperty("children", "", "", SettingsNoValue|SettingsAsList); + // Create group + std::string name = getLastPathComponent(dir.name); + Object *group = new Object(this, "PBXGroup_" + name , "PBXGroup", "PBXGroup", "", name); + + // List of children + Property children; + children.hasOrder = true; + children.flags = SettingsAsList; + group->addProperty("name", name, "", SettingsNoValue|SettingsQuoteVariable); group->addProperty("sourceTree", "<group>", "", SettingsNoValue|SettingsQuoteVariable); - _groups.add(group); + int order = 0; + for (FileNode::NodeList::const_iterator i = dir.children.begin(); i != dir.children.end(); ++i) { + const FileNode *node = *i; + + std::string id = "FileReference_" + node->name; + FileProperty property = FileProperty(node->name, node->name, node->name, "<group>"); + + ADD_SETTING_ORDER_NOVALUE(children, getHash(id), node->name, order++); + ADD_BUILD_FILE(id, node->name, node->name + " in Sources"); + ADD_FILE_REFERENCE(node->name, property); + + // Process child nodes + if (!node->children.empty()) + writeFileListToProject(*node, projectFile, indentation + 1, duplicate, objPrefix + node->name + '_', filePrefix + node->name + '/'); + } - // TODO Add files + group->properties["children"] = children; + + _groups.add(group); } ////////////////////////////////////////////////////////////////////////// @@ -717,6 +737,7 @@ void XCodeProvider::setupBuildConfiguration() { ADD_SETTING_QUOTE(scummvmSimulator_Debug, "FRAMEWORK_SEARCH_PATHS", "$(inherited)"); ADD_SETTING_LIST(scummvmSimulator_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, SettingsNoQuote|SettingsAsList, 5); ADD_SETTING(scummvmSimulator_Debug, "SDKROOT", "iphonesimulator3.2"); + ADD_SETTING_QUOTE(scummvmSimulator_Debug, "VALID_ARCHS", "i386 x86_64"); REMOVE_SETTING(scummvmSimulator_Debug, "TARGETED_DEVICE_FAMILY"); scummvmSimulator_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue); @@ -726,6 +747,7 @@ void XCodeProvider::setupBuildConfiguration() { Object *scummvmSimulator_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Release", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); Property scummvmSimulator_Release(scummvmSimulator_Debug); ADD_SETTING(scummvmSimulator_Release, "COPY_PHASE_STRIP", "YES"); + ADD_SETTING(scummvmSimulator_Release, "GCC_OPTIMIZATION_LEVEL", "3"); REMOVE_SETTING(scummvmSimulator_Release, "GCC_DYNAMIC_NO_PIC"); ADD_SETTING(scummvmSimulator_Release, "WRAPPER_EXTENSION", "app"); |