Skip to content
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

what should final output be for Windows? #21

Closed
junosuarez opened this issue May 6, 2015 · 13 comments
Closed

what should final output be for Windows? #21

junosuarez opened this issue May 6, 2015 · 13 comments

Comments

@junosuarez
Copy link
Contributor

Mac apps are conveniently distributed as folders, and the OS GUI treats them nicely as a single entity. On Windows (with #20) we end up as a folder, which is not a very natural way to distribute apps.

There's a couple of options I wanted to raise for discussion:

  1. do nothing: we end up with a working folder, and anything else is out of scope of this module and should be handled elsewhere
  2. zip the folder: this is a sort of bare minimum, and a fair number of smaller windows apps are distributed this way. We get a single file to distribute e.g. in a GitHub release, archive, etc. Zip is the idiomatic archive format for Windows.
  3. create an msi: this is the Windows native installer bundler format- e.g., how io.js is distributed, as well as almost all commerical apps. This has the most polish. There are a billion options with msis, but it should be possible to create a generic one that plays nicely with Electron apps and puts them in platform-idiomatic places, etc.
@max-mapper
Copy link
Contributor

atom has both a AtomSetup.exe and a atom-windows.zip. Im on slow internet and cant download both to check em out, but I wonder what the diff is

https://github.com/atom/atom/releases/tag/v0.196.0

@marwanhilmi
Copy link

atom-windows.zip is a simply a .zip of the output folder as described in Option 1.
AtomSetup.exe is an installer created with Squirrel for Windows which does a few things:

  • installs to user's home directory in AppData/Local
  • creates entry in Add/Remove programs
  • allows for auto-updating to work (whereas the zip version does not support it)

Naturally the simple option is .zip support.

It is also pretty straight forward to create a basic installer with a MakeNSIS configuration file (see example here: https://github.com/Aluxian/Facebook-Messenger-Desktop/blob/master/assets-windows/) but note that wouldn't give the auto-updating functionality found in the solution Atom uses.

My current use case calls for using Squirrel (because I need the auto-updater and don't want to roll my own). We would need to either bundle or download a handful of the Squirrel binaries. You can see how Atom uses Squirrel to generate the installer here: https://github.com/atom/grunt-electron-installer

@max-mapper
Copy link
Contributor

is the .zip in option 1 a zip that has e.g. App.exe inside it that users can double click to run the app? If so I think thats a good place to start (since it is the simplest option)

@marwanhilmi
Copy link

Yeah that's what it looks like, an exe file along with a handful of other dlls and misc files.

-rwxr-xr-x@   1 mhilmi  staff      1055 Apr 30 20:42 LICENSE
-rwxr-xr-x@   1 mhilmi  staff   1492992 Apr 30 20:44 Update.exe
-rwxr-xr-x@   1 mhilmi  staff   7214344 Apr 30 20:46 atom.exe
drwxr-xr-x@   4 mhilmi  staff       136 Apr 30 20:42 chromedriver
-rwxr-xr-x@   1 mhilmi  staff  56402432 Apr 30 20:42 chromiumcontent.dll
-rwxr-xr-x@   1 mhilmi  staff    252859 Apr 30 20:42 content_resources_200_percent.pak
-rwxr-xr-x@   1 mhilmi  staff   8457212 Apr 30 20:42 content_shell.pak
-rwxr-xr-x@   1 mhilmi  staff   3466856 Apr 30 20:42 d3dcompiler_47.dll
-rwxr-xr-x@   1 mhilmi  staff   1686016 Apr 30 20:42 ffmpegsumo.dll
-rwxr-xr-x@   1 mhilmi  staff  10457856 Apr 30 20:42 icudtl.dat
-rwxr-xr-x@   1 mhilmi  staff     10752 Apr 30 20:42 libEGL.dll
-rwxr-xr-x@   1 mhilmi  staff   1512960 Apr 30 20:42 libGLESv2.dll
drwxr-xr-x@  55 mhilmi  staff      1870 Apr 30 20:42 locales
-rwxr-xr-x@   1 mhilmi  staff    455328 Apr 30 20:42 msvcp120.dll
-rwxr-xr-x@   1 mhilmi  staff    970912 Apr 30 20:42 msvcr120.dll
-rwxr-xr-x@   1 mhilmi  staff    413533 Apr 30 20:42 natives_blob.bin
drwxr-xr-x@   8 mhilmi  staff       272 Apr 30 20:44 resources
-rwxr-xr-x@   1 mhilmi  staff    742500 Apr 30 20:42 snapshot_blob.bin
-rwxr-xr-x@   1 mhilmi  staff    199302 Apr 30 20:42 ui_resources_200_percent.pak
-rwxr-xr-x@   1 mhilmi  staff    247984 Apr 30 20:42 vccorlib120.dll
-rwxr-xr-x@   1 mhilmi  staff         7 Apr 30 20:42 version
-rwxr-xr-x@   1 mhilmi  staff     81768 Apr 30 20:42 xinput1_3.dll

@junosuarez
Copy link
Contributor Author

In the zip option, users would have to unzip it to a directory somewhere and then run the .exe from that location

@Ivshti
Copy link
Contributor

Ivshti commented May 10, 2015

I am for an option between zip and raw folder. An installer doesn't make sense, I think it's out of the scope for electron-packager. This is a job for a new tool that creates an installer for Windows and a dmg for OS X?

@max-mapper
Copy link
Contributor

@Ivshti +1 that is a great point about scope

On Sun, May 10, 2015 at 1:34 AM, Ivo Georgiev notifications@github.com
wrote:

I am for an option between zip and raw folder. An installer doesn't make
sense, I think it's out of the scope for electron-packager. Maybe a new
tool that creates an installer for Windows and a dmg for OS X?


Reply to this email directly or view it on GitHub
#21 (comment)
.

@englercj
Copy link

Just to throw in my two cents, I'm using this for creating packages currently and I love it.

I agree with @Ivshti that installers are out of scope of this tool, but the only tool I am aware of (https://github.com/domderen/atom-shell-installer) doesn't work with a folder output from this tool (some complaint about name in the nuget packing process). So really looking for a CLI tool like this one that can create installer/dmg files for these apps for distribution.

@Ivshti
Copy link
Contributor

Ivshti commented May 13, 2015

@englercj this is a tough thing. I've been packaging my app for almost a year now, and there are a few challenges I couldn't automate

  1. DMG - setting OS X folder options for a background and icon size programatically; couldn't find a way to do that. You can still use a template DMG and build from there

  2. Windows - finding a quality self-extracting installer that allows building from any platform (I Use OS X for building / dev); Paquet Builder is terrific but also paid (IMO deservingly so) and can be used programatically. Unfortunately I don't know if Wine can run it so that we can build from any platform.

My 2 cents, unless you're pushing new versions out every day, do the final step manually. It takes like 3 actions on OS X (replacing .app in the DMG) and 2-3 on Windows (pressing build on your installer creator).

I am not trying to discourage you from automation though, I am just saying it's a nasty process to automate. For OS X - sure. For windows - if there's a way to build quality SFX installers under any platform - sure, but I haven't been able to find that.

@junosuarez
Copy link
Contributor Author

@englercj

atom-shell-installer doesn't work with a folder output from this tool

Could you please open an issue and include the specific error message? Thanks!

@max-mapper
Copy link
Contributor

thanks for the feedback everyone, I'm gonna close this for now but open a new issue to specifically discuss app packaging

@max-mapper
Copy link
Contributor

ok new issue to discuss installers is here: #33

@lmatteis
Copy link

lmatteis commented Mar 8, 2016

@Ivshti how do you actually "press build on your installer creator"? Where do you find this option? I'd like to deliver a single .exe rather than a .zip with a bunch of dll's inside.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants