Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Set up auto-updates on Windows - #3815

Merged
kevinsawicki merged 50 commits into
masterfrom
squirrel-win-updates
Nov 14, 2014
Merged

kevinsawicki merged 50 commits into
masterfrom
squirrel-win-updates

Conversation

@anaisbetts

Copy link
Copy Markdown
Contributor

This PR sets up automatic updates for installations that use Squirrel for Windows by implementing auto-updater directly instead of using the one built into Atom Shell. Squirrel for Windows uses out-of-process updates, so wiring it up in Native Code would just mean extra suffering

@anaisbetts
anaisbetts force-pushed the squirrel-win-updates branch from a8f57e8 to 6d35533 Compare October 15, 2014 18:19
@thedaniel

Copy link
Copy Markdown
Contributor

Hit this trying to build this branch:

C:\atom [squirrel-win-updates]> .\script\build
Node: v0.10.32
npm: v1.4.28
Python: v2.7.8
Installing build modules...
Installing apm...

module.js:340
    throw err;
    ^
Error: Cannot find module '../build/Release/git.node'
    at Function.Module._resolveFilename (module.js:338:1
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (C:\atom\apm\node_modules\atom
    at Object.<anonymous> (C:\atom\apm\node_modules\atom
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

@thedaniel

Copy link
Copy Markdown
Contributor

I resolved my build problems. Next question: Is this branch expected to build a functional Setup.exe or is that still WIP?

@anaisbetts

Copy link
Copy Markdown
Contributor Author

@thedaniel You usually have to run the separate create-installer grunt task; it's not in the default build because it takes infinity time (it is in the CI build though). The installer shows up at atom-build/../releases

@thedaniel

Copy link
Copy Markdown
Contributor

I see. I was confused because I saw that build/windows existed in this repo and expected it to have the build output, but I see it in AppData/Local/Temp/atom-build. I did get a successful build which produced a Setup.exe that installed successfully, though with a JS error dialog.

screen shot 2014-10-21 at 1 53 50 pm

@anaisbetts

Copy link
Copy Markdown
Contributor Author

@thedaniel This is my Noobness in action, I don't know how to require a file in the same directory as my file 😿

build/windows is the Windows-specific utilities + other crap we need to run to generate the installer. Most of it is the result of building squirrel/squirrel.windows and dumping the binaries in

Comment thread src/browser/auto-update-manager.coffee Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autoUpdater = require './auto-updater-win32'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What he said - also the setup seems to leave a permanent loading gif behind
in the middle of the screen after install. Maybe that JS exception
prevented it from being cleaned up?

On Tue, Oct 21, 2014 at 2:04 PM, Kevin Sawicki [email protected]
wrote:

In src/browser/auto-update-manager.coffee:

 if process.platform is 'win32'
  •  autoUpdater.checkForUpdates = => @checkForUpdatesShim()
    
  •  autoUpdater = require 'browser/auto-updater-win32'
    

autoUpdater = require './auto-updater-win32'

—
Reply to this email directly or view it on GitHub
https://github.com/atom/atom/pull/3815/files#r19179132.

@thedaniel

Copy link
Copy Markdown
Contributor

Though fixing that line gives me a Setup.exe that appears to launch and close a second later with nothing displayed and nothing in the Event Viewer.

@kevinsawicki kevinsawicki changed the title [WIP] Set up auto-updates on Windows Set up auto-updates on Windows Nov 13, 2014
These will be re-added before the first release where squirrel update
assets are available on the release.
kevinsawicki added a commit that referenced this pull request Nov 14, 2014
@kevinsawicki
kevinsawicki merged commit 49828b9 into master Nov 14, 2014
@kevinsawicki
kevinsawicki deleted the squirrel-win-updates branch November 14, 2014 01:53
@kevinsawicki

Copy link
Copy Markdown
Contributor

Thanks for this @paulcbetts

@winstliu

Copy link
Copy Markdown
Contributor

👏 💯
So excited for the next release!

Thanks a lot @paulcbetts and @kevinsawicki (and everybody else that helped)!

@kevinsawicki

Copy link
Copy Markdown
Contributor

@50Wliu it probably will be a couple more releases before the installer/updater is officially released, it has a few remaining tasks such as #4180 and also needs more testing.

Once #4180 is done I'll open up a new issue asking for some help from people on Windows to test it out and report any install issues.

@winstliu

Copy link
Copy Markdown
Contributor

Ah well. Still, progress is nice :).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants