-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an installer based on Squirrel.Windows #22
Conversation
Anything else I can do for this PR? |
|
||
mkdir -Path $tempDirectoryName | ||
rm -r -fo "$tempDirectoryName\*.nupkg" | ||
NuGet pack .\src\AudioSwitcher\AudioSwitcher.csproj -OutputDirectory "$tempDirectoryName" -Prop Configuration=Release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the NuGet.CommandLine supposed to put NuGet.exe on the path in the Package Manager Console? I ran the script from the Package Manager Console and it failed to find it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran into the same problem with Squirrel, but look like this is because the package was just restored. If I restarted VS, then the script worked. Looks like a NuGet bug, filed: https://nuget.codeplex.com/workitem/4439#
Can you point me to an example Nuspec? I notice that there's a bunch of binaries in that package that aren't needed (all the net20, net40, folders, etc). I notice that the AudioSwitcher package has some files in net45, but others are splattered in the other framework folders (such as NuGet.Core, Splat, Cecil, etc). How does it know from which folders to pull the binaries? |
Ah, it appears walking through the source that it uses NuGet's VersionUtility to figure out compatibility and then copies that. What would a NuSpec look like that excluded all extra framework folders? Would it just point directly to the files inside the package folders (ie packages\Mono.Cecil.0.9.5.4\lib\net40\Mono.Cecil)? |
Here's the template that Atom Shell-based apps use, it's pretty representative: https://github.com/atom/grunt-atom-shell-installer/blob/master/template.nuspec
So, right now it doesn't, that's the problem. If you have a set of NuGet packages (i.e. a dependency tree), you don't have enough information to determine which files to include when you "flatten" the tree, you have to know stuff about the csprojs involved. I intend to work some MSBuild Magic™ to make that happen, but for now you just end up creating a nuspec file that explicitly has |
K, this should do. After playing around this for a while, there looks like there's a few things to do after this is merged:
|
Add an installer based on Squirrel.Windows
This PR is the initial start of an installer for AudioSwitcher, here's how to use it:
.\CreateInstaller.ps1
Take that folder, upload it verbatim to some sort of S3'ish thing that will host files, and you've got an update server.
Some cool things to add in the future (I didn't want to do anything because I assumed you'd want to set up your own update folder):