Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-19-2014, 06:34 PM   #1
blackest
Connoisseur
blackest began at the beginning.
 
Posts: 67
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
plugin path error 0.8.1 launcher.py help

hi I can't launch a plugin

the error is

Installation Error: plugin launcher /usr/local/share/../share/sigil/plugin_launchers//python/launcher.py does not exist

The path should be /usr/local/share/sigil/plugin_launchers/python/launcher.py

not sure if its a config file error or if its an error in sigil
blackest is offline   Reply With Quote
Old 10-19-2014, 06:47 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi,
Not sure either. This code changed in the latest release. The key snippet is:

Code:
QString PluginDB::launcherRoot()
{
    QString launcher_root;

    launcher_root = QCoreApplication::applicationDirPath();

#ifdef Q_OS_MAC
    launcher_root += "/../plugin_launchers/";
#elif defined(Q_OS_WIN32)
    launcher_root += "/plugin_launchers/";
#elif !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
    // all flavours of linux / unix
    launcher_root += "/../share/" + QCoreApplication::applicationName().toLower() + "/plugin_launchers/";
    // user supplied environment variable to plugin launcher directory will overrides everything
    const QString env_launcher_location = QString(getenv("SIGIL_PLUGIN_LAUNCHERS"));
    if (!env_launcher_location.isEmpty()) {
        launcher_root = env_launcher_location + "/";
    }
#endif

    return launcher_root;
}
So you might check to see if the environment variable SIGIL_PLUGIN_LAUNCHERS is being used and if so if it is set properly.

The remainder of the path is added in this snippet of code fromPluginRunner.cpp

Code:
    // Note: Keep SupportedEngines() in sync with the engine calling code here.
    if ((m_engine == "python2.7") || (m_engine == "python3.4")) {
        m_launcherPath = launcher_root + "/python/launcher.py";
        m_pluginPath = m_pluginsFolder + "/" + m_pluginName + "/" + "plugin.py";
        if (!QFileInfo(m_launcherPath).exists()) {
            Utility::DisplayStdErrorDialog(tr("Installation Error: plugin launcher ") +
                                           m_launcherPath + tr(" does not exist"));
            reject();
            return QDialog::Rejected;
        }
    } else {
        Utility::DisplayStdErrorDialog(tr("Error: plugin engine ") +
                                       m_engine + tr(" is not supported (yet!)"));
        reject();
        return QDialog::Rejected;
    }
So it looks like the double // are guaranteed the way the code reads now. But // should not be an issue on Linux or MacOSX, the should be indentical to one slash.

So your two paths should be equivalent unless there is a symlink or something being used.

In other words:

/usr/local/share/../share/sigil/plugin_launchers//python/launcher.py

should be equivalent to

/usr/local/share/sigil/plugin_launchers/python/launcher.py

So the error makes no sense. You could try adding the following to the shell script that launches Sigil:

export SIGIL_PLUGIN_LAUNCHERS=/usr/local/share/sigil/plugin_launchers

And see if it helps.

KevinH

Last edited by KevinH; 10-19-2014 at 07:10 PM.
KevinH is offline   Reply With Quote
Advert
Old 10-19-2014, 07:55 PM   #3
blackest
Connoisseur
blackest began at the beginning.
 
Posts: 67
Karma: 10
Join Date: Sep 2014
Device: sony prs 2
Quote:
Originally Posted by KevinH View Post
Hi,
Not sure either. This code changed in the latest release. The key snippet is:

Code:
QString PluginDB::launcherRoot()
{
    QString launcher_root;

    launcher_root = QCoreApplication::applicationDirPath();

#ifdef Q_OS_MAC
    launcher_root += "/../plugin_launchers/";
#elif defined(Q_OS_WIN32)
    launcher_root += "/plugin_launchers/";
#elif !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
    // all flavours of linux / unix
    launcher_root += "/../share/" + QCoreApplication::applicationName().toLower() + "/plugin_launchers/";
    // user supplied environment variable to plugin launcher directory will overrides everything
    const QString env_launcher_location = QString(getenv("SIGIL_PLUGIN_LAUNCHERS"));
    if (!env_launcher_location.isEmpty()) {
        launcher_root = env_launcher_location + "/";
    }
#endif

    return launcher_root;
}
So you might check to see if the environment variable SIGIL_PLUGIN_LAUNCHERS is being used and if so if it is set properly.

