当前位置: 首页>>代码示例>>Python>>正文


Python LauncherBase.LauncherBase类代码示例

本文整理汇总了Python中otp.launcher.LauncherBase.LauncherBase的典型用法代码示例。如果您正苦于以下问题:Python LauncherBase类的具体用法?Python LauncherBase怎么用?Python LauncherBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LauncherBase类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self):
        print 'Running: PiratesQuickLauncher'
        self.logPrefix = 'potcor-'

        ltime = 1 and time.localtime()
        logSuffix = '%02d%02d%02d_%02d%02d%02d' % (ltime[0] - 2000,  ltime[1], ltime[2],
                                                   ltime[3], ltime[4], ltime[5])

        
        if not os.path.exists('logs/'):
            os.mkdir('logs/')
            self.notify.info('Made new directory to save logs.')
        
        logfile = os.path.join('logs', self.logPrefix + logSuffix + '.log')

        log = open(logfile, 'a')
        logOut = LogAndOutput(sys.stdout, log)
        logErr = LogAndOutput(sys.stderr, log)
        sys.stdout = logOut
        sys.stderr = logErr
        self.heavyDownloadServerList = []
        self.heavyDownloadServer = None
        self.launcherFileDbFilename = '%s?%s' % (self.getValue('GAME_PATCHER_FILE_OPTIONS', 'patcher.ver'), random.randint(1, 1000000000))
        LauncherBase.__init__(self)
        self.contentDir = '/'
        self.serverDbFileHash = HashVal()
        self.launcherFileDbHash = HashVal()
        self.DECREASE_BANDWIDTH = 0
        self.httpChannel.setDownloadThrottle(0)
        self.showPhase = -1
        self.maybeStartGame()
        self.mainLoop()
开发者ID:TTGhost,项目名称:POTCOR-src,代码行数:32,代码来源:PiratesQuickLauncher.py

示例2: __init__

    def __init__(self):
        if sys.argv[2] == 'Phase2.py':
            sys.argv = sys.argv[:1] + sys.argv[3:]
        if len(sys.argv) == 5 or len(sys.argv) == 6:
            self.gameServer = sys.argv[2]
            self.accountServer = sys.argv[3]
            self.testServerFlag = int(sys.argv[4])
        else:
            print 'Error: Launcher: incorrect number of parameters'
            sys.exit()

        self.toontownBlueKey = 'TOONTOWN_BLUE'
        self.toontownPlayTokenKey = 'TOONTOWN_PLAYTOKEN'
        self.launcherMessageKey = 'LAUNCHER_MESSAGE'
        self.game1DoneKey = 'GAME1_DONE'
        self.game2DoneKey = 'GAME2_DONE'
        self.tutorialCompleteKey = 'TUTORIAL_DONE'
        self.toontownRegistryKey = 'Software\\Disney\\Disney Online\\Toontown'
        if self.testServerFlag:
            self.toontownRegistryKey = '%s%s' % (self.toontownRegistryKey, 'Test')
        self.toontownRegistryKey = '%s%s' % (self.toontownRegistryKey, self.getProductName())
        LauncherBase.__init__(self)
        self.webAcctParams = 'WEB_ACCT_PARAMS'
        self.parseWebAcctParams()
        self.mainLoop()
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:25,代码来源:ToontownLauncher.py

示例3: __init__

 def __init__(self):
     print 'Running: PiratesQuickLauncher'
     self.heavyDownloadServerList = []
     self.heavyDownloadServer = None
     self.launcherFileDbFilename = '%s?%s' % (self.getValue('GAME_PATCHER_FILE_OPTIONS', 'patcher.ver'), random.randint(1, 1000000000))
     LauncherBase.__init__(self)
     self.contentDir = '/'
     self.serverDbFileHash = HashVal()
     self.launcherFileDbHash = HashVal()
     self.DECREASE_BANDWIDTH = 0
     self.httpChannel.setDownloadThrottle(0)
     self.showPhase = -1
     self.maybeStartGame()
     self.mainLoop()
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:14,代码来源:PiratesQuickLauncher.py

