mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
[HOTFIX] Python module path (Windows)
The pythonPath pointer was not properly enlarged when expanded. Reduced to the return of Py_DecodeLocale. This sets the correct size of the pointer at the beginning.
This commit is contained in:
parent
00da8c6d8e
commit
f9f32c6cff
@ -29,8 +29,7 @@ PythonInit::PythonInit()
|
|||||||
// set Python module path when exists
|
// set Python module path when exists
|
||||||
wchar_t *pythonPath = Py_DecodeLocale((QDir::cleanPath(qApp->applicationDirPath() + "/../lib/python")).toLatin1().data(), nullptr);
|
wchar_t *pythonPath = Py_DecodeLocale((QDir::cleanPath(qApp->applicationDirPath() + "/../lib/python")).toLatin1().data(), nullptr);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
pythonPath = Py_DecodeLocale((QDir::cleanPath(qApp->applicationDirPath())).toLatin1().data(), nullptr);
|
pythonPath = Py_DecodeLocale((QDir::cleanPath(qApp->applicationDirPath()) + "/python" + STRINGIFY(PYTHON_VERSION_MAJOR_MINOR) ".zip").toLatin1().data(), nullptr);
|
||||||
pythonPath = wcscat(pythonPath, L"/python" STRINGIFY(PYTHON_VERSION_MAJOR_MINOR) ".zip");
|
|
||||||
if(QFile(QString::fromWCharArray(pythonPath)).exists())
|
if(QFile(QString::fromWCharArray(pythonPath)).exists())
|
||||||
#else
|
#else
|
||||||
if(QDir(QString::fromWCharArray(pythonPath)).exists())
|
if(QDir(QString::fromWCharArray(pythonPath)).exists())
|
||||||
|
Loading…
Reference in New Issue
Block a user