riderkick / FMD

Forked from https://sf.net/p/fmd/
GNU General Public License v2.0
717 stars 212 forks source link

Add support for DomDomSoft Manga Reader program #46

Closed blue-lightning closed 9 years ago

blue-lightning commented 9 years ago

You can download it from here: http://domdomsoft.com/

I try using the syntax "E:\Setups\DomDomSoft Manga Reader\DomDomSoft Manga Reader.exe" "%PATH%" in external path but it's not working. Instead, the first and last double quotation mark disappear; the program doesn't launch either.

riderkick commented 9 years ago

use: E:\Setups\DomDomSoft Manga Reader\DomDomSoft Manga Reader.exe "%PATH%" There is an issue with external program launcher, I need to separate the params.

riderkick commented 9 years ago

Fixed with this commit https://github.com/riderkick/FMD/commit/31a711b520c89b0d8d5358c80318266458a16c02 https://github.com/riderkick/FMD/commit/c12ea69f133eaaf33915951090069331330b395b https://github.com/riderkick/FMD/commit/e6dad8401678b1cb6defe74d3893cc5cf04330e4 https://github.com/riderkick/FMD/commit/534f04d85ee81393835ec2e272c9cd72cd8099f4

blue-lightning commented 9 years ago

Still not working. Maybe because DDS Manga Reader require elevated privillige ?

riderkick commented 9 years ago

It will ask if needed.

It's working fine here with

"E:\Setups\DomDomSoft Manga Reader\DomDomSoft Manga Reader.exe" "%PATH%"

On recent build, path containing space must be inside quote. Is there by any chance your path contain unicode character? if so, there is problem with passing unicode parameter. But the external program should be launched, it just can't pass the file to be opened. If you save the file to cbz/pdf then you can leave it blank, and let fmd open it with default app associated with this extension.

blue-lightning commented 9 years ago

3 cases: 1) FMD with non-admin privilege: Nothing 2) FMD with admin privilege, parameter "%PATH%": DomDomSoft encouters an error 3) FMD with admin privilege, parameter "%PATH%%FCHAPTER%": Working, displays first downloaded chapter.

And as you've mentioned, unicode also break the Reader.

DomDomSoft's version is 1.4.3, FMD's is 0.9.16.1

riderkick commented 9 years ago

What is your path to the DMR? Can it work without admin? How if you run DMR manually from run/cmd with that param "DMR Path" "FIle/FolderPath" To what type is your downloaded file saved? If you don't mind send me your config.ini,works.ini and favorites.ini

blue-lightning commented 9 years ago

The path is exactly as you see above: "E:\Setups\DomDomSoft Manga Reader\DomDomSoft Manga Reader.exe". Not sure about the admin privilege, but everytime I start it it shoots a request so I guess it's needed. My manga storepath is also normal. I store manga as images, not compress pdf or cbr.

I just try running this command with a non-elevated command prompt, it asks for admin right and then launches DMR as expected: "E:\Setups\DomDomSoft Manga Reader\DomDomSoft Manga Reader.exe" "D:\Books\Comics\Mahou Tsukai no Yome"

Config files are here

riderkick commented 9 years ago

I've been fix the issue with admin privileges and file path. But I still can't pass unicode character in parameter. I don't know, it can be limitation on fpc.

blue-lightning commented 9 years ago

Can unicode characters be converted to number code in code page UTF-8 or similar to be passed and then reconstructed on the command prompt ? Or maybe use PowerShell instead of Command Prompt ?

riderkick commented 9 years ago

It's already in UTF-8, I've been trying decode/encode without success. It seems it's the issue with fpc. I've been trying to use CreateProcessW ShellExecuteExW without success too. http://forum.lazarus.freepascal.org/index.php?topic=22403.0 http://comments.gmane.org/gmane.comp.ide.lazarus.general/76593

I think that's why the original developers invent an option to remove all unicode character in.filename.

blue-lightning commented 9 years ago

Case 1 is fixed, but 2 is still not working. Launching DMR always results in error unless both %PATH% and %CHAPTER% is added.

Updated: Add \ ("%PATH%\") fixes the problem. Since both "%PATH%\" and "%PATH%\%CHAPTER%" work as intended, I think \ should be added to PATH permanently.

riderkick commented 9 years ago

Launching DMR with "\" at the end causing error. Launching DMR with path that doesn't exist is fine, but when launching it with existing path that ended with "\", DMR crash. It was the flaw of DMR, you should file the bug to them. Other app is fine with "\" at the end, and they should be. I remove the the end pathdelim if chapter doesn't exist. But I forgot to adjust it, if %CHAPTER% or file doesn't exist, then %PATH% should not end with pathdelim. I'll look at it.

riderkick commented 9 years ago

I think this commit should fix it. https://github.com/riderkick/FMD/commit/bcf96e5a496dc5b36f67a8a0c2cc15f7fc19cff5

blue-lightning commented 9 years ago

Confirm fixed. DMR isn't supported by DomDomSoft anymore so this bug will continue existing, sadly; but I can't find a good comic reader with long strip mode so just have to put up with it.

riderkick commented 9 years ago

What do you mean DMR isn't supported anymore? The only bug left is passing unicode character.

blue-lightning commented 9 years ago

Forgot to add "by the developers". They've pretty much dropped the project. I'll edit the comment.

riderkick commented 9 years ago

I just fix the issue with unicode character.

riderkick commented 9 years ago

I just look at Honeyview, it seems the development is still alive and well, maybe you can ask them to add long strip view mode.