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.47k stars 209 forks source link

Remove unnecessary if statement and fix libcaesium error #210

Closed 4G3NT closed 1 year ago

4G3NT commented 1 year ago

caesium-image-compressor: error while loading shared libraries: libcaesium.so: cannot open shared object file: No such file or directory

Install target doesn't copy libcaesium.so to the install prefix and symlinks it to /usr/lib/libcaesium.so, thus causing Caesium Image Compressor to fail to locate it.

4G3NT commented 1 year ago

If you have a more efficient way of doing this, please make a suggestion and I will apply it.

Lymphatus commented 1 year ago

I think it may break if you already have libcaesium in you lib path. If you look at #199 the goal here was to be able to build if you already had the library on your own. So maybe it's better check if already it's there before symlinking.

4G3NT commented 1 year ago

I tested it by having the Caesium Image Compressor already installed and with a dead symlink /usr/lib/libcaesium.so -> /usr/local/lib, and it worked fine. Can you test it yourself and see if that's the case?

4G3NT commented 1 year ago

image

before and after installation

Lymphatus commented 1 year ago

Seems ok to me, but I would just wrap the part where you install libcaesium in a IF (NOT LIBCAESIUM). If someone has already a libcaesium installation I'd rather not mess with it and leave as it is.