electron-forge: Get rid of the version number on Windows app folder

Viewed 195

I use electron-forge and WIX to build installer on Windows. But I found that if there is a version number specified in package.json, then the installed folder will contain a subfolder with this specific version number appended.

For instance, if the version is "1.2.3+4", then inside the installed folder we get

app-1.2.3+4

This is problematic if we install new versions onto the same folder, which will litter all the old version files/folders in the same parent folder. I'd love new versions to simply overwrite that folder. How to get rid of this version number from the subfolder without affecting the versioning elsewhere?

Here is my wix setup inside package.json

      "makers": [
        {
          "name": "@electron-forge/maker-wix",
          "platforms": [
            "win32"
          ],
          "config": {
            "arch": "x64",
            "appUserModelId": "com.company.myapp",
            "description": "description of myapp",
            "exe": "myapp",
            "appIconPath": "C:\\Temp\\myapp.ico",
            "language": 1033,
            "manufacturer": "mycompany",
            "name": "My App",
            "programFilesFolderName": "MyApp",
            "shortName": "myapp",
            "shortcutFolderName": "My App",
            "ui": {
              "chooseDirectory": true,
              "images": {
                "background": "C:\\Temp\\background-orange.png",
                "banner": "C:\\Temp\\banner-orange.png"
              }
            },
            "version": "1.2.3+4"
          }
        }
      ]
    }
  },
0 Answers
Related