diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h index 92b9ece756..ec9bb1cc49 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h @@ -1014,22 +1014,20 @@ private: return addGroup (projectItem, childIDs); } - else + + if (projectItem.shouldBeAddedToTargetProject()) { - if (projectItem.shouldBeAddedToTargetProject()) - { - const String itemPath (projectItem.getFilePath()); - RelativePath path; + const String itemPath (projectItem.getFilePath()); + RelativePath path; - if (itemPath.startsWith ("${")) - path = RelativePath (itemPath, RelativePath::unknown); - else - path = RelativePath (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder); + if (itemPath.startsWith ("${")) + path = RelativePath (itemPath, RelativePath::unknown); + else + path = RelativePath (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder); - return addFile (path, projectItem.shouldBeCompiled(), - projectItem.shouldBeAddedToBinaryResources(), - projectItem.shouldInhibitWarnings()); - } + return addFile (path, projectItem.shouldBeCompiled(), + projectItem.shouldBeAddedToBinaryResources(), + projectItem.shouldInhibitWarnings()); } return String::empty; diff --git a/modules/juce_core/misc/juce_WindowsRegistry.h b/modules/juce_core/misc/juce_WindowsRegistry.h index 0644ce6ee7..47730acd3c 100644 --- a/modules/juce_core/misc/juce_WindowsRegistry.h +++ b/modules/juce_core/misc/juce_WindowsRegistry.h @@ -86,6 +86,12 @@ public: /** Returns true if the given value exists in the registry. */ static bool valueExistsWow64 (const String& regValuePath); + /** Returns true if the given key exists in the registry. */ + static bool keyExists (const String& regValuePath); + + /** Returns true if the given key exists in the registry. */ + static bool keyExistsWow64 (const String& regValuePath); + /** Deletes a registry value. */ static void deleteValue (const String& regValuePath); diff --git a/modules/juce_core/native/juce_win32_Registry.cpp b/modules/juce_core/native/juce_win32_Registry.cpp index fb9cba03fb..c740745aa0 100644 --- a/modules/juce_core/native/juce_win32_Registry.cpp +++ b/modules/juce_core/native/juce_win32_Registry.cpp @@ -115,6 +115,11 @@ struct RegistryKeyWrapper return defaultValue; } + static bool keyExists (const String& regValuePath, const DWORD wow64Flags) + { + return RegistryKeyWrapper (regValuePath, false, wow64Flags).key != 0; + } + static bool valueExists (const String& regValuePath, const DWORD wow64Flags) { const RegistryKeyWrapper key (regValuePath, false, wow64Flags); @@ -159,6 +164,11 @@ bool WindowsRegistry::valueExistsWow64 (const String& regValuePath) return RegistryKeyWrapper::valueExists (regValuePath, 0x100 /*KEY_WOW64_64KEY*/); } +bool WindowsRegistry::keyExistsWow64 (const String& regValuePath) +{ + return RegistryKeyWrapper::keyExists (regValuePath, 0x100 /*KEY_WOW64_64KEY*/); +} + bool WindowsRegistry::setValue (const String& regValuePath, const String& value) { return RegistryKeyWrapper::setValue (regValuePath, REG_SZ, value.toWideCharPointer(), @@ -185,6 +195,11 @@ bool WindowsRegistry::valueExists (const String& regValuePath) return RegistryKeyWrapper::valueExists (regValuePath, 0); } +bool WindowsRegistry::keyExists (const String& regValuePath) +{ + return RegistryKeyWrapper::keyExists (regValuePath, 0); +} + void WindowsRegistry::deleteValue (const String& regValuePath) { const RegistryKeyWrapper key (regValuePath, true, 0);