edrlab / thorium-reader

A cross platform desktop reading app, based on the Readium Desktop toolkit
https://www.edrlab.org/software/thorium-reader/
BSD 3-Clause "New" or "Revised" License
1.8k stars 154 forks source link

Double click to open a EPUB on Windows? #2163

Open seaspeak opened 5 months ago

seaspeak commented 5 months ago

Windows or Store version Thorium.Setup.2.4.1 won't open the clicked EPUB. I am always using Thorium.Setup.2.3.0-alpha.1.3658607447.exe, It is the only version I konw, could open the double-clicked EPUB.

panaC commented 5 months ago

Isn't a registry issue ? could you clear your registry epub file association, to let the window store make the association again. I'm on mac, not a windows user

seaspeak commented 5 months ago

Not an association problem, I guess. 2.4.1 brings up the main window (as below) and even not import the book/epub and not open the epub.

image

panaC commented 5 months ago

You cannot import an epub and open it in Thorium 2.4.1 at all ?

seaspeak commented 5 months ago

If I double-click a new epub, version Thorium.2.3.0-alpha.1.3658607447 will import the new epub and open it in a seperated window. But 2.4 just open the main window, and doesn't even import the new epub.

And yes, I can import a new epub by drag&drop or add in the main window.

panaC commented 5 months ago

Ok i will check on my side

danielweck commented 5 months ago

We will not be able to debug/troubleshoot this from Thorium APPX deployed to the Microsoft Windows Store, but hopefully we will be able to reproduce with the NSIS executable which installs Thorium for either all users or the current local one (i cannot remember what the Electron Builder does)

panaC commented 5 months ago

It works on my windows 11 pro machine. I remove by security any application associated with epub file association in Registry Editor. I tested both with a local Thorium build npm run prepackage:win && npm run package:win and Official Github Release 2.4.1 (https://github.com/edrlab/thorium-reader/releases/download/v2.4.1/Thorium.Setup.2.4.1.exe)

File association (double click, or open with) works with Thorium already open or not.

I should be abble to reproduce to help you. I keep the issue open

danielweck commented 5 months ago

Thank you for testing @panaC You don't have to manually invoke the "pre" (or "post") build scripts, they are automatically resolved by NPM when calling npm run package:win

danielweck commented 5 months ago

So could the problem experienced by some users be limited to the Windows Store version? Or maybe the NSIS executable installer is affected when users install the Windows Store version in parallel too?

seaspeak commented 5 months ago

I should be abble to reproduce to help you. I keep the issue open

I am sorry, I am confused. Can you reproduce the problem or you don't have the problem on your site?

I tested the Official Github Release 2.4.1 in Windows 10 Sandbox, so that I don't have to worry about cleaning the registry or user folders. I got the same result.

https://github.com/edrlab/thorium-reader/assets/8821870/5aa9371f-7b0a-4ef8-a8cc-908477b8b62c

danielweck commented 5 months ago

just out of interest, are you able to test with Windows 11?

seaspeak commented 5 months ago

Just tested on my colleague's notebook running Windows 11. It works. I tested release 2.4.1 on Windows 10 Sandbox and a fresh virtual machine, all are not working. So I may be 'confident' to say it is really not working on Window 10. Am I really the only one still using Windows 10? Why isn't anyone feedback this question?

panaC commented 5 months ago

Surely a breaking change with Electron, sorry !

danielweck commented 5 months ago

Thorium, just like other apps built with Electron, doesn't control at a low-level how file associations are created. I guess Electron Builder broke some Windows 10 backward compatibility ... or maybe the NSIS installer which probably is responsible for configuring the registry.