Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Say that nothing loads a driver in the home's Library

Țugui Dragoșbe1e8491f9cc
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstrings
index 1c30a5dc..4cebbb21 100644
--- a/Localization/Peel/Localizable.xcstrings
+++ b/Localization/Peel/Localizable.xcstrings
@@ -250668,6 +250668,112 @@
}
}
},
+ "macOS loads plug-ins like this one only from /Library, so nothing loads this one and moving it changes nothing." : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Systém macOS načítá plug-iny, jako je tento, jen ze složky /Library, takže se tento nikdy nenačte a jeho přesunutí nic nezmění."
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS lädt Plug-ins wie dieses nur aus /Library, daher lädt nichts dieses Plug-in, und durch das Verschieben ändert sich nichts."
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS solo carga módulos como este desde /Library, así que nada lo carga y trasladarlo no cambia nada."
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS ne charge les modules tels que celui-ci que depuis /Library : rien ne charge donc ce module, et le déplacer ne change rien."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS carica i plugin come questo solo da /Library, quindi nulla lo carica e spostarlo non cambia nulla."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOSはこのようなプラグインを/Libraryからのみ読み込むため、このプラグインを読み込むものはなく、ゴミ箱に入れても何も変わりません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS는 이와 같은 플러그인을 /Library에서만 로드하므로, 이 플러그인을 로드하는 것은 없으며 이동해도 아무것도 달라지지 않습니다."
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS laadt plug-ins zoals deze alleen vanuit /Library, dus niets laadt deze plug-in, en als je die verplaatst, verandert er niets."
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS wczytuje wtyczki takie jak ta tylko z /Library, więc nic nie wczytuje tej wtyczki, a przeniesienie jej do Kosza niczego nie zmieni."
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "O macOS só carrega plug-ins como este a partir de /Library, então nada carrega este e movê-lo não altera nada."
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS încarcă plug-inuri precum acesta doar din /Library, așa că nimic nu îl încarcă pe acesta, iar mutarea lui nu schimbă nimic."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS загружает плагины, подобные этому, только из /Library, поэтому этот плагин ничто не загружает, и его перемещение ничего не изменит."
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS läser bara in insticksfiler som den här från /Library, så inget läser in den här, och om den flyttas ändras ingenting."
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS bunun gibi yazılım eklerini yalnızca /Library içinden yükler, bu yüzden bunu hiçbir şey yüklemez ve onu taşımak hiçbir şeyi değiştirmez."
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS завантажує такі плагіни, як цей, лише з /Library, тож цей плагін ніщо не завантажує, і його переміщення нічого не змінить."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS只会从/Library载入此类插件,因此没有任何程序会载入此插件,移动它不会带来任何变化。"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "macOS只會從/Library載入這類外掛模組,因此沒有任何東西會載入這個外掛模組,移動它也不會有任何影響。"
+ }
+ }
+ }
+ },
"macOS loads plug-ins like this one only when legacy video device support has been restored in macOS Recovery. If it has, apps that use it may stop working." : {
"localizations" : {
"cs" : {
diff --git a/Packages/PeelCore/Sources/PeelCore/Plugins/Plugins.swift b/Packages/PeelCore/Sources/PeelCore/Plugins/Plugins.swift
index f18004ed..be0729c5 100644
--- a/Packages/PeelCore/Sources/PeelCore/Plugins/Plugins.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Plugins/Plugins.swift
@@ -65,6 +65,12 @@ public struct Plugin: Sendable, Hashable, Identifiable {
public var id: URL { url }
+ /// True for a driver in the home's Library: macOS loads audio drivers (`AudioServerPlugIn.h`) and camera plug-ins
+ /// only from `/Library`, so nothing loads this one.
+ public var isWhereNothingLoadsIt: Bool {
+ (category == .audioDrivers || category == .cameraPlugIns) && !isInstalledForAllUsers
+ }
+
/// Whether it is an Automator workflow in a Services folder: a Quick Action, which an app may have put there or
/// someone may have made on this Mac.
public var isAQuickAction: Bool {
diff --git a/Peel/Views/Plugins/PluginDetailView.swift b/Peel/Views/Plugins/PluginDetailView.swift
index 3e6ce129..21188941 100644
--- a/Peel/Views/Plugins/PluginDetailView.swift
+++ b/Peel/Views/Plugins/PluginDetailView.swift
@@ -151,7 +151,10 @@ extension Plugin {
}
private var whenItLoads: [LocalizedStringResource] {
- switch noLongerLoaded {
+ if isWhereNothingLoadsIt {
+ return ["macOS loads plug-ins like this one only from /Library, so nothing loads this one and moving it changes nothing."]
+ }
+ return switch noLongerLoaded {
case .quickLookGenerator:
["macOS no longer loads Quick Look generators like this one, so moving it changes nothing."]
case .internetPlugIn:
diff --git a/PeelTests/PluginTextTests.swift b/PeelTests/PluginTextTests.swift
index 909ebbb9..4c4fa569 100644
--- a/PeelTests/PluginTextTests.swift
+++ b/PeelTests/PluginTextTests.swift
@@ -29,6 +29,27 @@ struct PluginTextTests {
#expect(Plugin.sayingForAllUsers([mine, everyones, alone]) == [everyones.id])
}
+ @Test func saysNothingLoadsADriverInTheHomesLibrary() {
+ let inTheHome = "macOS loads plug-ins like this one only from /Library, so nothing loads this one and moving it changes nothing."
+ let audio = plugin(
+ "/Users/org.example/Library/Audio/Plug-Ins/HAL/Sound.driver", name: "Sound", category: .audioDrivers
+ )
+ let camera = plugin(
+ "/Users/org.example/Library/CoreMediaIO/Plug-Ins/DAL/Camera.plugin", name: "Camera", category: .cameraPlugIns
+ )
+ let everyones = plugin(
+ "/Library/Audio/Plug-Ins/HAL/Sound.driver", name: "Sound", forAllUsers: true, category: .audioDrivers
+ )
+ let midi = plugin(
+ "/Users/org.example/Library/Audio/MIDI Drivers/Keys.plugin", name: "Keys", category: .midiDrivers
+ )
+
+ #expect(audio.whenMoved.map(\.key).contains(inTheHome))
+ #expect(camera.whenMoved.map(\.key).contains(inTheHome))
+ #expect(!everyones.whenMoved.map(\.key).contains(inTheHome))
+ #expect(!midi.whenMoved.map(\.key).contains(inTheHome))
+ }
+
@Test func saysAMoveTakesAPlugInInLibraryFromEveryAccount() {
let mine = plugin("/Users/org.example/Library/Audio/Plug-Ins/Components/Echo.component", name: "Echo")
let everyones = plugin("/Library/Audio/Plug-Ins/Components/Echo.component", name: "Echo", forAllUsers: true)