Robert Knight
be8d6cbc87
Remove temporary updater files after update installation completes.
...
The cleanup is currently run in another process - on Windows for this to
work the updater will need to be run from outside the temporary installation
directory. Running the cleanup from the updater binary in the temporary
directory will fail since the binary to be removed will then be in use.
On Linux, Mac the cleanup could just be run from the main update installation
process.
2011-08-21 23:05:25 +01:00
Robert Knight
7c7428a4af
Log process ID of child processes launched by ProcessUtils::runAsync()
2011-08-21 23:03:49 +01:00
Robert Knight
1ce064a686
Fix update installer being run twice in each process.
2011-08-21 23:02:59 +01:00
Robert Knight
93274ed348
Use fstream to open and write to log file and include process ID in log entries.
2011-08-21 22:56:33 +01:00
Robert Knight
e4a427b9e2
Improve the description of the tool in the README file
2011-08-21 22:27:10 +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
Robert Knight
1fdec35cdd
Log details of the arguments to each updater process invocation in main()
2011-08-21 21:54:35 +01:00
Robert Knight
5f3745351f
Get launching of the main update installer process working in the case where elevation is not required.
...
* Add ProcessUtils::currentProcessPath() to get the path to the current application
and add a Linux implementation.
* Implement ProcessUtils::runAsync() on Unix using fork/execve.
* Setup updater to run the main installation phase with the correct arguments.
* Add '.zip' to the package name to get the path of the package file.
2011-08-21 21:51:29 +01:00
Robert Knight
55ebb233cb
Add FileOps method to get the canonical path for a file and the Unix implementation.
2011-08-21 21:50:20 +01:00
Robert Knight
b49332eaab
Add a log entry if an unrecognized updater mode string is encountered.
2011-08-21 21:49:51 +01:00
Robert Knight
2e285f11a8
Add methods to UpdateScript to retrieve the path which the script was parsed from
2011-08-21 21:48:13 +01:00
Robert Knight
3548f36e8c
Add entry type information at the start of each log file entry.
2011-08-21 21:47:33 +01:00
Robert Knight
2efb4fcaf3
Use boost threads to run the update installation on a background thread.
2011-08-20 12:52:47 +01:00
Robert Knight
8e47110231
Add code to launch applications with elevated priviledges on Mac from the old updater.
2011-08-20 12:52:22 +01:00
Robert Knight
44c1937d96
Implement temp package directory removal on Unix. Untested.
2011-08-20 12:11:05 +01:00
Robert Knight
8a29ffd55b
Add more detailed logging in the body of UpdateInstaller::run()
2011-08-20 01:01:32 +01:00
Robert Knight
96793d262b
Fix FileOps::touch()
...
creat() returns -1 on error or an fd otherwise which should be closed.
2011-08-20 00:58:09 +01:00
Robert Knight
8df91a76eb
Display a more helpful error message if waitpid() fails in ProcessUtils::waitForProcess()
2011-08-20 00:49:41 +01:00
Robert Knight
ceb3b7d6a0
Add more detailed information to any file I/O errors and return true from FileOps::removeFile() if the file does not exist.
2011-08-20 00:46:07 +01:00
Robert Knight
71f197deb7
Add minizip library and use it to implement extraction of files from zip archives.
2011-08-20 00:38:05 +01:00
Robert Knight
fec68e523b
Implement Unix version of dirname()
2011-08-19 21:23:55 +01:00
Robert Knight
8fea6c4202
Start implementing the Unix versions of functions in FileOps
2011-08-19 21:20:38 +01:00
Robert Knight
0a6630bc8c
Add the core logic for installing and uninstalling files in UpdateInstaller
2011-08-19 21:03:10 +01:00
Robert Knight
e3cec64375
Implement ProcessUtils::waitForProcess() using code from Qt updater
...
Also fix a typo in UpdateInstaller::run()
2011-08-19 20:08:42 +01:00
Robert Knight
e8e25e7c1c
Move intToStr() utility method to StringUtils header
2011-08-19 20:08:15 +01:00
Robert Knight
650e966bfe
Set platform defines correctly in Platform.h
2011-08-19 20:07:49 +01:00
Robert Knight
66ade327db
WIP - Standalone update installer with no dependency on Qt
2011-08-19 19:59:21 +01:00