Repository navigation
Expand file tree
/
Copy pathtukdify.spec
More file actions
77 lines (67 loc) · 2.09 KB
/
Copy pathtukdify.spec
File metadata and controls
77 lines (67 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# -*- mode: python ; coding: utf-8 -*-
"""
tukdify.spec — PyInstaller specification for Tukdify MultiCompressor.
Produces a deterministic, standalone one-file Windows executable.
Build: pyinstaller tukdify.spec --noconfirm --clean
Output: dist/Tukdify-MultiCompressor.exe
"""
import os
import sys
from PyInstaller.utils.hooks import collect_all
block_cipher = None
# Collect all data, binaries, and hidden imports for GUI & media libraries
datas = [("assets", "assets")]
binaries = []
hiddenimports = ["src"]
for pkg in ["customtkinter", "tkinterdnd2", "imageio_ffmpeg", "pillow_heif", "py7zr"]:
try:
tmp_datas, tmp_binaries, tmp_hidden = collect_all(pkg)
datas += tmp_datas
binaries += tmp_binaries
hiddenimports += tmp_hidden
except Exception:
pass
# Optional standalone ffmpeg / ffprobe binaries in root
for b in ["ffmpeg.exe", "ffprobe.exe", "ffmpeg", "ffprobe"]:
if os.path.isfile(b):
binaries.append((b, "."))
excludes = [
"matplotlib", "PyQt5", "PyQt6", "PySide2", "PySide6",
"scipy", "pandas", "IPython", "notebook", "pytest",
]
a = Analysis(
["main.py"],
pathex=["src"],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=excludes,
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name="Tukdify-MultiCompressor",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False, # Keep UPX OFF to prevent antivirus false positives
console=False, # GUI app — no console window
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
version="version_info.txt" if os.path.isfile("version_info.txt") else None,
icon="assets/tukdify.ico" if os.path.isfile("assets/tukdify.ico") else None,
)