From bcdc75c33ff5db1aee051d6cde77ab8cb855471f Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Sun, 10 Sep 2023 14:27:02 -0400 Subject: [PATCH] Setup document types --- Whisky/Info.plist | 57 +++++++++++++++++++++- Whisky/Views/Bottle Views/BottleView.swift | 4 +- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/Whisky/Info.plist b/Whisky/Info.plist index dc66dc44e..8bc842896 100644 --- a/Whisky/Info.plist +++ b/Whisky/Info.plist @@ -2,11 +2,62 @@ + CFBundleDocumentTypes + + + CFBundleTypeIconFile + + CFBundleTypeIconSystemGenerated + 0 + CFBundleTypeName + Microsoft MSI Installer + CFBundleTypeRole + Editor + LSHandlerRank + Owner + LSItemContentTypes + + com.microsoft.msi-installer + + + + CFBundleTypeIconFile + + CFBundleTypeIconSystemGenerated + 0 + CFBundleTypeName + Microsoft Batch File + CFBundleTypeRole + Editor + LSHandlerRank + Owner + LSItemContentTypes + + com.microsoft.bat + + + + CFBundleTypeIconFile + + CFBundleTypeIconSystemGenerated + 0 + CFBundleTypeName + Microsoft Executable + CFBundleTypeRole + Editor + LSHandlerRank + Owner + LSItemContentTypes + + com.microsoft.windows-executable + + + SUFeedURL https://raw.githubusercontent.com/IsaacMarovitz/Whisky/sparkle/appcast.xml SUPublicEDKey tnZFAvPUfCpM7Tr7Sx5gKRm6BUQQ6htJQeOMP44evms= - UTImportedTypeDeclarations + UTExportedTypeDeclarations UTTypeConformsTo @@ -15,6 +66,8 @@ UTTypeDescription Microsoft MSI Installer + UTTypeIconFile + UTTypeIcons UTTypeIdentifier @@ -34,6 +87,8 @@ UTTypeDescription Microsoft Batch File + UTTypeIconFile + UTTypeIcons UTTypeIdentifier diff --git a/Whisky/Views/Bottle Views/BottleView.swift b/Whisky/Views/Bottle Views/BottleView.swift index ed24362f3..fe990b05f 100644 --- a/Whisky/Views/Bottle Views/BottleView.swift +++ b/Whisky/Views/Bottle Views/BottleView.swift @@ -138,8 +138,8 @@ struct BottleView: View { panel.canChooseDirectories = false panel.canChooseFiles = true panel.allowedContentTypes = [UTType.exe, - UTType(importedAs: "com.microsoft.msi-installer"), - UTType(importedAs: "com.microsoft.bat")] + UTType(exportedAs: "com.microsoft.msi-installer"), + UTType(exportedAs: "com.microsoft.bat")] panel.directoryURL = bottle.url.appending(path: "drive_c") panel.begin { result in programLoading = true