(self, event, s_debug=False)
| 1040 | return self.list_game.GetItemText(self.list_game.GetSelection()) |
| 1041 | |
| 1042 | def Run(self, event, s_debug=False): |
| 1043 | |
| 1044 | game_exec = self.GetSelectedProgram() |
| 1045 | game_prefix = playonlinux.getPrefix(game_exec) |
| 1046 | |
| 1047 | if (s_debug == False): |
| 1048 | playonlinux.SetDebugState(game_exec, game_prefix, False) |
| 1049 | |
| 1050 | if (os.path.exists(os.environ["POL_USER_ROOT"] + "/wineprefix/" + game_prefix)): |
| 1051 | if (game_exec != ""): |
| 1052 | if (playonlinux.GetDebugState(game_exec)): |
| 1053 | try: |
| 1054 | self.debugFrame.analyseReal(0, game_prefix) |
| 1055 | self.debugFrame.Show() |
| 1056 | self.debugFrame.SetFocus() |
| 1057 | except: |
| 1058 | self.debugFrame = debug.MainWindow(None, -1, |
| 1059 | _("{0} debugger").format(os.environ["APPLICATION_TITLE"]), |
| 1060 | game_prefix, 0) |
| 1061 | self.debugFrame.Center(wx.BOTH) |
| 1062 | self.debugFrame.Show() |
| 1063 | |
| 1064 | subprocess.Popen(["bash", Variables.playonlinux_env + "/bash/run_app", game_exec]) |
| 1065 | else: |
| 1066 | wx.MessageBox(_("Please select a program."), os.environ["APPLICATION_TITLE"]) |
| 1067 | else: |
| 1068 | wx.MessageBox( |
| 1069 | _("The virtual drive associated with {0} ({1}) does no longer exists.").format(game_exec, game_prefix), |
| 1070 | os.environ["APPLICATION_TITLE"]) |
| 1071 | |
| 1072 | def RunDebug(self, event): |
| 1073 | game_exec = self.GetSelectedProgram() |
no test coverage detected