/
compile.py
46 lines (40 loc) · 1.32 KB
/
compile.py
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
import os
nuitka_arguments = [
"--standalone",
"--assume-yes-for-downloads",
"--nofollow-import-to=tkinter,unittest,pydoc,pdb",
"--plugin-enable=pyside6",
"--include-package=keyring.backends",
"--include-data-files=src/onelauncher/=onelauncher/=**/*.xsd",
"--include-data-dir=src/onelauncher/images=onelauncher/images",
"--include-data-dir=src/onelauncher/locale=onelauncher/locale",
"--include-data-dir=src/onelauncher/fonts=onelauncher/fonts",
]
def main():
if os.name == "nt":
nuitka_arguments.extend(
[
"--windows-disable-console",
"--include-package=win32timezone",
"--include-package=platformdirs.windows",
"--windows-icon-from-ico=src/onelauncher/images/OneLauncherIcon.ico",
]
)
elif os.name == "mac":
nuitka_arguments.extend(
[
"--include-package=platformdirs.macos",
]
)
else:
nuitka_arguments.extend(
[
"--include-qt-plugins=wayland-shell-integration,platforms",
"--include-package=platformdirs.unix",
]
)
os.system(
f"poetry run python -m nuitka {' '.join(nuitka_arguments)} start_onelauncher"
)
if __name__ == "__main__":
main()