Updates & QtWebKit

Hi,

Has anyone thought about how to implement an update manager? I was
thinking of using QtWebKit for this. While it is an extra dependency
on windows (compiling it takes a long time), it would make
implementing an update manager much easier. The update page could be
written in php (inclusing screenshots, with mysql perhaps for storing
the data) and it would be like any other php webpage. In avogadro,
when we load the page we can listen to the QWebView::linkClicked(QUrl)
signal and download/install the update.

Once we have sorted out python security issues we could even add a
page where users can submit their own scripts. A similar approach
might also be nice for tutorials where users can click a link and have
the molecule for the tutorial loaded in avogadro.

Does this sound reasonable or should we just write it in C++?

Thank in advance,
Tim

Tim Vandermeersch wrote:

Hi,

Has anyone thought about how to implement an update manager? I was
thinking of using QtWebKit for this. While it is an extra dependency
on windows (compiling it takes a long time), it would make
implementing an update manager much easier. The update page could be
written in php (inclusing screenshots, with mysql perhaps for storing
the data) and it would be like any other php webpage. In avogadro,
when we load the page we can listen to the QWebView::linkClicked(QUrl)
signal and download/install the update.

I have been thinking about implementing an Avogadro update manager. This
would check to see if the user has the latest version by downloading a
web page at a set URL, then prompt if they would like to download the
latest version if there is a new one. This could just use QtNetwork to
do all the work, in much the same way as the PDB downloader does.

I do think something like this would be a great extension to browse and
download plugins, and also to browse and download chemical data files
from web sites.

Once we have sorted out python security issues we could even add a
page where users can submit their own scripts. A similar approach
might also be nice for tutorials where users can click a link and have
the molecule for the tutorial loaded in avogadro.

This sounds great too.

Does this sound reasonable or should we just write it in C++?

Personally, I think a simpler update manager using QtNetwork would
likely work better. Geoff and I had been talking about using QtWebkit
for tutorials, browsing web sites with chemical data etc. I think this
would be a great use of QtWebkit and would provide some really unique
tutorials.

I would be interested in what other people think. I had figured for the
update manager it would download a text file off of our web server,
compare its version to the latest and prompt. We could record if a user
refused the update and not prompt further. We could optionally spawn a
new process, detach it and quit Avogadro if we wanted to automate more
on Windows. At the very least it would be relatively simple to add an
extension that downloads the file, prompts the user to run the installer
after quitting Avogadro.

Has anyone thought about how to implement an update manager? I was
thinking of using QtWebKit for this.

I think we’ll want QtWebKit for other things anyway. For example, it
seems much easier to have an actual web browser for a PubChem search
and wait for the user to click a link.

A similar approach might also be nice for tutorials where users can
click a link and have
the molecule for the tutorial loaded in avogadro.

Exactly.

Does this sound reasonable or should we just write it in C++?

I think there are enough good reasons to consider using an embedded
browser that we might as well add QtWebKit as an optional dependency.
Obviously none of these features are truly critical, even if they are
very useful.

My $0.02,
-Geoff

On May 16, 2009, at 6:49 PM, Marcus D. Hanwell wrote:

I would be interested in what other people think. I had figured for
the
update manager it would download a text file off of our web server,
compare its version to the latest and prompt.

I should point out that a common update strategy on Mac is to use RSS
feeds – “AppCasting.”

http://sparkle.andymatuschak.org/
http://connectedflow.com/appcasting/

I think we could probably adopt something like this. I like the
ability to add release notes to the window.

-Geoff