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

Ability to download proper app package based on user's architecture via NSIS #1207

Closed
mastergberry opened this issue Feb 2, 2017 · 18 comments · May be fixed by qcif/data-curator#563
Closed

Comments

@mastergberry
Copy link
Contributor

As referenced in #1165

If we can change the installer to download the proper app package (32 vs 64 bit) instead of combining both and wasting space then this would be a benefit for people that have large installers.

Objective is to try and save bandwidth for updates/downloads and to make the installation process faster for the user (less download time for people with slow internet).

@mastergberry
Copy link
Contributor Author

I suppose with this type of feature the updater system will need to have a way to specify whether to download the x32 or x64 bit update as well.

@akashnimare
Copy link
Contributor

+1 for this.

develar added a commit to develar/electron-builder that referenced this issue Feb 9, 2017
develar added a commit to develar/electron-builder that referenced this issue Feb 9, 2017
develar added a commit to develar/electron-builder that referenced this issue Feb 9, 2017
develar added a commit to develar/electron-builder that referenced this issue Feb 9, 2017
develar added a commit to develar/electron-builder that referenced this issue Feb 10, 2017
@develar
Copy link
Member

develar commented Feb 10, 2017

Use nsis-web to build web installer. If not nsisWeb.appPackageUrl is not set, web installer is version dependent (because versioned app package is downloaded).

Auto-Update — works as before. Package will be downloaded as part of installing.

@akashnimare
Copy link
Contributor

@develar how do I use it (and autoupdates) if I'm releasing my app on GitHub?

@develar
Copy link
Member

develar commented Feb 11, 2017

In the upcoming version latest.yml will be generated in the nsis-web subdirectory.

@akashnimare
Copy link
Contributor

Let me know when it's released :)

@develar
Copy link
Member

develar commented Feb 13, 2017

@akashnimare Please try 13.6.0

@akashnimare
Copy link
Contributor

@develar How do I suppose to use it? I want to generate both the arch ia32+x64 on windows. Is it correct -

scripts : {
"dist" : "build nsis-web --ia32 --x64"
}

or

scripts : {
"dist" : "build --nsis-web"
}

@develar
Copy link
Member

develar commented Feb 13, 2017

build --win nsis-web --ia32 --x64

@develar
Copy link
Member

develar commented Feb 13, 2017

Or, you can set nsis-web as a default target: set windows.target to ["nsis-web"].

@akashnimare
Copy link
Contributor

Thanks, I'm trying it out 🚀

@akashnimare
Copy link
Contributor

akashnimare commented Feb 13, 2017

@develar So I have got three files here-

  • app Web Setup 0.0.1
  • app-0.0.1-ia32.nsis
  • app-0.0.1-x64.nsis

and latest.yml in nsis-web directory. I guess I have to upload all these three files + latest.yml in my repo's GitHub release? app Web Setup 0.0.1 is the actual link which I have to give to others to download my app?

@mastergberry
Copy link
Contributor Author

I'm just curious, is there a way to go from the regular installer to the web installer eventually? Or not possible if you already published the first version of the app?

@develar
Copy link
Member

develar commented Feb 13, 2017

I guess I have to upload all these files + latest.yml in my repo's GitHub release?

Yes. It will be uploaded automatically. https://github.com/electron-userland/electron-builder/wiki/Publishing-Artifacts

app Web Setup 0.0.1 is the actual link which I have to give to others to download my app?

Yes.

is there a way to go from the regular installer to the web installer eventually? Or not possible if you already published the first version of the app?

It is possible without any issues or risks. Because latest.yml contains filename of installer, it will be just downloaded and installed. Auto-updater works with updates as a black box.

Even more — now you can change artifact name, you are not forced to use only webhttps://github.com/electron-userland/electron-builder/wiki/Options#NsisWebOptions-artifactName

@akashnimare
Copy link
Contributor

@develar Can I use perMachine and perClick with nsis-web

build : {
    "win": {
      "target": "nsis-web",
      "icon": "build/icon.ico",
      "iconUrl": "https://raw.githubusercontent.com/zulip/zulip-electron/master/build/icon.ico"
    },
    "nsis-web": {
      "perMachine": true,
      "oneClick": false
    }
}

@develar
Copy link
Member

develar commented Feb 13, 2017

You can try and report issue if it doesn't work ;)

@akashnimare
Copy link
Contributor

@develar will update you on this. Btw setting nsis-web in win.target only build for the arch you'are on so I had to use build --win nsis-web --ia32 --x64 to build for both the arch.

@develar
Copy link
Member

develar commented Feb 13, 2017

Btw setting nsis-web in win.target only build for the arch you'are on so I had to use

Yes, it sets only target, not arch. So, build --win --ia32 --x64

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

Successfully merging a pull request may close this issue.

3 participants