Skip to content

Commit 624fdf3

Browse files
committed
Adding File associastions on macOS and Windows through the same system as Linux
1 parent ab3ce63 commit 624fdf3

File tree

2 files changed

+8
-63
lines changed

2 files changed

+8
-63
lines changed

app/build.gradle.kts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ compose.desktop {
6363
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
6464
packageName = "Processing"
6565

66+
67+
68+
69+
fileAssociation("application/x-processing","pde", "Processing Source Code",rootProject.file("build/shared/lib/icons/pde-512.png"), rootProject.file("build/windows/pde.ico"), rootProject.file("build/macos/pde.icns"))
70+
fileAssociation("application/x-processing","pyde", "Processing Python Source Code",rootProject.file("build/shared/lib/icons/pde-512.png"), rootProject.file("build/windows/pde.ico"), rootProject.file("build/macos/pde.icns"))
71+
fileAssociation("application/x-processing","pdez", "Processing Sketch Bundle",rootProject.file("build/shared/lib/icons/pde-512.png"), rootProject.file("build/windows/pdze.ico"), rootProject.file("build/macos/pdez.icns"))
72+
fileAssociation("application/x-processing","pdex", "Processing Contribution Bundle", rootProject.file("build/shared/lib/icons/pde-512.png"), rootProject.file("build/windows/pdex.ico"), rootProject.file("build/macos/pdex.icns"))
73+
6674
macOS{
6775
bundleID = "${rootProject.group}.app"
6876
iconFile = rootProject.file("build/macos/processing.icns")
@@ -87,10 +95,6 @@ compose.desktop {
8795
// Fix fonts on some Linux distributions
8896
jvmArgs("-Dawt.useSystemAAFontSettings=on")
8997

90-
fileAssociation("application/x-processing","pde", "Processing Source Code",rootProject.file("build/shared/lib/icons/pde-512.png"))
91-
fileAssociation("application/x-processing","pyde", "Processing Python Source Code",rootProject.file("build/shared/lib/icons/pde-512.png"))
92-
fileAssociation("application/x-processing","pdez", "Processing Sketch Bundle",rootProject.file("build/shared/lib/icons/pde-512.png"))
93-
fileAssociation("application/x-processing","pdex", "Processing Contribution Bundle", rootProject.file("build/shared/lib/icons/pde-512.png"))
9498
}
9599
}
96100
}

app/macos/info.plist

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -9,65 +9,6 @@
99
</array>
1010
</dict>
1111
</array>
12-
<key>CFBundleDocumentTypes</key>
13-
<array>
14-
<dict>
15-
<key>CFBundleTypeExtensions</key>
16-
<array>
17-
<string>pde</string>
18-
</array>
19-
<key>LSTypeIsPackage</key>
20-
<false/>
21-
<key>CFBundleTypeIconFile</key>
22-
<string>macos/pde.icns</string>
23-
<key>CFBundleTypeName</key>
24-
<string>Processing Source Code</string>
25-
<key>CFBundleTypeRole</key>
26-
<string>Editor</string>
27-
</dict>
28-
<dict>
29-
<key>CFBundleTypeExtensions</key>
30-
<array>
31-
<string>pyde</string>
32-
</array>
33-
<key>LSTypeIsPackage</key>
34-
<false/>
35-
<key>CFBundleTypeIconFile</key>
36-
<string>macos/pde.icns</string>
37-
<key>CFBundleTypeName</key>
38-
<string>Processing Python Source Code</string>
39-
<key>CFBundleTypeRole</key>
40-
<string>Editor</string>
41-
</dict>
42-
<dict>
43-
<key>CFBundleTypeExtensions</key>
44-
<array>
45-
<string>pdez</string>
46-
</array>
47-
<key>LSTypeIsPackage</key>
48-
<false/>
49-
<key>CFBundleTypeIconFile</key>
50-
<string>macos/pdez.icns</string>
51-
<key>CFBundleTypeName</key>
52-
<string>Processing Sketch Bundle</string>
53-
<key>CFBundleTypeRole</key>
54-
<string>Editor</string>
55-
</dict>
56-
<dict>
57-
<key>CFBundleTypeExtensions</key>
58-
<array>
59-
<string>pdex</string>
60-
</array>
61-
<key>LSTypeIsPackage</key>
62-
<false/>
63-
<key>CFBundleTypeIconFile</key>
64-
<string>macos/pdex.icns</string>
65-
<key>CFBundleTypeName</key>
66-
<string>Processing Contribution Bundle</string>
67-
<key>CFBundleTypeRole</key>
68-
<string>Viewer</string>
69-
</dict>
70-
</array>
7112
<key>NSCameraUsageDescription</key>
7213
<string>The sketch you're running needs access to your video camera.</string>
7314
<key>NSMicrophoneUsageDescription</key>

0 commit comments

Comments
 (0)