clowd / Clowd.Squirrel

Quick and easy installer and automatic updates for cross-platform dotnet applications
427 stars 39 forks source link

Shortcut names for different environments #164

Closed RichardSinden closed 1 year ago

RichardSinden commented 1 year ago

I have an app that I deploy with different environments (e.g. test, prod, etc.). The app only gets built once and for each environment deploy, the app.config is updated with different service addresses and .nuspec files are updated with a different id/title and it is repackaged. At the moment, because these two versions have the same VersionInfo.ProductName, then the shortcut is called the same thing, which makes it difficult to differeniate them in the Start Menu. Looking at the code (UpdateManager.linkTargetForVersionInfo), it appears that the version info productName is prefered over the package. var possibleProductNames = new[] { versionInfo?.ProductName, package.ProductName, versionInfo?.FileDescription, Path.GetFileNameWithoutExtension(exeName), };

I'd like to add an option to prefer the package ProductName, perhaps by adding , bool preferPackageProductName = false to the CreateShortcutsForExecutable method (and corresponding RemoveShortcutsForExecutable).

I'm happy to create a PR. Any thoughts/issues with this?

caesay commented 1 year ago

Please see my comments on your pull request, there are several ways to do this already without a breaking change to the entire API surface.