-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·99 lines (92 loc) · 3.36 KB
/
Copy pathMakefile
File metadata and controls
executable file
·99 lines (92 loc) · 3.36 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
# create icons
genicon:
icon-gen -i ./icon_markrender.png -o icons --icns --icns-sizes 16,32,64,128,256,512,1024
# create single file
onefile:
rm -rf build dist
find . -type d -name '__pycache__' -exec rm -rf {} +
find . -type f -name '*.pyc' -delete
pyinstaller --upx-dir=./upx --onedir \
--clean \
--windowed \
--name "markrender" \
--icon "./icons/app.icns" \
--add-data "icons/app.icns:." \
--add-data "icons:icons" \
--add-data "app/editor/js_templates:app/editor/js_templates" \
--add-data "app/editor/plugins:app/editor/plugins" \
--noconfirm \
--hidden-import "numpy" \
--collect-submodules "numpy" \
--hidden-import "diff_match_patch" \
--exclude-module "PyQt5" \
--exclude-module "test" \
--exclude-module "tests" \
--exclude-module "unittest" \
--exclude-module "matplotlib" \
--exclude-module "PySide6.QtQuick" \
--exclude-module "PySide6.QtDesigner" \
--exclude-module "PySide6.QtQuickWidgets" \
--exclude-module "PySide6.QtVirtualKeyboard" \
--exclude-module "PySide6.QtTextToSpeech" \
--exclude-module "PySide6.QtTest" \
--exclude-module "PySide6.QtSql" \
--exclude-module "PySide6.QtSpatialAudio" \
--exclude-module "PySide6.QtStateMachine" \
--exclude-module "PySide6.QtQuick3D" \
--exclude-module "PySide6.QtShaderTools" \
--exclude-module "PySide6.Qt3DCore" \
--exclude-module "PySide6.Qt3DRender" \
--exclude-module "PySide6.Qt3DInput" \
--exclude-module "PySide6.Qt3DLogic" \
--exclude-module "PySide6.Qt3DWindow" \
--exclude-module "PySide6.Qt3DAnimation" \
--exclude-module "PySide6.Qt3DExtras" \
--exclude-module "PySide6.QtScxml" \
--exclude-module "PySide6.QtQuickControls2" \
--exclude-module "PySide6.QtQuickTemplates2" \
--exclude-module "PySide6.QtQuickTest" \
--exclude-module "PySide6.QtQuick3DAnimation" \
--exclude-module "PySide6.QtQuick3DPhysics" \
--exclude-module "PySide6.QtQuick3DRender" \
--exclude-module "PySide6.QtQuick3DInput" \
--exclude-module "PySide6.QtQuick3DXr" \
--exclude-module "PySide6.QtQuick3DUtils" \
--exclude-module "PySide6.QtQuick3DAssetImport" \
--exclude-module "PySide6.QtQuick3DAssetUtils" \
--exclude-module "PySide6.QtQuick3DHelpers" \
--exclude-module "PySide6.QtQuick3DParticleEffects" \
--exclude-module "PySide6.QtQuick3DScene2D" \
--exclude-module "PySide6.QtQuickControls2Basic" \
--exclude-module "PySide6.QtQuickControls2Fluent" \
--exclude-module "PySide6.QtQuickControls2Material" \
--exclude-module "PySide6.QtQuickControls2Universal" \
--exclude-module "PySide6.QtQuickControls2Fusion" \
--exclude-module "PySide6.QtQuickControls2Imagine" \
--exclude-module "PySide6.QtQuickControls2Impl" \
--exclude-module "PySide6.QtQuickControls2Universal" \
--exclude-module "PySide6.QtQuickShapes" \
--exclude-module "PySide6.QtQuickEffects" \
--exclude-module "PySide6.QtSensors" \
--exclude-module "PySide6.QtSerialPort" \
main.py
# create dmg
dmg: onefile
mkdir -p dist/dmg
mv dist/markrender.app dist/dmg
rm -f dist/dmg/Applications
ln -s /Applications dist/dmg/Applications
hdiutil create \
-volname "markrender" \
-srcfolder "dist/dmg" \
-ov \
-format UDZO \
"dist/markrender.dmg"
# format all python files
fmt:
autopep8 --in-place --recursive --aggressive --aggressive .
# clean no used files
clean:
rm -rf app.log config.db build dist
run:
QTWEBENGINE_REMOTE_DEBUGGING=9222 python main.py --debug