Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are .zim files associated with kiwix-desktop on Windows? #1242

Open
rgaudin opened this issue Nov 12, 2024 · 8 comments
Open

Are .zim files associated with kiwix-desktop on Windows? #1242

rgaudin opened this issue Nov 12, 2024 · 8 comments

Comments

@rgaudin
Copy link
Member

rgaudin commented Nov 12, 2024

There's code in the repo that indicates that .ZIM file are to be associated with kiwix-desktop and it works, at least with debian package and appimage.
The ZIM icon is never displayed though…

On Windows, I found no trace of code registering the .zim extension with the app and indeed it's not working (W11).
Should it be working? There's no feature request so it's unclear.

@kelson42
Copy link
Collaborator

On Windows, I suspect this can be done only via regitery change, therefore installer.

@rgaudin
Copy link
Member Author

rgaudin commented Nov 13, 2024

On Windows, I suspect this can be done only via regitery change, therefore installer.

This QT sample uses a sort of installer but there are samples on SO with other approaches.

I think this could run from within the App itself. I dont know Windows enough but registry has a user namespace that I believe can be modified easily.

This could be run on first run or upon user request in the no-trace portable mode (we still have that?)

@Jaifroid
Copy link
Member

I know a fair bit about this, having implemented it in the PWA and in the Electron apps. Registering file extensions to apps on Windows is usually done when the app is installed. But because Kiwix Desktop doesn't use an installer and is only distributed via a ZIP (portable app), there is no registration step. Instead, the user would have to do it manually via OS controls, which is beyond most users. Therefore, the only viable solution is: provide an installer! I'd recommend NSIS for Windows 7 users, and MSIX for Windows 10+ (there are a lot of cool advantages to MSIX or APPX: virtualized registry, app isolation, no need to ask for elevated permissions)...

FYI the PWA version, when installed as a standalone app by the browser (Chromium browsers only), registers ZIM archives to open with the PWA (and provides an icon in Windows - see screenshot below, but no icon in Ubuntu). Any app that registers for specific File Types has to have File Handling enabled internally, so it knows how to read the archive that is shared with it. (File Handling is implemented in both the PWA and Electron variants.)

There is no clash if a user has more than one app that can handle ZIM archives. After a new app is installed that can handle ZIM files, the OS recognizes that there is a new option, and so asks the user next time they double-click a file whether they want to use the existing registered app, or the new one. After the user has made their choice, they are not asked again unless the user uninstalls that app or installs another capable of handling the file extension.

Image

@rgaudin
Copy link
Member Author

rgaudin commented Nov 14, 2024

Thank you @Jaifroid from this ; very valuable.

I think we have multiple alternatives here and those are not exclusive:

  • provide an installer because that's what a lot (most?) Windows users expect and are used to.
  • Provide a portable version for those that prefer
  • Provide a portable version that leaves no trace on the system for those that need the privacy

The portable versions could include a File-registration installer. It could be launched manually by the user (from suggestion in the app). Maybe it could be triggered from within the app upon user request (would that work?)

Other topic: could you consider using this ZIM file icon for icons instead of the contoured kiwix bird. That'd be more in line with the branding guidelines (that does not exist yet)

@Jaifroid
Copy link
Member

Jaifroid commented Nov 14, 2024

could you consider using this ZIM file icon for icons instead of the contoured kiwix bird. That'd be more in line with the branding guidelines (that does not exist yet)

@rgaudin The problem is that the icons are really tiny in most situations (as in my screenshot). They have to use transparency around the actual icon so that they'll work in dark mode and light mode while still looking good. They can't have extraneous detail such as page turning representations or writing that will just look like pixel smudge at his resolution. And there are strict size requirements if I remember rightly.... I'm certainly happy to help craft a new icon that fits the requirements, though it did take quite a long time to tweak the current one till it was a) recognizable at this resolution, and b) worked fine in light and dark modes.

We only have one icon that must work in both modes, hence the contour is necessary in dark mode, or else we get a single square of black and the icon is invisible. Here are the two modes side by side, which makes it clearer:

Image

@rgaudin
Copy link
Member Author

rgaudin commented Nov 14, 2024

@Jaifroid we don't want developers to do this kind of things anymore. @siemsie is in charge of this so please write down the constraints and she'll provide the appropriate icons for you.

I understand it's a single icon for light/dark/custom modes. What are supported sizes? What are the supported format? Can we use a .ico file (which supports multiple sizes)? That would allow having a more detailed icon for larger sizes.

Of course now I glimpsed at your app icons I think that's gonna be another ticket. Because there's this naming thing and I see you're using a slightly modified version and color is different as well. I think we should maybe have a call with everybody first.

@Jaifroid
Copy link
Member

@rgaudin I understand, but please remember this was done several years ago, and there were no guidelines or branding documents. I did use the official icon for this, but was forced to add the outline. As I said, happy to conform to whatever works at this resolution.

@rgaudin
Copy link
Member Author

rgaudin commented Nov 14, 2024

Oh sorry, this is not a reproach. It's all over every Kiwix repo. I'd feel bad having you invest time and effort into tweaking icons while we now have @siemsie available to ensure the general coherence (until she has time to produce said guidelines) and create appropriate icons. It actual helps to record the disparity of the use cases.

@kelson42 kelson42 added this to the 2.5.0 milestone Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants