2

I'm developing in Ubuntu 22.04 Desktop environment. To produce a packaged app for Windows do I need to use a MS Windows environment or can I do it within Ubuntu 22.04 Desktop environment? I ask this, because I do not see any "windows"-related output:

 /out/make$ ls -lah
total 20K
drwxrwxr-x 5 raphy raphy 4,0K gen  5 12:42 .
drwxrwxr-x 4 raphy raphy 4,0K gen  5 12:41 ..
drwxrwxr-x 3 raphy raphy 4,0K gen  5 12:41 deb
drwxrwxr-x 3 raphy raphy 4,0K gen  5 12:42 rpm
drwxrwxr-x 3 raphy raphy 4,0K gen  5 12:42 zip

even if I've set in package.json maker-squirrel :

   "makers": [
    {
      "name": "@electron-forge/maker-squirrel",

Do I have to install the wine terminal in my Ubuntu 22.04 Desktop environment, in order to correctly product the Windows packaged app? Or what else do I have to do?

Raphael10
  • 2,508
  • 7
  • 22
  • 50

1 Answers1

0

Executing : yarn make --platform=win32 I get the following message:

raphy@raohy:~/ForgeTypescriptReactWebpack$ yarn make --platform=win32
yarn run v1.22.19
$ electron-forge make --platform=win32
✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
  › Making for the following targets: squirrel, zip
❯ Running package command
  ✔ Preparing to package application
  ✔ Running packaging hooks
    ✔ Running generateAssets hook
    ✔ Running prePackage hook
      ✔ [plugin-webpack] Preparing native dependencies: 1 / 1
      ✔ [plugin-webpack] Building webpack bundles
  ❯ Packaging application
    ❯ Packaging for x64 on win32
      ✔ Copying files
      ✔ Preparing native dependencies [0.1s]
      ✖ Finalizing package
        › Wrapper command 'wine64' not found on the system. Consult your Linux distribution's package manager to deter…
          Wine is required to use the appCopyright, appVersion, buildVersion, icon, and
          win32metadata parameters for Windows targets.
          See https://github.com/electron/electron-packager#building-windows-apps-from-non-windows-platforms for detai…
  ◼ Running postPackage hook
◼ Running preMake hook
◼ Making distributables
◼ Running postMake hook

An unhandled rejection has occurred inside Forge:
Error: Wrapper command 'wine64' not found on the system. Consult your Linux distribution's package manager to determine how to install Wine.

Wine is required to use the appCopyright, appVersion, buildVersion, icon, and
win32metadata parameters for Windows targets.

See https://github.com/electron/electron-packager#building-windows-apps-from-non-windows-platforms for details.
at spawnWrapper (/home/raphy/ForgeTypescriptReactWebpack/node_modules/cross-spawn-windows-exe/dist/src/wrapper.js:77:19)
    at async module.exports (/home/raphy/ForgeTypescriptReactWebpack/node_modules/rcedit/lib/rcedit.js:42:3)
    at async WindowsApp.runRcedit (/home/raphy/ForgeTypescriptReactWebpack/node_modules/electron-packager/src/win32.js:95:7)
    at async WindowsApp.create (/home/raphy/ForgeTypescriptReactWebpack/node_modules/electron-packager/src/win32.js:105:5)
    at async Promise.all (index 0)
    at async packager (/home/raphy/ForgeTypescriptReactWebpack/node_modules/electron-packager/src/index.js:204:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

So, definitely Wine has to be installed

After installing wine and executing the yarn make --platform=win32 again, I get some strange errors, for which I open another post

Raphael10
  • 2,508
  • 7
  • 22
  • 50