The remainder of the path is added in this snippet of code fromPluginRunner.cpp

Code:
    // Note: Keep SupportedEngines() in sync with the engine calling code here.
    if ((m_engine == "python2.7") || (m_engine == "python3.4")) {
        m_launcherPath = launcher_root + "/python/launcher.py";
        m_pluginPath = m_pluginsFolder + "/" + m_pluginName + "/" + "plugin.py";
        if (!QFileInfo(m_launcherPath).exists()) {
            Utility::DisplayStdErrorDialog(tr("Installation Error: plugin launcher ") +
                                           m_launcherPath + tr(" does not exist"));
            reject();
            return QDialog::Rejected;
        }
    } else {
        Utility::DisplayStdErrorDialog(tr("Error: plugin engine ") +
                                       m_engine + tr(" is not supported (yet!)"));
        reject();
        return QDialog::Rejected;
    }
So it looks like the double // are guaranteed the way the code reads now. But // should not be an issue on Linux or MacOSX, the should be indentical to one slash.

So your two paths should be equivalent unless there is a symlink or something being used.

In other words:

/usr/local/share/../share/sigil/plugin_launchers//python/launcher.py

should be equivalent to

/usr/local/share/sigil/plugin_launchers/python/launcher.py

So the error makes no sense. You could try adding the following to the shell script that launches Sigil:

export SIGIL_PLUGIN_LAUNCHERS=/usr/local/share/sigil/plugin_launchers

And see if it helps.

KevinH
I went for the easy option
This is the content of usr/bin/local/sigil now which works

export LD_LIBRARY_PATH=/opt/Qt/5.3/gcc/lib
export SIGIL_PLUGIN_LAUNCHERS=/usr/local/share/sigil/plugin_launchers
#~/sigil-0.8.1/run/bin/sigil
/usr/local/share/sigil/sigil

This is a bit different from diaps launcher as he distributes the qt libs with his sigil (sigil.real) where my qt libs are installed from qts installer and I built from source in my home folder and then moved sigil to /usr/local/share/sigil/sigil
building for osx is so much nicer as you get to build a dmg file which is naturally distributable. I've not built 0.8.1 for lion yet, i'm lazy. i'll do it if someone wants it thou.

i tried out the path with // and .. in and it works fine i even tried tty2 to see if it was different but thats fine with it to. So really shouldn't be a bug is fair to say.

Last edited by blackest; 10-19-2014 at 08:11 PM. Reason: more info
blackest is offline   Reply With Quote
Old 10-19-2014, 09:12 PM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Yes. The launcher root is expected (on Linux) to be found in the /share directory adjacent to the directory the Sigil binary is in. This will work "as is" if Sigil is installed to either of the "typical" /usr or /usr/local prefixes. If you relocate the binary (as I've done in my binary packages)--or the entire installation--to somewhere where that the typical ./bin ./share structure doesn't exist, then it will be necessary to set the launcher root directory manually via the SIGIL_PLUGIN_LAUNCHERS environment variable (either in your bash profile or the Sigil launch script).

I jump through the hoops I do with my binary package so that the Sigil.desktop file (/usr/local/share/applications) still functions as expected with regard to the various Linux Desktop Environments, their menus, and the "open with" context menus. Rather than launching from a terminal, the application launcher from the menu system can be easily copied to the desktop.

Last edited by DiapDealer; 10-19-2014 at 10:00 PM.
DiapDealer is online now   Reply With Quote
Reply

Tags
bug


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
eBook Path in Plugin Sladd Development 2 06-27-2014 12:43 PM
Is there a plugin to show books with no path puremagic Plugins 2 08-16-2013 08:29 AM
Driver plugin: get file path of ebook? jgoguen Development 5 01-14-2013 07:27 AM
User Defined device plugin - path scubaman Devices 1 12-22-2011 11:44 AM
Path Error Help CSL Calibre 0 04-24-2009 03:07 PM


All times are GMT -4. The time now is 10:10 PM.


MobileRead.com is a privately owned, operated and funded community.