diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5323a1a829..5491d85487 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -424,7 +424,6 @@ tasks.register("renameWindres") { } tasks.register("includeProcessingResources"){ dependsOn( - "includeJdk", "includeCore", "includeJavaMode", "includeSharedAssets", @@ -433,6 +432,7 @@ tasks.register("includeProcessingResources"){ "includeJavaModeResources", "renameWindres" ) + mustRunAfter("includeJdk") finalizedBy("signResources") } @@ -539,6 +539,7 @@ afterEvaluate { dependsOn("includeProcessingResources") } tasks.named("createDistributable").configure { + dependsOn("includeJdk") finalizedBy("setExecutablePermissions") } } diff --git a/app/src/processing/app/UpdateCheck.java b/app/src/processing/app/UpdateCheck.java index 1bfa296882..e18daee3eb 100644 --- a/app/src/processing/app/UpdateCheck.java +++ b/app/src/processing/app/UpdateCheck.java @@ -35,6 +35,7 @@ import processing.core.PApplet; + /** * Threaded class to check for updates in the background. *

@@ -112,6 +113,7 @@ public void updateCheck() throws IOException { System.getProperty("os.arch")); int latest = readInt(LATEST_URL + "?" + info); + int revision = Base.getRevision(); String lastString = Preferences.get("update.last"); long now = System.currentTimeMillis(); @@ -125,18 +127,19 @@ public void updateCheck() throws IOException { Preferences.set("update.last", String.valueOf(now)); if (base.activeEditor != null) { -// boolean offerToUpdateContributions = true; - if (latest > Base.getRevision()) { + if (latest > revision) { System.out.println("You are running Processing revision 0" + - Base.getRevision() + ", the latest build is 0" + + revision + ", the latest build is 0" + latest + "."); // Assume the person is busy downloading the latest version // offerToUpdateContributions = !promptToVisitDownloadPage(); promptToVisitDownloadPage(); } - if(latest < Base.getRevision()){ - WelcomeToBeta.showWelcomeToBeta(); + + int lastBetaWelcomeSeen = Preferences.getInteger("update.beta_welcome"); + if(latest < revision && revision != lastBetaWelcomeSeen ) { + WelcomeToBeta.showWelcomeToBeta(); } /* diff --git a/app/src/processing/app/ui/WelcomeToBeta.kt b/app/src/processing/app/ui/WelcomeToBeta.kt index d7492fa6aa..7757e820f6 100644 --- a/app/src/processing/app/ui/WelcomeToBeta.kt +++ b/app/src/processing/app/ui/WelcomeToBeta.kt @@ -35,6 +35,7 @@ import com.mikepenz.markdown.m2.markdownColor import com.mikepenz.markdown.m2.markdownTypography import com.mikepenz.markdown.model.MarkdownColors import com.mikepenz.markdown.model.MarkdownTypography +import processing.app.Preferences import processing.app.Base.getRevision import processing.app.Base.getVersionName import processing.app.ui.theme.LocalLocale @@ -61,7 +62,10 @@ class WelcomeToBeta { val mac = SystemInfo.isMacFullWindowContentSupported SwingUtilities.invokeLater { JFrame(windowTitle).apply { - val close = { dispose() } + val close = { + Preferences.set("update.beta_welcome", getRevision().toString()) + dispose() + } rootPane.putClientProperty("apple.awt.transparentTitleBar", mac) rootPane.putClientProperty("apple.awt.fullWindowContent", mac) defaultCloseOperation = JFrame.DISPOSE_ON_CLOSE diff --git a/build/shared/lib/defaults.txt b/build/shared/lib/defaults.txt index 6e3e00f0d6..1cfc190ca9 100644 --- a/build/shared/lib/defaults.txt +++ b/build/shared/lib/defaults.txt @@ -76,6 +76,10 @@ theme.gradient.method = rgb # on how many people are using Processing) update.check = true +# default value for beta_welcome +# -1 means no beta has been run +update.beta_welcome = -1 + # on windows, automatically associate .pde files with processing.exe platform.auto_file_type_associations = true