changeset 440:3a6441d9e01c

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]
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 02 Mar 2010 15:05:30 +0000
parents cfc7c384603b
children ed01a5c9c7e0
files demos/pychan_demo/pychan_test.py demos/rio_de_hola/misc/infotext.txt demos/rio_de_hola/run.py tools/editor/scripts/editor.py
diffstat 4 files changed, 21 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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:
 --------------
--- 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
--- 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