Skip to content

The swiss army knife of lossless video/audio editing

Try to support 32bit win

Mikael Finstad887132427919
diff --git a/package.json b/package.json
index 81dc7b6c..efd2a3de 100644
--- a/package.json
+++ b/package.json
@@ -121,13 +121,22 @@
"icon": "icon-build/app-512.png"
},
"win": {
+ "artifactName": "${productName}-${os}-${arch}.${ext}",
"target": [
- "portable",
- "zip"
+ {
+ "target": "portable",
+ "arch": [
+ "x64",
+ "ia32"
+ ]
+ },
+ {
+ "target": "zip"
+ }
],
"extraResources": [
"node_modules/ffmpeg-static/ffmpeg.exe",
- "node_modules/ffprobe-static/bin/win32/x64/**"
+ "node_modules/ffprobe-static/bin/win32/${arch}/**"
],
"icon": "icon-build/app-512.png"
},
diff --git a/src/ffmpeg.js b/src/ffmpeg.js
index 2b4f9e5a..f911ab63 100644
--- a/src/ffmpeg.js
+++ b/src/ffmpeg.js
@@ -34,14 +34,12 @@ function getFfmpegPath() {
function getFfprobePath() {
const platform = os.platform();
+ const arch = os.arch();
- const map = {
- darwin: 'darwin/x64/ffprobe',
- win32: 'win32/x64/ffprobe.exe',
- linux: 'linux/x64/ffprobe',
- };
-
- const subPath = map[platform];
+ let subPath;
+ if (platform === 'darwin') subPath = 'darwin/x64/ffprobe';
+ else if (platform === 'linux') subPath = 'linux/x64/ffprobe';
+ else if (platform === 'win32') subPath = `win32/${arch}/ffprobe.exe`;
if (!subPath) throw new Error(`Unsupported platform ${platform}`);