mirror of
https://github.com/processing/processing4.git
synced 2026-01-27 10:21:26 +01:00
Snap fixes
[skip ci]
This commit is contained in:
12
.github/workflows/release-gradle.yml
vendored
12
.github/workflows/release-gradle.yml
vendored
@@ -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 }}
|
||||
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 }}
|
||||
@@ -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<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>("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 }
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
// }
|
||||
|
||||
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user