Trying to build windows package, getting linux instead

I’m trying to make a non-steam build of my game for windows using the build-package-windows command, but for some reason it creates a linux game instead and I don’t know what to do about it.

  • :computer: Which OS (relevant if you have an issue in the terminal): :linux:

:gear: Logs or screenshots of the issue:

I’m not sure you can make a windows build from linux, the commands are shortcuts to have some settings preset for each OS, but you might need to be on the right OS.

This is just using electron forge as standard so you could look up online if there’s a way to make windows builds from linux with it but I’m not sure if it’s possible, in the same way that I have to use a mac to make mac builds, and usually need to use WSL on windows to make linux ones

1 Like

@liana, thanks for the suggestion! Passing the Electron Forge-specific parameter is exactly what was needed; it’s totally possible to build for any platform from any platform.

To anyone else looking for a solution, this is the command you’d need to run to build for, respectively, Windows, Linux, and macOS:

pnpm build-package-windows -- --platform win32
pnpm build-package-windows -- --platform linux
pnpm build-package-windows -- --platform darwin

Even mac works from windows? I thought that would be an issue… good to know