Esempio n. 1
0
    def misc_button(self, event):
        param = event.GetId()
        if(param == 402):
            if(self.s_isPrefix == False):
                playonlinux.open_folder(self.s_title)
            else:
                playonlinux.open_folder_prefix(self.s_prefix)
        if(param == 403):
            if(self.s_isPrefix == False):
                subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", self.s_title.encode('utf-8','replace'), "POL_OpenShell", self.s_title.encode('utf-8','replace')])
            else:
                subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--prefix", self.s_prefix.encode('utf-8','replace'), "POL_OpenShell"])

        if(param == 404):
            self.FileDialog = wx.FileDialog(self)
            self.FileDialog.SetDirectory("~")
            self.supported_files = "All|*.exe;*.EXE;*.msi;*.MSI\
            \|Windows executable (*.exe)|*.exe;*.EXE\
            \|Windows install file (*.msi)|*.msi;*MSI"
            self.FileDialog.SetWildcard(self.supported_files)
            self.FileDialog.ShowModal()
            if(self.FileDialog.GetPath() != ""):
                filename = self.FileDialog.GetPath().encode("utf-8","replace")
                dirname = os.path.dirname(filename)
                if(self.s_isPrefix == True):
                    subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--prefix", self.s_prefix.encode('utf-8','replace'), "POL_AutoWine", filename], cwd=dirname)
                else:
                    subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", self.s_title.encode('utf-8','replace'), "POL_AutoWine", filename], cwd=dirname)

        if(param == 201):
            if(self.s_isPrefix == False):
                subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--init", self.s_title.encode('utf-8','replace'), "POL_SetupWindow_shortcut_creator"])
            else:
                subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--init", "--prefix", self.s_prefix.encode('utf-8','replace'), "POL_SetupWindow_shortcut_creator"])
Esempio n. 2
0
	def misc_button(self, event):
		param = event.GetId()
		if(param == 402):
			if(self.s_isPrefix == False):
				playonlinux.open_folder(self.s_title)
			else:
				playonlinux.open_folder_prefix(self.s_prefix)
		if(param == 403):
			if(self.s_isPrefix == False):
				os.system("bash "+Variables.playonlinux_env+"/bash/POL_Command \""+self.s_title+"\" POL_OpenShell \""+self.s_title+"\" &")
			else:
				os.system("bash "+Variables.playonlinux_env+"/bash/POL_Command --prefix \""+self.s_prefix+"\" POL_OpenShell&")
				
		if(param == 404):
			self.FileDialog = wx.FileDialog(self)
			self.FileDialog.SetDirectory("~")
			self.supported_files = "All|*.exe;*.EXE;*.msi;*.MSI\
			\|Windows executable (*.exe)|*.exe;*.EXE\
			\|Windows install file (*.msi)|*.msi;*MSI"
			self.FileDialog.SetWildcard(self.supported_files)
			self.FileDialog.ShowModal()
			if(self.FileDialog.GetPath() != ""):
				if(self.s_isPrefix == True):
					os.system("bash "+Variables.playonlinux_env+"/bash/POL_Command --prefix \""+self.s_prefix+"\" POL_AutoWine \""+self.FileDialog.GetPath().encode('utf-8')+"\" &")
				else:
					os.system("bash "+Variables.playonlinux_env+"/bash/POL_Command \""+self.s_title+"\" POL_AutoWine \""+self.FileDialog.GetPath().encode('utf-8')+"\" &")
					
		if(param == 201):
			if(self.s_isPrefix == False):
				os.system("bash "+Variables.playonlinux_env+"/bash/POL_Command --init \""+self.s_title+"\" POL_SetupWindow_shortcut_creator &")
			else:
				os.system("bash "+Variables.playonlinux_env+"/bash/POL_Command --init --prefix \""+self.s_prefix+"\" POL_SetupWindow_shortcut_creator &")
