1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-20 01:14:20 +00:00

Fixed some Projucer live-build errors on Windows and added an option to set the Windows target platform

This commit is contained in:
ed 2017-05-04 12:47:18 +01:00
parent ece2d8b7c0
commit fa0b097652
5 changed files with 30 additions and 11 deletions

View file

@ -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<var> (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();