diff --git a/.github/workflows/release-gradle.yml b/.github/workflows/release-gradle.yml index 55f5a2bdc..00656fd16 100644 --- a/.github/workflows/release-gradle.yml +++ b/.github/workflows/release-gradle.yml @@ -173,14 +173,4 @@ jobs: - 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 }} \ No newline at end of file + 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 }} \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ea9d86935..e219e45a6 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -50,7 +50,7 @@ compose.desktop { nativeDistributions{ modules("jdk.jdi", "java.compiler", "jdk.accessibility") - targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) + targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb, TargetFormat.Pkg) packageName = "Processing" macOS{ @@ -162,23 +162,23 @@ tasks.register("packageCustomDmg"){ app ) } -tasks.register("packagePkg"){ - onlyIf { org.gradle.internal.os.OperatingSystem.current().isMacOsX } - dependsOn("createDistributable") - group = "compose desktop" - val distributable = tasks.named("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("packagePkg"){ +// onlyIf { org.gradle.internal.os.OperatingSystem.current().isMacOsX } +// dependsOn("createDistributable") +// group = "compose desktop" +// val distributable = tasks.named("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("packageCustomMsi"){ onlyIf { org.gradle.internal.os.OperatingSystem.current().isWindows } @@ -223,21 +223,25 @@ tasks.register("generateSnapConfiguration"){ command: opt/processing/bin/Processing desktop: opt/processing/lib/processing-Processing.desktop environment: - LD_LIBRARY_PATH: ${'$'}SNAP/lib:${'$'}LD_LIBRARY_PATH + LD_LIBRARY_PATH: ${'$'}SNAPopt/processing/lib/runtime/lib:${'$'}LD_LIBRARY_PATH plugs: - desktop - desktop-legacy - wayland - x11 + - network parts: processing: 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) } diff --git a/app/src/processing/app/Platform.java b/app/src/processing/app/Platform.java index 8d4d28ddc..70e10b3fc 100644 --- a/app/src/processing/app/Platform.java +++ b/app/src/processing/app/Platform.java @@ -578,17 +578,17 @@ public class Platform { // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - static public void setenv(String variable, String value) { - inst.setenv(variable, value); - } - - - static public String getenv(String variable) { - return inst.getenv(variable); - } - - - static public int unsetenv(String variable) { - return inst.unsetenv(variable); - } +// static public void setenv(String variable, String value) { +// inst.setenv(variable, value); +// } +// +// +// static public String getenv(String variable) { +// return inst.getenv(variable); +// } +// +// +// static public int unsetenv(String variable) { +// return inst.unsetenv(variable); +// } } diff --git a/app/src/processing/app/platform/DefaultPlatform.java b/app/src/processing/app/platform/DefaultPlatform.java index c2b858093..18997755b 100644 --- a/app/src/processing/app/platform/DefaultPlatform.java +++ b/app/src/processing/app/platform/DefaultPlatform.java @@ -257,31 +257,31 @@ public class DefaultPlatform { // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - public interface CLibrary extends Library { - CLibrary INSTANCE = Native.load("c", CLibrary.class); - int setenv(String name, String value, int overwrite); - String getenv(String name); - int unsetenv(String name); - int putenv(String string); - } - - - public void setenv(String variable, String value) { - CLibrary clib = CLibrary.INSTANCE; - clib.setenv(variable, value, 1); - } - - - public String getenv(String variable) { - CLibrary clib = CLibrary.INSTANCE; - return clib.getenv(variable); - } - - - public int unsetenv(String variable) { - CLibrary clib = CLibrary.INSTANCE; - return clib.unsetenv(variable); - } +// public interface CLibrary extends Library { +// CLibrary INSTANCE = Native.load("c", CLibrary.class); +// int setenv(String name, String value, int overwrite); +// String getenv(String name); +// int unsetenv(String name); +// int putenv(String string); +// } +// +// +// public void setenv(String variable, String value) { +// CLibrary clib = CLibrary.INSTANCE; +// clib.setenv(variable, value, 1); +// } +// +// +// public String getenv(String variable) { +// CLibrary clib = CLibrary.INSTANCE; +// return clib.getenv(variable); +// } +// +// +// public int unsetenv(String variable) { +// CLibrary clib = CLibrary.INSTANCE; +// return clib.unsetenv(variable); +// } // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . diff --git a/app/src/processing/app/platform/LinuxPlatform.java b/app/src/processing/app/platform/LinuxPlatform.java index 15a8e3d5a..0d130a6e2 100644 --- a/app/src/processing/app/platform/LinuxPlatform.java +++ b/app/src/processing/app/platform/LinuxPlatform.java @@ -33,7 +33,7 @@ import processing.core.PApplet; public class LinuxPlatform extends DefaultPlatform { - String homeDir; + String homeDir = "~"; public void initBase(Base base) { @@ -98,7 +98,7 @@ public class LinuxPlatform extends DefaultPlatform { File configHome = null; // Check to see if the user has set a different location for their config - String configHomeEnv = getenv("XDG_CONFIG_HOME"); + String configHomeEnv = System.getenv("XDG_CONFIG_HOME"); if (configHomeEnv != null && !configHomeEnv.isBlank()) { configHome = new File(configHomeEnv); if (!configHome.exists()) {