[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [krita] plugins/extensions/pykrita/plugin: Try to make Krita run as an appimage again
From:       Boudewijn Rempt <null () kde ! org>
Date:       2018-06-20 9:29:02
Message-ID: E1fVZQE-0002PB-Aw () code ! kde ! org
[Download RAW message or body]

Git commit 410255d029cf4ceaadc4d95ef0c9edefb32f471c by Boudewijn Rempt.
Committed on 20/06/2018 at 09:20.
Pushed by rempt into branch 'master'.

Try to make Krita run as an appimage again

This reverts part of

commit 6509644e3cb89610fce1f2925b0126c9bc1439c0
Author: Jeroen Hoolmans <jhoolmans@gmail.com>
Date:   Wed May 16 15:29:35 2018 +0200

    Added support to compile with Python2.7 on Linux

The code in this block was never executed because of a wrong
case-sensitive check for the mount point of an appimage. Now
it runs, it crashes all the time on *buntu, and sometimes
on opensuse.

CCMAIL:jhoolmans@gmail.com

M  +8    -3    plugins/extensions/pykrita/plugin/utilities.cpp

https://commits.kde.org/krita/410255d029cf4ceaadc4d95ef0c9edefb32f471c

diff --git a/plugins/extensions/pykrita/plugin/utilities.cpp \
b/plugins/extensions/pykrita/plugin/utilities.cpp index edf15e76ec4..bebd36fce73 \
                100644
--- a/plugins/extensions/pykrita/plugin/utilities.cpp
+++ b/plugins/extensions/pykrita/plugin/utilities.cpp
@@ -395,11 +395,16 @@ bool Python::setPath(const QStringList& scriptPaths)
     Py_SetPath(joinedPathsWChars.data());
 #else
     if (KoResourcePaths::getApplicationRoot().toLower().contains(".mount_krita")) {
+
         QVector<wchar_t> joinedPathsWChars(joinedPaths.size() + 1, 0);
         joinedPaths.toWCharArray(joinedPathsWChars.data());
-        PyRun_SimpleString("import sys; import os");
-        QString pathCommand = QString("sys.path += '") + joinedPaths + \
                QString("'.split(os.pathsep)");
-        PyRun_SimpleString(pathCommand.toUtf8().constData());
+        Py_SetPath(joinedPathsWChars.data());
+
+//        QVector<wchar_t> joinedPathsWChars(joinedPaths.size() + 1, 0);
+//        joinedPaths.toWCharArray(joinedPathsWChars.data());
+//        PyRun_SimpleString("import sys; import os");
+//        QString pathCommand = QString("sys.path += '") + joinedPaths + \
QString("'.split(os.pathsep)"); +//        \
PyRun_SimpleString(pathCommand.toUtf8().constData());  }
     else {
         qputenv("PYTHONPATH", joinedPaths.toLocal8Bit());


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic