OldSquirrelForWindows
OldSquirrelForWindows copied to clipboard
Allow modification of generated wix template
During the release stage, check for template.release.wxi in the Release folder or in $(SolutionDir)
<?include template.release.wxi ?>
This would make it easy to add custom behavior to the generated Wix template.
Being able to extend the templates is definitely on my radar, but I'd like to get v1 out the door which will cover:
- generating installers and updaters
- using the AppSetup extensibility points to do custom behaviour as C# code
- creating a custom UI for your installer
Happy to throw around ideas and proposals for how this feature could/should work in the interim.
@peters What would you want to customize? Since it's a managed installer all the screens come from managed code, so the wix template only provides the details of what files are installed.
@distantcam Aha, did now know that. I would like to add the application to startup so it runs when windows starts.
After install, the bootstrapper finds any file - in the build output - ending in .exe
and starts them.
There's also IAppSetup
components if you want to run C# scripts as part of the installation. I'm testing and documenting those next.
Great! ;)
The one thing we could do that would be easy, is just search the project / solution root for a template.wxs
file and use that instead. Easy win.
@paulcbetts Yeah, but then you'd have to make sure the template is right, and wix is finicky. I'm not a fan of handing users death star sized guns for their feet.
Also which template are we talking about? The app installer or the bootstrapper? I can think of reasons to customize both.
@distantcam They don't have to use it :)
@paulcbetts Yes, but you know they will. And then they will log issues here. :)
@shiftkey IAppSetup, you only have to implement it in a class in your main assembly and it will be picked up by the installer right?
public class ShimmerConfig : IAppSetup
{
public IEnumerable<ShortcutCreationRequest> GetAppShortcutList()
{
throw new NotImplementedException();
}
public void OnAppInstall()
{
throw new NotImplementedException();
}
public void OnAppUninstall()
{
throw new NotImplementedException();
}
public void OnVersionInstalled(Version versionBeingInstalled)
{
throw new NotImplementedException();
}
public void OnVersionUninstalling(Version versionBeingUninstalled)
{
throw new NotImplementedException();
}
public bool LaunchOnSetup { get; private set; }
public string Target { get; private set; }
}
That's the one
@peters Yep. you don't actually have to implement it though, if you're just a typical app with a single EXE, just ignore it and What You Expect Will Happen™
Great! ;)