Skip to content

Commit

Permalink
Resolved some syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
KenCorma committed Sep 3, 2024
1 parent 9867264 commit 5820825
Show file tree
Hide file tree
Showing 3 changed files with 307 additions and 139 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@electron/notarize": "^2.4.0",
"@electron/windows-sign": "^1.1.3",
"@types/adm-zip": "^0.5.5",
"@types/electron-squirrel-startup": "^1.0.2",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^5.0.0",
Expand Down
15 changes: 5 additions & 10 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,22 +86,17 @@ const launchPythonServer = async () => {
executablePath = path.join(process.resourcesPath, 'UI', packagedComfyUIExecutable);
pythonProcess = spawn(executablePath, { shell: true });
}
} else {
executablePath = path.join(process.resourcesPath, 'UI', packagedComfyUIExecutable);
pythonProcess = spawn(executablePath, { shell: true });
}
} else {
// Development: use the fake Python server
if (process.platform == 'darwin') {
// On macOS, the Python executable is inside the app bundle
const pythonPath = path.join(app.getAppPath(), 'assets', 'python', 'bin', 'python');
pythonProcess = spawn(pythonPath, [scriptPath]);
} else {
executablePath = path.join(app.getAppPath(), 'ComfyUI', 'ComfyUI.sh');
pythonProcess = spawn(executablePath, {
stdio: 'pipe',
});
}
}
else {
executablePath = path.join(process.resourcesPath, 'UI', packagedComfyUIExecutable);
pythonProcess = spawn(executablePath, { shell: true });
}
}

pythonProcess.stdout.pipe(process.stdout);
Expand Down
Loading

0 comments on commit 5820825

Please sign in to comment.