LazAutoUpdater/Systray Service: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: LazAutoUpdater/Systray Service
| Old | New | Line | |
|---|---|---|---|
| 1 | + | ### Summary | |
| 2 | + | ||
| 3 | + | - This application is designed to run at OS startup | |
| 4 | + | - It silently checks for application updates, and if it finds an update will silently perform the update - even if the application is running | |
| 5 | + | - The LazAutoUpdate component (\>=v0.21) has methods that enable your application to integrate seamlessly with the Systray Updater service | |
| 6 | + | - The Systray application is intended to be installed with your LazAutoUpdate-enabled application | |
| 7 | + | - The LazAutoUpdate Pack application automatically generates a configuration file for the Sytray Application | |
| 8 | + | ||
| 9 | + | ### Using the LazAutoUpdater Systray Service | |
| 10 | + | ||
| 11 | + | This is even simpler to code in your app. | |
| 12 | + | ||
| 13 | + | - Drop a LazAutoUpdate component on your main form | |
| 14 | + | - Set the VersionsININame, ZipfileName and SFProjectName to unique values for your app (the same values as your Update Pack uploads) | |
| 15 | + | - In the form.create() add the following lines | |
| 16 | + | ||
| 17 | + | ``` pascal | |
| 18 | + | If LazAutoUpdate1.CreateLocalLauImportFile | |
| 19 | + | then LazAutoUpdate1.RelocateLauImportFile; | |
| 20 | + | ``` | |
| 21 | + | ||
| 22 | + | That's it! | |
| 23 | + | ||
| 24 | + | - If the user is running Systray Service, it will will automatically import your app's configuration and update it on a schedule (default 9am Daily) | |
| 25 | + | - To deploy updates, configure (using the values specified in your app) and run AutoUpdate Pack, then upload as usual. | |
| 26 | + | ||
| 27 | + | - An absolute minimum of coding effort to keep your users updated. | |
| 28 | + | ||
| 29 | + | ### How it works | |
| 30 | + | ||
| 31 | + | - Using a [[longtimer]] the systray app will periodically query whether the configured app needs updating. If it does, then: | |
| 32 | + | ||
| 33 | + | 1. If the app is not running, it downloads and then copies over the new version of the app | |
| 34 | + | 2. If the app is running, it calls lauupdate(.exe) to remotely close, update then re-open the app. | |
| 35 | + | ||
| 36 | + | - Every so often (default=1minute) the systray app checks for a file named 'lauimport.ini' in the user's appdata folder, and if it finds it it will: | |
| 37 | + | ||
| 38 | + | 1. Merge its contents with the app configuration file | |
| 39 | + | 2. Delete the original | |
| 40 | + | ||
| 41 | + | In this way, an update's information can be reflected in the configuration file. | |
| 42 | + | ||
| 43 | + | --- | |
| 44 | + | *From the Free Pascal wiki, page "LazAutoUpdater/Systray Service", as it stood on 2020-02-18 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 45 | + | Category: Components | |
| 46 | + | Category: Deployment | |
| 47 | + | Category: Lazarus |
