From 05a96e29e45edca1a89cec21ee52af1a9ffdb61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matysiak?= Date: Thu, 9 Apr 2026 10:11:54 +0200 Subject: [PATCH] build: PyInstaller spec, produces dist/MonitorSwitcher.exe --- .gitignore | 2 ++ MonitorSwitcher.spec | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 MonitorSwitcher.spec diff --git a/.gitignore b/.gitignore index bd15dd0..d585f23 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ __pycache__/ *.pyc dist/ build/ +build/ +dist/ diff --git a/MonitorSwitcher.spec b/MonitorSwitcher.spec new file mode 100644 index 0000000..0af11b7 --- /dev/null +++ b/MonitorSwitcher.spec @@ -0,0 +1,37 @@ +block_cipher = None + +a = Analysis( + ['main.py'], + pathex=['.'], + binaries=[], + datas=[('config/config.json', 'config')], + hiddenimports=[ + 'wmi', 'pythoncom', 'pywintypes', + 'win32api', 'win32con', 'winreg', + 'pystray._win32', + ], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, +) + +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='MonitorSwitcher', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=False, + console=False, + icon=None, +)