Lymphatus / caesium-image-compressor

Caesium is an image compression software that helps you store, send and share digital pictures, supporting JPG, PNG, WebP and TIFF formats. You can quickly reduce the file size (and resolution, if you want) by preserving the overall quality of the image.
https://saerasoft.com/caesium
GNU General Public License v3.0
3.73k stars 218 forks source link

Windows portable app not truly portable. Stores app settings in registry. #317

Open stamminator opened 3 weeks ago

stamminator commented 3 weeks ago

I wanted to manually update version 2.7.1 of the win-portable Caesium app I'm currently using to 2.8.2 and went to make sure my settings/preferences wouldn't be erased upon updating. I was expecting to find a configuration file of some kind in the app directory (.ini, .json, .db, etc.), but after some digging, I realized it's storing data in a few places:

While this does mean I should be safe to just update via copy/paste without losing my settings, unfortunately it also means it isn't a portable app, since it's not self-contained. It would be great if the portable version were compiled to use a local config file. I'm no expert in portable apps, but one idea would be to handle it the way WinSetView handles it by entirely omitting the config file/directory from the build and only creating it at runtime, making it safe to copy/paste the entire root directory contents of a new portable install right over an existing one without losing settings.

Lymphatus commented 3 weeks ago

Yes, you're right. This is something I need to address because the app is indeed portable, but settings aren't, which is not right. The solution is just to say to the app to store the settings in an .ini (or whatever format) instead of the registry if the app is portable, which is a configuration passed at compile time.