View Single Post
Old 01-07-2015, 06:29 PM   #8
Vortex
Groupie
Vortex began at the beginning.
 
Vortex's Avatar
 
Posts: 171
Karma: 10
Join Date: Dec 2008
Device: Likebook Mars
Quote:
Originally Posted by PeterT View Post
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.
Peter, There is no file utils\lock.py or gui2\main.py , nearest I can find is utils\lock.pyo and gui2\main.pyo which are in the pylib.zip file. I looked at them with Edit Pad Pro and some of the same stuff is mentioned in the code but it's very different to what you have above. Am I looking in the right place?
Vortex is offline   Reply With Quote