mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
fix
This commit is contained in:
parent
cfd96256fc
commit
b79dfb22ab
5
.github/scripts/collectall_xp.py
vendored
5
.github/scripts/collectall_xp.py
vendored
@ -1,9 +1,10 @@
|
|||||||
import shutil, os
|
import shutil, os
|
||||||
import platform
|
import platform
|
||||||
import sys
|
import sys
|
||||||
|
os.system('python generate_xp_code.py')
|
||||||
os.system("git clone https://github.com/HIllya51/py3.4_pyqt5.5.1")
|
os.system("git clone https://github.com/HIllya51/py3.4_pyqt5.5.1")
|
||||||
os.rename("py3.4_pyqt5.5.1", "runtime")
|
os.rename("py3.4_pyqt5.5.1/Python34", "runtime")
|
||||||
|
|
||||||
targetdir = r"build\LunaTranslator_x86_winxp"
|
targetdir = r"build\LunaTranslator_x86_winxp"
|
||||||
launch = r"..\cpp\builds\_x86"
|
launch = r"..\cpp\builds\_x86"
|
||||||
baddll = "DLL64"
|
baddll = "DLL64"
|
||||||
|
@ -182,6 +182,11 @@ int PyStand::RunString(const wchar_t *script)
|
|||||||
{
|
{
|
||||||
_py_args.push_back((wchar_t *)_py_argv[i].c_str());
|
_py_args.push_back((wchar_t *)_py_argv[i].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WINXP
|
||||||
|
auto Py_SetPath = (void (*)(const wchar_t *))GetProcAddress(_hDLL, "Py_SetPath");
|
||||||
|
Py_SetPath(L"./files/runtime/Lib;./files/runtime/DLLs;./files/runtime/Lib/site-packages");
|
||||||
|
#endif
|
||||||
hr = _Py_Main((int)_py_args.size(), &_py_args[0]);
|
hr = _Py_Main((int)_py_args.size(), &_py_args[0]);
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ def parsecode(code: str):
|
|||||||
code = code.replace("self.screen().geometry().height()", "99999")
|
code = code.replace("self.screen().geometry().height()", "99999")
|
||||||
code = code.replace(
|
code = code.replace(
|
||||||
'"./files/runtime/PyQt5/Qt5/plugins"',
|
'"./files/runtime/PyQt5/Qt5/plugins"',
|
||||||
r'"C:\Python34\Lib\site-packages\PyQt5\plugins"',
|
'"./files/runtime/Lib/site-packages/PyQt5/plugins"',
|
||||||
)
|
)
|
||||||
code = code.replace("self.parent().devicePixelRatioF()", "1")
|
code = code.replace("self.parent().devicePixelRatioF()", "1")
|
||||||
code = code.replace("self.devicePixelRatioF()", "1")
|
code = code.replace("self.devicePixelRatioF()", "1")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user