fix: resolve Windows helper paths consistently

This commit is contained in:
wiiiii123
2026-07-10 18:59:05 +07:00
parent ced29934f5
commit f5e29bfb1a
+8 -1
View File
@@ -53,6 +53,7 @@ export function resolvePreferredWindowsNativeHelperPath(
helperDirectory: string,
binaryName: string,
): string {
const windowsArchTag = process.arch === "arm64" ? "win32-arm64" : "win32-x64";
const buildOutputPath = resolveUnpackedAppPath(
"electron",
"native",
@@ -61,7 +62,13 @@ export function resolvePreferredWindowsNativeHelperPath(
"Release",
binaryName,
);
const prebundledPath = getPrebundledNativeHelperPath(binaryName);
const prebundledPath = resolveUnpackedAppPath(
"electron",
"native",
"bin",
windowsArchTag,
binaryName,
);
if (app.isPackaged && existsSync(prebundledPath)) {
return prebundledPath;