I am trying to launch a patching dll for The Lord of The Rings Online with QProcess and get the output, but it only works on Linux (where I am doing it through wine with QProcess).
I have tried a lot without success, and have come to the conclusion that the issue may be rundll32 launching the patcher as a separate process that is not tracked by QProcess. This doesn't even really hold up though, because the patching at least in my testing (others say it has worked sometimes) has not happened.
from qtpy import QtCore, QtWidgets
import sys
class PatchWindow(QtWidgets.QMainWindow):
def __init__(self):
super().__init__()
self.setFixedSize(720, 400)
self.txtLog = QtWidgets.QTextBrowser(self)
self.txtLog.setGeometry(5,5,710,351)
self.process = QtCore.QProcess()
self.process.readyReadStandardOutput.connect(self.readOutput)
self.process.readyReadStandardError.connect(self.readErrors)
self.process.finished.connect(self.processFinished)
self.process.setWorkingDirectory("C:/LOTRO/")
self.show()
self.startProcess()
def readOutput(self):
line = self.process.readAllStandardOutput()
line = str(line, encoding="utf8", errors="replace")
self.txtLog.append(line)
def readErrors(self):
line = self.process.readAllStandardError()
line = str(line, encoding="utf8", errors="replace")
self.txtLog.append(line)
def processFinished(self, exitCode, exitStatus):
self.txtLog.append("Process Finished")
def startProcess(self):
self.process.start("rundll32 patchclient.dll,Patch patch.lotro.com:6015 --language DE --productcode LOTRO --highres")
self.txtLog.append("Process Started")
app = QtWidgets.QApplication(sys.argv)
PatchWindow = PatchWindow()
sys.exit(app.exec_())
There should be output similar to
Connecting to patch.lotro.com:6015
Checking files...
files to patch: 0 bytes to download: 0
Patching files:
File patching complete
, but there is nothing. The actual code for this is here