View Single Post
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: 8,879
Karma: 6120478
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