chore: set oneClick false and perMachine false in nsis
chore: set oneClick false and perMachine false in nsis
What does this PR do?
This PR updates the NSIS installer settings to:
- oneClick: false
- perMachine: false
The result is that clicking on the .exe to install there is no change (we do not have an "interactive" installation anyways, so onClick despite it being set to true by default doe snot apply).
However, you can now use /ALLUSERS on the command line to successfully
install to all users.
Why this is required:
Electron-Builder’s NSIS logic combines the two flags as shown below.
| oneClick | perMachine | Interactive UI scope | Silent /S scope | /ALLUSERS respected? |
|---|---|---|---|---|
| true | false | Always per-user (silent) | Per-user | No |
| true | true | Always per-machine (silent) | Per-machine | No (forced machine) |
| false | true | Wizard, forces admin install | Per-machine | Yes, but no per-user |
| false | false | Wizard, defaults per-user | Per-user or per-machine (when /ALLUSERS) | Yes |
We now set it to both false, allowing us to have both combinations (single user install, and CLI install to all users).
Screenshot / video of UI
N/A
What issues does this PR fix or reference?
Closes https://github.com/podman-desktop/podman-desktop/issues/12734
How to test this PR?
Confirming that it installs for all users:
-
Run
pnpm buildandpnpm compileon a WINDOWS MACHINE. -
Run the following using the installer:
cd dist/
./podman-desktop-installer.exe /S /ALLUSERS
- Confirm that it is installed SYSTEM WIDE in
C:/Program Files/Podman Desktop
Confirming it installs regularly:
-
Run
pnpm buildandpnpm compileon a WINDOWS MACHINE. -
Run the installer (dist/podman-desktop-installer.exe) as normal
-
See it installs to
%AppData%correctly.
Signed-off-by: Charlie Drage [email protected]
@benoitf @deboer-tim @cbr7
I did extensive testing on Windows to get this to work with a bunch of different build combinations, and found this to be the one that covers both cases.
However.. IMO, we need extensive QE testing / maybe an e2e test added to test single user install vs system wide.
Should we open up another issue to add QE / playwright tests?
Hello @cdrage! I've just finished testing the PR on windows. These are my results:
- Running the installer with /ALLUSERS (
./podman-desktop-1.20.0-next-setup-x64.exe /s /ALLUSERS) installs PD on C:/Program Files (works as expected) - Running the installer without /ALLUSERS (
./podman-desktop-1.20.0-next-setup-x64.exe /s) installs PD on C:\Users[user]\AppData\Local\Programs\Podman Desktop, not on %ProgramData% (C:\ProgramData). I think this is expected, did you write the wrong path on the issue?
Also, a new issue to cover the feature in an E2E test case has been opened: https://github.com/podman-desktop/e2e/issues/371
Hello @cdrage! I've just finished testing the PR on windows. These are my results:
- Running the installer with /ALLUSERS (
./podman-desktop-1.20.0-next-setup-x64.exe /s /ALLUSERS) installs PD on C:/Program Files (works as expected)- Running the installer without /ALLUSERS (
./podman-desktop-1.20.0-next-setup-x64.exe /s) installs PD on C:\Users[user]\AppData\Local\Programs\Podman Desktop, not on %ProgramData% (C:\ProgramData). I think this is expected, did you write the wrong path on the issue?Also, a new issue to cover the feature in an E2E test case has been opened: podman-desktop/e2e#371
I apologize, I meant %AppData%, bit of a brain fart! Not %ProgramData% (see docs: https://podman-desktop.io/docs/uninstall that we use %AppData%)
Thanks for testing this out :)
@cdrage merge ?
@cdrage merge ?
Sure. Tests pass, e2e tested it, three other approvals.
Hopefully in the future we also have the e2e test.
Thanks for reviewing!
@benoitf Can we update the choco package so that it includes the /ALLUSERS switch (e.g. opt in)?
We use DSC to push out our packages, and we strongly prefer machine wide installation.
Edit* The workaround for now is
cChocoPackageInstaller PodmanDesktop {
Name = "podman-desktop"
ChocoParams = '--install-arguments="/s /ALLUSERS"'
DependsOn = "[Script]InstallChocolatey", "[Service]DockerEngineService"
}
Cheers, Indy