mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
App Store upload & Snap fix
[skip ci]
This commit is contained in:
@@ -169,4 +169,18 @@ jobs:
|
||||
if: runner.os == 'Linux'
|
||||
run: snapcraft upload app/build/compose/binaries/main/${{ matrix.binary }}.${{ matrix.extension }}
|
||||
env:
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.PROCESSING_SNAPCRAFT_TOKEN }}
|
||||
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.PROCESSING_SNAPCRAFT_TOKEN }}
|
||||
|
||||
- name: Upload pkg to App Store
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
xcrun altool
|
||||
--upload-package app/build/compose/binaries/main/pkg/Processing-${{ needs.version.outputs.version }}.pkg
|
||||
--type macos
|
||||
--asc-public-id ${{ secrets.PROCESSING_STORE_PUBLIC_ID }}
|
||||
--apple-id ${{ secrets.PROCESSING_STORE_APP_ID }}
|
||||
--bundle-id ${{ vars.GRADLE_GROUP }}.app
|
||||
--bundle-short-version-string ${{ needs.version.outputs.version }}
|
||||
--bundle-version ${{ needs.version.outputs.version }}
|
||||
--username ${{ secrets.PROCESSING_APPLE_ID }}
|
||||
--password ${{ secrets.PROCESSING_APP_PASSWORD }}
|
||||
+22
-8
@@ -50,7 +50,7 @@ compose.desktop {
|
||||
|
||||
nativeDistributions{
|
||||
modules("jdk.jdi", "java.compiler", "jdk.accessibility")
|
||||
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb, TargetFormat.Pkg)
|
||||
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
||||
packageName = "Processing"
|
||||
|
||||
macOS{
|
||||
@@ -162,6 +162,23 @@ tasks.register<Exec>("packageCustomDmg"){
|
||||
app
|
||||
)
|
||||
}
|
||||
tasks.register<Exec>("packagePkg"){
|
||||
onlyIf { org.gradle.internal.os.OperatingSystem.current().isMacOsX }
|
||||
dependsOn("createDistributable")
|
||||
group = "compose desktop"
|
||||
val distributable = tasks.named<AbstractJPackageTask>("createDistributable").get()
|
||||
val app = distributable.destinationDir.get().file("${distributable.packageName.get()}.app").asFile
|
||||
val target = app.parentFile.parentFile.resolve("pkg/${distributable.packageName.get()}-$version.pkg")
|
||||
target.parentFile.mkdirs()
|
||||
|
||||
commandLine("pkgbuild",
|
||||
"--install-location", "/Applications",
|
||||
"--identifier", "${rootProject.group}.app",
|
||||
"--version", version,
|
||||
"--component", app,
|
||||
target
|
||||
)
|
||||
}
|
||||
|
||||
tasks.register<Exec>("packageCustomMsi"){
|
||||
onlyIf { org.gradle.internal.os.OperatingSystem.current().isWindows }
|
||||
@@ -205,6 +222,8 @@ tasks.register("generateSnapConfiguration"){
|
||||
processing:
|
||||
command: opt/processing/bin/Processing
|
||||
desktop: opt/processing/lib/processing-Processing.desktop
|
||||
environment:
|
||||
LD_LIBRARY_PATH: ${'$'}SNAP/lib:${'$'}LD_LIBRARY_PATH
|
||||
plugs:
|
||||
- desktop
|
||||
- desktop-legacy
|
||||
@@ -216,12 +235,9 @@ tasks.register("generateSnapConfiguration"){
|
||||
plugin: dump
|
||||
source: deb/processing_$version-1_$snaparch.deb
|
||||
source-type: deb
|
||||
stage-packages:
|
||||
- openjdk-17-jdk
|
||||
override-prime: |
|
||||
snapcraftctl prime
|
||||
chmod -R +x opt/processing/lib/app/resources/jdk-*
|
||||
rm -vf usr/lib/jvm/java-17-openjdk-*/lib/security/cacerts
|
||||
""".trimIndent()
|
||||
dir.file("../snapcraft.yaml").asFile.writeText(content)
|
||||
}
|
||||
@@ -249,14 +265,12 @@ tasks.register<Zip>("zipDistributable"){
|
||||
}
|
||||
|
||||
afterEvaluate{
|
||||
tasks.named("createDistributable").configure{
|
||||
finalizedBy("zipDistributable")
|
||||
}
|
||||
tasks.named("packageDmg").configure{
|
||||
dependsOn("packageCustomDmg")
|
||||
group = "compose desktop"
|
||||
actions = emptyList()
|
||||
}
|
||||
|
||||
tasks.named("packageMsi").configure{
|
||||
dependsOn("packageCustomMsi")
|
||||
group = "compose desktop"
|
||||
@@ -268,7 +282,7 @@ afterEvaluate{
|
||||
){
|
||||
dependsOn("notarizeDmg")
|
||||
}
|
||||
dependsOn("packageSnap")
|
||||
dependsOn("packageSnap", "zipDistributable", "packagePkg")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user