From 7fb49354d9343ade1f579896b5c2f346ed39e882 Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:37:56 +1100 Subject: [PATCH] Add README troubleshooting / cross platform (#305) * nit * Read .profile / .bashrc from vscode debug launch * Add README cross-platform build example * Add README troubleshooting steps --- .vscode/tasks.json | 3 +++ README.md | 31 ++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 7cae0cf2..32a24ab5 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -5,6 +5,9 @@ "label": "Start Vite Dev Server", "type": "shell", "command": "yarn start", + "linux": { + "options": { "shell": { "args": ["-ci"] } } + }, "isBackground": true, "problemMatcher": { "pattern": { diff --git a/README.md b/README.md index 0b918746..c02a78b9 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,9 @@ This command will install ComfyUI under `assets`, as well ComfyUI-Manager, and t Second, you need to install `uv`. This will be bundled with the distributable, but we also need it locally. -`yarn download:uv` +```bash +yarn download:uv +``` You can then run `start` to build/launch the code and a live buildserver that will automatically rebuild the code on any changes: @@ -169,8 +171,12 @@ You can also build the package and/or distributables using the `make` command: ```bash # build the platform-dependent package and any distributables yarn make +# build cross-platform, e.g. windows from linux +yarn make --windows ``` +### Troubleshooting + If you get an error similar to: ``` @@ -193,12 +199,35 @@ yarn install electron-rebuild ``` +#### Missing libraries + +You may get errors reporting that the build is unable to find e.g. `libnss3.so` if `electron` prerequisites are not included in your distro. Find the correct package for your distro and install. + +`apt` example: + +``` +apt-get install libnss3 +``` + ### Debugger There are helpful debug launch scripts for VSCode / Cursor under `.vscode/launch.json`. It will start the dev server as defined in `.vscode/tasks.json`. Then attach the debugger. This can be used simply by pressing `F5` in VSCode or VSCode derivative. +The launch environment can be customised, e.g. add a `"linux"` section to source your `~/.profile` (and other interactive config) when debugging in linux: + +```json +{ + "version": "2.0.0", + "tasks": [ + { + "linux": { "options": { "shell": { "args": ["-ci"] } } } + } + ] +} +``` + # Release We use Todesktop to build and codesign our distributables. To make a new release: