Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Say that nothing loads a Quick Look generator or an old Internet plug-in
Țugui Dragoș3f0ae96e4d2b
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstringsindex 0a88ce63..a03625ba 100644--- a/Localization/Peel/Localizable.xcstrings+++ b/Localization/Peel/Localizable.xcstrings@@ -53519,6 +53519,112 @@}}},+ "History can’t put it back, since Peel’s helper puts back into that folder only what is root’s alone, but you can drag it back out in Finder." : {+ "localizations" : {+ "cs" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Historie ho nemůže vrátit zpět, protože pomocník Peelu do této složky vrací zpět jen to, co patří výhradně uživateli root, ale ve Finderu ho můžete přetáhnout zpět ven."+ }+ },+ "de" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Im Verlauf lässt es sich nicht zurücklegen, da das Hilfsprogramm von Peel in diesen Ordner nur zurücklegt, was ausschließlich root gehört, du kannst es aber im Finder wieder herausziehen."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Historial no puede restaurarlo, ya que el asistente de Peel solo restaura en esa carpeta lo que pertenece únicamente a root, pero puedes sacarlo arrastrándolo en el Finder."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "L’Historique ne peut pas le remettre en place, car l’utilitaire de Peel ne remet dans ce dossier que ce qui appartient uniquement à root, mais vous pouvez le sortir de la corbeille dans le Finder, en le faisant glisser."+ }+ },+ "it" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "La Cronologia non può ripristinarlo, perché l’assistente di Peel ripristina in quella cartella soltanto ciò che appartiene esclusivamente a root, ma puoi trascinarlo fuori nel Finder."+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peelのヘルパーはrootだけが所有するものしかそのフォルダに戻さないため、履歴から戻すことはできません。ただし、Finderでドラッグして取り出せます。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "이 항목이 들어 있는 폴더에는 Peel 보조 프로그램이 Root 사용자 전용인 항목만 되돌려 놓으므로 기록에서 되돌려 놓을 수 없지만, Finder에서 드래그하여 꺼낼 수 있습니다."+ }+ },+ "nl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Geschiedenis kan het niet terugzetten, omdat het hulpprogramma van Peel in die map alleen terugzet wat uitsluitend van root is, maar je kunt het in Finder er weer uit slepen."+ }+ },+ "pl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Historia nie może jej przywrócić, ponieważ pomocnik Peel przywraca do tego folderu tylko to, co należy wyłącznie do użytkownika root, ale możesz przeciągnąć ją z Kosza w Finderze."+ }+ },+ "pt" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O Histórico não pode colocá-lo de volta, porque o auxiliar do Peel só coloca de volta nessa pasta o que pertence apenas ao usuário root, mas você pode arrastá-lo para fora no Finder."+ }+ },+ "ro" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nu îl puteți pune înapoi din Istoric, deoarece instrumentul de ajutor Peel pune înapoi în acel dosar doar ce aparține exclusiv utilizatorului Root, însă, în Finder, îl puteți trage afară din Coș."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "История не сможет его восстановить, поскольку помощник Peel восстанавливает в эту папку только то, что принадлежит исключительно пользователю root, но в Finder его можно перетащить из Корзины обратно."+ }+ },+ "sv" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Historik kan inte lägga tillbaka den, eftersom Peels hjälpprogram bara lägger tillbaka något i den mappen om det tillhör rotanvändaren och ingen annan, men du kan dra ut den igen i Finder."+ }+ },+ "tr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Geçmiş onu yerine koyamaz, çünkü Peel’in yardımcısı o klasörde yalnızca tek sahibi root olan öğeleri yerine koyar; ancak onu Finder’da sürükleyerek dışarı çıkarabilirsiniz."+ }+ },+ "uk" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Історія не зможе його повернути, бо помічник Peel повертає в ту папку лише те, що належить тільки користувачу root, але у Finder його можна перетягнути зі Смітника назад."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "“历史记录”无法将它放回原处,因为Peel的帮助程序只会将仅归root所有的内容放回该文件夹,不过你可以在“访达”中将它拖出来。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "由於Peel的輔助程式只會將只屬於root的項目還原到該檔案夾,「歷史記錄」無法將它還原,但你可以在Finder中將它拖出來。"+ }+ }+ }+ },"History couldn’t be updated" : {"localizations" : {"cs" : {@@ -236791,6 +236897,112 @@}}},+ "macOS and today’s browsers no longer load plug-ins like this one, so moving it changes nothing." : {+ "localizations" : {+ "cs" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Systém macOS ani dnešní prohlížeče už nenačítají plug-iny, jako je tento, takže jeho přesunutí nic nezmění."+ }+ },+ "de" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS und heutige Browser laden Plug-ins wie dieses nicht mehr, daher ändert sich durch das Verschieben nichts."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS y los navegadores actuales ya no cargan módulos como este, así que trasladarlo no cambia nada."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS et les navigateurs actuels ne chargent plus les modules tels que celui-ci : le déplacer ne change donc rien."+ }+ },+ "it" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS e i browser attuali non caricano più i plugin come questo, quindi spostarlo non cambia nulla."+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOSも現在のブラウザもこのようなプラグインを読み込まなくなったため、ゴミ箱に入れても何も変わりません。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS와 최신 브라우저는 이와 같은 플러그인을 더 이상 로드하지 않으므로, 이동해도 아무것도 달라지지 않습니다."+ }+ },+ "nl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS en de huidige browsers laden plug-ins zoals deze niet meer, dus als je het verplaatst, verandert er niets."+ }+ },+ "pl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS i współczesne przeglądarki nie wczytują już wtyczek takich jak ta, więc przeniesienie jej do Kosza niczego nie zmieni."+ }+ },+ "pt" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O macOS e os navegadores atuais não carregam mais plug-ins como este, então movê-lo não altera nada."+ }+ },+ "ro" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS și browserele de astăzi nu mai încarcă plug-inuri precum acesta, așa că mutarea lui nu schimbă nimic."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS и современные браузеры больше не загружают плагины, подобные этому, поэтому его перемещение ничего не изменит."+ }+ },+ "sv" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS och dagens webbläsare läser inte längre in insticksfiler som den här, så om den flyttas ändras ingenting."+ }+ },+ "tr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS ve günümüz tarayıcıları artık bunun gibi yazılım eklerini yüklemiyor, bu yüzden onu taşımak hiçbir şeyi değiştirmez."+ }+ },+ "uk" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS і сучасні браузери більше не завантажують такі плагіни, як цей, тож його переміщення нічого не змінить."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS和如今的浏览器都已不再载入此类插件,因此移动它不会带来任何变化。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS和現今的瀏覽器都已不再載入這類外掛模組,因此移動它不會有任何影響。"+ }+ }+ }+ },"macOS calls it" : {"localizations" : {"cs" : {@@ -241268,6 +241480,112 @@}}},+ "macOS no longer loads Quick Look generators like this one, so moving it changes nothing." : {+ "localizations" : {+ "cs" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Systém macOS už nenačítá generátory Rychlého náhledu, jako je tento, takže jeho přesunutí nic nezmění."+ }+ },+ "de" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS lädt Übersicht-Generatoren wie diesen nicht mehr, daher ändert sich durch das Verschieben nichts."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS ya no carga generadores de Vista rápida como este, así que trasladarlo no cambia nada."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS ne charge plus les générateurs Coup d’œil tels que celui-ci : le déplacer ne change donc rien."+ }+ },+ "it" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS non carica più i generatori di “Visualizzazione rapida” come questo, quindi spostarlo non cambia nulla."+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOSはこのようなクイックルックジェネレータを読み込まなくなったため、ゴミ箱に入れても何も変わりません。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS는 이와 같은 훑어보기 생성자를 더 이상 로드하지 않으므로, 이동해도 아무것도 달라지지 않습니다."+ }+ },+ "nl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS laadt generators voor Snelle weergave zoals deze niet meer, dus als je het verplaatst, verandert er niets."+ }+ },+ "pl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS nie wczytuje już generatorów Szybkiego przeglądu takich jak ten, więc przeniesienie tej wtyczki do Kosza niczego nie zmieni."+ }+ },+ "pt" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O macOS não carrega mais geradores da Visualização Rápida como este, então movê-lo não altera nada."+ }+ },+ "ro" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS nu mai încarcă generatoare Privire rapidă precum acesta, așa că mutarea lui nu schimbă nimic."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS больше не загружает генераторы Быстрого просмотра, подобные этому, поэтому его перемещение ничего не изменит."+ }+ },+ "sv" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS läser inte längre in Överblick-generatorer som den här, så om den flyttas ändras ingenting."+ }+ },+ "tr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS artık bunun gibi Göz At oluşturucularını yüklemiyor, bu yüzden onu taşımak hiçbir şeyi değiştirmez."+ }+ },+ "uk" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS більше не завантажує такі генератори Швидкого перегляду, як цей, тож його переміщення нічого не змінить."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS已不再载入此类快速查看生成器,因此移动它不会带来任何变化。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS已不再載入這類「快速查看」產生器,因此移動它不會有任何影響。"+ }+ }+ }+ },"macOS puts them on the Desktop. Choose somewhere else." : {"localizations" : {"cs" : {diff --git a/Packages/PeelCore/Sources/PeelCore/Plugins/Plugins.swift b/Packages/PeelCore/Sources/PeelCore/Plugins/Plugins.swiftindex b9cac0ab..d1820b80 100644--- a/Packages/PeelCore/Sources/PeelCore/Plugins/Plugins.swift+++ b/Packages/PeelCore/Sources/PeelCore/Plugins/Plugins.swift@@ -52,6 +52,15 @@ public struct Plugin: Sendable, Hashable, Identifiable {public var origin: Origin?+ /// A kind of plug-in nothing on macOS loads anymore, so moving one changes nothing.+ public enum NoLongerLoaded: Sendable, Hashable {+ case quickLookGenerator+ /// An Internet plug-in other than a WebKit plug-in.+ case internetPlugIn+ }++ public var noLongerLoaded: NoLongerLoaded?+public var id: URL { url }/// Whether it is an Automator workflow in a Services folder: a Quick Action, which an app may have put there or@@ -232,6 +241,7 @@ public enum Plugins {)plugin.staysInTheTrash = requiresPrivileges&& reach.refusal(ofPuttingBack: item.url, at: item.url) == .loadsCode+ plugin.noLongerLoaded = noLongerLoaded(item.url, category: item.category)plugin.origin = origin(of: item.url, identifier: plugin.bundleIdentifier, claimants: claimants, goneApps: goneApps)@@ -247,6 +257,27 @@ public enum Plugins {)}+ /// Whether nothing on macOS loads the plug-in anymore. macOS no longer loads a Quick Look generator from another+ /// maker (macOS 15 Release Notes), and from an Internet Plug-Ins folder WebKit loads only a WebKit plug-in, named+ /// `.webplugin` or of package type `WBPL` as `CFBundleGetPackageInfo` reads it, while browsers load none.+ static func noLongerLoaded(_ url: URL, category: Plugin.Category) -> Plugin.NoLongerLoaded? {+ switch category {+ case .quickLook:+ return url.pathExtension.caseInsensitiveCompare("qlgenerator") == .orderedSame ? .quickLookGenerator : nil+ case .internetPlugIns:+ guard url.pathExtension.caseInsensitiveCompare("webplugin") != .orderedSame else { return nil }+ var type: UInt32 = 0+ if let bundle = CFBundleCreate(nil, url as CFURL) {+ CFBundleGetPackageInfo(bundle, &type, nil)+ }+ return type == webKitPlugInType ? nil : .internetPlugIn+ default:+ return nil+ }+ }++ private static let webKitPlugInType = "WBPL".utf8.reduce(UInt32(0)) { $0 << 8 | UInt32($1) }+/// The plug-ins in the user's Library and the Mac's, each with its kind and whether it is there for every account./// A folder that is there and can't be listed joins `unreadable`.static func installed(diff --git a/Packages/PeelCore/Tests/PeelCoreTests/PluginsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/PluginsTests.swiftindex 2d54732d..a527b959 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/PluginsTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/PluginsTests.swift@@ -65,6 +65,28 @@ struct PluginsTests {#expect(plugins.first { $0.name == "Own" }?.staysInTheTrash == false)}+ @Test func knowsThePlugInsNothingLoadsAnymore() async throws {+ let directory = try TemporaryDirectory()+ try directory.directory("home/Library/QuickLook/Markdown.qlgenerator/Contents")+ try directory.directory("home/Library/QuickLook/Preview.appex/Contents")+ try directory.directory("root/Library/Internet Plug-Ins/Flash Player.plugin/Contents")+ try directory.directory("root/Library/Internet Plug-Ins/Viewer.webplugin/Contents")+ try Data("WBPL????".utf8).write(to: directory.file("root/Library/Internet Plug-Ins/Reader.plugin/Contents/PkgInfo"))+ try directory.directory("home/Library/Audio/Plug-Ins/Components/Echo.component/Contents")+ let environment = SearchEnvironment(+ homeDirectory: directory.url.appending(path: "home", directoryHint: .isDirectory),+ rootDirectory: directory.url.appending(path: "root", directoryHint: .isDirectory)+ )++ let plugins = await Plugins.scan(environment: environment).plugins+ let noLongerLoaded = Dictionary(uniqueKeysWithValues: plugins.map { ($0.name, $0.noLongerLoaded) })++ #expect(noLongerLoaded == [+ "Markdown": .quickLookGenerator, "Preview": nil, "Flash Player": .internetPlugIn, "Viewer": nil,+ "Reader": nil, "Echo": nil,+ ])+ }+@Test func saysWhichAppAPlugInCameWith() {let surge = InstalledApp(url: URL(filePath: "/Applications/Surge XT.app"), bundleIdentifier: "org.example.surgext", name: "Surge XT"diff --git a/Peel/Views/Plugins/PluginDetailView.swift b/Peel/Views/Plugins/PluginDetailView.swiftindex 241e147c..8ba05731 100644--- a/Peel/Views/Plugins/PluginDetailView.swift+++ b/Peel/Views/Plugins/PluginDetailView.swift@@ -149,7 +149,18 @@ extension Plugin {}private var whatGoes: [LocalizedStringResource] {- switch (isAQuickAction, staysInTheTrash) {+ if let noLongerLoaded {+ let nothingChanges: LocalizedStringResource = switch noLongerLoaded {+ case .quickLookGenerator:+ "macOS no longer loads Quick Look generators like this one, so moving it changes nothing."+ case .internetPlugIn:+ "macOS and today’s browsers no longer load plug-ins like this one, so moving it changes nothing."+ }+ return staysInTheTrash+ ? [nothingChanges, "History can’t put it back, since Peel’s helper puts back into that folder only what is root’s alone, but you can drag it back out in Finder."]+ : [nothingChanges]+ }+ return switch (isAQuickAction, staysInTheTrash) {case (true, true):["It leaves the Services menu and Quick Actions, and it may be one someone made in Automator on this Mac. History can’t put it back, since code is loaded from its folder and it isn’t root’s alone, but you can drag it back out in Finder."]case (true, false):diff --git a/PeelTests/PluginTextTests.swift b/PeelTests/PluginTextTests.swiftindex 1541d7a8..3e03628e 100644--- a/PeelTests/PluginTextTests.swift+++ b/PeelTests/PluginTextTests.swift@@ -4,10 +4,12 @@ import Foundationimport Testingstruct PluginTextTests {- private func plugin(_ path: String, name: String, forAllUsers: Bool = false) -> Plugin {+ private func plugin(+ _ path: String, name: String, forAllUsers: Bool = false, category: Plugin.Category = .audioUnits+ ) -> Plugin {Plugin(url: URL(filePath: path, directoryHint: .isDirectory), name: name, bundleIdentifier: nil, version: nil,- category: .audioUnits, isInstalledForAllUsers: forAllUsers, size: 1, requiresPrivileges: forAllUsers,+ category: category, isInstalledForAllUsers: forAllUsers, size: 1, requiresPrivileges: forAllUsers,refusal: nil)}@@ -35,4 +37,28 @@ struct PluginTextTests {#expect(mine.whenMoved.map { String(localized: $0) }.last != everyAccount)#expect(everyones.whenMoved.map { String(localized: $0) }.last == everyAccount)}++ @Test func saysMovingAPlugInNothingLoadsChangesNothing() {+ var generator = plugin(+ "/Users/org.example/Library/QuickLook/Markdown.qlgenerator", name: "Markdown", category: .quickLook+ )+ generator.noLongerLoaded = .quickLookGenerator+ var flash = plugin(+ "/Library/Internet Plug-Ins/Flash Player.plugin", name: "Flash Player", forAllUsers: true,+ category: .internetPlugIns+ )+ flash.noLongerLoaded = .internetPlugIn+ flash.staysInTheTrash = true+ let echo = plugin("/Users/org.example/Library/Audio/Plug-Ins/Components/Echo.component", name: "Echo")++ #expect(generator.whenMoved.map { String(localized: $0) } == [+ String(localized: "macOS no longer loads Quick Look generators like this one, so moving it changes nothing."),+ ])+ #expect(flash.whenMoved.map { String(localized: $0) } == [+ String(localized: "macOS and today’s browsers no longer load plug-ins like this one, so moving it changes nothing."),+ String(localized: "History can’t put it back, since Peel’s helper puts back into that folder only what is root’s alone, but you can drag it back out in Finder."),+ String(localized: "Every account on this Mac has it, so moving it takes it from all of them."),+ ])+ #expect(echo.whenMoved.map { String(localized: $0) } == [String(localized: "Apps that use it may stop working.")])+ }}