You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Squirrel for Windows is getting to a point where we can start to think about getting started integrating into Atom.
How does it work?
From Atom's perspective, there are two aspects of Squirrel to handle:
Squirrel will start Atom.exe with switches to indicate when installation-events occur (installation, upgrade, and uninstall). Atom needs to handle these events (or just exit if there's nothing to do). Squirrel also starts the app on install with a --squirrel-firstrun. Things like setting up app shortcuts and file associations will be done here.
Squirrel gives you an EXE called update.exe, which will allow you to update the application, or retrieve information about updates to apply via a JSON object.
In the build process, there will also be some related tooling work - once the build finishes, we need to do a few things:
Generate a NuSpec file representing the current Atom version (super easy, just a Mustache template)
Run NuGet.exe pack to generate the latest app package
Run Update.exe to generate an installer as well as delta packages. Update.exe will need to have access to the previous versions of Atom to be able to do this (i.e. we'll have an ongoing "Releases" directory that we'll keep updating with new stuff)
These tasks have to be run on a Windows machine, we can't use Mono because we have to call Windows APIs at the very end.
TODO:
Integrate Squirrel event handling into Atom startup code
Implement update backend by shelling to Update.exe
The updater assumes that all release files are at the same URL (i.e. if we have a RELEASES file at /foo/bar/RELEASES, we have to find FooBar-1.0.nupkg at /foo/bar/FooBar-1.0.nupkg. I believe we put a special hack into releases for exactly this scenario though - I'll look into it.
@batjko Yeah, you'll have to install .NET 4.5. If you have Visual Studio, you probably have it already. This unfortunately means that if you're using Windows XP, you'll have to install releases manually but there's not much we can do about that
However, in that case, this requirement should probably be handled gracefully if people don't have it yet, i.e. via an automatic installer, ideally.
I'm thinking of those who usually just download the zip release file for Atom, not all users use it on development machines, or with VS specifically pre-installed (if I didn't build atom regularly, I wouldn't have Visual Studio on mine).
Just a thought.
But I am looking forward to this as well. This is going to be another heads-exploding update.
@50Wliu What we've typically done in GitHub for Windows was, we'd create them then watch to see if the user deletes them, then we make sure to not bring them back on updates
I believe we put a special hack into releases for [assumptions like the updater makes]
We can make this work, special hack or no, by having the updater hit a path on atom.io and let that webapp redirect to the right asset. It would be nice for other clients of Squirrel if it would work with Releases without an intermediary though.
@Merg1255 while we can do that, the Atom installer doesn't require admin permissions, so you should be able to carry the setup.exe around on a USB stick too
@kevinsawicki In the original post for this issue, you mention generating a NuSpec file. Is the code for doing that in this repo? I didn't see it anywhere. If not, is it somewhere else publicly accessible? I'd like to see it.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
kevinsawicki commentedon Aug 29, 2014
Will atom/atom releases work for this?
benogle commentedon Aug 29, 2014
Excited for this!
kevinsawicki commentedon Aug 29, 2014
I'm very excited for this.
anaisbetts commentedon Aug 29, 2014
The updater assumes that all release files are at the same URL (i.e. if we have a
RELEASESfile at/foo/bar/RELEASES, we have to findFooBar-1.0.nupkgat/foo/bar/FooBar-1.0.nupkg. I believe we put a special hack into releases for exactly this scenario though - I'll look into it.batjko commentedon Aug 29, 2014
Will this put any additional dependencies or requirements on the client machine?
anaisbetts commentedon Aug 29, 2014
@batjko Yeah, you'll have to install .NET 4.5. If you have Visual Studio, you probably have it already. This unfortunately means that if you're using Windows XP, you'll have to install releases manually but there's not much we can do about that
batjko commentedon Aug 29, 2014
Ah, fair enough.
However, in that case, this requirement should probably be handled gracefully if people don't have it yet, i.e. via an automatic installer, ideally.
I'm thinking of those who usually just download the zip release file for Atom, not all users use it on development machines, or with VS specifically pre-installed (if I didn't build atom regularly, I wouldn't have Visual Studio on mine).
Just a thought.
But I am looking forward to this as well. This is going to be another heads-exploding update.
anaisbetts commentedon Aug 29, 2014
Yep, that's the plan - the C++ bootstrapper will handle this automatically
batjko commentedon Aug 29, 2014
💥
winstliu commentedon Aug 29, 2014
Very excited! 😃
I'm assuming we'll be able to opt-out of desktop, etc. shortcuts though?
anaisbetts commentedon Aug 29, 2014
@50Wliu What we've typically done in GitHub for Windows was, we'd create them then watch to see if the user deletes them, then we make sure to not bring them back on updates
winstliu commentedon Aug 30, 2014
Sounds great.
anaisbetts commentedon Sep 6, 2014
/cc #3447
Merg1255 commentedon Sep 25, 2014
just a note guys: also provide a portable version like you do now. It's always helpful for different environments. Thanks :)
thedaniel commentedon Sep 25, 2014
We can make this work, special hack or no, by having the updater hit a path on atom.io and let that webapp redirect to the right asset. It would be nice for other clients of Squirrel if it would work with Releases without an intermediary though.
anaisbetts commentedon Sep 25, 2014
@Merg1255 while we can do that, the Atom installer doesn't require admin permissions, so you should be able to carry the setup.exe around on a USB stick too
Merg1255 commentedon Sep 25, 2014
@paulcbetts sure, though I think it's easier to have a folder with everything in there.
kevinsawicki commentedon Nov 14, 2014
This is pretty much done now, the plan is being executed. I'm going to close this out and open specific issues for remaining tasks and issues.
kohenkatz commentedon Dec 21, 2014
@kevinsawicki In the original post for this issue, you mention generating a NuSpec file. Is the code for doing that in this repo? I didn't see it anywhere. If not, is it somewhere else publicly accessible? I'd like to see it.
kevinsawicki commentedon Dec 21, 2014
@kohenkatz it is generated during the build by this grunt plugin: https://github.com/atom/grunt-atom-shell-installer
You can see the raw template here: https://github.com/atom/grunt-atom-shell-installer/blob/master/template.nuspec
It is configured via settings in Atom's build file:
atom/build/Gruntfile.coffee
Lines 202 to 207 in 9422a80
thedaniel commentedon Dec 21, 2014
@kohenkatz I believe the code is part of the setup process for the Squirrel installer library: https://github.com/Squirrel/Squirrel.Windows (per this doc)
thedaniel commentedon Dec 21, 2014
whoops, disregard me!
kohenkatz commentedon Dec 21, 2014
@kevinsawicki Thanks!
lock commentedon Jan 24, 2019
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!