def isHomeless(): """Homeless setup means that Snowberry uses the main installation directory for user data. In Windows, the default is homeless mode.""" noHome = '-nohome' in sys.argv useHome = '-home' in sys.argv if useHome: return False if noHome: return True # The default is homeless in Windows versions earlier than Vista and # Win Server 2008. if host.isWindows() and not host.isWindowsVista(): return True return False
SERVER_RUNTIME = 'server-runtime' # List of custom addons directories. addonPaths = [] # On the Mac, change the current directory to Resources inside the bundle. if host.isMac(): import __main__ os.chdir(os.path.dirname(os.path.abspath(__main__.__file__))) # This is the name of the directory under which Snowberry's files will # be stored in the user's home directory. if host.isMac(): SNOWBERRY_HOME_DIR = 'Doomsday Engine' elif host.isWindowsVista(): SNOWBERRY_HOME_DIR = os.path.join('Documents', 'Doomsday Frontend') elif host.isWindows(): SNOWBERRY_HOME_DIR = os.path.join('My Documents', 'Doomsday Frontend') else: SNOWBERRY_HOME_DIR = '.doomsday' # In a homeless setup all the user data goes in the main installation folder. if isHomeless(): SNOWBERRY_HOME_DIR = '.' # This is the full path of the user's Snowberry home directory. homeDir = None # Bundle paths. Files will be searched in these after the user path, # but before the system path.