From 0e34c79eed9d69576d47a66db96f9e2e36dc5be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E4=B8=AD=E5=90=9B?= Date: Tue, 26 Mar 2024 01:21:03 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E6=94=B9window=E4=B8=8Bexift?= =?UTF-8?q?ool=E5=B7=A5=E5=85=B7=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/src/path.ts | 3 ++- scripts/install-exiftool.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/electron/src/path.ts b/electron/src/path.ts index 34ce4a4..b3e2d46 100644 --- a/electron/src/path.ts +++ b/electron/src/path.ts @@ -1,4 +1,5 @@ import { join } from 'node:path'; +import os from 'os'; import { app } from 'electron'; @@ -11,7 +12,7 @@ const paths = { public: env.VITE_PUBLIC, logger: join(app.getPath('userData'), 'logs'), logo: '', - exiftool: join(isDev ? env.VITE_DIST_ELECTRON : app.getAppPath(), 'exiftool/exiftool'), + exiftool: join(isDev ? env.VITE_DIST_ELECTRON : app.getAppPath(), 'exiftool', os.platform() === 'win32' ? 'exiftool.exe' : 'exiftool'), }; paths.public = isDev ? env.VITE_PUBLIC : paths.web; diff --git a/scripts/install-exiftool.ts b/scripts/install-exiftool.ts index 93dde6d..69c9b53 100644 --- a/scripts/install-exiftool.ts +++ b/scripts/install-exiftool.ts @@ -40,7 +40,7 @@ function installWinExiftool(outDir: string) { tryCatch(() => { const admzip = new AdmZip(WindowsExifToolPath); admzip.extractAllTo(outDir); - fs.renameSync(path.join(outDir, 'exiftool(-k).exe'), path.join(outDir, 'exiftool')); + fs.renameSync(path.join(outDir, 'exiftool(-k).exe'), path.join(outDir, 'exiftool.exe')); r(true); }, null, () => r(false));