1
+ # This file is part of Slice.
2
+ #
3
+ # Slice is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # Slice is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with Slice. If not, see <https://www.gnu.org/licenses/>.
15
+
16
+
17
+
18
+ # --------------------
19
+ # Resource file builds
20
+ # --------------------
21
+
22
+ build-image-resource :
23
+ cd src/resources/img && pyrcc5 -o ../../slice/imageresources.py image-resources.qrc
24
+
25
+ build-font-resource :
26
+ cd src/resources/fonts && pyrcc5 -o ../../slice/fontresources.py font-resources.qrc
27
+
28
+ # ---------------------
29
+ # macOS platform builds
30
+ # ---------------------
31
+
32
+ # Updates the Icon.icns file from the icon images in icons/Icon.iconset
33
+ macos-iconset :
34
+ cd icons && iconutil -c icns Icon.iconset
35
+
36
+ build-macos : macos-iconset build-image-resource build-font-resource
37
+ pyinstaller --noconfirm " target/PyInstaller-macOS/Slice-macOS.spec"
38
+ cp LICENSE dist/license.txt
39
+
40
+ codesign-macos :
41
+ codesign --deep -s " Christopher Simpkins" dist/Slice.app
42
+
43
+ build-macos-installer :
44
+ # https://github.com/sindresorhus/create-dmg
45
+ cd dist && create-dmg --overwrite Slice.app
46
+
47
+ # ---------------------
48
+ # Testing/debugging
49
+ # ---------------------
50
+
51
+ # directly execute the application without a PyInstaller build
52
+ run :
53
+ python src/run.py
54
+
55
+
56
+ .PHONY : build-image-resource build-font-resource\
57
+ build-macos macos-iconset codesign-macos build-macos-installer\
58
+ run
0 commit comments