Commit graph

7 commits

Author SHA1 Message Date
Robert Knight
e11cc9193a Fix MSVC++ compile error due to non-const array dimension values. 2011-08-22 16:36:39 +01:00
Robert Knight
d295b0323c Add support for the old-format updater command-line syntax.
The old syntax uses a series of Key=Value pairs, instead of
the more standard "--key value" syntax.

This is required so that the old Mendeley Desktop versions can
launch the new updater.
2011-08-22 12:59:08 +01:00
Robert Knight
a280b5d3d1 Support parsing update scripts structured for backwards compatibility with Mendeley Desktop clients <= 1.0
* Support XML scripts where the V3 script is wrapped in an <update-v3> element.
 * Add some basic unit testing facilities - if we find that something more sophisticated is needed,
   we can look at using cppunit, googletest or similar.
 * Add a test that parsing the same script with both the old and the new structure
   yields equivalent UpdateScript instances.
2011-08-22 12:06:48 +01:00
Robert Knight
c1a5cce3da Convert Qt permission flags (from QFile::Permissions) to Unix mode_t flags.
This fixes the permissions set on files by the updater.
2011-08-22 10:01:25 +01:00
Robert Knight
8773a7a622 Fix file uninstallation and add a test
Prepend the install directory to the file path specified in the
<uninstall> section of the XML file to get the path of the file
to remove.

If the file cannot be uninstalled because it does not exist,
log a warning and continue.
2011-08-21 23:41:57 +01:00
Robert Knight
dc303201fa Avoid checking for existence of package when installing symlinks
Only check for the existence of the package for regular files
2011-08-21 23:31:54 +01:00
Robert Knight
214814dbbc Add a basic test of the updater for the non-elevated case under Linux
This test compiles two 'versions' of an application,
then runs a script which creates an install directory containing
the 'old' app and a directory containing a file_list.xml update script,
a copy of the updater and a zip file containing the 'new' app.
The script then runs the updater, then runs the installed app
and checks that it is the new version.
2011-08-21 22:07:46 +01:00