Repository navigation
Expand file tree
/
Copy pathExploitFA.spec
More file actions
61 lines (53 loc) · 1.81 KB
/
Copy pathExploitFA.spec
File metadata and controls
61 lines (53 loc) · 1.81 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
"""PyInstaller one-file build for ExploitFA."""
from pathlib import Path
root = Path(SPECPATH)
def directory_assets(directory: Path, destination: str, pattern: str = "*") -> list[tuple[str, str]]:
"""Collect ``pattern`` files from ``directory`` as PyInstaller data entries."""
if not directory.is_dir():
return []
return [(str(path), destination) for path in sorted(directory.glob(pattern)) if path.is_file()]
# Every data file must be declared before Analysis runs; adding them afterwards
# silently drops them from the bundle.
datas = [
(str(root / "config" / "servers.example.json"), "config"),
(str(root / "config" / "subscriptions.json"), "config"),
]
datas += directory_assets(root / "src" / "ui" / "styles", "src/ui/styles", "*.qss")
datas += directory_assets(root / "assets" / "fonts", "assets/fonts")
datas += directory_assets(root / "assets" / "icons", "assets/icons")
datas += directory_assets(root / "assets" / "flags", "assets/flags")
core_binaries = []
for core_name in ("xray.exe", "sing-box.exe"):
core_path = root / "cores" / core_name
if core_path.is_file():
core_binaries.append((str(core_path), "cores"))
a = Analysis(
[str(root / "src" / "main.py")],
pathex=[str(root)],
binaries=core_binaries,
datas=datas,
hiddenimports=["PySide6.QtCore", "PySide6.QtGui", "PySide6.QtWidgets"],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=["pytest", "unittest", "pydoc", "tkinter"],
noarchive=False,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name="ExploitFA",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
target_arch="x86_64",
codesign_identity=None,
entitlements_file=None,
)