Changeset 661


Ignore:
Timestamp:
11/07/10 16:39:31 (9 years ago)
Author:
barra_parpg
Message:

Patch by greyghost:

  • Modified run.py with support for setting fife_path via a config.py file
  • This approach is more bulletproof than the current fife detection code, so whenever PARPG can't find FIFE, set the path manually by creating a config.py in the PARPG folder that contains: fife_path="path/to/FIFE/engine/python/"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/run.py

    r647 r661  
    1919import sys 
    2020 
    21 from fife import fife 
    22 print "Using the FIFE python module found here: ", \ 
    23     os.path.dirname(fife.__file__) 
     21#Check if config.py exists. Get 'fife_path' from config 
     22try: 
     23        import config 
     24        sys.path.append(config.fife_path) 
     25except: 
     26        pass 
     27 
     28try: 
     29        from fife import fife 
     30        print "Using the FIFE python module found here: ", \ 
     31                os.path.dirname(fife.__file__) 
     32except ImportError: 
     33        print "====================================================================== \n\ 
     34FIFE was not found in path. \n\ 
     35Try installing FIFE or creating config.py in the PARPG root directory, \n\ 
     36with a variable pointing to the 'python' subdirectory \n\ 
     37fife_path='<path_to_your_FIFE>' \n\ 
     38Example: fife_path='../fife/engine/python/' \n\ 
     39======================================================================" 
    2440 
    2541from scripts.parpg import PARPGApplication 
Note: See TracChangeset for help on using the changeset viewer.