mirror of
				https://gitee.com/gfdgd-xi/deep-wine-runner
				synced 2025-11-04 07:22:23 +08:00 
			
		
		
		
	修复打包器设置依赖无法生效的问题
This commit is contained in:
		
							parent
							
								
									86123c3358
								
							
						
					
					
						commit
						9b51368f9c
					
				@ -6,12 +6,13 @@ from qvncwidget import QVNCWidget
 | 
			
		||||
class Window(QMainWindow):
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        super(Window, self).__init__()
 | 
			
		||||
 | 
			
		||||
        self.setStyleSheet("background: black;")
 | 
			
		||||
        self.setWindowTitle("QVNCWidget")
 | 
			
		||||
 | 
			
		||||
        self.vnc = QVNCWidget(
 | 
			
		||||
            parent=self,
 | 
			
		||||
            host="127.0.0.1", port=5905,
 | 
			
		||||
            #host="127.0.0.1", port=5905,
 | 
			
		||||
            host="10.0.0.8", port=5900,
 | 
			
		||||
            readOnly=False
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
@ -20,9 +21,16 @@ class Window(QMainWindow):
 | 
			
		||||
        # you can disable mouse tracking if desired
 | 
			
		||||
        self.vnc.setMouseTracking(True)
 | 
			
		||||
        self.setAutoFillBackground(True)
 | 
			
		||||
        def a():
 | 
			
		||||
            while True:
 | 
			
		||||
                import time
 | 
			
		||||
                time.sleep(1)
 | 
			
		||||
                #self.vnc.reconnect()
 | 
			
		||||
        import threading
 | 
			
		||||
        threading.Thread(target=a).start()
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        self.vnc.start()
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
    def keyPressEvent(self, ev):
 | 
			
		||||
        self.vnc.keyPressEvent(ev)
 | 
			
		||||
@ -35,6 +43,8 @@ class Window(QMainWindow):
 | 
			
		||||
    def closeEvent(self, ev):
 | 
			
		||||
        self.vnc.stop()
 | 
			
		||||
        return super().closeEvent(ev)
 | 
			
		||||
    
 | 
			
		||||
#logging.basicConfig(level=logging.DEBUG)
 | 
			
		||||
 | 
			
		||||
app = QApplication(sys.argv)
 | 
			
		||||
window = Window()
 | 
			
		||||
 | 
			
		||||
@ -21,8 +21,6 @@ from socket import SHUT_RDWR
 | 
			
		||||
import struct as s
 | 
			
		||||
import time
 | 
			
		||||
 | 
			
		||||
import threading
 | 
			
		||||
 | 
			
		||||
class RFBUnexpectedResponse(Exception):
 | 
			
		||||
    pass
 | 
			
		||||
class RFBNoResponse(Exception):
 | 
			
		||||
@ -182,7 +180,6 @@ class RFBClient:
 | 
			
		||||
            self.__close()
 | 
			
		||||
            raise RFBHandshakeFailed(e)
 | 
			
		||||
 | 
			
		||||
        threading.Thread(target=a).start()
 | 
			
		||||
        self.desktopname = self.__recv(namelen).decode()
 | 
			
		||||
        self.log.debug(f"Connecting to \"{self.desktopname}\"")
 | 
			
		||||
 | 
			
		||||
@ -285,7 +282,6 @@ class RFBClient:
 | 
			
		||||
 | 
			
		||||
    def _handleConnection(self, data: bytes):
 | 
			
		||||
        msgid = es.return_uint8_val(data)
 | 
			
		||||
 | 
			
		||||
        if msgid == c.SMSG_FBUPDATE:
 | 
			
		||||
            # Framebuffer Update
 | 
			
		||||
            self._handleFramebufferUpdate(self.__recv(3))
 | 
			
		||||
@ -309,12 +305,13 @@ class RFBClient:
 | 
			
		||||
        self.log.debug(f"Server clipboard: {data}")
 | 
			
		||||
        # TODO: create callback
 | 
			
		||||
 | 
			
		||||
    zeroTime = 0
 | 
			
		||||
 | 
			
		||||
    def _handleFramebufferUpdate(self, data: bytes):
 | 
			
		||||
        numRectangles = s.unpack("!xH", data)[0]
 | 
			
		||||
        self.log.debug(f"numRectangles: {numRectangles}")
 | 
			
		||||
 | 
			
		||||
        self.onBeginUpdate()
 | 
			
		||||
 | 
			
		||||
        for _ in range(numRectangles):
 | 
			
		||||
            self._handleRectangle(self.__recv(12))
 | 
			
		||||
 | 
			
		||||
@ -322,10 +319,9 @@ class RFBClient:
 | 
			
		||||
 | 
			
		||||
    def _handleRectangle(self, data: bytes):
 | 
			
		||||
        xPos, yPos, width, height, encoding = s.unpack("!HHHHI", data)
 | 
			
		||||
 | 
			
		||||
        rect = RFBRectangle(xPos, yPos, width, height)
 | 
			
		||||
        self.log.debug(f"RECT: {rect}")
 | 
			
		||||
 | 
			
		||||
        #print(xPos, yPos)
 | 
			
		||||
        if encoding == c.ENC_RAW:
 | 
			
		||||
            size = (width*height*self.pixformat.bitspp) // 8
 | 
			
		||||
            self.log.debug(f"expected size: {size}")
 | 
			
		||||
@ -333,7 +329,6 @@ class RFBClient:
 | 
			
		||||
            start = time.time()
 | 
			
		||||
            data = self.__recv(expectedSize=size)
 | 
			
		||||
            self.log.debug(f"fetching data took: {(time.time() - start)*1e3} ms")
 | 
			
		||||
 | 
			
		||||
            self._decodeRAW(data, rect)
 | 
			
		||||
            del data
 | 
			
		||||
        else:
 | 
			
		||||
 | 
			
		||||
@ -1590,7 +1590,7 @@ fi
 | 
			
		||||
Version: {e2_text.text()}
 | 
			
		||||
Architecture: {debInformation[debArch.currentIndex()]["Architecture"]}
 | 
			
		||||
Maintainer: {e4_text.text()}
 | 
			
		||||
Depends: {debInformation[debArch.currentIndex()]["Depends"]}
 | 
			
		||||
Depends: {debDepends.text()}
 | 
			
		||||
Section: non-free/otherosfs
 | 
			
		||||
Priority: optional
 | 
			
		||||
Multi-Arch: foreign
 | 
			
		||||
@ -1602,7 +1602,7 @@ Description: {e3_text.text()}
 | 
			
		||||
Version: {e2_text.text()}
 | 
			
		||||
Architecture: {debInformation[debArch.currentIndex()]["Architecture"]}
 | 
			
		||||
Maintainer: {e4_text.text()}
 | 
			
		||||
Depends: {debInformation[debArch.currentIndex()]["Depends"]}
 | 
			
		||||
Depends: {debDepends.text()}
 | 
			
		||||
Recommends: {debRecommend.text()}
 | 
			
		||||
Section: non-free/otherosfs
 | 
			
		||||
Priority: optional
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user