Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve UNINSTALL logic #89

Closed
robinjhuang opened this issue Oct 15, 2024 · 3 comments
Closed

Improve UNINSTALL logic #89

robinjhuang opened this issue Oct 15, 2024 · 3 comments
Assignees
Labels

Comments

@robinjhuang
Copy link
Member

robinjhuang commented Oct 15, 2024

Add custom uninstall logic to Windows NSIS:

  1. Should delete the extra_model_config.yaml file. This is always saved to app.getPath('userData').

Bonus: Read the file and the python environment located at "base_path". For example, it should delete everything under /Users/junhanhuang/Documents/ComfyUI/.venv and /Users/junhanhuang/Documents/ComfyUI/uv-cache

eg.

# ComfyUI extra_model_paths.yaml for darwin
comfyui:
  base_path: /Users/junhanhuang/Documents/ComfyUI
  is_default: true
  checkpoints: models/checkpoints/
  classifiers: models/classifiers/
  clip: models/clip/
  clip_vision: models/clip_vision/
  configs: models/configs/
  controlnet: models/controlnet/
  diffusers: models/diffusers/
  diffusion_models: models/diffusion_models/
  embeddings: models/embeddings/
  gligen: models/gligen/
  hypernetworks: models/hypernetworks/
  loras: models/loras/
  photomaker: models/photomaker/
  style_models: models/style_models/
  unet: models/unet/
  upscale_models: models/upscale_models/
  vae: models/vae/
  vae_approx: models/vae_approx/
  custom_nodes: custom_nodes/

A development script that does this already exists in: 8e55f55

@robinjhuang robinjhuang changed the title UNINSTALL Fix UNINSTALL logic Oct 22, 2024
@robinjhuang robinjhuang changed the title Fix UNINSTALL logic Improve UNINSTALL logic Oct 22, 2024
@robinjhuang robinjhuang self-assigned this Oct 25, 2024
@robinjhuang robinjhuang added the V1 label Nov 2, 2024
@robinjhuang
Copy link
Member Author

From Dave:

Yes, you can add something like this:
!macro customUnInstall
ExecWait "del /f C:\Some\Path"
!macroend
https://www.npmjs.com/package/@todesktop/cli#windowsnsisinclude---optional-string

@robinjhuang
Copy link
Member Author

robinjhuang commented Nov 17, 2024

Can we encompass this logic as a function that we can expose in the Electron API as "resetInstall" command?

Needed in: rg/electron/issues/270

We want to add this as a button you can click when an error occurs...

@robinjhuang
Copy link
Member Author

#279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants