Display once per revision number

This commit is contained in:
Moon D.
2025-08-13 15:29:04 -04:00
parent 3f36db5742
commit 511dd3a636
3 changed files with 22 additions and 5 deletions
+2 -1
View File
@@ -424,7 +424,6 @@ tasks.register<Copy>("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")
}
}
+15 -3
View File
@@ -35,6 +35,7 @@ import processing.app.ui.WelcomeToBeta;
import processing.core.PApplet;
/**
* Threaded class to check for updates in the background.
* <p/>
@@ -125,7 +126,6 @@ public class UpdateCheck {
Preferences.set("update.last", String.valueOf(now));
if (base.activeEditor != null) {
// boolean offerToUpdateContributions = true;
if (latest > Base.getRevision()) {
System.out.println("You are running Processing revision 0" +
@@ -135,8 +135,20 @@ public class UpdateCheck {
// offerToUpdateContributions = !promptToVisitDownloadPage();
promptToVisitDownloadPage();
}
if(latest < Base.getRevision()){
WelcomeToBeta.showWelcomeToBeta();
String lastBetaSeenStr = Preferences.get("beta.last_beta_welcome_seen");
int lastBetaSeen = 0;
if (lastBetaSeenStr != null) {
lastBetaSeen = Integer.parseInt(lastBetaSeenStr);
}
int revision = Base.getRevision();
System.err.println("MOON DEBUG" +
Base.getRevision() + ", and lastBetaSeen is " +
lastBetaSeen + ".");
if(latest < revision && revision != lastBetaSeen ) {
WelcomeToBeta.showWelcomeToBeta();
}
/*
+5 -1
View File
@@ -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("beta.last_beta_welcome_seen", getRevision().toString())
dispose()
}
rootPane.putClientProperty("apple.awt.transparentTitleBar", mac)
rootPane.putClientProperty("apple.awt.fullWindowContent", mac)
defaultCloseOperation = JFrame.DISPOSE_ON_CLOSE