fstl-app / fstl

A fast STL file viewer
449 stars 105 forks source link

Add .desktop file for linux and a .png version of the icon. #40

Closed ApostolosB closed 2 months ago

ApostolosB commented 5 years ago

The desktop can be something like:

Type=Application Version= 0.9.3 Name=fstl Comment=Fast viewer for .stl files. Exec=fstl %F Categories=Graphics; Icon=fstl.png

The png is something someone must export from the ico file or convert the original file.

DeveloperPaul123 commented 4 years ago

Would you consider filing a PR for this?

VestigeJ commented 4 years ago

I’d recommend packaging it as a snap package or appimage to hit several linux distros at once.

ApostolosB commented 3 years ago

Would you consider filing a PR for this?

while what i wrote on the first comment will work as a desktop file i have no idea where those are placed and how they are installed. As for the icon we will probably need the original file.

mboerwinkle commented 3 years ago

I think .desktop files are supposed to be either installed by 'make install' (if building from source) or handled by whoever packages it for release per platform. Geany places their .desktop file in their root directory and has a directory for icons, but they primarily target Linux. Based on how platform specific stuff is currently set up in this repo, I would suggest making a new directory named "linux" (or something. As a parallel to "app" and "exe") containing the .desktop file and the .png icon. We would then need to do something with cmake so that 'make install' handles the .desktop and .png on relevant platforms. I can probably do more research and tackle this at some point, but please let me know if you have any thoughts. Martin

ApostolosB commented 3 years ago

By looking at other linux projects that also support macos they seem to have a directory with sub directories for each OS. those include . desktop and whatever is needed. About the installation stuff i have no idea.

DeveloperPaul123 commented 3 years ago

Thanks for the updates and suggestions @mboerwinkle @ApostolosB, I think I have the information I need to implement this. Doesn't seem like it would be too hard.

pablorq commented 3 years ago

Hi!

This is a simple installer for the desktop file on Ubuntu 20.10, but it should work on other Linux systems.

Inside the .zip file there are:

The installer just copy the desktop and icon files to their corresponding directories. Admin credentials (sudo) are required.

Enjoy!

fstl-desktop.zip

nathaneltitane commented 2 years ago

This sis quite important as there is no way as of now to associate the mimetype automatically on install for light systems using i3wm or similar.

The desktop file must also specify the mimetype for handling xdg-open queries. Here is a more complete sample copied from meshlab:

[Desktop Entry] Version=1.0 Name=fstl GenericName=STL viewer Comment=View STL model files Type=Application Exec=fstl Icon=icon.png Terminal=false MimeType=model/stl Categories=Graphics;3DGraphics;Viewer;Qt;

DeveloperPaul123 commented 2 months ago

Closed in #101