Esempio n. 3
0
    def misc_button(self, event):
        param = event.GetId()
        if(param == 402):
            if(self.s_isPrefix == False):
                playonlinux.open_folder(self.s_title)
            else:
                playonlinux.open_folder_prefix(self.s_prefix)
        if(param == 403):
            if(self.s_isPrefix == False):
                subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", self.s_title.encode('utf-8','replace'), "POL_OpenShell", self.s_title.encode('utf-8','replace')])
            else:
                subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--prefix", self.s_prefix.encode('utf-8','replace'), "POL_OpenShell"])

        if(param == 404):
            self.FileDialog = wx.FileDialog(self)
            self.FileDialog.SetDirectory("~")
            self.supported_files = "All|*.exe;*.EXE;*.msi;*.MSI\
            \|Windows executable (*.exe)|*.exe;*.EXE\
            \|Windows install file (*.msi)|*.msi;*MSI"
            self.FileDialog.SetWildcard(self.supported_files)
            self.FileDialog.ShowModal()
            if(self.FileDialog.GetPath() != ""):
                filename = self.FileDialog.GetPath().encode("utf-8","replace")
                dirname = os.path.dirname(filename)
                if(self.s_isPrefix == True):
                    subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--prefix", self.s_prefix.encode('utf-8','replace'), "POL_AutoWine", filename], cwd=dirname)
                else:
                    subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", self.s_title.encode('utf-8','replace'), "POL_AutoWine", filename], cwd=dirname)

        if(param == 201):
            if(self.s_isPrefix == False):
                subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--init", self.s_title.encode('utf-8','replace'), "POL_SetupWindow_shortcut_creator"])
            else:
                subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--init", "--prefix", self.s_prefix.encode('utf-8','replace'), "POL_SetupWindow_shortcut_creator"])
Esempio n. 4
0
    def misc_button(self, event):
        param = event.GetId()
        if (param == 402):
            if (self.s_isPrefix == False):
                playonlinux.open_folder(self.s_title)
            else:
                playonlinux.open_folder_prefix(self.s_prefix)
        if (param == 403):
            if (self.s_isPrefix == False):
                os.system("bash " + Variables.playonlinux_env +
                          "/bash/POL_Command \"" + self.s_title +
                          "\" POL_OpenShell \"" + self.s_title + "\" &")
            else:
                os.system("bash " + Variables.playonlinux_env +
                          "/bash/POL_Command --prefix \"" + self.s_prefix +
                          "\" POL_OpenShell&")

        if (param == 404):
            self.FileDialog = wx.FileDialog(self)
            self.FileDialog.SetDirectory("~")
            self.supported_files = "All|*.exe;*.EXE;*.msi;*.MSI\
			\|Windows executable (*.exe)|*.exe;*.EXE\
			\|Windows install file (*.msi)|*.msi;*MSI"

            self.FileDialog.SetWildcard(self.supported_files)
            self.FileDialog.ShowModal()
            if (self.FileDialog.GetPath() != ""):
                if (self.s_isPrefix == True):
                    os.system("bash " + Variables.playonlinux_env +
                              "/bash/POL_Command --prefix \"" + self.s_prefix +
                              "\" POL_AutoWine \"" +
                              self.FileDialog.GetPath().encode('utf-8') +
                              "\" &")
                else:
                    os.system("bash " + Variables.playonlinux_env +
                              "/bash/POL_Command \"" + self.s_title +
                              "\" POL_AutoWine \"" +
                              self.FileDialog.GetPath().encode('utf-8') +
                              "\" &")

        if (param == 201):
            if (self.s_isPrefix == False):
                os.system("bash " + Variables.playonlinux_env +
                          "/bash/POL_Command --init \"" + self.s_title +
                          "\" POL_SetupWindow_shortcut_creator &")
            else:
                os.system("bash " + Variables.playonlinux_env +
                          "/bash/POL_Command --init --prefix \"" +
                          self.s_prefix +
                          "\" POL_SetupWindow_shortcut_creator &")
Esempio n. 5
0
  def GoToAppDir(self, event):
		self.game_exec = self.list_game.GetItemText(self.list_game.GetSelection()).encode("utf-8")
		playonlinux.open_folder(self.game_exec)