-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExecutableFile.spec
More file actions
64 lines (59 loc) · 1.36 KB
/
ExecutableFile.spec
File metadata and controls
64 lines (59 loc) · 1.36 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
from PyInstaller.utils.hooks import collect_submodules
from PyInstaller.utils.hooks import collect_dynamic_libs
from PyInstaller.utils.hooks import collect_data_files
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--app-name", default="Clikey")
opts = parser.parse_args()
hidden = [
"keyboard",
"pyautogui",
"PIL.ImageGrab",
"autoit",
"mss",
"mss.windows",
"tkinterdnd2",
]
# 일부 패키지의 지연 import 대비
hidden += collect_submodules("pyautogui")
block_cipher = None
autoit_bins = collect_dynamic_libs('autoit')
# tkinterdnd2가 의존하는 tkdnd 동적 라이브러리/Tcl 스크립트 포함
tkdnd_datas = collect_data_files('tkinterdnd2')
a = Analysis(
['app.py'],
pathex=[],
binaries=autoit_bins,
datas=[
('app.ico', '.'),
] + tkdnd_datas,
hiddenimports=hidden,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name=opts.app_name,
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False, # 콘솔 창 숨김
icon='app.ico',
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='Clikey'
)