def __setup(self):
    if (PF not in BASEDIR):
        logger.critical(f"Unsupported platform '{PF}'")
        sys.exit(1)
    try:
        base = (os.environ.get('SC2PATH') or get_user_sc2_install() or BASEDIR[PF])
        self.BASE = Path(base).expanduser()
        self.EXECUTABLE = latest_executeble((self.BASE / 'Versions'))
        self.CWD = ((self.BASE / CWD[PF]) if CWD[PF] else None)
        self.REPLAYS = (self.BASE / 'Replays')
        if (self.BASE / 'maps').exists():
            self.MAPS = (self.BASE / 'maps')
        else:
            self.MAPS = (self.BASE / 'Maps')
    except FileNotFoundError as e:
        logger.critical(f"SC2 installation not found: File '{e.filename}' does not exist.")
        sys.exit(1)
def __setup(self):
    if (PF not in BASEDIR):
        logger.critical(f"Unsupported platform '{PF}'")
        sys.exit(1)
    try:
        base = (os.environ.get('SC2PATH') or get_user_sc2_install() or BASEDIR[PF])
        self.BASE = Path(base).expanduser()
        self.EXECUTABLE = latest_executeble((self.BASE / 'Versions'))
        self.CWD = ((self.BASE / CWD[PF]) if CWD[PF] else None)
        self.REPLAYS = (self.BASE / 'Replays')
        if (self.BASE / 'maps').exists():
            self.MAPS = (self.BASE / 'maps')
        else:
            self.MAPS = (self.BASE / 'Maps')
    except FileNotFoundError as e:
        logger.critical(f"SC2 installation not found: File '{e.filename}' does not exist.")
        sys.exit(1)