Retrait win11toast et compilation agressive via fichier spec
This commit is contained in:
133
La Tanière Launcher.spec
Normal file
133
La Tanière Launcher.spec
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
# -*- mode: python ; coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
a = Analysis(
|
||||||
|
['src\\mainwindow.py'],
|
||||||
|
pathex=[],
|
||||||
|
binaries=[],
|
||||||
|
datas=[
|
||||||
|
('.\\styles\\styles.qss', 'styles'),
|
||||||
|
('.\\ui\\mainwindow.ui', 'ui')
|
||||||
|
],
|
||||||
|
hiddenimports=[],
|
||||||
|
hookspath=[],
|
||||||
|
hooksconfig={
|
||||||
|
"qt_plugins": ["platforms", "styles"]
|
||||||
|
},
|
||||||
|
runtime_hooks=[],
|
||||||
|
excludes=[
|
||||||
|
# PySide6 - modules non utilisés
|
||||||
|
'PySide6.Qt3DAnimation',
|
||||||
|
'PySide6.Qt3DCore',
|
||||||
|
'PySide6.Qt3DExtras',
|
||||||
|
'PySide6.Qt3DInput',
|
||||||
|
'PySide6.Qt3DLogic',
|
||||||
|
'PySide6.Qt3DRender',
|
||||||
|
'PySide6.QtAxContainer',
|
||||||
|
'PySide6.QtBluetooth',
|
||||||
|
'PySide6.QtCharts',
|
||||||
|
'PySide6.QtConcurrent',
|
||||||
|
'PySide6.QtDataVisualization',
|
||||||
|
'PySide6.QtDesigner',
|
||||||
|
'PySide6.QtHelp',
|
||||||
|
'PySide6.QtLocation',
|
||||||
|
'PySide6.QtMultimedia',
|
||||||
|
'PySide6.QtMultimediaWidgets',
|
||||||
|
'PySide6.QtNetwork',
|
||||||
|
'PySide6.QtNetworkAuth',
|
||||||
|
'PySide6.QtNfc',
|
||||||
|
'PySide6.QtOpenGL',
|
||||||
|
'PySide6.QtOpenGLWidgets',
|
||||||
|
'PySide6.QtPdf',
|
||||||
|
'PySide6.QtPdfWidgets',
|
||||||
|
'PySide6.QtPositioning',
|
||||||
|
'PySide6.QtPrintSupport',
|
||||||
|
'PySide6.QtQml',
|
||||||
|
'PySide6.QtQuick',
|
||||||
|
'PySide6.QtQuick3D',
|
||||||
|
'PySide6.QtQuickControls2',
|
||||||
|
'PySide6.QtQuickWidgets',
|
||||||
|
'PySide6.QtRemoteObjects',
|
||||||
|
'PySide6.QtScxml',
|
||||||
|
'PySide6.QtSensors',
|
||||||
|
'PySide6.QtSerialBus',
|
||||||
|
'PySide6.QtSerialPort',
|
||||||
|
'PySide6.QtSpatialAudio',
|
||||||
|
'PySide6.QtSql',
|
||||||
|
'PySide6.QtStateMachine',
|
||||||
|
'PySide6.QtSvg',
|
||||||
|
'PySide6.QtSvgWidgets',
|
||||||
|
'PySide6.QtTest',
|
||||||
|
'PySide6.QtTextToSpeech',
|
||||||
|
'PySide6.QtWebChannel',
|
||||||
|
'PySide6.QtWebEngineCore',
|
||||||
|
'PySide6.QtWebEngineQuick',
|
||||||
|
'PySide6.QtWebEngineWidgets',
|
||||||
|
'PySide6.QtWebSockets',
|
||||||
|
'PySide6.QtXml',
|
||||||
|
|
||||||
|
# Stdlib inutile en prod
|
||||||
|
'unittest',
|
||||||
|
'email',
|
||||||
|
'html',
|
||||||
|
'http',
|
||||||
|
'xmlrpc',
|
||||||
|
'pydoc',
|
||||||
|
'doctest',
|
||||||
|
'difflib',
|
||||||
|
'tkinter',
|
||||||
|
'curses',
|
||||||
|
'readline',
|
||||||
|
'xml',
|
||||||
|
'xmlrpc',
|
||||||
|
'csv',
|
||||||
|
'multiprocessing',
|
||||||
|
'concurrent',
|
||||||
|
'asyncio', # non utilisé dans ton code
|
||||||
|
'sqlite3',
|
||||||
|
'ssl',
|
||||||
|
'socket', # win11toast peut en avoir besoin, à tester
|
||||||
|
'ctypes', # idem, à tester
|
||||||
|
'lib2to3',
|
||||||
|
'test',
|
||||||
|
'distutils',
|
||||||
|
'setuptools',
|
||||||
|
'pkg_resources',
|
||||||
|
'pip',
|
||||||
|
],
|
||||||
|
noarchive=False,
|
||||||
|
optimize=2, # optimisation bytecode
|
||||||
|
)
|
||||||
|
pyz = PYZ(a.pure, a.zipped_data)
|
||||||
|
|
||||||
|
exe = EXE(
|
||||||
|
pyz,
|
||||||
|
a.scripts,
|
||||||
|
a.binaries,
|
||||||
|
a.datas,
|
||||||
|
[],
|
||||||
|
name='La Tanière Launcher',
|
||||||
|
debug=False,
|
||||||
|
bootloader_ignore_signals=False,
|
||||||
|
strip=False, # True = enlève symboles debug
|
||||||
|
upx=True,
|
||||||
|
upx_exclude=[
|
||||||
|
"_uuid.pyd",
|
||||||
|
"Qt6Core.dll",
|
||||||
|
"Qt6Gui.dll",
|
||||||
|
"Qt6Widgets.dll",
|
||||||
|
"Qt6UiTools.dll",
|
||||||
|
"qwindows.dll",
|
||||||
|
"python3*.dll",
|
||||||
|
"vcruntime*.dll",
|
||||||
|
"msvcp*.dll",
|
||||||
|
],
|
||||||
|
runtime_tmpdir=None,
|
||||||
|
console=False,
|
||||||
|
disable_windowed_traceback=True,
|
||||||
|
argv_emulation=False,
|
||||||
|
target_arch=None,
|
||||||
|
codesign_identity=None,
|
||||||
|
entitlements_file=None,
|
||||||
|
icon=['assets\\Icone.ico'],
|
||||||
|
)
|
||||||
@@ -12,9 +12,6 @@ from PySide6.QtWidgets import QMainWindow, QApplication
|
|||||||
|
|
||||||
import resources as resources # This is generated from the .qrc file # noqa: F401
|
import resources as resources # This is generated from the .qrc file # noqa: F401
|
||||||
|
|
||||||
if sys.platform=='windows' or sys.platform=="win32":
|
|
||||||
from win11toast import toast # type: ignore
|
|
||||||
|
|
||||||
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
||||||
bundle_dir = Path(sys._MEIPASS)
|
bundle_dir = Path(sys._MEIPASS)
|
||||||
else:
|
else:
|
||||||
@@ -87,11 +84,7 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def connexion_btn_link():
|
def connexion_btn_link():
|
||||||
buttons = [
|
return None
|
||||||
{'activationType': 'protocol', 'arguments': '', 'content': 'Entrer en jeu'},
|
|
||||||
]
|
|
||||||
if sys.platform=='windows' or sys.platform=="win32":
|
|
||||||
toast('C\'est enfin à ton tour d\'entrer en jeu! 🎮🐍', app_id='LaTanière Launcher',buttons=buttons)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user