View Single Post
Old 01-04-2015, 06:12 PM   #4
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,537
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
If you're truly desperate, one option would be to change the mutex used by calibre to prevent multiple instances running. One approach to this would be run standard calibre as is, and to run portable calibre from source, and override the mutex used by calibre portable.

See source file utils\lock.py and look at
Code:
if iswindows:
    def singleinstance(name):
        mutexname = 'mutexforsingleinstanceof'+__appname__+name
        mutex =  win32event.CreateMutex(None, False, mutexname)
__appname__ is calibre

singleinstance is called from gui2\main.py with the variable
Code:
singleinstance_name = 'calibre_GUI'
so maybe change that to
Code:
singleinstance_name = 'calibre_PORTABLE'
and always runs portable from source.

Remember though NEVER EVER EVER point both to the same library.

Also, this has NOT been tested and I am NOT RESPONSIBLE for any corruption that might happen.
PeterT is offline   Reply With Quote