Browse Source

Projucer: Fixed the "Don't Add Resources Folder to App Extension" setting in the iOS exporter so that it does what it says and added the option to the Mac exporter

tags/2021-05-28
ed 7 years ago
parent
commit
f29fa75477
2 changed files with 11 additions and 13 deletions
  1. +10
    -12
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
  2. +1
    -1
      extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h

+ 10
- 12
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h View File

@@ -64,14 +64,15 @@ public:
extraFrameworksValue (settings, Ids::extraFrameworks, getUndoManager()), extraFrameworksValue (settings, Ids::extraFrameworks, getUndoManager()),
postbuildCommandValue (settings, Ids::postbuildCommand, getUndoManager()), postbuildCommandValue (settings, Ids::postbuildCommand, getUndoManager()),
prebuildCommandValue (settings, Ids::prebuildCommand, getUndoManager()), prebuildCommandValue (settings, Ids::prebuildCommand, getUndoManager()),
iosAppExtensionDuplicateResourcesFolderValue (settings, Ids::iosAppExtensionDuplicateResourcesFolder, getUndoManager()),
duplicateAppExResourcesFolderValue (settings, Ids::duplicateAppExResourcesFolder, getUndoManager(), true),
iosDeviceFamilyValue (settings, Ids::iosDeviceFamily, getUndoManager(), "1,2"), iosDeviceFamilyValue (settings, Ids::iosDeviceFamily, getUndoManager(), "1,2"),
iPhoneScreenOrientationValue (settings, Ids::iPhoneScreenOrientation, getUndoManager(), "portraitlandscape"), iPhoneScreenOrientationValue (settings, Ids::iPhoneScreenOrientation, getUndoManager(), "portraitlandscape"),
iPadScreenOrientationValue (settings, Ids::iPadScreenOrientation, getUndoManager(), "portraitlandscape"), iPadScreenOrientationValue (settings, Ids::iPadScreenOrientation, getUndoManager(), "portraitlandscape"),
customXcodeResourceFoldersValue (settings, Ids::customXcodeResourceFolders, getUndoManager()), customXcodeResourceFoldersValue (settings, Ids::customXcodeResourceFolders, getUndoManager()),
customXcassetsFolderValue (settings, Ids::customXcassetsFolder, getUndoManager()), customXcassetsFolderValue (settings, Ids::customXcassetsFolder, getUndoManager()),
microphonePermissionNeededValue (settings, Ids::microphonePermissionNeeded, getUndoManager()), microphonePermissionNeededValue (settings, Ids::microphonePermissionNeeded, getUndoManager()),
microphonePermissionsTextValue (settings, Ids::microphonePermissionsText, getUndoManager(), "This is an audio app which requires audio input. If you do not have a USB audio interface connected it will use the microphone."),
microphonePermissionsTextValue (settings, Ids::microphonePermissionsText, getUndoManager(),
"This is an audio app which requires audio input. If you do not have a USB audio interface connected it will use the microphone."),
uiFileSharingEnabledValue (settings, Ids::UIFileSharingEnabled, getUndoManager()), uiFileSharingEnabledValue (settings, Ids::UIFileSharingEnabled, getUndoManager()),
uiSupportsDocumentBrowserValue (settings, Ids::UISupportsDocumentBrowser, getUndoManager()), uiSupportsDocumentBrowserValue (settings, Ids::UISupportsDocumentBrowser, getUndoManager()),
uiStatusBarHiddenValue (settings, Ids::UIStatusBarHidden, getUndoManager()), uiStatusBarHiddenValue (settings, Ids::UIStatusBarHidden, getUndoManager()),
@@ -110,7 +111,7 @@ public:
String getPostBuildScript() const { return postbuildCommandValue.get(); } String getPostBuildScript() const { return postbuildCommandValue.get(); }
String getPreBuildScript() const { return prebuildCommandValue.get(); } String getPreBuildScript() const { return prebuildCommandValue.get(); }
bool shouldDuplicateResourcesFolderForAppExtension() const { return iosAppExtensionDuplicateResourcesFolderValue.get(); }
bool shouldDuplicateAppExResourcesFolder() const { return duplicateAppExResourcesFolderValue.get(); }
String getDeviceFamilyString() const { return iosDeviceFamilyValue.get(); } String getDeviceFamilyString() const { return iosDeviceFamilyValue.get(); }
@@ -195,14 +196,12 @@ public:
"This way you can specify them for OS X and iOS separately, and modify the content of the resource folders " "This way you can specify them for OS X and iOS separately, and modify the content of the resource folders "
"without re-saving the Projucer project."); "without re-saving the Projucer project.");
if (getProject().getProjectType().isAudioPlugin())
props.add (new ChoicePropertyComponent (duplicateAppExResourcesFolderValue, "Add Duplicate Resources Folder to App Extension"),
"Disable this to prevent the Projucer from creating a duplicate resources folder for AUv3 app extensions.");
if (iOS) if (iOS)
{ {
if (getProject().getProjectType().isAudioPlugin())
props.add (new ChoicePropertyComponent (iosAppExtensionDuplicateResourcesFolderValue,
"Don't Add Resources Folder to App Extension"),
"Enable this to prevent the Projucer from creating a resources folder for AUv3 app extensions.");
props.add (new ChoicePropertyComponent (iosDeviceFamilyValue, "Device Family", props.add (new ChoicePropertyComponent (iosDeviceFamilyValue, "Device Family",
{ "iPhone", "iPad", "Universal" }, { "iPhone", "iPad", "Universal" },
{ "1", "2", "1,2" }), { "1", "2", "1,2" }),
@@ -1682,7 +1681,7 @@ private:
const bool iOS; const bool iOS;
ValueWithDefault customPListValue, pListPrefixHeaderValue, pListPreprocessValue, extraFrameworksValue, postbuildCommandValue, ValueWithDefault customPListValue, pListPrefixHeaderValue, pListPreprocessValue, extraFrameworksValue, postbuildCommandValue,
prebuildCommandValue, iosAppExtensionDuplicateResourcesFolderValue, iosDeviceFamilyValue, iPhoneScreenOrientationValue,
prebuildCommandValue, duplicateAppExResourcesFolderValue, iosDeviceFamilyValue, iPhoneScreenOrientationValue,
iPadScreenOrientationValue, customXcodeResourceFoldersValue, customXcassetsFolderValue, microphonePermissionNeededValue, microphonePermissionsTextValue, iPadScreenOrientationValue, customXcodeResourceFoldersValue, customXcassetsFolderValue, microphonePermissionNeededValue, microphonePermissionsTextValue,
uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue, uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue,
iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue, iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue,
@@ -1880,8 +1879,7 @@ private:
if (target->type != XcodeTarget::AggregateTarget) if (target->type != XcodeTarget::AggregateTarget)
{ {
auto skipAUv3 = (target->type == XcodeTarget::AudioUnitv3PlugIn
&& ! shouldDuplicateResourcesFolderForAppExtension());
auto skipAUv3 = (target->type == XcodeTarget::AudioUnitv3PlugIn && ! shouldDuplicateAppExResourcesFolder());
if (! projectType.isStaticLibrary() && target->type != XcodeTarget::SharedCodeTarget && ! skipAUv3) if (! projectType.isStaticLibrary() && target->type != XcodeTarget::SharedCodeTarget && ! skipAUv3)
target->addBuildPhase ("PBXResourcesBuildPhase", resourceIDs); target->addBuildPhase ("PBXResourcesBuildPhase", resourceIDs);


+ 1
- 1
extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h View File

@@ -227,7 +227,7 @@ namespace Ids
DECLARE_ID (iCloudPermissions); DECLARE_ID (iCloudPermissions);
DECLARE_ID (iosDevelopmentTeamID); DECLARE_ID (iosDevelopmentTeamID);
DECLARE_ID (iosAppGroupsId); DECLARE_ID (iosAppGroupsId);
DECLARE_ID (iosAppExtensionDuplicateResourcesFolder);
DECLARE_ID (duplicateAppExResourcesFolder);
DECLARE_ID (buildToolsVersion); DECLARE_ID (buildToolsVersion);
DECLARE_ID (gradleVersion); DECLARE_ID (gradleVersion);
const Identifier androidPluginVersion ("gradleWrapperVersion"); // old name is very confusing, but we need to remain backward compatible const Identifier androidPluginVersion ("gradleWrapperVersion"); // old name is very confusing, but we need to remain backward compatible


Loading…
Cancel
Save