Tools: [skip ci] extend doc string of FreeCAD thumbnailer

This commit is contained in:
wmayer
2020-12-14 11:22:12 +01:00
parent fa7bf5e0ff
commit 91e52cc1b9

View File

@@ -3,22 +3,32 @@
Installation:
- This executable file should be on the PATH so it can be found
"$ sudo cp freecad-thumbnailer /usr/share/bin"
- the application/x-extension-fcstd MIME type should be registered
Check that a corresponding /usr/share/mime/packages/freecad.xml file exists
Make sure the MIME database is up to date
"$ sudo update-mime-database /usr/share/mime"
- Register this thumbnailer
Adding a file /usr/share/thumbnailers/FreeCAD.thumbnailer with the following content:
"$ sudo cp freecad-thumbnailer /usr/bin"
and must have execution rights
"$ sudo chmod +x /usr/bin/freecad-thumbnailer"
[Thumbnailer Entry]
TryExec=freecad-thumbnailer
Exec=freecad-thumbnailer -s %s %i %o
MimeType=application/x-extension-fcstd;
- If a FreeCAD project file doesn't include a thumbnail the file freecad.png is used.
Thus, the file src/Gui/Icons/freecad-icon-48.png must be installed.
"$ sudo cp freecad-icon-48.png /usr/share/icons/hicolor/48x48/apps/freecad.png"
- The application/x-extension-fcstd MIME type should be registered
Check that a corresponding /usr/share/mime/packages/freecad.xml file exists
Make sure the MIME database is up to date
"$ sudo update-mime-database /usr/share/mime"
- Register this thumbnailer
Adding a file /usr/share/thumbnailers/FreeCAD.thumbnailer with the following content:
[Thumbnailer Entry]
TryExec=freecad-thumbnailer
Exec=freecad-thumbnailer -s %s %i %o
MimeType=application/x-extension-fcstd;
HINT: Make sure that the symlink /usr/bin/python exists and points to the Python executable
NOTE: To make sure FreeCAD saves thumbnail information:
Edit -> Preferences... -> Document -> Save thumbnail into project when saving document
Edit -> Preferences... -> Document -> Save thumbnail into project when saving document
"""
import sys
import zipfile