GODT-1537: Manual in-app update mechanism.

This commit is contained in:
Jakub
2022-03-30 14:34:58 +02:00
parent 3b07121f08
commit 5b20b6a3d0
9 changed files with 173 additions and 8 deletions

View File

@ -81,6 +81,7 @@ type QMLBackend struct {
_ func() `signal:"updateIsLatestVersion"`
_ func() `slot:"checkUpdates"`
_ func() `signal:"checkUpdatesFinished"`
_ func() `slot:"installUpdate"`
_ bool `property:"isDiskCacheEnabled"`
_ core.QUrl `property:"diskCachePath"`
@ -213,6 +214,13 @@ func (q *QMLBackend) setup(f *FrontendQt) {
}()
})
q.ConnectInstallUpdate(func() {
go func() {
defer f.panicHandler.HandlePanic()
f.installUpdate()
}()
})
f.setIsDiskCacheEnabled()
f.setDiskCachePath()
q.ConnectChangeLocalCache(func(e bool, d *core.QUrl) {