# HG changeset patch # User prock@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1267542330 0 # Node ID 3a6441d9e01ce7cdd58fdb4281a291d4226945e5 # Parent cfc7c384603bc58b8c032047bdba57dffe42db16 The demos and editor now look for a local copy of FIFE before trying to import the installed version of FIFE. This is to ease development and not force developers to install FIFE every time they make changes to core and/or the extensions. fixes[t:453] diff -r cfc7c384603b -r 3a6441d9e01c demos/pychan_demo/pychan_test.py --- a/demos/pychan_demo/pychan_test.py Tue Mar 02 12:05:35 2010 +0000 +++ b/demos/pychan_demo/pychan_test.py Tue Mar 02 15:05:30 2010 +0000 @@ -26,7 +26,13 @@ import sys, os, re +fife_path = os.path.join('..','..','engine','python') +if os.path.isdir(fife_path) and fife_path not in sys.path: + sys.path.insert(0,fife_path) + from fife import fife +print "Using the FIFE python module found here: ", os.path.dirname(fife.__file__) + from fife.extensions import fifelog from fife.extensions import basicapplication from fife.extensions import pychan @@ -153,7 +159,7 @@ """ # We use PyChan's synchronous execution feature here. pychan.loadXML('gui/credits.xml').execute({ 'okButton' : "Yay!" }) - + class TestXMLApplication(basicapplication.ApplicationBase): """ Test Application. Run the pychan_test.py file diff -r cfc7c384603b -r 3a6441d9e01c demos/rio_de_hola/misc/infotext.txt --- a/demos/rio_de_hola/misc/infotext.txt Tue Mar 02 12:05:35 2010 +0000 +++ b/demos/rio_de_hola/misc/infotext.txt Tue Mar 02 15:05:30 2010 +0000 @@ -1,4 +1,4 @@ -Welcome to the FIFE Rio de hola game, release 2008.1 +Welcome to the FIFE Rio de hola game, release 0.3.1 Keybindings: -------------- diff -r cfc7c384603b -r 3a6441d9e01c demos/rio_de_hola/run.py --- a/demos/rio_de_hola/run.py Tue Mar 02 12:05:35 2010 +0000 +++ b/demos/rio_de_hola/run.py Tue Mar 02 15:05:30 2010 +0000 @@ -26,7 +26,13 @@ import sys, os, re, math, random, shutil +fife_path = os.path.join('..','..','engine','python') +if os.path.isdir(fife_path) and fife_path not in sys.path: + sys.path.insert(0,fife_path) + from fife import fife +print "Using the FIFE python module found here: ", os.path.dirname(fife.__file__) + from fife.extensions import * from scripts import world from scripts.common import eventlistenerbase diff -r cfc7c384603b -r 3a6441d9e01c tools/editor/scripts/editor.py --- a/tools/editor/scripts/editor.py Tue Mar 02 12:05:35 2010 +0000 +++ b/tools/editor/scripts/editor.py Tue Mar 02 15:05:30 2010 +0000 @@ -29,9 +29,16 @@ """ import sys +import os import traceback +fife_path = os.path.join('..','..','engine','python') +if os.path.isdir(fife_path) and fife_path not in sys.path: + sys.path.insert(0,fife_path) + from fife import fife +print "Using the FIFE python module found here: ", os.path.dirname(fife.__file__) + from fife.extensions import loaders import events import plugin