diff --git a/setup/installer/linux/freeze.py b/setup/installer/linux/freeze.py index ca78da9c83..067862e4ba 100644 --- a/setup/installer/linux/freeze.py +++ b/setup/installer/linux/freeze.py @@ -161,8 +161,6 @@ class LinuxFreeze(Command): elif exe not in executables: print >>sys.stderr, 'Invalid invocation of calibre loader. CALIBRE_CX_EXE=%%s is unknown'%%exe else: - from PyQt4.QtCore import QCoreApplication - QCoreApplication.setLibraryPaths([sys.frozen_path, os.path.join(sys.frozen_path, "qtplugins")]) sys.argv[0] = exe module, func = executables[exe] module = __import__(module, fromlist=[1]) @@ -248,6 +246,7 @@ class LinuxFreeze(Command): export MAGICK_CONFIGURE_PATH=$base/ImageMagick/config export MAGICK_CODER_MODULE_PATH=$base/ImageMagick/modules-Q16/coders export MAGICK_CODER_FILTER_PATH=$base/ImageMagick/modules-Q16/filter + export QT_PLUGIN_PATH=$base/qtplugins $loader "$@" ''')%exe) os.chmod(path, 0755) diff --git a/src/calibre/libunrar.py b/src/calibre/libunrar.py index ed09d66a46..06732b931a 100644 --- a/src/calibre/libunrar.py +++ b/src/calibre/libunrar.py @@ -27,6 +27,9 @@ else: if hasattr(sys, 'frozen') and iswindows: lp = os.path.join(os.path.dirname(sys.executable), 'DLLs', 'unrar.dll') _libunrar = cdll.LoadLibrary(lp) +elif hasattr(sys, 'frozen_path'): + lp = os.path.join(sys.frozen_path, 'libunrar.so') + _libunrar = cdll.LoadLibrary(lp) else: _libunrar = load_library(_librar_name, cdll)