-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·83 lines (81 loc) · 3.24 KB
/
Makefile
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
run: install-packages; poetry run python3 main.py
install-packages: ; poetry install
init-ubuntu: ; sudo apt-get update && \
sudo apt-get upgrade -y && \
sudo apt install software-properties-common -y && \
sudo add-apt-repository ppa:deadsnakes/ppa -y && \
sudo apt-get install -y python3.10-tk python3.10-distutils libvips && \
python3 -m pip install poetry && \
poetry env use /usr/bin/python3.10 && \
poetry install
build-mac: install-packages; @printf "[Compiling via PyInstaller...]\n"
poetry run pyinstaller --noconfirm --onedir --windowed --icon "src/Images/NWEdit.icns" \
--hidden-import "art" \
--hidden-import "pyvips" \
--hidden-import "Foundation" \
--hidden-import "json" \
--hidden-import "json5rw"\
--hidden-import "ttkthemes" \
--hidden-import "mistune" \
--hidden-import "pygments" \
--hidden-import "PyTouchBar" \
--hidden-import "send2trash" \
--hidden-import "tkhtmlview" \
--hidden-import "tkinter" \
--hidden-import "tkinter.font" --hidden-import "tkinter.ttk" \
--hidden-import "tkterminal" \
--add-data "src:src/" \
--add-data "docs:docs/" \
--name "NWEdit" \
--additional-hooks-dir=. \
"./main.py" \
--clean > /dev/null
rm -rf build NWEdit.spec
@printf "\033[36m[Build complete] \033[0m\n"
build-linux: install-packages; @printf "[Compiling via PyInstaller...]\n"
poetry run pyinstaller --noconfirm --onefile --windowed --icon "src/Images/NWEdit.ico" \
--hidden-import "art" \
--hidden-import "pyvips" \
--hidden-import "json" \
--hidden-import "json5rw" \
--hidden-import "mistune" \
--hidden-import "pygments" \
--hidden-import "send2trash" \
--hidden-import "tkhtmlview" \
--hidden-import "tkinter.ttk" \
--hidden-import "tkinter" \
--hidden-import "tkinter.font" \
--hidden-import "ttkthemes" \
--add-data "src:src/" \
--add-data "docs:docs/" \
--hidden-import "tkterminal" \
--name "NWEdit" \
--additional-hooks-dir=. \
"./main.py" \
--clean > /dev/null
rm -rf build NWEdit.spec
@printf "\033[36m[Build complete] \033[0m"
build-windows: install-packages; @echo "[Compiling via PyInstaller...]"
poetry run pyinstaller --noconfirm --onefile --windowed --icon "src/Images/NWEdit.ico" \
--hidden-import "art" \
--hidden-import "pyvips" \
--hidden-import "json" \
--hidden-import "json5rw" \
--hidden-import "mistune" \
--hidden-import "pygments" \
--hidden-import "send2trash" \
--hidden-import "tkhtmlview" \
--hidden-import "tkinter" \
--hidden-import "tkinter.font" \
--hidden-import "tkinter.ttk" \
--hidden-import "tkterminal" \
--hidden-import "ttkthemes" \
--add-data "src;src/" \
--add-data "docs;docs/" \
--name "NWEdit" \
--additional-hooks-dir=. \
"./main.py" \
--clean > NUL
del NWEdit.spec
rmdir build
@echo "[Build complete]"