Ejemplo n.º 1
0
    def launch(self, username):
        if username in self.config["passwords"]:
            password = self.config["passwords"][username]
        else:
            ped = wx.PasswordEntryDialog(self, "Enter %s's Password" % username)
            ped.ShowModal()
            password = ped.GetValue()
            ped.Destroy()

        if username and password:
            from mock import Mock
            if self.server == "tranquility":
                di = self.config.get("eve-dir")
                singularity = False
            else:
                di = self.config.get("singularity-dir")
                singularity = True

            if di and os.path.exists(di):
                os.chdir(di)

            if os.path.exists(os.path.join("bin", "ExeFile.exe")):
                try:
                    token = do_login(username, password)
                    #token = "TOKEN"
                    launch(token, Mock(dry=False, singularity=singularity))
                except LoginFailed as e:
                    wx.MessageBox(str(e), "%s: Login Failed" % username, wx.OK | wx.ICON_ERROR)
            else:
                wx.MessageBox("Can't find bin/ExeFile.exe.\nTry 'Options' -> 'Locate Eve Install'?", "Launch Failed", wx.OK | wx.ICON_ERROR)

                print "Not in the right directory"
Ejemplo n.º 2
0
 def launch(self, launch_config):
     try:
         token = None
         if launch_config.username and launch_config.password:
             token = do_login(launch_config.username, launch_config.password)
         launch(self.config, launch_config, token)
     except LoginFailed as e:
         wx.MessageBox(str(e), "%s: Login Failed" % launch_config.confname, wx.OK | wx.ICON_ERROR)
     except LaunchFailed as e:
         wx.MessageBox(str(e), "%s: Launch Failed" % launch_config.confname, wx.OK | wx.ICON_ERROR)
Ejemplo n.º 3
0
 def launch(self, launch_config):
     try:
         token = None
         if launch_config.username and launch_config.password:
             token = do_login(launch_config.username,
                              launch_config.password)
         launch(self.config, launch_config, token)
     except LoginFailed as e:
         wx.MessageBox(str(e), "%s: Login Failed" % launch_config.confname,
                       wx.OK | wx.ICON_ERROR)
     except LaunchFailed as e:
         wx.MessageBox(str(e), "%s: Launch Failed" % launch_config.confname,
                       wx.OK | wx.ICON_ERROR)
Ejemplo n.º 4
0
def launch_all(args, config):
    for name in args.launches:
        try:
            launch_config = get_launch_config(config, name)
            token = None
            if launch_config.username and launch_config.password:
                token = do_login(launch_config.username, launch_config.password)
            launch(config, launch_config, token)
        except LoginFailed as e:
            log.error("Login failed: %s", e)
            return 1
        except LaunchFailed as e:
            log.error("Launch failed: %s", e)
            return 1
Ejemplo n.º 5
0
    def launch(self, username):
        if username in self.config["passwords"]:
            password = self.config["passwords"][username]
        else:
            ped = wx.PasswordEntryDialog(self,
                                         "Enter %s's Password" % username)
            ped.ShowModal()
            password = ped.GetValue()
            ped.Destroy()

        if username and password:
            from mock import Mock
            if self.server == "tranquility":
                di = self.config.get("eve-dir")
                singularity = False
            else:
                di = self.config.get("singularity-dir")
                singularity = True

            if di and os.path.exists(di):
                os.chdir(di)

            if os.path.exists(os.path.join("bin", "ExeFile.exe")):
                try:
                    token = do_login(username, password)
                    #token = "TOKEN"
                    launch(token, Mock(dry=False, singularity=singularity))
                except LoginFailed as e:
                    wx.MessageBox(str(e), "%s: Login Failed" % username,
                                  wx.OK | wx.ICON_ERROR)
            else:
                wx.MessageBox(
                    "Can't find bin/ExeFile.exe.\nTry 'Options' -> 'Locate Eve Install'?",
                    "Launch Failed", wx.OK | wx.ICON_ERROR)

                print "Not in the right directory"