0

I have the below build script:

"build": {
    "appId": "com.yourcompany.gamelauncher",
    "productName": "My Game",
    "directories": {
      "output": "release",
      "buildResources": "app-resource"
    },
    "files": [
      "dist/**/*",
      {
        "from": "assets",
        "to": "assets"
      },
      {
        "from": "../dist/app",
        "to": "app"
      },
      {
        "from": "./build",
        "to": "build"
      },
      "./package.json",
      "./.env"
    ],
    "win": {
      "icon": "icon.ico",
      "target": [
        "nsis"
      ],
      "signAndEditExecutable": true,
      "requestedExecutionLevel": "requireAdministrator"
    },
    "nsis": {
      "oneClick": false,
      "allowToChangeInstallationDirectory": true,
      "deleteAppDataOnUninstall": false,
      "include": "build/installer.nsh"
    }
  },

When the user selects the installation path, I want to create a root folder that contains two subfolders:

Launcher → contains all the binary files and will be updated later by electron-updater.

Game → contains the game files, which should remain unaffected when the Launcher is updated.

How can I configure this setup so that updates with electron-updater only affect the Launcher folder and do not overwrite or remove the Game folder?

Also, if I separate the installation this way, will it have any impact on how registry entries are created (for example, app uninstall path, version info, etc.)?

I have the custom install file as the below but it doesn't work:

!macro preInit
  StrCpy $INSTDIR "$INSTDIR\Launcher"
!macroend

!macro customInstall
  CreateDirectory "$INSTDIR\Launcher"
  CreateDirectory "$INSTDIR\Game"
!macroend

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.