WorldWideTelescope / wwt-windows-client

WorldWide Telescope Windows Application
Other
179 stars 55 forks source link

Work on auto-updating #194

Closed pkgw closed 2 years ago

pkgw commented 2 years ago

Auto-updates weren't working with the current installers because msiexec /i is now refusing to reinstall an already-installed package. Based on my research and experimentation, it looks like we need to use msiexec /fvomus instead.

Also, here we finally tackle #133. This turned out to be an enormous, dumb can of worms. The salient issues are as follows:

So the mess is:

The above problems would be a lot simpler to tackle if we inverted the meaning of checkbox and property: NOAUTOUPDATE, with a default of being unchecked. But that kind of double-negative is confusing and changes the existing behavior.

If we don't want to make that inversion, we can make the following change:

This way, in the no-UI case, we'll default to ON, but AUTOUPDATE=OFF on the command line will change that. Non-empty values other than OFF will default to updates on. In the UI case, we'll get the intended behavior, with the wrinkle that if the user unchecks the box the property will be deleted, not set to OFF. (This is why the registry settings have to check for NOT(AUTOUPDATE).

The biggest limitation here is that in the UI case, if you set AUTOUPDATE on the command line too, the setting is ignored -- specifically, AUTOUPDATE=OFF still results in the checkbox being checked. I believe this is a limitation of the checkbox initialization code. We could potentially work around it with some kind of custom action that deletes/clears AUTOUPDATE if it is set to OFF early on, but that's just more than I want to deal with right now.

Other notes: