electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.72k stars 1.74k forks source link

runAfterFinish only works after the second time installing #6661

Open bvandevliet opened 2 years ago

bvandevliet commented 2 years ago

After building the nsis installer (with runAfterFinish kept to default true). The app will only start after the second time installing it. I had this issue in Electron 10.4.7 and now still in 17.0.1. However, this only seems to happen when I change the executable setup filename either using artifactName or manually after the build.

package.json

"build": {
    "productName": "Peazy",
    "appId": "com.electron.peazy",
    "artifactName": "${productName}.${ext}",
    "directories": {
      "output": "./out"
    },
    "win": {
      "target": "nsis",
      "icon": "./src/renderer/assets/img/favicon.ico",
      "publisherName": "Bob Vandevliet"
    },
    "nsis": {
      "runAfterFinish": true,
      "createDesktopShortcut": false,
      "createStartMenuShortcut": false
    }
  }
stale[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

bvandevliet commented 2 years ago

It's still relevant, however it seems no one else has experienced this issue (no responses, which I think is strange). For my project, I solved it using a launcher, but it's not a beautiful solution (it's a workaround).

changsiang-lim-tfs commented 2 days ago

This issue still exists in electron-builder@24.13.3.