Skip to content
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

Add "Check for Updates" functionality #41

Open
cbrnr opened this issue Mar 3, 2017 · 20 comments
Open

Add "Check for Updates" functionality #41

cbrnr opened this issue Mar 3, 2017 · 20 comments

Comments

@cbrnr
Copy link
Owner

cbrnr commented Mar 3, 2017

We should add a menu entry to check for SigViewer updates.

@Yida-Lin
Copy link
Contributor

Yida-Lin commented Mar 9, 2017

Let's reference to the description here.

@Yida-Lin
Copy link
Contributor

@cbrnr Hi Clemens,

Shall we include this feature for our next release? We simply need to create an online repository and let the Qt Maintenance tool handle the update. What do you think?

http://doc.qt.io/qtinstallerframework/ifw-updates.html

@cbrnr
Copy link
Owner Author

cbrnr commented Mar 27, 2017

Where can we set up the repository?

@Yida-Lin
Copy link
Contributor

@cbrnr That's what I am not exactly sure about... I read the following part several times but couldn't really get it yet. Does it make much sense to you?

http://doc.qt.io/qtinstallerframework/ifw-online-installers.html#creating-repositories

@cbrnr
Copy link
Owner Author

cbrnr commented Mar 27, 2017

Hm, we'd have to try, but it sounds like you just need to create a folder with the repo stuff and then upload the whole thing to a web server. Which we don't have unless we can upload it to the GitHub webpage. I don't know, I think an update notification from within SigViewer would be more useful, pointing people to the new release which they can then manually download.

@Yida-Lin
Copy link
Contributor

@cbrnr I see. Well, we will see. I will need to look into more different approaches. But bottom line, I wish it to be an "update" function (but doesn't force user to update) rather than manually downloading again, because that will require the user to manually uninstall, which is a hassle. The less we ask the user to do, the happier they are.

@cbrnr
Copy link
Owner Author

cbrnr commented Mar 27, 2017

It might be possible that after downloading the new installer, the old version is detected and therefore users don't need to uninstall first. I think this would be OK.

@Yida-Lin
Copy link
Contributor

Well, I think it doesn't allow you to install if you already have one in that location.

image

@cbrnr
Copy link
Owner Author

cbrnr commented Mar 27, 2017

I think the normal installer also creates a kind of repo - maybe update functionality has to be enabled? But anyway, I agree that first having to uninstall SigViewer before installing a new version is cumbersome.

@Yida-Lin
Copy link
Contributor

@cbrnr I think there are two kinds of installers, online and offline. The one I created is offline, which doesn't create a repo. We need to create an online installer, which generates a repo.

http://doc.qt.io/qtinstallerframework/ifw-online-installers.html#creating-repositories

@cbrnr
Copy link
Owner Author

cbrnr commented May 16, 2017

This is a complex topic. I'd prefer something simple without too much overhead. Ideally, I'd want to have SigViewer just check if a newer version is available and then notify the user with a download link. However, as you mentioned the Windows installer does not support updating without an explicit uninstall first. Could you check if there is an option to enable installing a new version over an existing one in Qt IFW? Alternatively, we could switch back to NSIS; the script we used previously is still available here, but needs to be adapted of course.

Once we have an installer that supports installing a new version without explicitly having to uninstall the old one first, we could think about a mechanism to check version numbers. We could use our GitHub releases, I'm sure there is a way to find out the latest version available on GitHub.

@Yida-Lin
Copy link
Contributor

@cbrnr Hi Clemens,

I think in Qt IFW there is an option "update" that can update the application without uninstalling it. The challenge is seems it requires an online repo, but I am not sure whether our github repo qualifies for that.

I am less familiar with NSIS, but I am open to whichever way that can make SigViewer auto-updates itself.

@Yida-Lin
Copy link
Contributor

@cbrnr I guess we should also make this moving forward... before the next version is released.

Let's see whether this one works... I am surprised Qt doesn't provide a built-in updater API. There are so many applications today that auto-update themselves; not sure how they did it?

@Yida-Lin
Copy link
Contributor

Yida-Lin commented Jun 18, 2017

@cbrnr I was using OBS studio and happened to be attracted to their github page and see they have an auto-updater in the source code. Why don't we model on them and create our auto-updater? I will see whether it's possible.

One problem that I see is, their directory is named "win-update" thus I am not sure whether they have auto updater for Mac and Linux as well. Could you please test it and let me know whether it's the case?

In addition, some more threads

and here

Thanks!

@cbrnr
Copy link
Owner Author

cbrnr commented Jun 19, 2017

I get an update error dialog when I check for updates:

screen shot 2017-06-19 at 09 24 32

@Yida-Lin
Copy link
Contributor

@cbrnr Not sure whether it's temporary error or hardcore error :/

@cbrnr
Copy link
Owner Author

cbrnr commented Jun 20, 2017

It also looks like quite a bit of effort on their side. There must be a simpler way. I suggest that we implement an updater that just checks the GitHub releases and pops up a notification dialog with a download link if a release is newer than the currently used version.

@Yida-Lin
Copy link
Contributor

@cbrnr Clemens! Any more thoughts on the updater topic? :)

The mechanism to check whether there is a new version, needs to be done by hosting an XML file (let's ignore the updating part for now... only talking about checking for new version). But only putting the XML file in the Github repo doesn't work, for some reason, at least from what I attempted. Possibly by how github works (e.g., GitHub will insert blob/ or tree/ in your path when you open a source file), or because of Qt Installer Framework. A corresponding GitHub Page needs to be created in order for it to work.

IMO, I wouldn't consider adding a github page burdensome or evil, because we don't really need to code or maintain anything. It's just a beautified version of the README.md. Plus it has the function of hosting important files for remote access, such as XML. In addition, it would be nice to have a cool page for such an awesome project anyways :)

@cbrnr
Copy link
Owner Author

cbrnr commented Sep 18, 2017

Yes, a project website would definitely be nice. However, I'd still prefer a simple custom updater solution that simply checks whether the latest GitHub release is newer than the installed version. That way, we don't need all this additional overhead and complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants