Resource Path Specification

As part of your System Configuration, you can specify a number of search paths for various kinds of application data. Each path contains semicolon-delimited directory absolute paths. Paths are specified in the normal OS-dependent manner, e.g. 'C:\Data' on Windows and '/home/public/Data' on Linux. (Sadly, Windows build-related paths need forward slashes while resource paths for running programs need backward ones. Not our fault. Sorry.)

IMPORTANT: Syzygy 1.1 changes how applications are searched for and where they may look for their data. Also, szgd now has a 'base paths' argument that limits where programs can be launched from. This argument is a semicolon-delimited list of absolute directory paths; and directory paths listed in SZG_EXEC/path, SZG_PYTHON/executable, SZG_PYTHON/path, and SZG_PYTHON/lib_path must fall inside/below one of the directories listed in the 'base paths' argument. See Creating a Cluster: The Remote Execution Daemon.

  1. Executables:
    SZG_EXEC path directory_path_1;directory_path_2;...
    
    In cluster mode, this tells the remote execution daemon szgd where to look for programs. Before Syzygy 1.1, szgd would only look in directories on the search path, and applications had to look for their data files in directories on the SZG_DATA path, below. Now szgd also looks in the immediate subdirectories of directories on the path. When szgd finds the program, it sets the current directory to the directory containing the program. This lets a program and its data share the same directory, enabling conventional file-reading relative to the program's path.

    All directories listed in this path are also added to the Python module import path before a Python program is launched. They are added after any directories specified in the PYTHONPATH environment variable, SZG_PYTHON/path, and SZG_PYTHON/lib_path.

    All directory paths listed must be contained within a directory path in szgd's 'base paths' argument, mentioned above.

  2. Python executable:
    SZG_PYTHON executable executable_path_1
    
    In cluster mode, this tells the remote execution daemon szgd where to look for the Python executable. It should be the complete path to the executable, but should not include the '.exe' suffix on Windows. If special command line arguments (to the Python executable itself, not the Python program you are running) are required, delimit them with vertical bars: For example, if you were using Movable Python and wanted to pass the '-o' argument, you might set it to the following:
    SZG_PYTHON executable C:\movpy-2.0.0-py2.4.4\movpy\movpy|-o
    
    All directory paths listed must be contained within a directory path in szgd's 'base paths' argument, mentioned above.

  3. Python programs:
    SZG_PYTHON path directory_path_1;directory_path_2;...
    
    In cluster mode, this tells the remote execution daemon szgd where to look for Python programs. szgd looks in the immediate subdirectories of directories on the path. When szgd finds the program, it sets the current directory to the directory containing the program. This lets a program and its data share the same directory, enabling conventional file-reading relative to the program's path.

    All directories listed in this path are also added to the Python module import path before a Python program is launched. They are added after any directories specified in the PYTHONPATH environment variable, but before directories in SZG_PYTHON/lib_path and SZG_EXEC/path.

    All directory paths listed must be contained within a directory path in szgd's 'base paths' argument, mentioned above.

  4. Python modules:
    SZG_PYTHON lib_path directory_path_1;directory_path_2;...
    
    In cluster mode, all directories listed in this path are added to the Python module import path before a Python program is launched. They are added after any directories specified in the PYTHONPATH environment variable and in SZG_PYTHON/lib_path, but before directories in SZG_EXEC/path.

    All directory paths listed must be contained within a directory path in szgd's 'base paths' argument, mentioned above.

  5. Data:
    SZG_DATA path directory_path_1;directory_path_2;...
    
    Data files to be found by programs using the ar_fileFind() function should be placed in a directory on this path. This is no longer necessary, however: See Accessing data in Cluster Mode.

  6. Sound files:
      SZG_SOUND path directory_path_1;directory_path_2;...
    
    Location of sound files to be loaded by SoundRender. Note that these can also be placed with the application, but if so it must inform SoundRender using either of the application frameworks' setDataBundlePath() method (see the Programming chapter).

  7. Texture maps used in a distributed scene graph program (again, see Programming and to be displayed by szgrender:
      SZG_RENDER texture_path directory_path_1;directory_path_2;...
    

  8. Texture-mapped fonts:
      SZG_RENDER text_path directory_1
    
    BUG: This one is not yet semicolon-delimited like the others. It can only be a single directory.