Fixes and tests.

This commit is contained in:
Mikaël Capelle
2022-05-02 18:56:44 +02:00
parent 6ea9d92b26
commit 30a01cf783
15 changed files with 308 additions and 51 deletions
+12 -12
View File
@@ -16,58 +16,58 @@ Do you want to try initializing python again (at the risk of another crash)?
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="169"/>
<location filename="proxypython.cpp" line="173"/>
<source>Python Proxy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="179"/>
<location filename="proxypython.cpp" line="183"/>
<source>Proxy Plugin to allow plugins written in python to be loaded</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="251"/>
<location filename="proxypython.cpp" line="255"/>
<source>ModOrganizer path contains a semicolon</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="253"/>
<location filename="proxypython.cpp" line="257"/>
<source>Python DLL not found</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="255"/>
<location filename="proxypython.cpp" line="259"/>
<source>Invalid Python DLL</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="257"/>
<location filename="proxypython.cpp" line="261"/>
<source>Initializing Python failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="259"/>
<location filename="proxypython.cpp" line="289"/>
<location filename="proxypython.cpp" line="263"/>
<location filename="proxypython.cpp" line="293"/>
<source>invalid problem key %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="267"/>
<location filename="proxypython.cpp" line="271"/>
<source>The path to Mod Organizer (%1) contains a semicolon. &lt;br&gt;While this is legal on NTFS drives, many softwares do not handle it correctly.&lt;br&gt;Unfortunately MO depends on libraries that seem to fall into that group.&lt;br&gt;As a result the python plugin cannot be loaded, and the only solution we canoffer is to remove the semicolon or move MO to a path without a semicolon.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="278"/>
<location filename="proxypython.cpp" line="282"/>
<source>The Python plugin DLL was not found, maybe your antivirus deleted it. Re-installing MO2 might fix the problem.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="281"/>
<location filename="proxypython.cpp" line="285"/>
<source>The Python plugin DLL is invalid, maybe your antivirus is blocking it. Re-installing MO2 and adding exclusions for it to your AV might fix the problem.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="proxypython.cpp" line="286"/>
<location filename="proxypython.cpp" line="290"/>
<source>The initialization of the Python plugin DLL failed, unfortunately without any details.</source>
<translation type="unfinished"></translation>
</message>
+5 -1
View File
@@ -142,7 +142,11 @@ bool ProxyPython::init(IOrganizer* moInfo)
m_Runner = std::unique_ptr<IPythonRunner>{createPythonRunner()};
if (m_Runner) {
m_Runner->initialize(pluginFolder / "libs");
const auto libpath = pluginFolder / "libs";
const QStringList paths{
QFileInfo(libpath / "pythoncore.zip").absoluteFilePath(),
QFileInfo(libpath).absoluteFilePath(), IOrganizer::getPluginDataPath()};
m_Runner->initialize(paths);
}
if (m_MOInfo) {