Skip to content

Commit

Permalink
Added option to Game Settings to select game client. Version bump to
Browse files Browse the repository at this point in the history
0.27
  • Loading branch information
nwestfal committed Feb 12, 2020
1 parent a9c9640 commit 77ae254
Show file tree
Hide file tree
Showing 9 changed files with 209 additions and 136 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,9 @@ Changes

0.2.6 Updated certificate chain to new SSL certificates after recent update (22.0.1 or possibly 22) update
by SSG broke authentication using the old certs.

0.2.7 Added option in Game Settings to select which game client to use.
The choices are 32-bit, 32-bit Legacy ("Awesomium"), and 64-bit. The 32-bit
Legacy Awesomium client is recommended for Linux users. Game client override
code that checked TurbineLauncher.exe.config has been removed since it is no
longer needed with this option.
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.6
AppVerName=PyLotRO 0.2.7
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.6"
Version = "0.2.7"
Description = "LOTRO/DDO Launcher"
Author = "Alan Jackson"
Email = "[email protected]"
Expand Down
16 changes: 14 additions & 2 deletions PyLotROLauncher/MainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,13 @@ def actionPatchSelected(self):
def actionOptionsSelected(self):
winSettings = SettingsWindow(self.winMain, self.settings.hiResEnabled, self.settings.app,
self.settings.wineProg, self.settings.wineDebug, self.settings.patchClient,
self.settings.winePrefix, self.settings.gameDir, self.valHomeDir, self.osType, self.rootDir)
self.settings.winePrefix, self.settings.gameDir, self.valHomeDir, self.osType, self.rootDir,
self.settings.gameClientIdx)

self.hideWinMain()
if winSettings.Run() == QtGui.QDialog.Accepted:
self.settings.hiResEnabled = winSettings.getHiRes()
self.settings.gameClientIdx = winSettings.getGameClientIdx()
self.settings.app = winSettings.getApp()
self.settings.patchClient = winSettings.getPatchClient()
self.settings.gameDir = winSettings.getGameDir()
Expand All @@ -252,6 +254,7 @@ def actionWizardSelected(self):
self.settings.usingDND = winWizard.getUsingDND()
self.settings.usingTest = winWizard.getUsingTest()
self.settings.hiResEnabled = winWizard.getHiRes()
self.settings.gameClientIdx = winSettings.getGameClientIdx()
self.settings.app = winWizard.getApp()
self.settings.wineProg = winWizard.getProg()
self.settings.wineDebug = winWizard.getDebug()
Expand Down Expand Up @@ -387,7 +390,16 @@ def AuthAccount(self):
self.AddLog(self.account.messError)