示例4: setPandaErrorCode

 def setPandaErrorCode(self, code):
     self.pandaErrorCode = code
     if self.WIN32:
         self.notify.info('setting panda error code to %s' % code)
         exitCode2exitPage = {
             OTPLauncherGlobals.ExitEnableChat: 'chat',
             OTPLauncherGlobals.ExitSetParentPassword: 'setparentpassword',
             OTPLauncherGlobals.ExitPurchase: 'purchase'}
         if code in exitCode2exitPage:
             self.setRegistry('EXIT_PAGE', exitCode2exitPage[code])
             self.setRegistry(self.PandaErrorCodeKey, 0)
         else:
             self.setRegistry(self.PandaErrorCodeKey, code)
     else:
         LauncherBase.setPandaErrorCode(self, code)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:15,代码来源:ToontownLauncher.py

示例5: setPandaErrorCode

 def setPandaErrorCode(self, code):
     self.pandaErrorCode = code
     if self.WIN32:
         self.notify.info("setting panda error code to %s" % code)
         exitCode2exitPage = {
             OTPLauncherGlobals.ExitEnableChat: "chat",
             OTPLauncherGlobals.ExitSetParentPassword: "setparentpassword",
             OTPLauncherGlobals.ExitPurchase: "purchase",
         }
         if code in exitCode2exitPage:
             self.setRegistry("EXIT_PAGE", exitCode2exitPage[code])
             self.setRegistry(self.PandaErrorCodeKey, 0)
         else:
             self.setRegistry(self.PandaErrorCodeKey, code)
     else:
         LauncherBase.setPandaErrorCode(self, code)
开发者ID:ponyboy837,项目名称:SecretGitLolYoloSweg2015,代码行数:16,代码来源:ToontownLauncher.py

示例6: __init__

 def __init__(self):
     print 'Running: ToontownQuickLauncher'
     self.toontownBlueKey = 'TOONTOWN_BLUE'
     self.launcherMessageKey = 'LAUNCHER_MESSAGE'
     self.game1DoneKey = 'GAME1_DONE'
     self.game2DoneKey = 'GAME2_DONE'
     self.tutorialCompleteKey = 'TUTORIAL_DONE'
     LauncherBase.__init__(self)
     self.useTTSpecificLogin = config.GetBool('tt-specific-login', 0)
     self.toontownPlayTokenKey = 'TTI_PLAYCOOKIE'
     print 'useTTSpecificLogin=%s' % self.useTTSpecificLogin
     self.contentDir = '/'
     self.serverDbFileHash = HashVal()
     self.launcherFileDbHash = HashVal()
     self.DECREASE_BANDWIDTH = 0
     self.httpChannel.setDownloadThrottle(0)
     self.webAcctParams = 'WEB_ACCT_PARAMS'
     self.parseWebAcctParams()
     self.showPhase = -1
     self.maybeStartGame()
     self.mainLoop()
开发者ID:nate97,项目名称:src,代码行数:21,代码来源:QuickLauncher.py

示例7: launcherMessage

 def launcherMessage(self, msg):
     LauncherBase.launcherMessage(self, msg)
     self.setRegistry(self.launcherMessageKey, msg)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:3,代码来源:ToontownLauncher.py

示例8: getPercentPatchComplete

 def getPercentPatchComplete(self, bytesWritten):
     if self.totalPatchDownload:
         return LauncherBase.getPercentPatchComplete(self, bytesWritten)
     else:
         return 0
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:5,代码来源:ToontownLauncher.py

示例9: getNextDownloadServer

 def getNextDownloadServer(self):
     if self.heavyDownloadServer:
         return self.getNextHeavyDownloadServer()
     else:
         return LauncherBase.getNextDownloadServer(self)
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:5,代码来源:PiratesQuickLauncher.py


注:本文中的otp.launcher.LauncherBase.LauncherBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。