在Mac系统使用electron-forge打包window安装包报错,报错如下
Output:
System.AggregateException: One or more errors occurred. (�����������û��Ϊָ���ļ�����Ӧ�ó���
ShellExecuteEx ʧ��: �Ҳ����ļ���
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
006c:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported
0094:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported) ---> System.Exception:
�����������û��Ϊָ���ļ�����Ӧ�ó���
ShellExecuteEx ʧ��: �Ҳ����ļ���
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
006c:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported
0094:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported
at Squirrel.Utility.CreateZipFromDirectory (System.String zipFilePath, System.String inFolder) [0x00119] in
<1ffb1a5dca5b4f2f93386cec56fd9ec2>:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in
<207d12884485488d9288cc8cbf474289>:0
at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken
cancellationToken) [0x00043] in <207d12884485488d9288cc8cbf474289>:0
at System.Threading.Tasks.Task.Wait () [0x00000] in <207d12884485488d9288cc8cbf474289>: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: �����������û��Ϊָ���ļ�����Ӧ�ó���
ShellExecuteEx ʧ��: �Ҳ����ļ���
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
006c:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported
0094:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported
at Squirrel.Utility.CreateZipFromDirectory (System.String zipFilePath, System.String inFolder) [0x00119] in
<1ffb1a5dca5b4f2f93386cec56fd9ec2>:0 <---
◼ Running postMake hook
Downloading SHASUMS256.txt: [-----------------------------------------------------------------------] 0% ETA: 0.0 seconds
Downloading SHASUMS256.txt: [===============================================================-------] 90% ETA: 0.0 seconds
Downloading SHASUMS256.txt: [=====================================================================] 100% ETA: 0.0 seconds
An unhandled rejection has occurred inside Forge:
Error: Failed with exit code: 255
Output:
System.AggregateException: One or more errors occurred. (�����������û��Ϊָ���ļ�����Ӧ�ó���
ShellExecuteEx ʧ��: �Ҳ����ļ���
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
006c:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported
0094:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported) ---> System.Exception: �����������û��Ϊָ���ļ�����Ӧ�ó���
ShellExecuteEx ʧ��: �Ҳ����ļ���
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
006c:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported
0094:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported
at Squirrel.Utility.CreateZipFromDirectory (System.String zipFilePath, System.String inFolder) [0x00119] in <1ffb1a5dca5b4f2f93386cec56fd9ec2>:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <207d12884485488d9288cc8cbf474289>:0
at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <207d12884485488d9288cc8cbf474289>:0
at System.Threading.Tasks.Task.Wait () [0x00000] in <207d12884485488d9288cc8cbf474289>: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: �����������û��Ϊָ���ļ�����Ӧ�ó���
ShellExecuteEx ʧ��: �Ҳ����ļ���
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
006c:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported
0094:fixme:keyboard:NtUserActivateKeyboardLayout Changing user locale is not supported
at Squirrel.Utility.CreateZipFromDirectory (System.String zipFilePath, System.String inFolder) [0x00119] in <1ffb1a5dca5b4f2f93386cec56fd9ec2>:0 <---
at ChildProcess.<anonymous> (/Users/xiaoyang/im-app/node_modules/electron-winstaller/lib/spawn-promise.js:48:24)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5)
error Command failed with exit code 1.
package.json文件配置如下:
{
"name": "im-app",
"version": "1.0.0",
"main": "main.js",
"description": "im-app",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"makeWin64": "electron-forge make --platform=win32 --arch=x64 --targets='@electron-forge/maker-squirrel'"
},
"author": "xiaoyang",
"license": "MIT",
"config": {
"forge": "./forge.config.js"
},
"devDependencies": {
"@electron-forge/cli": "^7.5.0",
"@electron-forge/maker-deb": "^7.5.0",
"@electron-forge/maker-rpm": "^7.5.0",
"@electron-forge/maker-squirrel": "^7.5.0",
"@electron-forge/maker-zip": "^7.5.0",
"@electron-forge/plugin-auto-unpack-natives": "^7.5.0",
"@electron-forge/plugin-fuses": "^7.5.0",
"@electron/fuses": "^1.8.0",
"electron": "^32.1.2"
},
"dependencies": {
"electron-squirrel-startup": "^1.0.1"
}
}
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: {},
platforms: ['win32'],
},
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
},
{
name: '@electron-forge/maker-deb',
config: {},
},
{
name: '@electron-forge/maker-rpm',
config: {},
},
],
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,
}),
],
};
执行yarn makeWin64
报以上错误,清除过依赖项缓存并重新yarn无效
mono版本信息如下:
Mono JIT compiler version 6.12.0.206 (2020-02/0cbf0e290c3 Tue Feb 13 17:04:08 EST 2024)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS:
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(610)
Suspend: hybrid
GC: sgen (concurrent by default)
安装了wine-stable,但执行wine -V
时,报
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
007c:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
无法启动程序,或者没有为指定文件关联应用程序。
ShellExecuteEx 失败: 找不到文件。