From 599866f837bca59654eca8015fea9796d9d0b34b Mon Sep 17 00:00:00 2001 From: John Cote Date: Tue, 29 Jun 2021 21:17:19 -0400 Subject: [PATCH] launcher: More cleanup --- otp/launcher/LauncherBase.py | 24 ------------------------ toontown/launcher/QuickLauncher.py | 15 --------------- 2 files changed, 39 deletions(-) diff --git a/otp/launcher/LauncherBase.py b/otp/launcher/LauncherBase.py index 16f324d..acd2f6c 100644 --- a/otp/launcher/LauncherBase.py +++ b/otp/launcher/LauncherBase.py @@ -71,38 +71,14 @@ class LauncherBase(DirectObject): logErr = LogAndOutput(sys.__stderr__, log) sys.stdout = logOut sys.stderr = logErr - if sys.platform == 'darwin': - os.system('/usr/sbin/system_profiler >>' + logfile) - elif sys.platform == 'linux2': - os.system('cat /proc/cpuinfo >>' + logfile) - os.system('cat /proc/meminfo >>' + logfile) - os.system('/sbin/ifconfig -a >>' + logfile) print('\n\nStarting %s...' % self.GameName) print('Current time: ' + time.asctime(time.localtime(time.time())) + ' ' + time.tzname[0]) print('sys.path = ', sys.path) print('sys.argv = ', sys.argv) - if len(sys.argv) >= self.ArgCount: - Configrc_args = sys.argv[self.ArgCount - 1] - print("generating configrc using: '" + Configrc_args + "'") - else: - Configrc_args = '' - print('generating standard configrc') - if 'PRC_EXECUTABLE_ARGS' in os.environ: - print('PRC_EXECUTABLE_ARGS is set to: ' + os.environ['PRC_EXECUTABLE_ARGS']) - print('Resetting PRC_EXECUTABLE_ARGS') - ExecutionEnvironment.setEnvironmentVariable('PRC_EXECUTABLE_ARGS', '-stdout ' + Configrc_args) - if 'CONFIG_CONFIG' in os.environ: - print('CONFIG_CONFIG is set to: ' + os.environ['CONFIG_CONFIG']) - print('Resetting CONFIG_CONFIG') - os.environ['CONFIG_CONFIG'] = ':_:configdir_.:configpath_:configname_Configrc.exe:configexe_1:configargs_-stdout ' + Configrc_args - cpMgr = ConfigPageManager.getGlobalPtr() - cpMgr.reloadImplicitPages() launcherConfig = DConfig builtins.config = launcherConfig if config.GetBool('log-private-info', 0): print('os.environ = ', os.environ) - elif '__COMPAT_LAYER' in os.environ: - print('__COMPAT_LAYER = %s' % (os.environ['__COMPAT_LAYER'],)) self.miniTaskMgr = MiniTaskManager() self.setServerVersion(launcherConfig.GetString('server-version', 'no_version_set')) self.ServerVersionSuffix = launcherConfig.GetString('server-version-suffix', '') diff --git a/toontown/launcher/QuickLauncher.py b/toontown/launcher/QuickLauncher.py index 6a87aed..4914a65 100644 --- a/toontown/launcher/QuickLauncher.py +++ b/toontown/launcher/QuickLauncher.py @@ -41,9 +41,6 @@ class QuickLauncher(LauncherBase): def setValue(self, key, value): os.environ[key] = str(value) - def getVerifyFiles(self): - return config.GetInt('launcher-verify', 0) - def getTestServerFlag(self): return self.getValue('IS_TEST_SERVER', 0) @@ -84,18 +81,6 @@ class QuickLauncher(LauncherBase): return value - def getCDDownloadPath(self, origPath, serverFilePath): - return '%s/%s/CD_%d/%s' % (origPath, - self.ServerVersion, - self.fromCD, - serverFilePath) - - def getDownloadPath(self, origPath, serverFilePath): - return '%s/%s' % (origPath, serverFilePath) - - def hashIsValid(self, serverHash, hashStr): - return serverHash.setFromDec(hashStr) - def getAccountServer(self): return self.getValue('ACCOUNT_SERVER', '')