Made sure to have the launcher send the gamedir as the first entry in the environment for the portal and launcher. This makes it possible to start evennia from anywhere in the game folder.

This commit is contained in:
Griatch 2015-02-10 00:12:41 +01:00
parent 5038d42438
commit ec4e985c39
3 changed files with 1 additions and 9 deletions

View file

@ -91,6 +91,7 @@ def getenv():
""" """
sep = ";" if os.name == "nt" else ":" sep = ";" if os.name == "nt" else ":"
env = os.environ.copy() env = os.environ.copy()
sys.path.insert(0, GAMEDIR)
env['PYTHONPATH'] = sep.join(sys.path) env['PYTHONPATH'] = sep.join(sys.path)
return env return env

View file

@ -11,11 +11,6 @@ by game/evennia.py).
import sys import sys
import os import os
# add core Evennia directory
sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.dirname(
os.path.dirname(os.path.abspath(__file__))))))
sys.path.insert(1, os.getcwd())
from twisted.application import internet, service from twisted.application import internet, service
from twisted.internet import protocol, reactor from twisted.internet import protocol, reactor
from twisted.web import server from twisted.web import server

View file

@ -11,10 +11,6 @@ import time
import sys import sys
import os import os
# add core Evennia directory
sys.path.insert(1, os.path.dirname(os.path.dirname(
os.path.dirname(os.path.abspath(__file__)))))
from twisted.web import server, static from twisted.web import server, static
from twisted.application import internet, service from twisted.application import internet, service
from twisted.internet import reactor, defer from twisted.internet import reactor, defer