bgrabitmap / lazpaint

🎨 Cross-platform image editor with raster and vector layers similar to Paint.Net written in Lazarus (Free Pascal)
https://lazpaint.github.io/
GNU General Public License v3.0
405 stars 57 forks source link

Add to Windows 10 Settings Default Applications #97

Closed lainz closed 4 years ago

lainz commented 4 years ago

Hi, I think I need to setup LazPaint as default image viewer, since the Windows 10 image viewer is slow on my PC.

There is a setting on Windows 10: windows_default_apps

But LazPaint is not listed there.

I think this can be done using registry, but is a guess... maybe we can ask how Gimp did get added there in some Gimp forum?

I know that the default file associations can be done when we install LazPaint as well, but this Windows setting will be nice to have too.

circular17 commented 4 years ago

There is probably some registry setting. Maybe this could be done by the installer?

lainz commented 4 years ago

Yes if it's a registry setting for sure, inno setup can handle registry.

lainz commented 4 years ago

Well Gimp registers more stuff, with this tool searching for "gimp" it shows more registry entries that lazpaint https://www.nirsoft.net/utils/regscanner.html

But yet I need to test if adding these to lazpaint shows it in the list or not

circular17 commented 4 years ago

Hmmm ok.

There is no documentation online about it ?

lainz commented 4 years ago

Not one I found that works for images, I found the gimp source code of installer but not have time to check it yet

https://gitlab.gnome.org/GNOME/gimp/blob/fe35294ee7c244367dfb4963b7c72c86d0e3ac44/build/windows/installer/associations.isi

lainz commented 4 years ago

On the registry I found nothing, I compared VLC that's the video player that is listed on default video player and Gimp that is listed on image viewer, nothing special about these, just that these supports a lot of file extensions.

Maybe Windows detects the file associations each application supports (in capabilities / file associations, lazpaint is registered there) and if it match the file associations for the category it adds it automatically.

For example this app is listed, and these are the associations checked when I select it from the menu: windows_image_viewer

Also there's nothing special in the gimp inno setup script.

circular17 commented 4 years ago

Hmm puzzling

lainz commented 4 years ago

Now it works! I've added the rest of the supported file formats of LazPaint in the windows installer.