Configure and install thumbnailer

Currently the file "src/XDGData/FreeCAD.thumbnailer" gets installed, but
the associated freecad-thumbnailer script isn't. Install the script,
too.

While here, have the paths to the default icon and freecad-thumbnailer
script follow ${CMAKE_INSTALL_DATAROOTDIR} and ${CMAKE_INSTALL_BINDIR}
respectively.
This commit is contained in:
Johannes Thyssen Tishman
2025-03-19 18:03:29 +01:00
committed by Adrián Insaurralde Avalos
parent 2fe3631fd9
commit c8b1ea2836
4 changed files with 20 additions and 6 deletions

View File

@@ -37,6 +37,7 @@ import getopt
opt, par = getopt.getopt(sys.argv[1:], "-s:")
input_file = par[0]
output_file = par[1]
default_icon = "@CMAKE_INSTALL_DATAROOTDIR@/icons/hicolor/48x48/apps/org.freecad.FreeCAD.png"
try:
# Read compressed file
@@ -54,7 +55,7 @@ try:
image = zfile.read(image)
else:
# apps should have at least 48x48 icons
freecad = open("/usr/share/icons/hicolor/48x48/apps/org.freecad.FreeCAD.png", "rb")
freecad = open(default_icon, "rb")
image = freecad.read()
# Write icon to output_file