Repository navigation
Expand file tree
/
Copy pathclickforge.spec
More file actions
111 lines (100 loc) · 2.69 KB
/
Copy pathclickforge.spec
File metadata and controls
111 lines (100 loc) · 2.69 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# -*- mode: python ; coding: utf-8 -*-
import os
import sys
import customtkinter
sys.path.insert(0, os.path.abspath("."))
from clickforge import __version__
block_cipher = None
ctk_path = os.path.dirname(customtkinter.__file__)
hidden_imports = ["customtkinter", "PIL", "PIL._tkinter_finder"]
if sys.platform.startswith("win"):
hidden_imports.extend(["pynput.keyboard._win32", "pynput.mouse._win32"])
elif sys.platform == "darwin":
hidden_imports.extend(["pynput.keyboard._darwin", "pynput.mouse._darwin"])
else:
hidden_imports.extend(["pynput.keyboard._xorg", "pynput.mouse._xorg"])
datas = [
(ctk_path, "customtkinter"),
("assets/icon.ico", "assets"),
("assets/icon.png", "assets"),
("assets/logo.svg", "assets"),
]
if os.path.exists("assets/icon.icns"):
datas.append(("assets/icon.icns", "assets"))
if not sys.platform.startswith("win"):
try:
from PyInstaller.utils.hooks import collect_data_files
import certifi # noqa: F401
datas.extend(collect_data_files("certifi"))
hidden_imports.append("certifi")
except Exception:
pass
a = Analysis(
["main.py"],
pathex=[],
binaries=[],
datas=datas,
hiddenimports=hidden_imports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[
"unittest",
"test",
"doctest",
"pydoc",
"lib2to3",
"ensurepip",
"idlelib",
"tkinter.test",
"pip",
"setuptools",
"wheel",
],
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,
name="ClickForge" if sys.platform != "darwin" else "ClickForge_Mac",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False,
icon="assets/icon.ico" if sys.platform != "darwin" else None,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
upx_exclude=[],
name="ClickForge",
)
if sys.platform == "darwin":
app = BUNDLE(
coll,
name="ClickForge.app",
icon="assets/icon.icns" if os.path.exists("assets/icon.icns") else None,
bundle_identifier="com.efeartn.clickforge",
info_plist={
"CFBundleShortVersionString": __version__,
"CFBundleVersion": __version__,
"NSHighResolutionCapable": "True",
"LSBackgroundOnly": "False",
},
)