Skip to content

You must install both Mono and Wine on non-Windows #3778

Open
@guy-bartkus

Description

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

7.6.0

Electron version

v33.2.1

Operating system

Linux Mint 22

Last known working Electron Forge version

No response

Expected behavior

npm run make -- --platform win32 should make a windows installer.

Actual behavior

Already installed wine32 and mono-xsp4 using sudo dpkg --add-architecture i386 && sudo apt install wine32 mono-xsp4, but error implies one or both is not installed.

~/Documents/Projects/Node/worldbuilder$ npm run make -- --platform win32

> [email protected] make
> electron-forge make --platform win32

✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
  › Making for the following targets:
✔ Running package command
  ✔ Preparing to package application
  ✔ Running packaging hooks
    ✔ Running generateAssets hook
    ✔ Running prePackage hook
  ✔ Packaging application
    ✔ Packaging for x64 on win32 [10s]
  ✔ Running postPackage hook
✔ Running preMake hook
❯ Making distributables
  ✖ Making a squirrel distributable for win32/x64
    › You must install both Mono and Wine on non-Windows
◼ Running postMake hook

An unhandled rejection has occurred inside Forge:
Error: You must install both Mono and Wine on non-Windows
at /home/guy/Documents/Projects/Node/worldbuilder/node_modules/electron-winstaller/lib/index.js:128:31
    at step (/home/guy/Documents/Projects/Node/worldbuilder/node_modules/electron-winstaller/lib/index.js:56:23)
    at Object.next (/home/guy/Documents/Projects/Node/worldbuilder/node_modules/electron-winstaller/lib/index.js:37:53)
    at fulfilled (/home/guy/Documents/Projects/Node/worldbuilder/node_modules/electron-winstaller/lib/index.js:28:58)

My forge.config.js:

const { FusesPlugin } = require('@electron-forge/plugin-fuses');
const { FuseV1Options, FuseVersion } = require('@electron/fuses');

module.exports = {
	packagerConfig: {
		asar: true,
	},
	rebuildConfig: {},
	makers: [
		{
			name: '@electron-forge/maker-squirrel',
			config: {
				icon: "icons/icon.ico"
			},
		}
	],
	plugins: [
		{
			name: '@electron-forge/plugin-auto-unpack-natives',
			config: {},
		},
		// Fuses are used to enable/disable various Electron functionality
		// at package time, before code signing the application
		new FusesPlugin({
			version: FuseVersion.V1,
			[FuseV1Options.RunAsNode]: false,
			[FuseV1Options.EnableCookieEncryption]: true,
			[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
			[FuseV1Options.EnableNodeCliInspectArguments]: false,
			[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
			[FuseV1Options.OnlyLoadAppFromAsar]: true,
		}),
	],
};

Steps to reproduce

Install wine32 and mono-xsp4 using sudo dpkg --add-architecture i386 && sudo apt install wine32 mono-xsp4, then run npm run make -- --platform win32 on linux.

Additional information

No response

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions