Skip to content

Display Welcome to Beta once per revision #1203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ tasks.register<Copy>("renameWindres") {
}
tasks.register("includeProcessingResources"){
dependsOn(
"includeJdk",
"includeCore",
"includeJavaMode",
"includeSharedAssets",
Expand All @@ -433,6 +432,7 @@ tasks.register("includeProcessingResources"){
"includeJavaModeResources",
"renameWindres"
)
mustRunAfter("includeJdk")
finalizedBy("signResources")
}

Expand Down Expand Up @@ -539,6 +539,7 @@ afterEvaluate {
dependsOn("includeProcessingResources")
}
tasks.named("createDistributable").configure {
dependsOn("includeJdk")
finalizedBy("setExecutablePermissions")
}
}
13 changes: 8 additions & 5 deletions app/src/processing/app/UpdateCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import processing.core.PApplet;



/**
* Threaded class to check for updates in the background.
* <p/>
Expand Down Expand Up @@ -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();
Expand All @@ -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();
}

/*
Expand Down
6 changes: 5 additions & 1 deletion app/src/processing/app/ui/WelcomeToBeta.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions build/shared/lib/defaults.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading