I am trying to use PyUpdater without an update server, but updates from flash drives instead. Any ideas on how to instantiate the class AppUpdate
without the Client.check_update()
method?
Asked
Active
Viewed 86 times
4

djvg
- 11,722
- 5
- 72
- 103

Michael Lintschinger
- 61
- 5
-
Note that PyUpdater 4.0 is [broken](https://stackoverflow.com/a/73192339) in many ways, and the project is now officially [archived](https://github.com/Digital-Sapphire/PyUpdater#this-is-the-end), i.e. it is no longer maintained. – djvg Sep 30 '22 at 13:35
-
Could you explain why you would want to update from a flash drive? Any reason you couldn't just run an installer directly from that drive? – djvg Sep 30 '22 at 13:36
1 Answers
2
Assuming that "without an update server" refers to an actual online (production) server:
A quick workaround would be to serve the files locally from the usb drive, e.g. using python's http.server:
python -m http.server -d <path to folder on usb drive>
Then you would need to point your app to the corresponding url path on localhost
, by adding the url to the UPDATE_URLS
in your ClientConfig
:
class ClientConfig(object):
PUBLIC_KEY = 'abcdefg...'
APP_NAME = 'my-app'
COMPANY_NAME = 'my-company'
HTTP_TIMEOUT = 30
MAX_DOWNLOAD_RETRIES = 3
UPDATE_URLS = [
'http://localhost:8000/my_updates/', # <<<<<<<<<< this one
'https://example.com/my_updates',
...
]

djvg
- 11,722
- 5
- 72
- 103