sekwah41 / mobalytics-repackager

Mobalytics tool for linux
11 stars 3 forks source link

Add in some basic minetype for Mobalytics so browser can redirect properly #23

Open spstarr opened 2 years ago

spstarr commented 2 years ago

I sorta got a MIMEtype setup install the desktop file in ~/.local/share/applications

[Desktop Entry]
Name=Mobalytics
StartupWMClass=mobalytics-desktop
Comment=Mobalytics Desktop
GenericName=Mobalytics Desktop for Linux
Exec=/home/spstarr/Mobalytics-1.98.239.AppImage %U
Icon=/usr/share/pixmaps/mobalytics.png
Type=Application
StartupNotify=true
MimeType=x-scheme-handler/mobalytics;

xdg-mime default mobalytics.desktop x-scheme-handler/mobalytics update-mime-database ~/.local/share/applications/

spstarr commented 2 years ago

It is hooked into the desktop:

image

sekwah41 commented 2 years ago

Given the settings, it should already have the mimetype setup or at least its working for me on manjaro for snap.

https://github.com/sekwah41/mobalytics-repackager/blob/dcf8f09d8b0dcae7cb8054e0399cc25e2ff0c64f/electron-builder/config.js#L22-L27

Though I'll take a look into it after work in about an hour. May need to alter stuff for AppImage.

ogaseb commented 1 year ago

This should be added to the README.md tbh

I sorta got a MIMEtype setup install the desktop file in ~/.local/share/applications

[Desktop Entry]
Name=Mobalytics
StartupWMClass=mobalytics-desktop
Comment=Mobalytics Desktop
GenericName=Mobalytics Desktop for Linux
Exec=/home/spstarr/Mobalytics-1.98.239.AppImage %U
Icon=/usr/share/pixmaps/mobalytics.png
Type=Application
StartupNotify=true
MimeType=x-scheme-handler/mobalytics;
* Extract the PNG icon from the asar resources

xdg-mime default mobalytics.desktop x-scheme-handler/mobalytics update-mime-database ~/.local/share/applications/

sekwah41 commented 1 year ago

Turns out the reason that this was no longer being set it electron-builder removing desktop integration as part of the tool in v21 image

I will revert the builder back down to v20 so we can get the proper desktop integration, though ill also link this issue to the readme.

sekwah41 commented 1 year ago

Yup downgrading brings back this menu. I was wondering why it had vanished and though it was some weird manjaro update not electron builder.

Btw im back to actively developing my projects so if you guys have any more issues or suggestions feel free to poke me. (I am trying to do more to get experience writing software so this is just fun to experiment)

image

Ill upload a version with this later unless i find a reason no to.

sekwah41 commented 1 year ago

Seems there is a reason behind it, though ill look to get some stuff working still https://github.com/electron-userland/electron-builder/releases/tag/v21.0.1