@@ -3,8 +3,9 @@ APPID = com.github.jacalz.wormhole-gui
3
3
ICON = internal/assets/icon/icon-512.png
4
4
NAME = wormhole-gui
5
5
6
- # Default path to the go binary directory .
6
+ # Variables for development .
7
7
GOBIN ?= ~/go/bin/
8
+ VERSION ?= dev
8
9
9
10
# If PREFIX isn't provided, we check for $(DESTDIR)/usr/local and use that if it exists.
10
11
# Otherwice we fall back to using /usr.
@@ -18,12 +19,14 @@ build:
18
19
install :
19
20
install -Dm00755 $(NAME ) $(DESTDIR )$(PREFIX ) /bin/$(NAME )
20
21
install -Dm00644 $(ICON ) $(DESTDIR )$(PREFIX ) /share/pixmaps/$(NAME ) .png
21
- install -Dm00644 internal/assets/$(NAME ) .desktop $(DESTDIR )$(PREFIX ) /share/applications/$(NAME ) .desktop
22
+ install -Dm00644 internal/assets/unix/$(NAME ) .desktop $(DESTDIR )$(PREFIX ) /share/applications/$(NAME ) .desktop
23
+ install -Dm00644 internal/assets/unix/com.github.jacalz.$(NAME ) .metainfo.xml $(DESTDIR )$(PREFIX ) /share/metainfo/com.github.jacalz.$(NAME ) .metainfo.xml
22
24
23
25
uninstall :
24
26
-rm $(DESTDIR )$(PREFIX ) /share/applications/$(NAME ) .desktop
25
27
-rm $(DESTDIR )$(PREFIX ) /bin/$(NAME )
26
28
-rm $(DESTDIR )$(PREFIX ) /share/pixmaps/$(NAME ) .png
29
+ -rm $(DESTDIR )$(PREFIX ) /share/metainfo/com.github.jacalz.$(NAME ) .metainfo.xml
27
30
28
31
check :
29
32
# Check the whole codebase for misspellings.
@@ -50,4 +53,23 @@ linux:
50
53
windows :
51
54
$(GOBIN ) fyne-cross windows -arch amd64 -app-id $(APPID ) -icon $(ICON )
52
55
53
- cross-compile : darwin freebsd linux windows
56
+ windows-debug :
57
+ $(GOBIN ) fyne-cross windows -console -arch amd64 -app-id $(APPID ) -icon $(ICON )
58
+
59
+ release : darwin freebsd linux windows
60
+ # Usage: make release VERSION=v2.x.x
61
+ # If no version is specified, it will default to "dev" instead.
62
+
63
+ # Move Linux package bundles to the root with correct naming.
64
+ mv fyne-cross/dist/linux-amd64/wormhole-gui.tar.gz $(NAME)-$(VERSION)-linux-amd64.tar.gz
65
+ mv fyne-cross/dist/linux-arm64/wormhole-gui.tar.gz $(NAME)-$(VERSION)-linux-arm64.tar.gz
66
+
67
+ # Move FreeBSD package bundles to the root with correct naming.
68
+ mv fyne-cross/dist/freebsd-amd64/wormhole-gui.tar.gz $(NAME)-$(VERSION)-freebsd-amd64.tar.gz
69
+
70
+ # Zip up the darwin package with correct name and move to the root.
71
+ (cd fyne-cross/dist/darwin-amd64/ && zip -r wormhole-gui-darwin-amd64.zip wormhole-gui.app/)
72
+ mv fyne-cross/dist/darwin-amd64/wormhole-gui-darwin-amd64.zip $(NAME)-$(VERSION)-darwin-amd64.zip
73
+
74
+ # Move Windows package to the root with correct naming.
75
+ mv fyne-cross/dist/windows-amd64/wormhole-gui.exe.zip $(NAME)-$(VERSION)-windows-amd64.zip
0 commit comments