Squirrel / OldSquirrelForWindows

It's like ClickOnce but Works™
665 stars 55 forks source link

Any suggestions on best practices for dynamic update Url? #244

Open dealproc opened 10 years ago

dealproc commented 10 years ago

Looking to use Squirrel.Windows for an application that I need to provide auto-update functionality. It's a Kiosk style application, and has a central "server" component that hosts the data bits that are fed into the Kiosk application. According to the documents, we're supposed to call: bool UpdateManager.CheckForUpdates("http://mycoolsite.com/releases/") to check for updates, but I'd rather have it check the web address from which the software was initially installed from, much like what ClickOnce did, to see if any updates exist for the application.

The base 'data services' project, we're going to install using a forced mechanism to manage which of our clients are on a specific version.

Any suggestions on this?

shiftkey commented 10 years ago

So ClickOnce is actually cheating in this regard, because you specify the Installation Folder Location as part of the publish step, and it uses that at runtime.

The other thing that ClickOnce does is let you specify a different location for updates, using the lovely mage.exe tool

Mage -Update HelloWorld.exe.application -ProviderUrl http://adatum.com/Update/Path

But all those are pre-deployment options.

What I'd do is use your app.config to store this setting and performing a config transform per-environment - meaning no need to recompile binaries.

dealproc commented 10 years ago

I have an "environment" per client in this instance. Was hoping there was another way.

shiftkey commented 10 years ago

I'm open to suggestions on this, but it's rather tricky because I don't want to depend on browser behaviour - we assume the same browser downloads the same bits from the same URL as the next browser (until you publish an update, of course)...