Skip to content

Commit

Permalink
fix: The Windows arm64 supported.
Browse files Browse the repository at this point in the history
Signed-off-by: The1111mp <[email protected]>
  • Loading branch information
1111mp committed Dec 21, 2023
1 parent 0f97183 commit 37b6bcf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/utils/migration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { exec } from 'node:child_process';
import { platform } from 'node:process';
import { platform, arch } from 'node:process';
import { join } from 'node:path';
import {
pathExists,
Expand Down Expand Up @@ -36,8 +36,8 @@ async function updateToSchemaVersionDefault(version: number) {
await setNvmdToPathForWindows();

const exeSourceFile = app.isPackaged
? join(process.resourcesPath, 'assets', 'sources', 'nvmd.exe')
: join(__dirname, '../../..', 'assets', 'sources', 'nvmd.exe');
? join(process.resourcesPath, 'assets', 'sources', `${arch}.exe`)
: join(__dirname, '../../..', 'assets', 'sources', `${arch}.exe`);
const cmdSourceFile = app.isPackaged
? join(process.resourcesPath, 'assets', 'sources', 'temp.cmd')
: join(__dirname, '../../..', 'assets', 'sources', 'temp.cmd');
Expand Down Expand Up @@ -119,8 +119,8 @@ async function updateToSchemaVersionLast(version: number) {
await remove(targetFile);

const sourceFile = app.isPackaged
? join(process.resourcesPath, 'assets', 'sources', 'nvmd.exe')
: join(__dirname, '../../..', 'assets', 'sources', 'nvmd.exe');
? join(process.resourcesPath, 'assets', 'sources', `${arch}.exe`)
: join(__dirname, '../../..', 'assets', 'sources', `${arch}.exe`);
await copy(sourceFile, targetFile).catch((_err) => {});

async function updateFile(fileName: string) {
Expand Down

0 comments on commit 37b6bcf

Please sign in to comment.