@@ -50,7 +50,7 @@ compose.desktop {
5050
5151 nativeDistributions{
5252 modules(" jdk.jdi" , " java.compiler" , " jdk.accessibility" )
53- targetFormats(TargetFormat .Dmg , TargetFormat .Msi , TargetFormat .Deb )
53+ targetFormats(TargetFormat .Dmg , TargetFormat .Msi , TargetFormat .Deb , TargetFormat . Pkg )
5454 packageName = " Processing"
5555
5656 macOS{
@@ -162,23 +162,23 @@ tasks.register<Exec>("packageCustomDmg"){
162162 app
163163 )
164164}
165- tasks.register<Exec >(" packagePkg" ){
166- onlyIf { org.gradle.internal.os.OperatingSystem .current().isMacOsX }
167- dependsOn(" createDistributable" )
168- group = " compose desktop"
169- val distributable = tasks.named<AbstractJPackageTask >(" createDistributable" ).get()
170- val app = distributable.destinationDir.get().file(" ${distributable.packageName.get()} .app" ).asFile
171- val target = app.parentFile.parentFile.resolve(" pkg/${distributable.packageName.get()} -$version .pkg" )
172- target.parentFile.mkdirs()
173-
174- commandLine(" pkgbuild" ,
175- " --install-location" , " /Applications" ,
176- " --identifier" , " ${rootProject.group} .app" ,
177- " --version" , version,
178- " --component" , app,
179- target
180- )
181- }
165+ // tasks.register<Exec>("packagePkg"){
166+ // onlyIf { org.gradle.internal.os.OperatingSystem.current().isMacOsX }
167+ // dependsOn("createDistributable")
168+ // group = "compose desktop"
169+ // val distributable = tasks.named<AbstractJPackageTask>("createDistributable").get()
170+ // val app = distributable.destinationDir.get().file("${distributable.packageName.get()}.app").asFile
171+ // val target = app.parentFile.parentFile.resolve("pkg/${distributable.packageName.get()}-$version.pkg")
172+ // target.parentFile.mkdirs()
173+ //
174+ // commandLine("pkgbuild",
175+ // "--install-location", "/Applications",
176+ // "--identifier", "${rootProject.group}.app",
177+ // "--version", version,
178+ // "--component", app,
179+ // target
180+ // )
181+ // }
182182
183183tasks.register<Exec >(" packageCustomMsi" ){
184184 onlyIf { org.gradle.internal.os.OperatingSystem .current().isWindows }
@@ -223,21 +223,25 @@ tasks.register("generateSnapConfiguration"){
223223 command: opt/processing/bin/Processing
224224 desktop: opt/processing/lib/processing-Processing.desktop
225225 environment:
226- LD_LIBRARY_PATH: ${' $' } SNAP /lib:${' $' } LD_LIBRARY_PATH
226+ LD_LIBRARY_PATH: ${' $' } SNAPopt/processing/lib/runtime /lib:${' $' } LD_LIBRARY_PATH
227227 plugs:
228228 - desktop
229229 - desktop-legacy
230230 - wayland
231231 - x11
232+ - network
232233
233234 parts:
234235 processing:
235236 plugin: dump
236237 source: deb/processing_$version -1_$snaparch .deb
237238 source-type: deb
239+ stage-packages:
240+ - openjdk-17-jdk
238241 override-prime: |
239242 snapcraftctl prime
240243 chmod -R +x opt/processing/lib/app/resources/jdk-*
244+ rm -vf usr/lib/jvm/java-17-openjdk-*/lib/security/cacerts
241245 """ .trimIndent()
242246 dir.file(" ../snapcraft.yaml" ).asFile.writeText(content)
243247}
0 commit comments