Quote:
Originally Posted by eschwartz
Should be as simple as setting the cwd to the parent directory of the ebook file.
I can't specifically think of any reason why that might be a bad idea, so, if you are talking about the plugin, here is a patch and a fixed copy that does just that.
|
Thanks, though I am not feeling safe modifying calibre files.
I got my solution through autoit exe, which acts as a cmd file - splits path and file name, CD's to path and runs my viewer.
I compiled it to exe and this works.
Code if anyone else will want this function in future, though it's pretty specific to alreader2 and there's almost none other viewers which save bookmarks in external file in same folder (so I can copy both files anywhere and keep bookmarks working)
Code:
#include <File.au3>
global $drive, $path, $fname, $fext
_PathSplit($cmdline[1],$drive,$path,$fname,$fext)
FileChangeDir($drive & $path)
$cmd = "D:\Office\AlReader\AlReader2.exe """ & $fname & $fext & """"
Run("D:\Office\AlReader\AlReader2.exe """ & $fname & $fext & """");
Not very good solution, but it's better for me than recompiling calibre with patch on each version update. I use by default calibre-viewer - for 'static' epub files, where bookmarks are saved in file, alreader2 is used for epubs 'in progress' where an update of file will erase all bookmarks