mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-24 12:51:06 +00:00
Convert the README file to markdown
This commit is contained in:
parent
66a1f6be9e
commit
666c36a4bd
1 changed files with 31 additions and 46 deletions
|
@ -17,44 +17,35 @@ the location of the compressed packages and the path to the update script.
|
||||||
Once the updater has been started, it:
|
Once the updater has been started, it:
|
||||||
|
|
||||||
1. Waits for the application to exit
|
1. Waits for the application to exit
|
||||||
|
|
||||||
2. Acquires the necessary priviledges to install the updates, prompting
|
2. Acquires the necessary priviledges to install the updates, prompting
|
||||||
the user if necessary.
|
the user if necessary.
|
||||||
|
|
||||||
3. Installs the updates, displaying progress to the user in a small dialog
|
3. Installs the updates, displaying progress to the user in a small dialog
|
||||||
|
|
||||||
4. Performs cleanup and any additional actions required as part of the update
|
4. Performs cleanup and any additional actions required as part of the update
|
||||||
|
|
||||||
5. Starts the new version of the main application.
|
5. Starts the new version of the main application.
|
||||||
|
|
||||||
In the event of a failure during the update, the installation is rolled back
|
In the event of a failure during the update, the installation is rolled back
|
||||||
to its previous state and a message is presented to the user.
|
to its previous state and a message is presented to the user.
|
||||||
|
|
||||||
Building the Updater
|
## Building the Updater
|
||||||
====================
|
|
||||||
|
|
||||||
Create a new directory for the build and from that directory run:
|
Create a new directory for the build and from that directory run:
|
||||||
|
|
||||||
cmake <path to source directory>
|
cmake <path to source directory>
|
||||||
make
|
make
|
||||||
|
|
||||||
The updater binary will be built in the src/ directory.
|
The updater binary will be built in the src/ directory.
|
||||||
|
|
||||||
You should also run the tests in src/tests to verify that the updater is
|
You should also run the tests in src/tests to verify that the updater is
|
||||||
functioning correctly.
|
functioning correctly.
|
||||||
|
|
||||||
Preparing an Update
|
## Preparing an Update
|
||||||
===================
|
|
||||||
|
|
||||||
1. Create a directory containing your application's files,
|
1. Create a directory containing your application's files,
|
||||||
laid out in the same way and with the same permissions as they would be when installed.
|
laid out in the same way and with the same permissions as they would be when installed.
|
||||||
|
|
||||||
2. Create a config file specifying how the application's files should be
|
2. Create a config file specifying how the application's files should be
|
||||||
partitioned into packages - see tools/config-template.json
|
partitioned into packages - see tools/config-template.json
|
||||||
|
|
||||||
3. Use the tools/create-packages.rb script to create a file_list.xml file
|
3. Use the tools/create-packages.rb script to create a file_list.xml file
|
||||||
and a set of package files required for updates.
|
and a set of package files required for updates.
|
||||||
|
|
||||||
4. Upload the file_list.xml file and packages to a server
|
4. Upload the file_list.xml file and packages to a server
|
||||||
|
|
||||||
After step 4 is done, you need to notify existing installs that an update
|
After step 4 is done, you need to notify existing installs that an update
|
||||||
|
@ -64,45 +55,40 @@ Preparing an Update
|
||||||
|
|
||||||
See doc/update-hosting for more details on hosting and delivering the updates.
|
See doc/update-hosting for more details on hosting and delivering the updates.
|
||||||
|
|
||||||
Invoking the Updater
|
## Invoking the Updater
|
||||||
====================
|
|
||||||
|
|
||||||
Once the application has downloaded an update, it needs to invoke it. The syntax is:
|
Once the application has downloaded an update, it needs to invoke it. The syntax is:
|
||||||
|
|
||||||
updater --install-dir <install-dir> --package-dir <package-dir> --script <script file>
|
updater --install-dir <install-dir> --package-dir <package-dir> --script <script file>
|
||||||
|
|
||||||
Where <install-dir> is the directory which the application is installed into,
|
Where `<install-dir>` is the directory which the application is installed into,
|
||||||
<package-dir> is the directory containing the packages required for the update
|
`<package-dir>` is the directory containing the packages required for the update
|
||||||
and <script> is the file_list.xml file describing the update.
|
and `<script>` is the `file_list.xml` file describing the update.
|
||||||
|
|
||||||
Once the updater has run, it will launch the file specified in the file_list.xml file
|
Once the updater has run, it will launch the file specified in the `file_list.xml` file
|
||||||
as being the main application binary.
|
as being the main application binary.
|
||||||
|
|
||||||
See the updater test in src/tests/test-update.rb for an example
|
See the updater test in `src/tests/test-update.rb` for an example
|
||||||
of how to invoke the updater.
|
of how to invoke the updater.
|
||||||
|
|
||||||
You should design the process used to download and launch the updater so that new
|
You should design the process used to download and launch the updater so that new
|
||||||
versions of the updater itself can be delivered as part of the update if necessary.
|
versions of the updater itself can be delivered as part of the update if necessary.
|
||||||
|
|
||||||
Customizing the Updater
|
## Customizing the Updater
|
||||||
=======================
|
|
||||||
|
|
||||||
To customize the application name, organization and messages displayed by the updater:
|
To customize the application name, organization and messages displayed by the updater:
|
||||||
|
|
||||||
1. Edit the AppInfo class (in AppInfo.h, AppInfo.cpp) to set the name
|
1. Edit the AppInfo class (in AppInfo.h, AppInfo.cpp) to set the name
|
||||||
of the application and associated organization.
|
of the application and associated organization.
|
||||||
|
|
||||||
2. Replace the icons in src/resources
|
2. Replace the icons in src/resources
|
||||||
|
|
||||||
3. Change the product name and organization in src/resources/updater.rc
|
3. Change the product name and organization in src/resources/updater.rc
|
||||||
|
|
||||||
4. If you are building the updater on Windows and have a suitable Authenticode
|
4. If you are building the updater on Windows and have a suitable Authenticode
|
||||||
certificate, use it to sign the Windows binary. This will make the application
|
certificate, use it to sign the Windows binary. This will make the application
|
||||||
show a less scary UAC prompt if administrator permissions are required
|
show a less scary UAC prompt if administrator permissions are required
|
||||||
to complete the installation.
|
to complete the installation.
|
||||||
|
|
||||||
Updater Dependencies
|
## Updater Dependencies
|
||||||
====================
|
|
||||||
The external dependencies of the updater binary are:
|
The external dependencies of the updater binary are:
|
||||||
|
|
||||||
* The C/C++ runtime libraries (Linux, Mac),
|
* The C/C++ runtime libraries (Linux, Mac),
|
||||||
|
@ -110,8 +96,7 @@ Updater Dependencies
|
||||||
* zlib (Linux, Mac)
|
* zlib (Linux, Mac)
|
||||||
* native UI library (Win32 API on Windows, Cocoa on Mac, GTK on Linux if available)
|
* native UI library (Win32 API on Windows, Cocoa on Mac, GTK on Linux if available)
|
||||||
|
|
||||||
Full and Delta Updates
|
## Full and Delta Updates
|
||||||
======================
|
|
||||||
|
|
||||||
The simplest auto-update implementation is for existing installs
|
The simplest auto-update implementation is for existing installs
|
||||||
to download a complete copy of the new version and install it. This is
|
to download a complete copy of the new version and install it. This is
|
||||||
|
@ -131,23 +116,23 @@ Full and Delta Updates
|
||||||
|
|
||||||
There are several ways in which this can be done:
|
There are several ways in which this can be done:
|
||||||
|
|
||||||
Pre-computed Delta Updates
|
* Pre-computed Delta Updates
|
||||||
- For each release, create a full update plus delta updates from the
|
For each release, create a full update plus delta updates from the
|
||||||
previous N releases. Users of recent releases will receive a small
|
previous N releases. Users of recent releases will receive a small
|
||||||
delta update. Users of older releases will receive the full update.
|
delta update. Users of older releases will receive the full update.
|
||||||
|
|
||||||
Server-computed Delta Updates
|
* Server-computed Delta Updates
|
||||||
- The server receives a request for an update from client version X and in response,
|
The server receives a request for an update from client version X and in response,
|
||||||
computes an update from version X to the current version Y, possibly
|
computes an update from version X to the current version Y, possibly
|
||||||
caching that information for future use. The client then receives the
|
caching that information for future use. The client then receives the
|
||||||
delta file_list.xml file and downloads only the listed packages.
|
delta file_list.xml file and downloads only the listed packages.
|
||||||
|
|
||||||
Applications such as Chrome and Firefox use a mixture of the above methods.
|
Applications such as Chrome and Firefox use a mixture of the above methods.
|
||||||
|
|
||||||
Client-computed Delta Updates
|
* Client-computed Delta Updates
|
||||||
- The client downloads the file_list.xml file for the latest version and
|
The client downloads the file_list.xml file for the latest version and
|
||||||
computes a delta update file locally. It then downloads only the required
|
computes a delta update file locally. It then downloads only the required
|
||||||
packages and invokes the updater, which installs only the changed or updated
|
packages and invokes the updater, which installs only the changed or updated
|
||||||
files from those packages.
|
files from those packages.
|
||||||
|
|
||||||
This is similar to Linux package management systems.
|
This is similar to Linux package management systems.
|
Loading…
Reference in a new issue