<NeedToBeUpdated> is always "yes"
-
Because the forum won’t let me post links. “You need 5 reputation to post links.” Can’t even leave the “@” and your username at the beginning of my reply. Sorry!
-
OK, understood.
You should NOW have 5 reputation points, as I upvoted 5 of your posts. -
@tfnab said in <NeedToBeUpdated> is always "yes":
You need 5 reputation to post links
The threshold has now been lowered to 1. Sorry for the inconvenience
-
@tfnab said in <NeedToBeUpdated> is always "yes":
Yes, I’m using the API “wrong”.
When I saw that bit in the documentation about needing to remove the extra dots before calling the API I was wondering why the API could not have dealt with this itself.
I started doing the mental gymnastics but discovered I’m no longer that flexible. I’ll need to write down the various permutations and see what breaks, for example, should someone call the API with a version greater than the current version using both dotted and dot removed version numbers, and the best way to normalize the value passed to the API.
-
@mkupper I may be blind… is that PHP script in the GitHub repo somewhere? If so I’d be more than happy to have a look myself and possibly provide a patch.
-
@tfnab It’s part of the WinGUP project and is at https://github.com/gup4win/wingup/blob/master/src/ConfigFiles/getDownLoadUrl.php
GUP.exe that ships with Notepad++ and is run when someone does a check for updates.
I don’t know if @donho has been keeping the WinGUP project up to date when he make changes to https://notepad-plus-plus.org/update/getDownloadUrl.php
-
@mkupper Given that
param
(which is used to distinguish between 32-bit and 64-bit versions) isn’t really used in the update check script I would assume it’s not up to date. Hence I’m not going to bother forking and creating a pull request… maybe this is of help anyway:I would simply replace this (line 25)
if ($curentVersion >= $lastestVersion)
with this:
if (substr_count($curentVersion,'.') > 1 && version_compare($curentVersion,$lastestVersionStr,'>=') || $curentVersion >= $lastestVersion)
I think it should cover all scenarios, at least the ones I can think of.
-
Thank you @tfnab
I have posted the issue to github and also cross-posted it as a v8.5.7 regression.
FWIW, I ran a test from Powershell wihch confirmed your findings:
( gci 'C:\npp\npp853-RTM\notepad++.exe' ).VersionInfo.ProductVersion -> 8.53 ( gci 'C:\npp\npp854-RC1\notepad++.exe' ).VersionInfo.ProductVersion -> 8.54 ( gci 'C:\npp\npp854-RC2\notepad++.exe' ).VersionInfo.ProductVersion -> 8.54 ( gci 'C:\npp\npp854-RTM\notepad++.exe' ).VersionInfo.ProductVersion -> 8.54 ( gci 'C:\npp\npp855-RC1\notepad++.exe' ).VersionInfo.ProductVersion -> 8.55 ( gci 'C:\npp\npp856-RTM\notepad++.exe' ).VersionInfo.ProductVersion -> 8.56 ( gci 'C:\npp\npp857-RC1\notepad++.exe' ).VersionInfo.ProductVersion -> 8.5.7 ( gci 'C:\npp\npp857-RTM\notepad++.exe' ).VersionInfo.ProductVersion -> 8.5.7
-
M mkupper referenced this topic on
-
https://notepad-plus-plus.org/update/getDownloadUrl.php is internal URL for Notepad++ packages doing self auto-updating, but it not supposed for outside usage (from any individual or IT people of enterprise doing it manually). Therefore no support for the internal URL normally.
However, I have no way so far to hide the URL from outside, so I will explain how it does work.
From the v8.5.7, Notepad++ has changed its displayed version (from X.YZ to X.Y.Z) but keep its old version notation (X.YZ) as internal use for keeping the auto-update working.
So if you want to use Notepad++ internal URL for your update use, and your Notepad++ version is X.Y.Z (Y & Z are always 1 digit) you have to pass https://notepad-plus-plus.org/update/getDownloadUrl.php?version=X.YZ to make it work. For the case of v8.5.7, it’ll be https://notepad-plus-plus.org/update/getDownloadUrl.php?version=8.57
Note that getDownloadUrl.php could change its way to manage the auto-update in the future. Since it’s an internal used URL, there’s no warranty to keep its retro-compatibility.
Hope this explanation helps.
-
@donho All understood perfectly well.
Please consider change of policy (and of the update check web service) anyway!
In some environments auto updates cannot be used. Reasons include (but not limited to): users don’t have admin privileges, “golden image” cannot be changed at runtime.
For those scenarios it would still be nice to have update checks. After all it worked nice with the file properties version up until 8.56/8.5.6
You changed the version scheme of that displayed version in 8.5.7 catering to people who run external version control mechanisms. So following the same reasoning please consider this one additional small change to address what is practically the same requirement! It would be highly appreciated.
-
FYI
https://notepad-plus-plus.org/update/getDownloadUrl.php has been modified.
It work with bothX.Y.Z
andX.YZ
now. -
@donho Thanks a lot. This is much appreciated.
You’ve broken one other feature along the way: the guide says:
if you just paste https://notepad-plus-plus.org/update/getDownloadUrl.php into your browser’s address bar, you will only get a generic answer that currently contains this http download url:
http://notepad-plus-plus.org/repository/7.x/7.5.9/npp.7.5.9.Installer.exe
This is no longer the case. Omitting the version parameter just returns this:
<GUP><NeedToBeUpdated>no</NeedToBeUpdated></GUP>
instead of the latest version number and download link. Tbh it doesn’t affect me, but maybe someone else cares?
-
M mkupper referenced this topic on