Windows support: cross-built NSIS installer
- toFileURL and path-basename handling made Windows-safe (backslashes, drive letters) so media/model loading works there - Blender discovery scans Program Files\Blender Foundation; ffmpeg candidates include common Windows paths - build config: win/nsis target (x64, custom install dir), build/icon.ico generated from the 1024 png, dist:win script Cross-compiled from macOS: dist/DJ Visualizer Setup 1.6.0.exe (95MB) with scripts unpacked and models/MediaPipe bundled. Untested on real Windows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a869d5b969
commit
7414dbe2ec
5 files changed
+38
-9
No files matched your search
@@ -114,6 +114,15 @@ async function ensureMicAccess() {
|
||||
function blenderPath() {
|
||||
const cands = ['/Applications/Blender.app/Contents/MacOS/Blender',
|
||||
'/opt/homebrew/bin/blender', '/usr/local/bin/blender'];
|
||||
if (process.platform === 'win32') {
|
||||
// Blender installs versioned folders under Program Files
|
||||
for (const root of ['C:\\Program Files\\Blender Foundation', 'C:\\Program Files (x86)\\Blender Foundation']) {
|
||||
try {
|
||||
for (const d of fs.readdirSync(root))
|
||||
cands.push(path.join(root, d, 'blender.exe'));
|
||||
} catch (e) { /* root missing */ }
|
||||
}
|
||||
}
|
||||
for (const c of cands) if (fs.existsSync(c)) return c;
|
||||
return null;
|
||||
}
|
||||
@@ -209,7 +218,8 @@ function ffmpegPath() {
|
||||
const cands = [];
|
||||
try { cands.push(require('ffmpeg-static')); } catch (e) { /* optional */ }
|
||||
cands.push(process.env.FFMPEG, 'ffmpeg',
|
||||
'/opt/homebrew/bin/ffmpeg', '/usr/local/bin/ffmpeg', '/usr/bin/ffmpeg');
|
||||
'/opt/homebrew/bin/ffmpeg', '/usr/local/bin/ffmpeg', '/usr/bin/ffmpeg',
|
||||
'C:\\ffmpeg\\bin\\ffmpeg.exe', 'C:\\Program Files\\ffmpeg\\bin\\ffmpeg.exe');
|
||||
for (const c of cands) {
|
||||
if (!c) continue;
|
||||
if (c === 'ffmpeg' || fs.existsSync(c)) return c;
|
||||
|
||||
Reference in new issue
Block a user