electron / electron/forge

Unable to makes squirrel distributable for win32/arm64 on macos

Open
#3,142 12 comments 11 reactions 0 assignees View on GitHub
maker/squirrel platform/macOS
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 1h
Merged PRs (30d)
30

Description

### Pre-flight checklist

- [X] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

### Electron Forge version

6.0.4

### Electron version

22.0.1

### Operating system

macOS 13.1 (M1)

### Last known working Electron Forge version

_No response_

### Expected behavior

a successful squirrel out folder

### Actual behavior

here is what is happening when i run: **electron-forge make --platform win32**

```
✔ Checking your system
✔ Loading configuration
✔ Loading configuration
✔ Resolving make targets
› Making for the following targets: squirrel
✔ Running package command
✔ Preparing to package application
✔ Running packaging hooks
✔ Running generateAssets hook
✔ Running prePackage hook
✔ [plugin-webpack] Preparing native dependencies: 2 / 2
✔ [plugin-webpack] Building webpack bundles
✔ Packaging application
✔ Packaging for arm64 on win32 [2m15s]
✔ Running postPackage hook
✔ Running preMake hook
❯ Making distributables
✖ Making a squirrel distributable for win32/arm64
› Failed with exit code: 255
Output:
System.AggregateException: One or more errors occurred. () ---> System.…
at Squirrel.Utility.CreateZipFromDirectory (System.String zipFilePath, …
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in :0
at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in :0
at System.Threading.Tasks.Task.Wait () [0x00000] in :0
at Squirrel.ReleasePackage.CreateReleasePackage (System.String outputFile, System.String packagesRootDir, System.Func`2[T,TResult] releaseNotesProcessor, System.Action`1[T] contentsPostProcessHook) [0x001f7] in <1ffb1a5dca5b4f2f93386cec56fd9ec2>:0
at Squirrel.Update.Program.Releasify (System.String package, System.String targetDir, System.String packagesDir, System.String bootstrapperExe, System.String backgroundGif, System.String signingOpts, System.String baseUrl, System.String setupIcon, System.Boolean generateMsi, System.Boolean packageAs64Bit, System.String frameworkVersion, System.Boolean generateDeltas) [0x00214] in <1ffb1a5dca5b4f2f93386cec56fd9ec2>:0
at Squirrel.Update.Program.executeCommandLine (System.String[] args) [0x00116] in <1ffb1a5dca5b4f2f93386cec56fd9ec2>:0
at Squirrel.Update.Program.main (System.String[] args) [0x00113] in <1ffb1a5dca5b4f2f93386cec56fd9ec2>:0
at Squirrel.Update.Program.Main (System.String[] args) [0x00006] in <1ffb1a5dca5b4f2f93386cec56fd9ec2>:0
---> (Inner Exception #0) System.Exception
at Squirrel.Utility.CreateZipFromDirectory (System.String zipFilePath, System.String inFolder) [0x00119] in <1ffb1a5dca5b4f2f93386cec56fd9ec2>:0 <---
at ChildProcess. (/Users/myusername/Desktop/work/project/project/node_modules/electron-winstaller/lib/spawn-promise.js:49:24)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
```

### Steps to reproduce

1- install wine with homebrew using this command:
`brew install --cask wine-stable`

2- install mono from their website
`https://www.mono-project.com/docs/getting-started/install/mac/`

3- add mono path to .zprofile
`export PATH=$PATH:/Library/Frameworks/Mono.framework/Versions/Current/bin/mono`

4- in forge.config.js
```
{
name: '@electron-forge/maker-squirrel',
config: {
certificateFile: './cert.pfx',
certificatePassword: process.env.CERTIFICATE_PASSWORD,
authors: 'test',
description: 'Desktop app'
},
platforms: ["win32"]
}
```

5- run the make command:
`electron-forge make --platform win32`

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.