Skip to content

Commit

Permalink
Merge branch 'master' of ssh://deng.git.sourceforge.net/gitroot/deng/…
Browse files Browse the repository at this point in the history
…deng
  • Loading branch information
skyjake committed Jun 18, 2012
2 parents 3f5ea9b + 55eb17e commit 261d0b4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions snowberry/plugins/launcher.py
Expand Up @@ -209,8 +209,7 @@ def startGame(profile):
return

# Put the response file in the user's runtime directory.
responseFile = os.path.join(paths.getUserPath(paths.RUNTIME),
'Options.rsp')
responseFile = os.path.join(paths.getUserPath(paths.RUNTIME), 'Options.rsp')

file(responseFile, 'w').write(options + "\n")

Expand Down Expand Up @@ -239,7 +238,7 @@ def q1p(s): return '\\\"' + s + '\\\"'
def q2p(s): return '\\\\\\\"' + s + '\\\\\\\"'
curDir = os.getcwd()
print >> scpt, " do script \"cd %s; %s @%s\"" % \
(q1p(curDir), engineBin.replace(' ', '\\\\ '), q2p(responseFile))
(q1p(curDir), engineBin.replace(' ', '\\\\ '), responseFile.replace(' ', '\\\\ '))
print >> scpt, 'end tell'
scpt.close()
engineBin = osaFile
Expand All @@ -249,15 +248,15 @@ def q2p(s): return '\\\\\\\"' + s + '\\\\\\\"'
sh = file(shFile, 'w')
print >> sh, '#!/bin/sh'
print >> sh, "cd %s" % (paths.quote(os.getcwd()))
print >> sh, "%s @%s" % (paths.quote(engineBin), paths.quote(responseFile))
print >> sh, "%s @%s" % (paths.quote(engineBin), responseFile.replace(' ', '\\ '))
sh.close()
os.chmod(shFile, 0744)
engineBin = paths.quote(shFile)
spawnFunc = spawnWithTerminal
else:
spawnFunc = os.spawnvp

spawnFunc(os.P_NOWAIT, engineBin, [engineBin, '@' + paths.quote(responseFile)])
spawnFunc(os.P_NOWAIT, engineBin, [engineBin, '@' + responseFile])

# Shut down if the configuration settings say so.
value = profile.getValue('quit-on-launch')
Expand Down

0 comments on commit 261d0b4

Please sign in to comment.