Difference between revisions of "LazAutoUpdater/Systray Service"
From Lazarus wiki
Jump to navigationJump to searchm (Fixed syntax highlighting) |
|||
Line 1: | Line 1: | ||
===Summary=== | ===Summary=== | ||
+ | |||
*This application is designed to run at OS startup | *This application is designed to run at OS startup | ||
*It silently checks for application updates, and if it finds an update will silently perform the update - even if the application is running | *It silently checks for application updates, and if it finds an update will silently perform the update - even if the application is running | ||
Line 7: | Line 8: | ||
===Using the LazAutoUpdater Systray Service=== | ===Using the LazAutoUpdater Systray Service=== | ||
+ | |||
This is even simpler to code in your app. | This is even simpler to code in your app. | ||
Line 12: | Line 14: | ||
* Set the VersionsININame, ZipfileName and SFProjectName to unique values for your app (the same values as your Update Pack uploads) | * Set the VersionsININame, ZipfileName and SFProjectName to unique values for your app (the same values as your Update Pack uploads) | ||
* In the form.create() add the following lines | * In the form.create() add the following lines | ||
− | <syntaxhighlight> | + | |
+ | <syntaxhighlight lang=pascal> | ||
If LazAutoUpdate1.CreateLocalLauImportFile | If LazAutoUpdate1.CreateLocalLauImportFile | ||
then LazAutoUpdate1.RelocateLauImportFile; | then LazAutoUpdate1.RelocateLauImportFile; | ||
Line 25: | Line 28: | ||
===How it works=== | ===How it works=== | ||
+ | |||
*Using a [[longtimer]] the systray app will periodically query whether the configured app needs updating. If it does, then: | *Using a [[longtimer]] the systray app will periodically query whether the configured app needs updating. If it does, then: | ||
#If the app is not running, it downloads and then copies over the new version of the app | #If the app is not running, it downloads and then copies over the new version of the app | ||
Line 34: | Line 38: | ||
In this way, an update's information can be reflected in the configuration file. | In this way, an update's information can be reflected in the configuration file. | ||
− | + | [[Category:Lazarus]] | |
[[Category:Components]] | [[Category:Components]] | ||
+ | [[Category:Deployment]] |
Latest revision as of 01:45, 19 February 2020
Summary
- This application is designed to run at OS startup
- It silently checks for application updates, and if it finds an update will silently perform the update - even if the application is running
- The LazAutoUpdate component (>=v0.21) has methods that enable your application to integrate seamlessly with the Systray Updater service
- The Systray application is intended to be installed with your LazAutoUpdate-enabled application
- The LazAutoUpdate Pack application automatically generates a configuration file for the Sytray Application
Using the LazAutoUpdater Systray Service
This is even simpler to code in your app.
- Drop a LazAutoUpdate component on your main form
- Set the VersionsININame, ZipfileName and SFProjectName to unique values for your app (the same values as your Update Pack uploads)
- In the form.create() add the following lines
If LazAutoUpdate1.CreateLocalLauImportFile
then LazAutoUpdate1.RelocateLauImportFile;
That's it!
- 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)
- To deploy updates, configure (using the values specified in your app) and run AutoUpdate Pack, then upload as usual.
- An absolute minimum of coding effort to keep your users updated.
How it works
- Using a longtimer the systray app will periodically query whether the configured app needs updating. If it does, then:
- If the app is not running, it downloads and then copies over the new version of the app
- If the app is running, it calls lauupdate(.exe) to remotely close, update then re-open the app.
- 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:
- Merge its contents with the app configuration file
- Delete the original
In this way, an update's information can be reflected in the configuration file.