forked from DevilXD/TwitchDropsMiner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.spec
71 lines (64 loc) · 1.77 KB
/
build.spec
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
# -*- mode: python ; coding: utf-8 -*-
from __future__ import annotations
import sys
from pathlib import Path
from typing import TYPE_CHECKING
SELF_PATH = str(Path(".").absolute())
if SELF_PATH not in sys.path:
sys.path.insert(0, SELF_PATH)
from constants import WORKING_DIR, DEFAULT_LANG
if TYPE_CHECKING:
from PyInstaller.building.api import PYZ, EXE
from PyInstaller.building.build_main import Analysis
datas: list[tuple[str | Path, str]] = [
("pickaxe.ico", '.'), # icon file
# SeleniumWire HTTPS/SSL cert file and key
("./env/Lib/site-packages/seleniumwire/ca.crt", "./seleniumwire"),
("./env/Lib/site-packages/seleniumwire/ca.key", "./seleniumwire"),
]
for lang_filepath in WORKING_DIR.joinpath("lang").glob("*.json"):
if lang_filepath.stem != DEFAULT_LANG:
datas.append((lang_filepath, "lang"))
block_cipher = None
a = Analysis(
["main.py"],
pathex=[],
datas=datas,
binaries=[],
excludes=[],
hookspath=[],
hooksconfig={},
noarchive=False,
hiddenimports=[
"setuptools._distutils.log",
"setuptools._distutils.dir_util",
"setuptools._distutils.file_util",
"setuptools._distutils.archive_util",
],
runtime_hooks=[],
cipher=block_cipher,
win_no_prefer_redirects=False,
win_private_assemblies=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
upx=True,
debug=False,
strip=False,
console=False,
upx_exclude=[],
target_arch=None,
icon="pickaxe.ico",
runtime_tmpdir=None,
codesign_identity=None,
entitlements_file=None,
bootloader_ignore_signals=False,
disable_windowed_traceback=False,
name="Twitch Drops Miner (by DevilXD)",
)