Browse Source

If the jucer file does not specify a macOS/iOS deployment target then default to the latest known working version

tags/2021-05-28
hogliux 9 years ago
parent
commit
05b15c431d
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h

+ 11
- 4
extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h View File

@@ -29,7 +29,7 @@ namespace
{
const char* const osxVersionDefault = "default";
const int oldestSDKVersion = 5;
const int currentSDKVersion = 11;
const int currentSDKVersion = 12;
const char* const osxArch_Default = "default";
const char* const osxArch_Native = "Native";
@@ -374,8 +374,8 @@ protected:
if (iOS)
{
const char* iosVersions[] = { "Use Default", "7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "8.4", "9.0", "9.1", "9.2", "9.3", 0 };
const char* iosVersionValues[] = { osxVersionDefault, "7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "8.4", "9.0", "9.1", "9.2", "9.3", 0 };
const char* iosVersions[] = { "Use Default", "7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "8.4", "9.0", "9.1", "9.2", "9.3", "10.0", 0 };
const char* iosVersionValues[] = { osxVersionDefault, "7.0", "7.1", "8.0", "8.1", "8.2", "8.3", "8.4", "9.0", "9.1", "9.2", "9.3", "10.0", 0 };
props.add (new ChoicePropertyComponent (iosDeploymentTarget.getPropertyAsValue(), "iOS Deployment Target",
StringArray (iosVersions), Array<var> (iosVersionValues)),
@@ -957,12 +957,17 @@ public:
const String sdk (config.osxSDKVersion.get());
const String sdkCompat (config.osxDeploymentTarget.get());
// if the user doesn't set it, then use the last known version that works well with JUCE
String deploymentTarget = "10.11";
for (int ver = oldestSDKVersion; ver <= currentSDKVersion; ++ver)
{
if (sdk == getSDKName (ver)) s.add ("SDKROOT = macosx10." + String (ver));
if (sdkCompat == getSDKName (ver)) s.add ("MACOSX_DEPLOYMENT_TARGET = 10." + String (ver));
if (sdkCompat == getSDKName (ver)) deploymentTarget = "10." + String (ver);
}
s.add ("MACOSX_DEPLOYMENT_TARGET = " + deploymentTarget);
s.add ("MACOSX_DEPLOYMENT_TARGET_ppc = 10.4");
s.add ("SDKROOT_ppc = macosx10.5");
@@ -1947,6 +1952,8 @@ private:
const String iosVersion (config.iosDeploymentTarget.get());
if (iosVersion.isNotEmpty() && iosVersion != osxVersionDefault)
s.add ("IPHONEOS_DEPLOYMENT_TARGET = " + iosVersion);
else
s.add ("IPHONEOS_DEPLOYMENT_TARGET = 9.3");
}
else
{


Loading…
Cancel
Save