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

Updater: NSIS always creates shortcuts on the desktop even if users delete it (Windows) #1070

Closed
Zamiell opened this issue Jan 1, 2017 · 2 comments

Comments

@Zamiell
Copy link

Zamiell commented Jan 1, 2017

  • electron-builder Version: 10.15.1

  • electron-auto-updater Version: 0.8.6

  • Target: win32 x64

  • Build command:
    npm run dist2 --python="C:/Python27/python.exe"

  • Console output:

Rebuilding native production dependencies for win32:x64
Packaging for win32 x64 using electron 1.4.13 to dist\win-unpacked
Packaging NSIS installer for arch x64
Building NSIS installer
Creating Github Publisher - owner: Zamiell, project: isaac-racing-client, version: 0.0.49
Release with tag v0.0.49 doesn't exist, creating one
Uploading RacingPlus-Setup-0.0.49.exe [====================] 100% 0.0s
Released version 0.0.49 successfully.
  • Main package.json:
{
{
  "name": "RacingPlus",
  "description": "A racing mod for The Binding of Isaac: Afterbirth+.",
  "scripts": {
    "start": "electron ./app",
    "postinstall": "install-app-deps",
    "pack": "build --dir",
    "dist": "build",
    "dist2": "build --publish always"
  },
  "build": {
    "appId": "org.electron.isaacRacingClient",
    "win": {},
    "publish": {
      "provider": "github"
    }
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Zamiell/isaac-racing-client.git"
  },
  "license": "GPL-3.0",
  "bugs": {
    "url": "https://github.com/Zamiell/isaac-racing-client/issues"
  },
  "homepage": "https://isaacracing.net",
  "devDependencies": {
    "electron": "^1.4.13",
    "electron-builder": "^10.15.1"
  }
}
  • App package.json (in app subdirectory):
{
  "name": "RacingPlus",
  "productName": "Racing+",
  "main": "./main.js",
  "version": "0.0.49",
  "description": "A racing mod for The Binding of Isaac: Afterbirth+.",
  "author": "Racing+",
  "license": "GPL-3.0",
  "dependencies": {
    "electron-auto-updater": "^0.8.6",
    "electron-is-dev": "^0.1.2",
    "electron-log": "^1.3.0",
    "fs-extra": "^1.0.0",
    "keytar": "^3.0.2",
    "linkifyjs": "^2.1.3",
    "raven": "^1.1.1",
    "tail": "^1.2.1",
    "teeny-conf": "^1.1.0",
    "touch": "^1.0.0",
    "tracer": "^0.8.7"
  }
}
  • Node version: v6.9.1
  • NPM version: 3.10.8
  • OS: Windows 7 x64 Professional

The problem

  • By default, the NSIS installer creates a shortcut on the desktop after initial installation. This is a good thing, as it seems like a good default behavior for my users.
  • Some users might not want the desktop shortcut. But that is fine - they can just delete it themselves manually after installation is completed.
  • However, after an automatic update, the desktop shortcut is recreated by the NSIS installer. So, the user has to keep deleting the desktop shortcut OVER and OVER every single time the application is updated.

Is there a way to make electron-builder create the desktop shortcut on installation, but not on automatic update?

@badams
Copy link
Contributor

badams commented Jan 2, 2017

I guess the solution here would be to add support for a customFinish macro to the NSIS installer (see the currently supported macros)

You could then implement a macro for your installer which does the following:

@develar
Copy link
Member

develar commented Jan 2, 2017

It is not easy (as generic solution) to implement because new installer may be completely different (new locations for shortcuts and so on). I cannot promise that I will implement it in a short term. PR welcome.

As @badams said, currently there is a workaround — you customize installer.

So, moved to backlog to keep issue list clear.

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

No branches or pull requests

3 participants