diff --git a/extras/Introjucer/Source/Project/jucer_Project.cpp b/extras/Introjucer/Source/Project/jucer_Project.cpp index 5b5962bd95..fba5d91e84 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.cpp +++ b/extras/Introjucer/Source/Project/jucer_Project.cpp @@ -506,6 +506,8 @@ bool Project::Item::shouldBeAddedToBinaryResources() const { return getShouldAd Value Project::Item::getShouldAddToResourceValue() const { return node.getPropertyAsValue (Ids::resource, getUndoManager()); } Value Project::Item::getShouldInhibitWarningsValue() const { return node.getPropertyAsValue (Ids::noWarnings, getUndoManager()); } +Value Project::Item::getShouldUseStdCallValue() const { return node.getPropertyAsValue (Ids::useStdCall, nullptr); } + String Project::Item::getFilePath() const { diff --git a/extras/Introjucer/Source/Project/jucer_Project.h b/extras/Introjucer/Source/Project/jucer_Project.h index 18886279dd..c43da6de00 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.h +++ b/extras/Introjucer/Source/Project/jucer_Project.h @@ -171,6 +171,7 @@ public: bool shouldBeAddedToBinaryResources() const; Value getShouldAddToResourceValue() const; Value getShouldInhibitWarningsValue() const; + Value getShouldUseStdCallValue() const; //============================================================================== bool canContain (const Item& child) const; diff --git a/extras/Introjucer/Source/Project/jucer_ProjectExport_MSVC.h b/extras/Introjucer/Source/Project/jucer_ProjectExport_MSVC.h index 05a6640b66..71f5ee8420 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectExport_MSVC.h +++ b/extras/Introjucer/Source/Project/jucer_ProjectExport_MSVC.h @@ -136,6 +136,7 @@ protected: for (int i = 0; i < libraryModules.size(); ++i) libraryModules.getUnchecked(i)->addExtraSearchPaths (*this, searchPaths); + searchPaths.removeDuplicates (false); return searchPaths; } @@ -463,38 +464,22 @@ protected: return filter; } - void addFiles (const Project::Item& projectItem, XmlElement& parent, const bool useStdcall) + void addFiles (const Project::Item& projectItem, XmlElement& parent) { if (projectItem.isGroup()) { XmlElement* filter = createGroup (projectItem.getName().toString(), parent); for (int i = 0; i < projectItem.getNumChildren(); ++i) - addFiles (projectItem.getChild(i), *filter, useStdcall); + addFiles (projectItem.getChild(i), *filter); } - else - { - if (projectItem.shouldBeAddedToTargetProject()) - { - const RelativePath path (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder); - - addFile (path, parent, - projectItem.shouldBeAddedToBinaryResources() || (shouldFileBeCompiledByDefault (path) && ! projectItem.shouldBeCompiled()), - useStdcall); - } - } - } - - void addGroup (XmlElement& parent, const String& groupName, const Array& files, const bool useStdcall) - { - if (files.size() > 0) + else if (projectItem.shouldBeAddedToTargetProject()) { - XmlElement* const group = createGroup (groupName, parent); + const RelativePath path (projectItem.getFile(), getTargetFolder(), RelativePath::buildTargetFolder); - for (int i = 0; i < files.size(); ++i) - if (files.getReference(i).hasFileExtension ("cpp;c;cc;cxx;h;hpp;hxx;rc;ico")) - addFile (files.getReference(i), *group, false, - useStdcall && shouldFileBeCompiledByDefault (files.getReference(i))); + addFile (path, parent, + projectItem.shouldBeAddedToBinaryResources() || (shouldFileBeCompiledByDefault (path) && ! projectItem.shouldBeCompiled()), + shouldFileBeCompiledByDefault (path) && (bool) projectItem.getShouldUseStdCallValue().getValue()); } } @@ -502,7 +487,7 @@ protected: { for (int i = 0; i < groups.size(); ++i) if (groups.getReference(i).getNumChildren() > 0) - addFiles (groups.getReference(i), files, false); + addFiles (groups.getReference(i), files); } //============================================================================== diff --git a/extras/Introjucer/Source/Project/jucer_ProjectType.cpp b/extras/Introjucer/Source/Project/jucer_ProjectType.cpp index 5c2522cde5..7dc781c7f3 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectType.cpp +++ b/extras/Introjucer/Source/Project/jucer_ProjectType.cpp @@ -583,7 +583,10 @@ public: { const RelativePath file (exporter.getJucePathFromProjectFolder().getChildFile (*f)); group.addRelativeFile (file, -1, file.hasFileExtension ("cpp;mm;r")); - group.getChild (group.getNumChildren() - 1).getShouldInhibitWarningsValue() = true; + + const Project::Item& last = group.getChild (group.getNumChildren() - 1); + last.getShouldInhibitWarningsValue() = true; + last.getShouldUseStdCallValue() = true; } exporter.groups.add (group); diff --git a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h index d9dbd023a3..2e8abcb2a1 100644 --- a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h +++ b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h @@ -117,6 +117,7 @@ namespace Ids DECLARE_ID (memberName); DECLARE_ID (focusOrder); DECLARE_ID (hidden); + DECLARE_ID (useStdCall); DECLARE_ID (androidSDKPath); DECLARE_ID (androidNDKPath); DECLARE_ID (androidInternetNeeded); diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 24ad1b7ae4..30b1dc9501 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -522,13 +522,6 @@ namespace JuceDummyNamespace {} #ifndef __JUCE_WIN32_NATIVEINCLUDES_JUCEHEADER__ #define __JUCE_WIN32_NATIVEINCLUDES_JUCEHEADER__ -#ifndef STRICT - #define STRICT 1 -#endif - -#undef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 - #if JUCE_MSVC #ifndef _CPPRTTI #error "You're compiling without RTTI enabled! This is needed for a lot of JUCE classes, please update your compiler settings!" @@ -542,10 +535,16 @@ namespace JuceDummyNamespace {} #pragma warning (disable : 4100 4201 4514 4312 4995) #endif +#undef _WIN32_WINNT #define _WIN32_WINNT 0x0500 +#undef STRICT +#define STRICT 1 +#undef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#undef _UNICODE #define _UNICODE 1 +#undef UNICODE #define UNICODE 1 - #ifndef _WIN32_IE #define _WIN32_IE 0x0400 #endif @@ -34319,7 +34318,7 @@ END_JUCE_NAMESPACE #undef _WIN32_WINNT #define _WIN32_WINNT 0x500 #undef STRICT - #define STRICT + #define STRICT 1 #include #include #pragma warning (disable : 4312 4355) @@ -108899,6 +108898,10 @@ END_JUCE_NAMESPACE #if JUCE_USE_FLAC #if JUCE_WINDOWS + #undef _WIN32_WINNT + #define _WIN32_WINNT 0x0500 + #undef STRICT + #define STRICT #include #endif diff --git a/juce_amalgamated.h b/juce_amalgamated.h index a8a34cfaf7..31a4c29a26 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -73,7 +73,7 @@ namespace JuceDummyNamespace {} */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 54 -#define JUCE_BUILDNUMBER 24 +#define JUCE_BUILDNUMBER 25 /** Current Juce version number. @@ -34923,7 +34923,7 @@ public: storeAsXML }; - struct Options + struct JUCE_API Options { /** Creates an empty Options structure. You'll need to fill-in the data memebers appropriately before using this structure. diff --git a/src/audio/audio_file_formats/juce_FlacAudioFormat.cpp b/src/audio/audio_file_formats/juce_FlacAudioFormat.cpp index 0f2167b45a..2c8cde04fd 100644 --- a/src/audio/audio_file_formats/juce_FlacAudioFormat.cpp +++ b/src/audio/audio_file_formats/juce_FlacAudioFormat.cpp @@ -29,6 +29,10 @@ #if JUCE_USE_FLAC #if JUCE_WINDOWS + #undef _WIN32_WINNT + #define _WIN32_WINNT 0x0500 + #undef STRICT + #define STRICT #include #endif diff --git a/src/audio/plugin_client/RTAS/juce_RTAS_WinUtilities.cpp b/src/audio/plugin_client/RTAS/juce_RTAS_WinUtilities.cpp index 8896590b2f..da216c8441 100644 --- a/src/audio/plugin_client/RTAS/juce_RTAS_WinUtilities.cpp +++ b/src/audio/plugin_client/RTAS/juce_RTAS_WinUtilities.cpp @@ -29,6 +29,11 @@ #if _MSC_VER #define _DO_NOT_DECLARE_INTERLOCKED_INTRINSICS_IN_MEMORY // (workaround for a VC build problem) + +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#undef STRICT +#define STRICT #include #include diff --git a/src/audio/plugin_client/VST/juce_VST_Wrapper.cpp b/src/audio/plugin_client/VST/juce_VST_Wrapper.cpp index bfc7a27b08..a157645cb2 100644 --- a/src/audio/plugin_client/VST/juce_VST_Wrapper.cpp +++ b/src/audio/plugin_client/VST/juce_VST_Wrapper.cpp @@ -24,10 +24,14 @@ */ #ifdef _MSC_VER - #pragma warning (disable : 4996 4100) + #pragma warning (disable : 4996 4100) #endif #ifdef _WIN32 + #undef _WIN32_WINNT + #define _WIN32_WINNT 0x500 + #undef STRICT + #define STRICT 1 #include #elif defined (LINUX) #include diff --git a/src/audio/plugin_host/formats/juce_VSTPluginFormat.cpp b/src/audio/plugin_host/formats/juce_VSTPluginFormat.cpp index 99f14ed515..057bc59b87 100644 --- a/src/audio/plugin_host/formats/juce_VSTPluginFormat.cpp +++ b/src/audio/plugin_host/formats/juce_VSTPluginFormat.cpp @@ -32,7 +32,7 @@ #undef _WIN32_WINNT #define _WIN32_WINNT 0x500 #undef STRICT - #define STRICT + #define STRICT 1 #include #include #pragma warning (disable : 4312 4355) diff --git a/src/core/juce_StandardHeader.h b/src/core/juce_StandardHeader.h index a151c33ff1..4d1d81e458 100644 --- a/src/core/juce_StandardHeader.h +++ b/src/core/juce_StandardHeader.h @@ -33,7 +33,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 54 -#define JUCE_BUILDNUMBER 24 +#define JUCE_BUILDNUMBER 25 /** Current Juce version number. diff --git a/src/native/windows/juce_win32_NativeIncludes.h b/src/native/windows/juce_win32_NativeIncludes.h index 0a9cec6797..89778f9424 100644 --- a/src/native/windows/juce_win32_NativeIncludes.h +++ b/src/native/windows/juce_win32_NativeIncludes.h @@ -30,13 +30,6 @@ #include "../../core/juce_TargetPlatform.h" #include "../../../juce_Config.h" -#ifndef STRICT - #define STRICT 1 -#endif - -#undef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 - #if JUCE_MSVC #ifndef _CPPRTTI #error "You're compiling without RTTI enabled! This is needed for a lot of JUCE classes, please update your compiler settings!" @@ -50,10 +43,16 @@ #pragma warning (disable : 4100 4201 4514 4312 4995) #endif +#undef _WIN32_WINNT #define _WIN32_WINNT 0x0500 +#undef STRICT +#define STRICT 1 +#undef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#undef _UNICODE #define _UNICODE 1 +#undef UNICODE #define UNICODE 1 - #ifndef _WIN32_IE #define _WIN32_IE 0x0400 #endif diff --git a/src/utilities/juce_PropertiesFile.h b/src/utilities/juce_PropertiesFile.h index 5706f44228..7513a44364 100644 --- a/src/utilities/juce_PropertiesFile.h +++ b/src/utilities/juce_PropertiesFile.h @@ -61,7 +61,7 @@ public: }; //============================================================================== - struct Options + struct JUCE_API Options { /** Creates an empty Options structure. You'll need to fill-in the data memebers appropriately before using this structure.