-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPixelToPathWindows.spec
More file actions
70 lines (63 loc) · 1.92 KB
/
PixelToPathWindows.spec
File metadata and controls
70 lines (63 loc) · 1.92 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
# PixelToPathWindows.spec
# Prérequis : bootloader recompilé depuis les sources PyInstaller
# pip install vtracer cairosvg customtkinter tkinterdnd2 Pillow numpy
from PyInstaller.building.build_main import Analysis, PYZ, EXE, COLLECT
from PyInstaller.utils.hooks import collect_submodules, collect_data_files
import sys, os
block_cipher = None
# vtracer expose une extension native (.pyd) — PyInstaller la détecte
# automatiquement via collect_submodules. cairosvg nécessite les DLLs GTK
# qui doivent être dans bin/gtk-bin/ (inchangé).
a = Analysis(
['app.py'],
pathex=[os.path.abspath('.')],
binaries=[],
datas=[
('interface', 'interface'),
('moteur', 'moteur'),
# GTK toujours nécessaire pour cairosvg sur Windows
('bin/gtk-bin', 'bin/gtk-bin'),
],
hiddenimports=[
'PIL._tkinter_finder',
'vtracer', # extension Rust/pyo3
*collect_submodules('cairosvg'),
*collect_submodules('customtkinter'),
'tkinter',
'tkinter.ttk',
'tkinter.filedialog',
],
hookspath=[],
runtime_hooks=[],
excludes=[
'matplotlib', 'scipy', 'pandas', # exclure les libs inutiles
'IPython', 'jupyter', # réduit la taille et la surface AV
],
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,
[],
exclude_binaries=True, # onedir : moins suspect qu'onefile
name='PixelToPath',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False, # UPX déclenche les AV — toujours False
console=False,
icon='interface/assets/app_icon.ico',
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
name='PixelToPath',
)