def LaunchGame(self):
game = StartGame(self.winMain, self.worldQueueConfig.gameClientFilename,
gameClientIdx = int(self.settings.gameClientIdx)

if gameClientIdx == 0:
gameClientFilename = self.worldQueueConfig.gameClientFilename32
elif gameClientIdx == 1:
gameClientFilename = self.worldQueueConfig.gameClientFilenameLegacy
elif gameClientIdx == 2:
gameClientFilename = "x64/" + self.worldQueueConfig.gameClientFilename64

game = StartGame(self.winMain, gameClientFilename,
self.worldQueueConfig.gameClientArgTemplate, self.accNumber, self.urlLoginServer,
self.account.ticket, self.urlChatServer,
self.langConfig.langList[self.uiMain.cboLanguage.currentIndex()].code,
Expand Down
24 changes: 8 additions & 16 deletions PyLotROLauncher/PyLotROUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ def CheckRealm(self, useDND, baseDir, osType):
class WorldQueueConfig:
def __init__(self, urlConfigServer, usingDND, baseDir, osType, gameDir):
self.gameClientFilename = ""
self.gameClientFilename32 = ""
self.gameClientFilename64 = ""
self.gameClientFilenameLegacy = ""
self.gameClientArgTemplate = ""
self.crashreceiver = ""
self.DefaultUploadThrottleMbps = ""
Expand Down Expand Up @@ -515,7 +518,11 @@ def __init__(self, urlConfigServer, usingDND, baseDir, osType, gameDir):
for node in nodes:
if node.nodeType == node.ELEMENT_NODE:
if node.getAttribute("key") == "GameClient.WIN32.Filename":
self.gameClientFilename = node.getAttribute("value")
self.gameClientFilename32 = node.getAttribute("value")
if node.getAttribute("key") == "GameClient.WIN64.Filename":
self.gameClientFilename64 = node.getAttribute("value")
if node.getAttribute("key") == "GameClient.WIN32Legacy.Filename":
self.gameClientFilenameLegacy = node.getAttribute("value")
elif node.getAttribute("key") == "GameClient.WIN32.ArgTemplate":
self.gameClientArgTemplate = node.getAttribute("value")
elif node.getAttribute("key") == "GameClient.Arg.crashreceiver":
Expand Down Expand Up @@ -546,21 +553,6 @@ def __init__(self, urlConfigServer, usingDND, baseDir, osType, gameDir):
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
7 changes: 7 additions & 0 deletions PyLotROLauncher/Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def LoadSettings(self, useGame=None):
self.focusAccount = True
self.winePrefix = os.environ.get('WINEPREFIX')
self.gameDir = ""
self.gameClientIdx = 0
self.hideWinMain = False
success = False

Expand Down Expand Up @@ -95,6 +96,8 @@ def LoadSettings(self, useGame=None):
self.hiResEnabled = True
else:
self.hiResEnabled = False
elif node.nodeName == "Game.Client.Index":
self.gameClientIdx = GetText(node.childNodes)
elif node.nodeName == "Game.Directory":
self.gameDir = GetText(node.childNodes)
elif node.nodeName == "Realm":
Expand Down Expand Up @@ -191,6 +194,10 @@ def SaveSettings(self, saveAccountDetails):
tempNode.appendChild(doc.createTextNode("%s" % (self.gameDir)))
gameConfigNode.appendChild(tempNode)

tempNode = doc.createElementNS(EMPTY_NAMESPACE, "Game.Client.Index")
tempNode.appendChild(doc.createTextNode("%s" % (self.gameClientIdx)))
gameConfigNode.appendChild(tempNode)

tempNode = doc.createElementNS(EMPTY_NAMESPACE, "PatchClient")
tempNode.appendChild(doc.createTextNode("%s" % (self.patchClient)))
gameConfigNode.appendChild(tempNode)
Expand Down
10 changes: 9 additions & 1 deletion PyLotROLauncher/SettingsWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

class SettingsWindow:
def __init__(self, parent, hiRes, app, wineProg, wineDebug, patchClient, winePrefix,
gameDir, homeDir, osType, rootDir):
gameDir, homeDir, osType, rootDir, gameClientIdx):

self.homeDir = homeDir
self.osType = osType
Expand Down Expand Up @@ -77,6 +77,9 @@ def __init__(self, parent, hiRes, app, wineProg, wineDebug, patchClient, winePre
self.uiSettings.txtGameDir.setText(gameDir)
self.uiSettings.cboGraphics.addItem("Enabled")
self.uiSettings.cboGraphics.addItem("Disabled")
self.uiSettings.cboGameClient.addItem("32-bit")
self.uiSettings.cboGameClient.addItem("32-bit Legacy (\"Awesomium\")")
self.uiSettings.cboGameClient.addItem("64-bit")
self.uiSettings.chkAdvanced.setChecked(False)
self.uiSettings.txtPatchClient.setText(patchClient)
self.uiSettings.txtPatchClient.setEnabled(False)
Expand All @@ -102,6 +105,8 @@ def __init__(self, parent, hiRes, app, wineProg, wineDebug, patchClient, winePre
else:
self.uiSettings.cboGraphics.setCurrentIndex(1)

self.uiSettings.cboGameClient.setCurrentIndex(int(gameClientIdx))

QtCore.QObject.connect(self.uiSettings.btnGameDir, QtCore.SIGNAL("clicked()"), self.btnGameDirClicked)
QtCore.QObject.connect(self.uiSettings.chkAdvanced, QtCore.SIGNAL("clicked()"), self.chkAdvancedClicked)

Expand Down Expand Up @@ -203,6 +208,9 @@ def getHiRes(self):
else:
return False

def getGameClientIdx(self):
return self.uiSettings.cboGameClient.currentIndex()

def Run(self):
return self.winSettings.exec_()

Loading

0 comments on commit 77ae254

Please sign in to comment.