From 3eba1b8a8eda01cd67c9f326d3cf2da4904945ab Mon Sep 17 00:00:00 2001 From: Neal Westfall Date: Fri, 2 Jun 2017 07:14:22 -0700 Subject: [PATCH] Added code to handle local game client override in TurbineLauncher.exe.config in game directory --- ChangeLog | 7 +++++++ PyLotRO.iss | 2 +- PyLotROLauncher/Information.py | 2 +- PyLotROLauncher/MainWindow.py | 6 ++++-- PyLotROLauncher/PyLotROUtils.py | 17 ++++++++++++++++- PyLotROLauncher/StartGame.py | 9 ++++++++- 6 files changed, 37 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b76d60b..a8b54de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -96,3 +96,10 @@ Changes encoding for the news feed by default and check the Content-Encoding header and uncompress if content is gzip. Also some palette adjustments to the widgets (darker theme) + +0.2.5 Added code to check for local game client override in TurbineLauncher.exe.config in game + directory. This is to handle workaround from SSG for game client crashes on + Windows XP/Vista platforms that also affects Linux users running the game under + wine. For more information see link below. + + https://www.lotro.com/forums/showthread.php?654273-Windows-XP-and-Vista-Launcher-Issues-Solution diff --git a/PyLotRO.iss b/PyLotRO.iss index d5a2391..304d9f6 100755 --- a/PyLotRO.iss +++ b/PyLotRO.iss @@ -7,7 +7,7 @@ ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) AppId={{EB42F98E-B61B-4EE7-AF06-CAAF8D1825A3} AppName=PyLotRO -AppVerName=PyLotRO 0.2.4 +AppVerName=PyLotRO 0.2.5 AppPublisher=AJackson AppPublisherURL=http://www.lotrolinux.com AppSupportURL=http://www.lotrolinux.com diff --git a/PyLotROLauncher/Information.py b/PyLotROLauncher/Information.py index e868e46..c45104a 100644 --- a/PyLotROLauncher/Information.py +++ b/PyLotROLauncher/Information.py @@ -1,5 +1,5 @@ # coding=utf-8 -Version = "0.2.4" +Version = "0.2.5" Description = "LOTRO/DDO Launcher" Author = "Alan Jackson" Email = "ajackson@bcs.org.uk" diff --git a/PyLotROLauncher/MainWindow.py b/PyLotROLauncher/MainWindow.py index d9ed4da..a0f290e 100644 --- a/PyLotROLauncher/MainWindow.py +++ b/PyLotROLauncher/MainWindow.py @@ -397,7 +397,9 @@ def LaunchGame(self): self.worldQueueConfig.crashreceiver, self.worldQueueConfig.DefaultUploadThrottleMbps, self.worldQueueConfig.bugurl, self.worldQueueConfig.authserverurl, self.worldQueueConfig.supporturl, self.worldQueueConfig.supportserviceurl, - self.worldQueueConfig.glsticketlifetime) + self.worldQueueConfig.glsticketlifetime, + self.uiMain.cboRealm.currentText(), + self.uiMain.txtAccount.text()) self.winMain.hide() game.Run() @@ -649,7 +651,7 @@ def AccessGLSDataCentre(self, urlGLS, gameName): QtCore.QObject.emit(self.winMain, QtCore.SIGNAL("AddLog(QString)"), "[E04] Error accessing GLS data centre.") def GetWorldQueueConfig(self, urlWorldQueueServer): - self.worldQueueConfig = WorldQueueConfig(urlWorldQueueServer, self.settings.usingDND, self.baseDir, self.osType) + self.worldQueueConfig = WorldQueueConfig(urlWorldQueueServer, self.settings.usingDND, self.baseDir, self.osType, self.settings.gameDir) if self.worldQueueConfig.loadSuccess: QtCore.QObject.emit(self.winMain, QtCore.SIGNAL("AddLog(QString)"), "World queue configuration read") diff --git a/PyLotROLauncher/PyLotROUtils.py b/PyLotROLauncher/PyLotROUtils.py index fab7f60..b2cec17 100644 --- a/PyLotROLauncher/PyLotROUtils.py +++ b/PyLotROLauncher/PyLotROUtils.py @@ -475,7 +475,7 @@ def CheckRealm(self, useDND, baseDir, osType): self.realmAvailable = False class WorldQueueConfig: - def __init__(self, urlConfigServer, usingDND, baseDir, osType): + def __init__(self, urlConfigServer, usingDND, baseDir, osType, gameDir): self.gameClientFilename = "" self.gameClientArgTemplate = "" self.crashreceiver = "" @@ -546,6 +546,21 @@ def __init__(self, urlConfigServer, usingDND, baseDir, osType): self.worldQueueParam = node.getAttribute("value") self.loadSuccess = True + + # check TurbineLauncher.exe.config in gameDir for local game client override + tempxml = "" + filename = gameDir + '/TurbineLauncher.exe.config' + if os.path.exists(filename): + infile = uopen(filename, "r", "utf-8") + tempxml = infile.read() + infile.close() + doc = xml.dom.minidom.parseString(tempxml) + nodes = doc.getElementsByTagName("appSettings")[0].childNodes + for node in nodes: + if node.nodeType == node.ELEMENT_NODE: + if node.getAttribute("key") == "GameClient.WIN32.Filename": + self.gameClientFilename = node.getAttribute("value") + except: self.loadSuccess = False raise diff --git a/PyLotROLauncher/StartGame.py b/PyLotROLauncher/StartGame.py index e2a7867..eb339f2 100644 --- a/PyLotROLauncher/StartGame.py +++ b/PyLotROLauncher/StartGame.py @@ -36,13 +36,15 @@ def __init__(self, parent, appName, argTemplate, account, server, ticket, chatServer, language, runDir, wineProgram, wineDebug, winePrefix, hiResEnabled, wineApp, osType, homeDir, icoFileIn, rootDir, crashreceiver, DefaultUploadThrottleMbps, bugurl, authserverurl, - supporturl, supportserviceurl, glsticketlifetime): + supporturl, supportserviceurl, glsticketlifetime, realmName, accountText): self.winMain = parent self.homeDir = homeDir self.winLog = QtGui.QDialog(parent) self.winLog.setPalette(parent.palette()) self.osType = osType + self.realmName = realmName + self.accountText = accountText uifile = None icofile = None @@ -179,6 +181,11 @@ def __init__(self, parent, appName, argTemplate, account, server, ticket, for arg in tempArg.split(" "): self.arguments.append(arg) + self.uiLog.txtLog.append("Connecting to server: " + realmName) + self.uiLog.txtLog.append("Account: " + accountText) + self.uiLog.txtLog.append("Game Directory: " + runDir) + self.uiLog.txtLog.append("Game Client: " + appName) + def readOutput(self): self.uiLog.txtLog.append(QByteArray2str(self.process.readAllStandardOutput()))