| 6626 | slicerName: slicer.name, |
| 6627 | slicerPath: slicer.path, |
| 6628 | isZipEntry: isZipEntry || false, |
| 6629 | zipPath: isZipEntry ? pathInfo.zipPath : null, |
| 6630 | entryPath: isZipEntry ? pathInfo.entryPath : null |
| 6631 | }); |
| 6632 | } |
| 6633 | return; // Don't try to execute on server |
| 6634 | } |
| 6635 | |
| 6636 | // For hidden Electron window or normal mode, check Docker/Windows path compatibility |
| 6637 | const inDocker = isDockerContainer(); |
| 6638 | if (inDocker) { |
| 6639 | // Check if slicer path is a Windows path (starts with drive letter like C:\ or UNC like \\server) |
| 6640 | const hasWindowsDrive = /^[A-Za-z]:[\\/]/.test(slicer.path); |
| 6641 | const hasUncPath = /^\\\\/.test(slicer.path); |
| 6642 | const isWindowsPath = hasWindowsDrive || hasUncPath; |
| 6643 | |
| 6644 | if (isWindowsPath) { |
| 6645 | console.error('[Slicer] Cannot execute Windows slicer in Docker:', slicer.path); |
| 6646 | const win = getWindowFromEvent(event); |
| 6647 | const errorMessage = `The slicer path "${slicer.path}" is a Windows path, but the application is running in a Docker container (Linux).\n\n` + |
| 6648 | `In Docker/Server mode, slicer paths must be:\n` + |
| 6649 | `- Linux executable paths (e.g., /usr/bin/slicer)\n` + |
| 6650 | `- Paths accessible from within the container\n\n` + |
| 6651 | `If you need to use a Windows slicer, you must run Printventory in normal mode (not Docker/Server mode).`; |
| 6652 | |
| 6653 | if (win && !win.isDestroyed()) { |
| 6654 | dialog.showMessageBox(win, { |
| 6655 | type: 'warning', |
| 6656 | title: 'Slicer Path Not Compatible', |
| 6657 | message: 'Cannot execute Windows executable in Docker container', |
| 6658 | detail: errorMessage |
| 6659 | }); |
| 6660 | } else { |
| 6661 | console.error('[Slicer] Slicer Path Not Compatible:', errorMessage); |