View Single Post
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