예제 #1
0
    def OnInit(self):
        lng.iLang()

        subprocess.call(["bash", Variables.playonlinux_env + "/bash/startup"])

        self.frame = MainWindow(None, -1, os.environ["APPLICATION_TITLE"])
        # Gui Server
        self.POLServer = gui_server.gui_server(self.frame)
        self.POLServer.start()

        i = 0
        while (os.environ["POL_PORT"] == "0"):
            time.sleep(0.01)
            if (i >= 300):
                wx.MessageBox(
                    _("{0} is not able to start POL_SetupWindow_server.").
                    format(os.environ["APPLICATION_TITLE"]), _("Error"))
                os._exit(0)
                break
            i += 1
        self.frame.myScript = Program()

        self.SetTopWindow(self.frame)
        self.frame.Show(True)
        self.frame.Hide()
        return True
예제 #2
0
	def OnInit(self):
		lng.iLang()
		close = False
		exe_present = False
		
		self.systemCheck()
				
		for f in  sys.argv[1:]:		
			self.MacOpenFile(f)
			if(".exe" in f or ".EXE" in f):
				exe_present = True
			close = True
			
		if(close == True and exe_present == False):
			os._exit(0)
			
		self.SetClassName(os.environ["APPLICATION_TITLE"])
		self.SetAppName(os.environ["APPLICATION_TITLE"])
		#self.icon = wx.TaskBarIcon()
		#self.icon.SetIcon(wx.Icon(Variables.playonlinux_env+"/etc/playonmac.png", wx.BITMAP_TYPE_ANY))
		self.frame = MainWindow(None, -1, os.environ["APPLICATION_TITLE"])
		self.SetTopWindow(self.frame)
		#self.frame.Center(wx.BOTH)
		self.frame.Show(True)
		
		return True
예제 #3
0
    def OnInit(self):
        lng.iLang()

        os.system("bash " + Variables.playonlinux_env + "/bash/startup")

        self.frame = MainWindow(None, -1, os.environ["APPLICATION_TITLE"])
        # Gui Server
        self.POLServer = gui_server.gui_server(self.frame)
        self.POLServer.start()

        i = 0
        while os.environ["POL_PORT"] == "0":
            time.sleep(0.01)
            if i >= 300:
                wx.MessageBox(
                    _("{0} is not able to start POL_SetupWindow_server.").format(os.environ["APPLICATION_TITLE"]),
                    _("Error"),
                )
                os._exit(0)
                break
            i += 1
        self.frame.myScript = Program()

        self.SetTopWindow(self.frame)
        self.frame.Show(True)
        self.frame.Hide()
        return True
예제 #4
0
	def OnInit(self):
		lng.iLang()
		close = False
		exe_present = False
		if(os.popen("id -u").read() == "0"):
			wx.MessageBox(_("{0} is not supposed to be run as root. Sorry").format(os.environ["APPLICATION_TITLE"]))
			sys.exit()
			
		
		for f in  sys.argv[1:]:
			
			self.MacOpenFile(f)
			if(".exe" in f or ".EXE" in f):
				exe_present = True
			close = True
			
		if(close == True and exe_present == False):
			sys.exit()
			
		self.SetClassName(os.environ["APPLICATION_TITLE"])
		self.SetAppName(os.environ["APPLICATION_TITLE"])
		#self.icon = wx.TaskBarIcon()
		#self.icon.SetIcon(wx.Icon(Variables.playonlinux_env+"/etc/playonmac.png", wx.BITMAP_TYPE_ANY))
		self.frame = MainWindow(None, -1, os.environ["APPLICATION_TITLE"])
		self.SetTopWindow(self.frame)
		self.frame.Center(wx.BOTH)
		self.frame.Show(True)
		
		return True
예제 #5
0
	def OnInit(self):
		lng.iLang()
		close = False
		exe_present = False
		
		if(os.popen("id -u").read() == "0\n" or os.popen("id -u").read() == "0"):
			wx.MessageBox(_("{0} is not supposed to be run as root. Sorry").format(os.environ["APPLICATION_TITLE"]),_("Error"))
			sys.exit()			
		
		try:
			returncode=subprocess.call([os.environ["PLAYONLINUX"]+"/bash/check_gl","x86"])
		except:
			returncode=255
			
		if(os.environ["POL_OS"] == "Linux" and returncode != 0):
			wx.MessageBox(_("{0} is unable to find 32bits OpenGL libraries.\n\nYou might encounter problem with your games").format(os.environ["APPLICATION_TITLE"]),_("Error"))
		
		if(os.environ["AMD64_COMPATIBLE"] == "True"):
			try:
				returncode=subprocess.call([os.environ["PLAYONLINUX"]+"/bash/check_gl","amd64"])
			except:
				returncode=255

		if(os.environ["AMD64_COMPATIBLE"] == "True" and os.environ["POL_OS"] == "Linux" and returncode != 0):
			wx.MessageBox(_("{0} is unable to find 64bits OpenGL libraries.\n\nYou might encounter problem with your games").format(os.environ["APPLICATION_TITLE"]),_("Error"))

		if(os.environ["AMD64_COMPATIBLE"] == "True"):
			try:
				returncode=subprocess.call([os.environ["PLAYONLINUX"]+"/bash/check_fs"])
			except:
				returncode=255

			if(os.environ["POL_OS"] == "Linux" and returncode != 0):
				wx.MessageBox(_("Your filesystem might prevent "+os.environ["APPLICATION_TITLE"]+" from running correctly.\n\nPlease open  "+os.environ["APPLICATION_TITLE"]+" in a terminal to get more details").format(os.environ["APPLICATION_TITLE"]),_("Error"))
				
		for f in  sys.argv[1:]:		
			self.MacOpenFile(f)
			if(".exe" in f or ".EXE" in f):
				exe_present = True
			close = True
			
		if(close == True and exe_present == False):
			sys.exit()
			
		self.SetClassName(os.environ["APPLICATION_TITLE"])
		self.SetAppName(os.environ["APPLICATION_TITLE"])
		#self.icon = wx.TaskBarIcon()
		#self.icon.SetIcon(wx.Icon(Variables.playonlinux_env+"/etc/playonmac.png", wx.BITMAP_TYPE_ANY))
		self.frame = MainWindow(None, -1, os.environ["APPLICATION_TITLE"])
		self.SetTopWindow(self.frame)
		#self.frame.Center(wx.BOTH)
		self.frame.Show(True)
		
		return True
예제 #6
0
	def OnInit(self):
		lng.iLang()
		
		
		self.SetClassName(os.environ["APPLICATION_TITLE"])
		self.SetAppName(os.environ["APPLICATION_TITLE"])
		self.frame = gui.POL_SetupFrame(os.environ["APPLICATION_TITLE"],str(pid_to_open),top,left,str(pid_to_open))
		self.frame.Center(wx.BOTH)
		self.frame.Show(True)

		
		return True