Fixes AppImage build

- RawTherapee app icon should be installed in hicolor theme provided in AppImage package
- Fix wrong searching path for SVG/PNG images in rtscalable.h
This commit is contained in:
Pandagrapher 2023-09-12 11:59:43 +02:00
parent 735958fc0d
commit e255a77fcd
13 changed files with 63 additions and 48 deletions

View File

@ -366,12 +366,14 @@ endif()
if(NOT DEFINED ICONSDIR)
if(UNIX)
if(BUILD_BUNDLE)
set(ICONSDIR "${DATADIR}/icons")
if(APPLE)
set(ICONSDIR "${DATADIR}/icons")
else()
set(ICONSDIR "${DATADIR}/share/icons")
endif()
else()
set(ICONSDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
endif()
else()
set(ICONSDIR "${DATADIR}/icons")
endif()
endif()

View File

@ -6,7 +6,7 @@ file(GLOB DCPFILES "dcpprofiles/*")
set(PROFILESDIR "profiles")
set(THEMEDIR "themes")
set(ICONSDIR "icons")
set(ICONTHEMEDIR "icons")
set(IMAGESDIR "images")
if(WIN32)
@ -24,6 +24,7 @@ endif()
if(UNIX)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/rawtherapee.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop" DESTINATION ${DESKTOPDIR})
install(DIRECTORY "${ICONTHEMEDIR}/hicolor" DESTINATION "${ICONSDIR}")
endif()
install(FILES ${LANGUAGEFILES} DESTINATION "${DATADIR}/languages")
@ -35,7 +36,7 @@ install(FILES ${OPTIONSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OW
install(DIRECTORY "${PROFILESDIR}" DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.pp3")
install(DIRECTORY "${THEMEDIR}" DESTINATION "${DATADIR}")
install(DIRECTORY "${ICONSDIR}" DESTINATION "${DATADIR}")
install(DIRECTORY "${ICONTHEMEDIR}/rawtherapee" DESTINATION "${DATADIR}/${ICONTHEMEDIR}")
install(DIRECTORY "${IMAGESDIR}" DESTINATION "${DATADIR}")
if(APPLE)

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,48 @@
[Icon Theme]
Name=Hicolor
Comment=RawTherapee app icon
Hidden=true
Directories=16x16/apps,24x24/apps,32x32/apps,48x48/apps,64x64/apps,128x128/apps,256x256/apps,scalable/apps
[16x16/apps]
Size=16
Context=ApplicationIcons
Type=Threshold
[24x24/apps]
Size=24
Context=ApplicationIcons
Type=Threshold
[32x32/apps]
Size=32
Context=ApplicationIcons
Type=Threshold
[48x48/apps]
Size=48
Context=ApplicationIcons
Type=Threshold
[64x64/apps]
Size=64
Context=ApplicationIcons
Type=Threshold
[128x128/apps]
Size=128
Context=ApplicationIcons
Type=Threshold
[256x256/apps]
Size=256
Context=ApplicationIcons
Type=Threshold
[scalable/apps]
MinSize=16
Size=128
MaxSize=256
Context=ApplicationIcons
Type=Scalable

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -2,51 +2,14 @@
Name=RawTherapee
Comment=RawTherapee icon theme
Inherits=Adwaita
Directories=16x16/app_icons,24x24/app_icons,32x32/app_icons,48x48/app_icons,64x64/app_icons,128x128/app_icons,256x256/app_icons,scalable/app_icons,scalable/apps
Directories=24x24/apps,scalable/apps
[16x16/app_icons]
Size=16
Context=ApplicationIcons
Type=Threshold
[24x24/app_icons]
[24x24/apps]
Size=24
Context=ApplicationIcons
Context=Applications
Type=Threshold
[32x32/app_icons]
Size=32
Context=ApplicationIcons
Type=Threshold
[48x48/app_icons]
Size=48
Context=ApplicationIcons
Type=Threshold
[64x64/app_icons]
Size=64
Context=ApplicationIcons
Type=Threshold
[128x128/app_icons]
Size=128
Context=ApplicationIcons
Type=Threshold
[256x256/app_icons]
Size=256
Context=ApplicationIcons
Type=Threshold
[scalable/app_icons]
MinSize=16
Size=128
MaxSize=256
Context=ApplicationIcons
Type=Scalable
[scalable/apps]
MinSize=16
Size=128

View File

@ -24,9 +24,10 @@
#include <librsvg/rsvg.h>
#include "../rtengine/settings.h"
#include "config.h"
#include "guiutils.h"
extern Glib::ustring argv0;
// Default static parameter values
double RTScalable::dpi = 96.;
int RTScalable::scale = 1;
@ -118,7 +119,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadSurfaceFromPNG(const Glib::us
path = fname;
} else {
// Look for PNG file in "images" folder
Glib::ustring imagesFolder = Glib::build_filename(DATA_SEARCH_PATH, "images");
Glib::ustring imagesFolder = Glib::build_filename(argv0, "images");
path = Glib::build_filename(imagesFolder, fname);
}
@ -145,7 +146,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadSurfaceFromSVG(const Glib::us
path = fname;
} else {
// Look for SVG file in "images" folder
Glib::ustring imagesFolder = Glib::build_filename(DATA_SEARCH_PATH, "images");
Glib::ustring imagesFolder = Glib::build_filename(argv0, "images");
path = Glib::build_filename(imagesFolder, fname);
}