-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Run Minetest update checker on startup #7629
Conversation
This, unfortunately, doesn't help with the biggest offender - Ubuntu. I've heard their policy was to remove update notifications and such from programs, but I can't find a citation for this (although I have seen one in firefox). Maybe they won't notice? :D |
It'd be nice if the update check interval can be selected from a pre-defined set of choices like so
|
That is indeed the policy of most distributions (including Debian and Ubuntu). It makes sense from their point of view, as users are not supposed to download Minetest directly from minetest.net according to them.
Is it really necessary to add one more configuration option just for this? We have a lot of them already. I think it would be enough to have a single boolean that controls whether updates should be checked daily. |
It would be nice if they also didn't provide an outdated version of a networked program :/ |
I feel that the user should have control over how often MT checks for updates, and I don't think one extra drop-down would do any harm. :) |
I don't think there is a need for the setting, personally. It adds more complexity and more settings is more things to test |
Just use the github last release API instead of full release API: |
|
"was found" somewhere in the dungeons of the internet? |
@@ -22,7 +22,7 @@ local function version_info_formspec(data) | |||
return ( | |||
"size[9,4.5,true]" .. | |||
"textarea[0.5,0.5;8.5,3;;" .. | |||
fgettext("A new Minetest version was found!") .. ";" .. | |||
fgettext("New Minetest version is available") .. ";" .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"A new Minetest version..." maybe? Sounds better and more like a full sentence... :)
The "never notify me again" tickbox is a bit misleading IMO, it should read "don't notify me on future updates" or so. I wouldn't expect from such a checkbox that it disabled notifications for future updates. |
I think not good, I suggest : Add a news column in main menu is not possible ? |
That's also a possibility, will adjust the PR accordingly.
Why? Referring the users to the official download page covers all (or at least should) platforms which we support. Official repositories tend to be outdated quickly and people can tick the checkbox once on the initial startup to never get a notification again. @MrChiantos This is possible but wouldn't provide enough new and helpful information since the (half/)yearly updates would be likely the only content. |
You're right, that suggestion was bullsh*t... |
How about setting the defaults via cmake flag, with it defaulting to no updates?
This would then work as wanted without depending on having the right minetest.conf ready or additional version information passed around. |
e2a1326
to
3f4effe
Compare
@t4im Thanks for your suggestion. I added the CMake config |
Well, anyone doing the windows development builds and daily ppa builds could flip this on as well. The idea behind the default was that someone cloning the git repository to compile it themselves would have a default of no-updates without having to opt-out. This ensures that no one has to switch it on and off all the time (assuming CI systems being used for daily development builds) |
BTW, what is the difference between "OK" and "Remind me later"? |
I think, "Ok" means something like "OK, I understood, don't tell me about this version again.". |
i think it can be good to embed the update API in server list or another such program which will cache the github API calls for 1h or more, and control the backend API in case of at a point a migration outside github will be done (i don't say in the next year, but maybe at a point github will have too many problems). |
This is done from my point of view, it's just that Android error that needs to be fixed |
Maybe rebasing fixes the Android issue? 🤔 I also squashed closely related commits to keep the overview. |
If this is broken on Android and we want it for 5.6 maybe it could just be disabled on there? Most users get MT via an app store anyway (which takes care of updates). |
Actually the variable is merely missing here: minetest/android/native/build.gradle Lines 13 to 17 in 6df69f9
|
This feature is enabled by default for release builds. Package maintainers may use -DENABLE_UPDATE_CHECKER=0 to disable this. Co-authored-by: rubenwardy <[email protected]>
Nice catch, thank you @sfan5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works:)
I pushed a commit that fixes some potential issues (and moves a few lines around for no reason) and tested the feature. In principle this has my +1. Just two things:
|
The following should work to detect if we're still in the main menu (and not some dialog): Testing code: --- a/builtin/mainmenu/tab_about.lua
+++ b/builtin/mainmenu/tab_about.lua
@@ -141,7 +141,10 @@ return {
end,
cbf_button_handler = function(this, fields, name, tabdata)
if fields.homepage then
- core.open_url("https://www.minetest.net")
+ core.handle_async(function(_) os.execute("sleep 5") end, "",
+ function()
+ print(dump(_G.ui))
+ end)
end
if fields.share_debug then click the homepage button, switch to some other part of the menu and see what the internal state looks like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works.
However, the version checking is not optimal (relies onMINOR.MAJOR.PATCH
) and GitHub seems to limit the API page calls (source).core.get_version
should probably also be extended by ais_dev_build
field to get around the ugly detection.See #7629 (comment) for the current status and testing instructions.