Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Handle all 64 bits architecture and rcedit-x64 while using wine #380

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function createWindowsInstaller(options: Options): Promise<void> {
let useMono = false;

const monoExe = 'mono';
const wineExe = process.arch === 'x64' ? 'wine64' : 'wine';
const wineExe = process.arch.endsWith('64') ? 'wine64' : 'wine';

if (process.platform !== 'win32') {
useMono = true;
Expand Down Expand Up @@ -56,6 +56,14 @@ export async function createWindowsInstaller(options: Options): Promise<void> {
if (useMono) {
args.unshift(cmd);
cmd = wineExe;

if (process.arch.endsWith('64')) {
const x64EditPath = path.join(vendorPath, 'rcedit-x64.exe');
const rcEditPath = path.join(vendorPath, 'rcedit.exe');

await fs.remove(rcEditPath);
await fs.copy(x64EditPath, rcEditPath);
}
}

await spawn(cmd, args);
Expand Down
Binary file added vendor/rcedit-x64.exe
Binary file not shown.