From ee5e1e2af402e29041efcb9e9db081e217dba345 Mon Sep 17 00:00:00 2001 From: Nell Date: Mon, 26 May 2025 01:41:07 +0200 Subject: [PATCH] some fix --- .idea/misc.xml | 2 +- .idea/oxapp25.iml | 2 +- build.bat | 5 +++++ pysidedeploy.spec | 31 ++++++++++++++++--------------- src/utils.py | 1 + windows/main_window.py | 2 -- 6 files changed, 24 insertions(+), 19 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index bffa872..ea97439 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,7 +3,7 @@ - + diff --git a/.idea/oxapp25.iml b/.idea/oxapp25.iml index 90b5c49..b71d6cf 100644 --- a/.idea/oxapp25.iml +++ b/.idea/oxapp25.iml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/build.bat b/build.bat index fe4ea21..b30828c 100644 --- a/build.bat +++ b/build.bat @@ -7,10 +7,15 @@ if "%1"=="resources" ( pyinstaller OxApp.spec --noconfirm ) else if "%1"=="installer" ( "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "setup.iss" +) else if "%1"=="clean" ( + echo Nettoyage des packages non requis... + pip freeze > unins && pip uninstall -y -r unins && pip install -r requirements.txt && del unins + echo Nettoyage terminé. ) else ( echo Commandes disponibles: echo build.bat resources - Compile les ressources echo build.bat deploy - Déploie l'application echo build.bat pyinstaller - Crée l'exécutable avec PyInstaller echo build.bat installer - Crée l'installateur avec Inno Setup + echo build.bat clean - Nettoie les packages non requis dans requirements.txt ) diff --git a/pysidedeploy.spec b/pysidedeploy.spec index f43d8ca..8e06057 100644 --- a/pysidedeploy.spec +++ b/pysidedeploy.spec @@ -17,7 +17,7 @@ input_file = D:\Dev\oxapp25\main.py exec_directory = . # path to .pyproject project file -project_file = +project_file = # application icon icon = D:\Dev\oxapp25\oxpanel.ico @@ -37,13 +37,13 @@ android_packages = buildozer==1.5.0,cython==0.29.33 # comma separated path to qml files required # normally all the qml files required by the project are added automatically -qml_files = +qml_files = # excluded qml plugin binaries -excluded_qml_plugins = +excluded_qml_plugins = # qt modules used. comma separated -modules = Network,WebEngineCore,Widgets,Gui,WebEngineWidgets,Core,WebChannel +modules = WebChannel,Core,WebEngineCore,WebEngineWidgets,Gui,Widgets,Network # qt plugins used by the application. only relevant for desktop deployment. for qt plugins used # in android application see [android][plugins] @@ -52,26 +52,26 @@ plugins = networkinformation,styles,networkaccess,tls [android] # path to pyside wheel -wheel_pyside = +wheel_pyside = # path to shiboken wheel -wheel_shiboken = +wheel_shiboken = # plugins to be copied to libs folder of the packaged application. comma separated -plugins = +plugins = [nuitka] # usage description for permissions requested by the app as found in the info.plist file # of the app bundle # eg = extra_args = --show-modules --follow-stdlib -macos.permissions = +macos.permissions = # mode of using nuitka. accepts standalone or onefile. default is onefile. mode = standalone # (str) specify any extra nuitka arguments -extra_args = --quiet --noinclude-qt-translations --windows-console-mode=disable --output-filename=oxapp --company-name=Oxpanel --product-name=OxApp --file-description="Application légitime OxApp" --copyright="Oxpanel (c) 2023" --file-version=1.0.0 --product-version=1.0.0 --unstripped --no-deployment-flag=self-execution --disable-ccache --disable-console +extra_args = --quiet --noinclude-qt-translations --windows-console-mode=disable --output-filename=oxapp --company-name=Oxpanel --product-name=OxApp --file-description="OxApp" --copyright="Oxpanel (c) 2023" --file-version=1.0.0 --product-version=1.0.0 --unstripped --no-deployment-flag=self-execution --disable-ccache --disable-console [buildozer] @@ -81,21 +81,22 @@ extra_args = --quiet --noinclude-qt-translations --windows-console-mode=disable mode = release # contrains path to pyside6 and shiboken6 recipe dir -recipe_dir = +recipe_dir = # path to extra qt android jars to be loaded by the application -jars_dir = +jars_dir = # if empty uses default ndk path downloaded by buildozer -ndk_path = +ndk_path = # if empty uses default sdk path downloaded by buildozer -sdk_path = +sdk_path = # other libraries to be loaded. comma separated. # loaded at app startup -local_libs = +local_libs = # architecture of deployed platform # possible values = ["aarch64", "armv7a", "i686", "x86_64"] -arch = +arch = + diff --git a/src/utils.py b/src/utils.py index 505720e..af733c8 100644 --- a/src/utils.py +++ b/src/utils.py @@ -6,6 +6,7 @@ import pickle import pathlib + def cookie_qt_to_py(cookie: QNetworkCookie): return Cookie( version=0, diff --git a/windows/main_window.py b/windows/main_window.py index b77effa..0b0f84d 100644 --- a/windows/main_window.py +++ b/windows/main_window.py @@ -1,5 +1,3 @@ -import threading - from PySide6.QtCore import QTimer from PySide6.QtGui import QIcon from PySide6.QtWidgets import QMainWindow