From e4a4e0d958791496606e51f3820cfe4c8366f344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Wed, 24 May 2023 01:54:51 +0200 Subject: [PATCH] updating build process for x86 and mac --- client-py3/full/linux/installer.sh | 2 +- client-py3/full/linux/udsclient-appimage-x86_64.recipe | 2 +- client-py3/full/src/UDSClient.py | 6 +++--- client-py3/full/src/UDSClientLauncher.py | 4 ++-- client-py3/full/src/UDSLauncherMac.py | 4 ++-- client-py3/full/src/UDSResources_rc.py | 4 ++-- client-py3/full/src/UDSWindow.py | 4 ++-- client-py3/full/src/rc_UDSResources.py | 2 +- client-py3/full/src/uds/log.py | 6 +++--- client-py3/full/src/uds/ui/__init__,py | 0 client-py3/full/src/update.sh | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 client-py3/full/src/uds/ui/__init__,py diff --git a/client-py3/full/linux/installer.sh b/client-py3/full/linux/installer.sh index 7d18e1ca5..35d4cd724 100644 --- a/client-py3/full/linux/installer.sh +++ b/client-py3/full/linux/installer.sh @@ -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 PySide6 or PyQt5" +echo "* Python3 PyQt6 or PyQt5" echo "* Python3 six" echo "* Python3 requests" echo "* Python3 cryptography" diff --git a/client-py3/full/linux/udsclient-appimage-x86_64.recipe b/client-py3/full/linux/udsclient-appimage-x86_64.recipe index b13bb23ce..a8f23f051 100644 --- a/client-py3/full/linux/udsclient-appimage-x86_64.recipe +++ b/client-py3/full/linux/udsclient-appimage-x86_64.recipe @@ -35,7 +35,7 @@ AppDir: include: - python3 - python3-pkg-resources - # In future, will be replaced with pyside6 (when available as debian package) + # In future, will be replaced with PyQt6 (when available as debian package) - python3-pyqt5 - python3-paramiko - python3-cryptography diff --git a/client-py3/full/src/UDSClient.py b/client-py3/full/src/UDSClient.py index 75b5fbc69..d9652dfbc 100755 --- a/client-py3/full/src/UDSClient.py +++ b/client-py3/full/src/UDSClient.py @@ -38,10 +38,10 @@ import webbrowser import threading import typing -# First, try to use PySide6, available on arm64, x86_64, i386, ... +# First, try to use PyQt6, available on arm64, x86_64, i386, ... try: - from PySide6 import QtCore, QtWidgets, QtGui - from PySide6.QtCore import QSettings + from PyQt6 import QtCore, QtWidgets, QtGui + from PyQt6.QtCore import QSettings except ImportError: # If not found, try to use PyQt5 (not available on arm64) from PyQt5 import QtCore, QtWidgets, QtGui # type: ignore from PyQt5.QtCore import QSettings # type: ignore diff --git a/client-py3/full/src/UDSClientLauncher.py b/client-py3/full/src/UDSClientLauncher.py index ccc5c6fe7..d1bf29fab 100644 --- a/client-py3/full/src/UDSClientLauncher.py +++ b/client-py3/full/src/UDSClientLauncher.py @@ -7,9 +7,9 @@ from uds.log import logger import UDSClient from UDSLauncherMac import Ui_MacLauncher -# First, try to use PySide6 (has arm64, x86_64 support) +# First, try to use PyQt6 (has arm64, x86_64 support) try: - from PySide6 import QtCore, QtWidgets, QtGui + from PyQt6 import QtCore, QtWidgets, QtGui except ImportError: # If not found, try to use PyQt5 (only x86_64) from PyQt5 import QtCore, QtWidgets, QtGui # type: ignore diff --git a/client-py3/full/src/UDSLauncherMac.py b/client-py3/full/src/UDSLauncherMac.py index ff7ffb8ba..e857afebb 100644 --- a/client-py3/full/src/UDSLauncherMac.py +++ b/client-py3/full/src/UDSLauncherMac.py @@ -7,9 +7,9 @@ # 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. -# Note: This file is generated by pyuic5, but it is modified to use PySide6 instead of PyQt5 if possible +# Note: This file is generated by pyuic5, but it is modified to use PyQt6 instead of PyQt5 if possible try: - from PySide6 import QtCore, QtGui, QtWidgets + from PyQt6 import QtCore, QtGui, QtWidgets except ImportError: from PyQt5 import QtCore, QtGui, QtWidgets # type: ignore diff --git a/client-py3/full/src/UDSResources_rc.py b/client-py3/full/src/UDSResources_rc.py index e75b4ab9b..b6caf0152 100644 --- a/client-py3/full/src/UDSResources_rc.py +++ b/client-py3/full/src/UDSResources_rc.py @@ -6,9 +6,9 @@ # # WARNING! All changes made in this file will be lost! -# Note: This file is generated by pyuic5, but it is modified to use PySide6 instead of PyQt5 if possible +# Note: This file is generated by pyuic5, but it is modified to use PyQt6 instead of PyQt5 if possible try: - from PySide6 import QtCore + from PyQt6 import QtCore except ImportError: from PyQt5 import QtCore # type: ignore diff --git a/client-py3/full/src/UDSWindow.py b/client-py3/full/src/UDSWindow.py index 332ae0e12..a1ff35e52 100644 --- a/client-py3/full/src/UDSWindow.py +++ b/client-py3/full/src/UDSWindow.py @@ -7,9 +7,9 @@ # 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. -# Note: This file is generated by pyuic5, but it is modified to use PySide6 instead of PyQt5 if possible +# Note: This file is generated by pyuic5, but it is modified to use PyQt6 instead of PyQt5 if possible try: - from PySide6 import QtCore, QtGui, QtWidgets + from PyQt6 import QtCore, QtGui, QtWidgets except ImportError: from PyQt5 import QtCore, QtGui, QtWidgets # type: ignore diff --git a/client-py3/full/src/rc_UDSResources.py b/client-py3/full/src/rc_UDSResources.py index 28580aafa..a27aa0d7f 100644 --- a/client-py3/full/src/rc_UDSResources.py +++ b/client-py3/full/src/rc_UDSResources.py @@ -3,7 +3,7 @@ # Created by: The Resource Compiler for Qt version 6.3.1 # WARNING! All changes made in this file will be lost! -from PySide6 import QtCore +from PyQt6 import QtCore qt_resource_data = b"\ \x00\x00\x08\xed\ diff --git a/client-py3/full/src/uds/log.py b/client-py3/full/src/uds/log.py index 4bd66340a..d3dbd7918 100644 --- a/client-py3/full/src/uds/log.py +++ b/client-py3/full/src/uds/log.py @@ -36,10 +36,10 @@ import platform import sys import tempfile -# First, try to use PySide6, available on arm64, x86_64, i386, ... +# First, try to use PyQt6, available on arm64, x86_64, i386, ... try: - from PySide6 import QtCore # Just to test if it's available - QT='PySide6' + from PyQt6 import QtCore # Just to test if it's available + QT='PyQt6' except ImportError: # If not found, it is using PyQt5 QT='PyQt5' diff --git a/client-py3/full/src/uds/ui/__init__,py b/client-py3/full/src/uds/ui/__init__,py new file mode 100644 index 000000000..e69de29bb diff --git a/client-py3/full/src/update.sh b/client-py3/full/src/update.sh index 1a8e222e1..b2266505c 100755 --- a/client-py3/full/src/update.sh +++ b/client-py3/full/src/update.sh @@ -7,7 +7,7 @@ function process { done } -pyrcc5 UDSResources.qrc -o UDSResources_rc.py +pyrcc5 UDSResources.qrc -o uds/ UDSResources_rc.py # process current directory ui's