Skip to content

Commit 22e3ec9

Browse files
committed
Add macOS pde:// and file associations
1 parent 5402de2 commit 22e3ec9

1 file changed

Lines changed: 75 additions & 1 deletion

File tree

app/build.gradle.kts

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ compose.desktop {
4848
bundleID = "org.processing.app"
4949
iconFile = project.file("../build/macos/processing.icns")
5050
infoPlist{
51-
51+
extraKeysRawXml = plistStrings
5252
}
5353
}
5454
windows{
@@ -202,3 +202,77 @@ afterEvaluate {
202202
}
203203
tasks.findByName("createDistributable")?.finalizedBy("setExecutablePermissions")
204204
}
205+
206+
val plistStrings: String
207+
get() = """
208+
<key>CFBundleURLTypes</key>
209+
<array>
210+
<dict>
211+
<key>CFBundleURLName</key>
212+
<string>org.processing.app</string>
213+
<key>CFBundleURLSchemes</key>
214+
<array>
215+
<string>pde</string>
216+
</array>
217+
</dict>
218+
</array>
219+
<key>CFBundleDocumentTypes</key>
220+
<array>
221+
<dict>
222+
<key>CFBundleTypeExtensions</key>
223+
<array>
224+
<string>pde</string>
225+
</array>
226+
<key>LSTypeIsPackage</key>
227+
<false/>
228+
<key>CFBundleTypeIconFile</key>
229+
<string>macos/pde.icns</string>
230+
<key>CFBundleTypeName</key>
231+
<string>Processing Source Code</string>
232+
<key>CFBundleTypeRole</key>
233+
<string>Editor</string>
234+
</dict>
235+
<dict>
236+
<key>CFBundleTypeExtensions</key>
237+
<array>
238+
<string>pyde</string>
239+
</array>
240+
<key>LSTypeIsPackage</key>
241+
<false/>
242+
<key>CFBundleTypeIconFile</key>
243+
<string>macos/pde.icns</string>
244+
<key>CFBundleTypeName</key>
245+
<string>Processing Python Source Code</string>
246+
<key>CFBundleTypeRole</key>
247+
<string>Editor</string>
248+
</dict>
249+
<dict>
250+
<key>CFBundleTypeExtensions</key>
251+
<array>
252+
<string>pdez</string>
253+
</array>
254+
<key>LSTypeIsPackage</key>
255+
<false/>
256+
<key>CFBundleTypeIconFile</key>
257+
<string>macos/pdez.icns</string>
258+
<key>CFBundleTypeName</key>
259+
<string>Processing Sketch Bundle</string>
260+
<key>CFBundleTypeRole</key>
261+
<string>Editor</string>
262+
</dict>
263+
<dict>
264+
<key>CFBundleTypeExtensions</key>
265+
<array>
266+
<string>pdex</string>
267+
</array>
268+
<key>LSTypeIsPackage</key>
269+
<false/>
270+
<key>CFBundleTypeIconFile</key>
271+
<string>macos/pdex.icns</string>
272+
<key>CFBundleTypeName</key>
273+
<string>Processing Contribution Bundle</string>
274+
<key>CFBundleTypeRole</key>
275+
<string>Viewer</string>
276+
</dict>
277+
</array>
278+
""".trimIndent()

0 commit comments

Comments
 (0)