Repository: electron/electron
Pull request: feat: add `ELECTRON_INSTALL_` env vars

#### Description of Change

Due to the binary no longer installing on `npm install` and us getting warnings from `npm` for setting unknown config values for `npm install --platform win32 electron`, here are two new env vars:

```sh
# before: pass npm config flag on install command
npm install --platform=mas electron --save-dev
# after: add env var when you first run the Electron command
npm install electron --save-dev
ELECTRON_INSTALL_PLATFORM=mas npx electron . --no
```

cc @electron/wg-api 

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included
- [x] I have built and tested this PR
- [x] `npm test` passes
- [x] relevant API documentation, tutorials, and examples are updated and follow the [documentation style guide](https://github.com/electron/electron/blob/main/docs/development/style-guide.md)
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: added `ELECTRON_INSTALL_PLATFORM` and `ELECTRON_INSTALL_ARCH` variables to install binaries from other platforms and architectures.


Changed files:
filename: docs/breaking-changes.md
patch: @@ -59,6 +59,17 @@ npm install electron --save-dev --ignore-scripts
 npx install-electron --no
 ```
 
+If you need to test changes across platforms or architectures, you should now use the
+`ELECTRON_INSTALL_ARCH` and `ELECTRON_INSTALL_PLATFORM` environment variables.
+
+```sh
+# before: pass npm config flag on install command
+npm install --platform=mas electron --save-dev
+# after: add env var when you first run the Electron command
+npm install electron --save-dev
+ELECTRON_INSTALL_PLATFORM=mas npx electron . --no
+```
+
 ### Removed: `quotas` object from `Session.clearStorageData(options)`
 
 When calling `Session.clearStorageData(options)`, the `options.quotas` object is no longer supported because it has been

filename: docs/tutorial/installation.md
patch: @@ -51,20 +51,40 @@ any dependencies in your app will not be installed.
 ## Customization
 
 If you want to change the architecture that is downloaded (e.g., `x64` on an
-`arm64` machine), you can use the `--arch` flag with npm install or set the
-`npm_config_arch` environment variable:
+`arm64` machine), you can set the `ELECTRON_INSTALL_ARCH` environment variable:
 
-```shell
-npm install --arch=x64 electron
+```sh
+# Inside an npm script or with npx
+ELECTRON_INSTALL_ARCH=x64 electron .
 ```
 
+Supported architectures are a subset of Node.js [`process.arch`](https://nodejs.org/api/process.html#processarch)
+values, and include:
+
+* `x64` (Intel Mac and 64-bit Windows)
+* `ia32` (32-bit Windows)
+* `arm64` (Apple silicon, Windows on ARM, ARM64 Linux)
+* `arm` (32-bit ARM)
+
 In addition to changing the architecture, you can also specify the platform
 (e.g., `win32`, `linux`, etc.) using the `--platform` flag:
 
-```shell
-npm install --platform=win32 electron
+```sh
+# Inside an npm script or with npx
+ELECTRON_INSTALL_PLATFORM=mas electron .
 ```
 
+Supported platforms are Node-like [platform strings](https://nodejs.org/api/process.html#processplatform):
+
+* `darwin`
+* `mas` ([Mac App Store](./mac-app-store-submission-guide.md))
+* `win32`
+* `linux`
+
+> [!TIP]
+> To see all available platform/architecture combinations for a particular release, see the artifacts
+> on [Electron's GitHub Releases](https://github.com/electron/electron/releases).
+
 ## Proxies
 
 If you need to use an HTTP proxy, you need to set the `ELECTRON_GET_USE_PROXY` variable to any

filename: npm/install.js
patch: @@ -21,8 +21,11 @@ if (isInstalled()) {
   process.exit(0);
 }
 
-const platform = process.env.npm_config_platform || process.platform;
-let arch = process.env.npm_config_arch || process.arch;
+const platform = process.env.ELECTRON_INSTALL_PLATFORM || process.env.npm_config_platform || process.platform;
+let arch =
+  process.env.ELECTRON_INSTALL_ARCH ||
+  process.env.npm_config_arch ||
+  process.arch;
 
 if (platform === 'darwin' && process.platform === 'darwin' && arch === 'x64' &&
     process.env.npm_config_arch === undefined) {