diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp index 2f4aee7619..350138024a 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_CompileEngineClient.cpp @@ -69,16 +69,18 @@ namespace ProjectProperties static Value getLiveSetting (Project& p, const Identifier& i) { return getLiveSettings (p).getPropertyAsValue (i, p.getUndoManagerFor (getLiveSettings (p))); } static var getLiveSettingVar (Project& p, const Identifier& i) { return getLiveSettingsConst (p) [i]; } - static Value getUserHeaderPathValue (Project& p) { return getLiveSetting (p, Ids::headerPath); } - static String getUserHeaderPathString (Project& p) { return getLiveSettingVar (p, Ids::headerPath); } - static Value getSystemHeaderPathValue (Project& p) { return getLiveSetting (p, Ids::systemHeaderPath); } - static String getSystemHeaderPathString (Project& p) { return getLiveSettingVar (p, Ids::systemHeaderPath); } - static Value getExtraDLLsValue (Project& p) { return getLiveSetting (p, Ids::extraDLLs); } - static String getExtraDLLsString (Project& p) { return getLiveSettingVar (p, Ids::extraDLLs); } - static Value getExtraCompilerFlagsValue (Project& p) { return getLiveSetting (p, Ids::extraCompilerFlags); } - static String getExtraCompilerFlagsString (Project& p) { return getLiveSettingVar (p, Ids::extraCompilerFlags); } - static Value getExtraPreprocessorDefsValue (Project& p) { return getLiveSetting (p, Ids::defines); } - static String getExtraPreprocessorDefsString (Project& p) { return getLiveSettingVar (p, Ids::defines); } + static Value getUserHeaderPathValue (Project& p) { return getLiveSetting (p, Ids::headerPath); } + static String getUserHeaderPathString (Project& p) { return getLiveSettingVar (p, Ids::headerPath); } + static Value getSystemHeaderPathValue (Project& p) { return getLiveSetting (p, Ids::systemHeaderPath); } + static String getSystemHeaderPathString (Project& p) { return getLiveSettingVar (p, Ids::systemHeaderPath); } + static Value getExtraDLLsValue (Project& p) { return getLiveSetting (p, Ids::extraDLLs); } + static String getExtraDLLsString (Project& p) { return getLiveSettingVar (p, Ids::extraDLLs); } + static Value getExtraCompilerFlagsValue (Project& p) { return getLiveSetting (p, Ids::extraCompilerFlags); } + static String getExtraCompilerFlagsString (Project& p) { return getLiveSettingVar (p, Ids::extraCompilerFlags); } + static Value getExtraPreprocessorDefsValue (Project& p) { return getLiveSetting (p, Ids::defines); } + static String getExtraPreprocessorDefsString (Project& p) { return getLiveSettingVar (p, Ids::defines); } + static Value getWindowsTargetPlatformVersionValue (Project& p) { return getLiveSetting (p, Ids::liveWindowsTargetPlatformVersion); } + static String getWindowsTargetPlatformVersionString (Project& p) { return getLiveSettingVar (p, Ids::liveWindowsTargetPlatformVersion); } static File getProjucerTempFolder() { @@ -121,6 +123,13 @@ void LiveBuildProjectSettings::getLiveSettings (Project& project, PropertyListBu props.add (new TextPropertyComponent (getExtraDLLsValue (project), "Extra dynamic libraries", 2048, true), "Extra dynamic libs that the running code may require. Use new-lines or commas to separate the items"); + + static const char* targetPlatformNames[] = { "(default)", "8.1", "10.0.10240.0", "10.0.10586.0", "10.0.14393.0", "10.0.15063.0", nullptr }; + const var targetPlatforms[] = { var(), "8.1", "10.0.10240.0", "10.0.10586.0", "10.0.14393.0", "10.0.15063.0" }; + + props.add (new ChoicePropertyComponent (getWindowsTargetPlatformVersionValue (project), "Windows Target Platform", + StringArray (targetPlatformNames), Array (targetPlatforms, numElementsInArray (targetPlatforms))), + "The Windows target platform to use"); } void LiveBuildProjectSettings::updateNewlyOpenedProject (Project&) { /* placeholder */ } @@ -325,6 +334,8 @@ public: build.setUtilsCppInclude (project.getAppIncludeFile().getFullPathName()); + build.setWindowsTargetPlatformVersion (ProjectProperties::getWindowsTargetPlatformVersionString (project)); + scanForProjectFiles (project, build); owner.updateAllEditors(); diff --git a/extras/Projucer/Source/LiveBuildEngine/projucer_ProjectBuildInfo.h b/extras/Projucer/Source/LiveBuildEngine/projucer_ProjectBuildInfo.h index 8ddc36510a..4c6b363ddf 100644 --- a/extras/Projucer/Source/LiveBuildEngine/projucer_ProjectBuildInfo.h +++ b/extras/Projucer/Source/LiveBuildEngine/projucer_ProjectBuildInfo.h @@ -91,5 +91,8 @@ struct ProjectBuildInfo StringArray getExtraDLLs() const { return separateJoinedStrings (tree [Ids::extraDLLs]); } void setExtraDLLs (const StringArray& s) { tree.setProperty (Ids::extraDLLs, concatenateListOfStrings (s), nullptr); } + String getWindowsTargetPlatformVersion() const { return tree [Ids::liveWindowsTargetPlatformVersion]; } + void setWindowsTargetPlatformVersion (const String& s) { tree.setProperty (Ids::liveWindowsTargetPlatformVersion, s, nullptr); } + ValueTree tree; }; diff --git a/extras/Projucer/Source/Utility/jucer_PresetIDs.h b/extras/Projucer/Source/Utility/jucer_PresetIDs.h index da0c6dde39..ea92d98b4f 100644 --- a/extras/Projucer/Source/Utility/jucer_PresetIDs.h +++ b/extras/Projucer/Source/Utility/jucer_PresetIDs.h @@ -83,6 +83,7 @@ namespace Ids DECLARE_ID (defines); DECLARE_ID (headerPath); DECLARE_ID (systemHeaderPath); + DECLARE_ID (liveWindowsTargetPlatformVersion); DECLARE_ID (libraryPath); DECLARE_ID (customXcodeFlags); DECLARE_ID (customXcassetsFolder); diff --git a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/os.h b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/os.h index 621747276f..412ca7622f 100644 --- a/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/os.h +++ b/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/os.h @@ -145,7 +145,7 @@ static __inline void vorbis_fpu_restore(vorbis_fpu_control fpu){ /* Optimized code path for x86_64 builds. Uses SSE2 intrinsics. This can be done safely because all x86_64 CPUs supports SSE2. */ -#if (defined(_MSC_VER) && defined(_WIN64)) || (defined(__GNUC__) && defined (__x86_64__)) +#if (! JUCE_PROJUCER_LIVE_BUILD) && ((defined(_MSC_VER) && defined(_WIN64)) || (defined(__GNUC__) && defined (__x86_64__))) # define VORBIS_FPU_CONTROL typedef ogg_int16_t vorbis_fpu_control; diff --git a/modules/juce_core/native/juce_win32_SystemStats.cpp b/modules/juce_core/native/juce_win32_SystemStats.cpp index 2361a8d4eb..80473183c3 100644 --- a/modules/juce_core/native/juce_win32_SystemStats.cpp +++ b/modules/juce_core/native/juce_win32_SystemStats.cpp @@ -54,7 +54,11 @@ static void callCPUID (int result[4], uint32 type) #else static void callCPUID (int result[4], int infoType) { + #if JUCE_PROJUCER_LIVE_BUILD + std::fill (result, result + 4, 0); + #else __cpuid (result, infoType); + #endif } #endif