Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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")
}
}
18 changes: 15 additions & 3 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 @@ -125,7 +126,6 @@ public void updateCheck() throws IOException {
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" +
Expand All @@ -135,8 +135,20 @@ public void updateCheck() throws IOException {
// offerToUpdateContributions = !promptToVisitDownloadPage();
promptToVisitDownloadPage();
}
if(latest < Base.getRevision()){
WelcomeToBeta.showWelcomeToBeta();

String lastBetaSeenStr = Preferences.get("beta.last_beta_welcome_seen");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say using Preferences.getInteger() would be a better choice here, to make sure it is never empty you can add the key to the defaults.txt in build/shared/lib/defaults.txt

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 + ".");

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will remove this, i suppose

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, feel free to use Messages.log that will be hidden for users and will give us valuable information when looking at the logs


if(latest < revision && revision != lastBetaSeen ) {
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("beta.last_beta_welcome_seen", getRevision().toString())
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i need a better key name. wondering your thoughts. should it be update.beta_welcome or something?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update.beta_prompt

dispose()
}
rootPane.putClientProperty("apple.awt.transparentTitleBar", mac)
rootPane.putClientProperty("apple.awt.fullWindowContent", mac)
defaultCloseOperation = JFrame.DISPOSE_ON_CLOSE
Expand Down
Loading