Skip to content

Commit

Permalink
Added code to handle local game client override in TurbineLauncher.ex…
Browse files Browse the repository at this point in the history
…e.config in game directory
  • Loading branch information
nwestfal committed Jun 2, 2017
1 parent 20254cc commit 3eba1b8
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 6 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion PyLotRO.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion PyLotROLauncher/Information.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# coding=utf-8
Version = "0.2.4"
Version = "0.2.5"
Description = "LOTRO/DDO Launcher"
Author = "Alan Jackson"
Email = "[email protected]"
Expand Down
6 changes: 4 additions & 2 deletions PyLotROLauncher/MainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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")
Expand Down
17 changes: 16 additions & 1 deletion PyLotROLauncher/PyLotROUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion PyLotROLauncher/StartGame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()))

Expand Down

0 comments on commit 3eba1b8

Please sign in to comment.