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:
parent
41697a4bab
commit
606b3f205d
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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\
|
||||
|
@ -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):
|
||||
|
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user