1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Added PySide6 support as firts option (due to arm64 support)

This commit is contained in:
Adolfo Gómez García 2023-05-23 02:54:28 +02:00
parent 41697a4bab
commit 606b3f205d
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23
7 changed files with 32 additions and 8 deletions

View File

@ -7,7 +7,7 @@ update-desktop-database
echo "Installation process done."
echo "Remember that the following packages must be installed on system:"
echo "* Python3 paramiko"
echo "* Python3 PyQt5"
echo "* Python3 PySide6 or PyQt5"
echo "* Python3 six"
echo "* Python3 requests"
echo "* Python3 cryptography"

View File

@ -35,6 +35,7 @@ AppDir:
include:
- python3
- python3-pkg-resources
# In future, will be replaced with pyside6 (when available as debian package)
- python3-pyqt5
- python3-paramiko
- python3-cryptography

View File

@ -7,11 +7,15 @@ from uds.log import logger
import UDSClient
from UDSLauncherMac import Ui_MacLauncher
from PyQt5 import QtCore, QtWidgets, QtGui
# First, try to use PySide6 (has arm64, x86_64 support)
try:
from PySide6 import QtCore, QtWidgets, QtGui
except ImportError: # If not found, try to use PyQt5 (only x86_64)
from PyQt5 import QtCore, QtWidgets, QtGui # type: ignore
SCRIPT_NAME = 'UDSClientLauncher'
class UdsApplication(QtWidgets.QApplication):
class UdsApplication(QtWidgets.QApplication): # type: ignore
path: str
tunnels: typing.List[subprocess.Popen]

View File

@ -7,8 +7,11 @@
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
# Note: This file is generated by pyuic5, but it is modified to use PySide6 instead of PyQt5 if possible
try:
from PySide6 import QtCore, QtGui, QtWidgets
except ImportError:
from PyQt5 import QtCore, QtGui, QtWidgets # type: ignore
class Ui_MacLauncher(object):

View File

@ -6,7 +6,11 @@
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
# Note: This file is generated by pyuic5, but it is modified to use PySide6 instead of PyQt5 if possible
try:
from PySide6 import QtCore
except ImportError:
from PyQt5 import QtCore # type: ignore
qt_resource_data = b"\
\x00\x00\x08\xed\

View File

@ -7,8 +7,11 @@
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
# Note: This file is generated by pyuic5, but it is modified to use PySide6 instead of PyQt5 if possible
try:
from PySide6 import QtCore, QtGui, QtWidgets
except ImportError:
from PyQt5 import QtCore, QtGui, QtWidgets # type: ignore
class Ui_MainWindow(object):

View File

@ -36,6 +36,14 @@ import platform
import sys
import tempfile
# First, try to use PySide6, available on arm64, x86_64, i386, ...
try:
from PySide6 import QtCore # Just to test if it's available
QT='PySide6'
except ImportError: # If not found, it is using PyQt5
QT='PyQt5'
LOGLEVEL = logging.INFO
DEBUG = False
@ -79,6 +87,7 @@ if DEBUG:
logger.debug(' Python compiler: %s', platform.python_compiler())
logger.debug(' Python build: %s', platform.python_build())
# Also environment variables and any useful info
logger.debug('Qt framework: %s', QT)
logger.debug('Log level set to DEBUG')
logger.debug('Environment variables:')
for k, v in os.environ.items():