Explorar o código

Update macOS build process

Ruben hai 6 meses
pai
achega
b3e8a28a3c
Modificáronse 2 ficheiros con 129 adicións e 1 borrados
  1. 45 1
      Build/Build Avalonia.MacOS.ps1
  2. 84 0
      src/PicView.Core.MacOS/Info.plist

+ 45 - 1
Build/Build Avalonia.MacOS.ps1

@@ -70,7 +70,7 @@ $infoPlistContent = @"
     <key>CFBundleDisplayName</key>
     <string>PicView</string>
     <key>CFBundleIdentifier</key>
-    <string>ruben2776.picview</string>
+    <string>com.ruben2776.picview</string>
     <key>CFBundleVersion</key>
     <string>${appVersion}</string>
     <key>CFBundlePackageType</key>
@@ -99,6 +99,50 @@ $infoPlistContent = @"
     <false/>
 	<key>LSApplicationCategoryType</key>
     <string>public.app-category.graphics-design</string>
+       <key>CFBundleDocumentTypes</key>
+        <array>
+            <dict>
+                <key>CFBundleTypeName</key>
+                <string>Image File</string>
+                <key>LSItemContentTypes</key>
+                <array>
+                    <string>public.png</string>
+                    <string>public.jpeg</string>
+                    <string>public.jpg</string>
+                    <string>public.gif</string>
+                    <string>public.tiff</string>
+                    <string>public.bmp</string>
+                    <string>public.ico</string>
+                    <string>public.svg-image</string>
+                    <string>org.webmproject.webp</string>
+                    <string>org.khronos.avif</string>
+                </array>
+                <key>CFBundleTypeRole</key>
+                <string>Viewer</string>
+            </dict>
+        </array>
+        <key>UTExportedTypeDeclarations</key>
+        <array>
+            <dict>
+                <key>UTTypeIdentifier</key>
+                <string>org.khronos.avif</string>
+                <key>UTTypeConformsTo</key>
+                <array>
+                    <string>public.image</string>
+                </array>
+                <key>UTTypeDescription</key>
+                <string>AVIF Image</string>
+                <key>UTTypeTagSpecification</key>
+                <dict>
+                    <key>public.filename-extension</key>
+                    <array>
+                        <string>avif</string>
+                    </array>
+                    <key>public.mime-type</key>
+                    <string>image/avif</string>
+                </dict>
+            </dict>
+        </array>
 </dict>
 </plist>
 "@

+ 84 - 0
src/PicView.Core.MacOS/Info.plist

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+    <dict>
+        <key>CFBundleName</key>
+        <string>PicView</string>
+        <key>CFBundleDisplayName</key>
+        <string>PicView</string>
+        <key>CFBundleIdentifier</key>
+        <string>com.ruben2776.picview</string>
+        <key>CFBundleVersion</key>
+        <string>{{appVersion}}</string>
+        <key>CFBundlePackageType</key>
+        <string>APPL</string>
+        <key>CFBundleSignature</key>
+        <string>????</string>
+        <key>CFBundleExecutable</key>
+        <string>PicView</string>
+        <key>CFBundleIconFile</key>
+        <string>AppIcon.icns</string>
+        <key>CFBundleShortVersionString</key>
+        <string>{{appVersion}}</string>
+        <key>LSMinimumSystemVersion</key>
+        <string>10.15</string>
+        <key>NSHighResolutionCapable</key>
+        <true/>
+        <key>LSArchitecturePriority</key>
+        <array>
+            <string>$Platform</string>
+        </array>
+        <key>CFBundleSupportedPlatforms</key>
+        <array>
+            <string>MacOSX</string>
+        </array>
+        <key>NSRequiresAquaSystemAppearance</key>
+        <false/>
+        <key>LSApplicationCategoryType</key>
+        <string>public.app-category.graphics-design</string>
+        <key>CFBundleDocumentTypes</key>
+        <array>
+            <dict>
+                <key>CFBundleTypeName</key>
+                <string>Image File</string>
+                <key>LSItemContentTypes</key>
+                <array>
+                    <string>public.png</string>
+                    <string>public.jpeg</string>
+                    <string>public.jpg</string>
+                    <string>public.gif</string>
+                    <string>public.tiff</string>
+                    <string>public.bmp</string>
+                    <string>public.ico</string>
+                    <string>public.svg-image</string>
+                    <string>org.webmproject.webp</string>
+                    <string>org.khronos.avif</string>
+                </array>
+                <key>CFBundleTypeRole</key>
+                <string>Viewer</string>
+            </dict>
+        </array>
+        <key>UTExportedTypeDeclarations</key>
+        <array>
+            <dict>
+                <key>UTTypeIdentifier</key>
+                <string>org.khronos.avif</string>
+                <key>UTTypeConformsTo</key>
+                <array>
+                    <string>public.image</string>
+                </array>
+                <key>UTTypeDescription</key>
+                <string>AVIF Image</string>
+                <key>UTTypeTagSpecification</key>
+                <dict>
+                    <key>public.filename-extension</key>
+                    <array>
+                        <string>avif</string>
+                    </array>
+                    <key>public.mime-type</key>
+                    <string>image/avif</string>
+                </dict>
+            </dict>
+        </array>
+    </dict>
+</plist>