Change deployment target of Managed Software Center.app to macOS 10.15

This commit is contained in:
Greg Neagle
2025-06-30 08:23:54 -07:00
parent 50c695492e
commit c6332f41bd
3 changed files with 42 additions and 19 deletions
@@ -596,7 +596,7 @@
DEAD_CODE_STRIPPING = YES;
INFOPLIST_FILE = MSCDockTilePlugin/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
MACOSX_DEPLOYMENT_TARGET = 10.13;
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = com.googlecode.munki.MSCDockTilePlugin;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@@ -616,7 +616,7 @@
DEAD_CODE_STRIPPING = YES;
INFOPLIST_FILE = MSCDockTilePlugin/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
MACOSX_DEPLOYMENT_TARGET = 10.13;
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = com.googlecode.munki.MSCDockTilePlugin;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@@ -757,7 +757,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11;
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = com.googlecode.munki.ManagedSoftwareCenter;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -781,7 +781,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11;
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = com.googlecode.munki.ManagedSoftwareCenter;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -18,13 +18,21 @@ extension MainWindowController: NSToolbarDelegate {
// MARK: NSToolbarDelegate functions
func toolbarDefaultItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {
return [
.flexibleSpace,
.progressIndicatorItem,
.sidebarTrackingSeparator,
.navigationGoBackItem,
.flexibleSpace,
]
if #available(macOS 11.0, *) {
return [
.flexibleSpace,
.progressIndicatorItem,
.sidebarTrackingSeparator,
.navigationGoBackItem,
.flexibleSpace,
]
} else {
// Fallback on earlier versions
return [
.progressIndicatorItem,
.navigationGoBackItem
]
}
}
func toolbarAllowedItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {
@@ -143,7 +151,11 @@ extension MainWindowController: NSToolbarDelegate {
}
}
if !itemFound {
toolbar.insertItem(withItemIdentifier: .navigationGoBackItem, at: 3)
if #available(macOS 11.0, *) {
toolbar.insertItem(withItemIdentifier: .navigationGoBackItem, at: 3)
} else {
toolbar.insertItem(withItemIdentifier: .navigationGoBackItem, at: 1)
}
}
}
}
@@ -525,13 +525,24 @@ class MainWindowController: NSWindowController {
superview.replaceSubview(webViewPlaceholder, with: replacementWebView)
}
webView = replacementWebView
let safeGuide = superview.safeAreaLayoutGuide
NSLayoutConstraint.activate([
webView.leadingAnchor.constraint(equalTo: safeGuide.leadingAnchor),
webView.trailingAnchor.constraint(equalTo: safeGuide.trailingAnchor),
webView.topAnchor.constraint(equalTo: superview.topAnchor),
webView.bottomAnchor.constraint(equalTo: superview.bottomAnchor)
])
if #available(macOS 11.0, *) {
let safeGuide = superview.safeAreaLayoutGuide
NSLayoutConstraint.activate([
webView.leadingAnchor.constraint(equalTo: safeGuide.leadingAnchor),
webView.trailingAnchor.constraint(equalTo: safeGuide.trailingAnchor),
webView.topAnchor.constraint(equalTo: superview.topAnchor),
webView.bottomAnchor.constraint(equalTo: superview.bottomAnchor)
])
} else {
// Fallback on earlier versions
NSLayoutConstraint.activate([
webView.leadingAnchor.constraint(equalTo: superview.leadingAnchor),
webView.trailingAnchor.constraint(equalTo: superview.trailingAnchor),
webView.topAnchor.constraint(equalTo: superview.topAnchor),
webView.bottomAnchor.constraint(equalTo: superview.bottomAnchor)
])
}
webView.navigationDelegate = self
}
}