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));