Skip to content

Commit

Permalink
Build Windows and macOS variants as tray apps
Browse files Browse the repository at this point in the history
  • Loading branch information
cld9x committed Aug 5, 2019
1 parent d0c57ec commit ad66477
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ test.db
/ui/public/static/bundle.*
npm-debug.log
yarn-error.log
/test_cache
32 changes: 26 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ before:
- go generate ./...
builds:
- id: xbvr-mac
binary: xbvr
# main: cmd/tray/main.go
binary: XBVR.app/Contents/MacOS/XBVR
main: pkg/tray/main.go
flags:
- -tags=json1
env:
Expand All @@ -17,12 +17,14 @@ builds:
- darwin
goarch:
- amd64
# hooks:
# post: ./appify.sh -s dist/darwin_amd64/xbvr -i ui/public/icons/xbvr-mac.icns -n XBVR
hooks:
post: ./appify.sh -s ./dist/darwin_amd64/XBVR.app/Contents/MacOS/XBVR -i ./ui/public/icons/xbvr-mac.icns -n XBVR
- id: xbvr-windows
binary: xbvr
main: pkg/tray/main.go
flags:
- -tags=json1
- -H=windowsgui
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
Expand Down Expand Up @@ -56,11 +58,29 @@ builds:
- 6
- 7
archives:
- replacements:
darwin: macOS
- id: archive-linux
builds:
- xbvr-linux-amd64
- xbvr-linux-arm
replacements:
linux: Linux
windows: Windows
amd64: x86_64
- id: archive-win
builds:
- xbvr-windows
format: zip
replacements:
windows: Windows
- id: archive-mac
builds:
- xbvr-mac
format: zip
replacements:
darwin: macOS
files:
- XBVR.app/Contents/Resources/XBVR.icns
- XBVR.app/Contents/Info.plist
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
Expand Down
4 changes: 2 additions & 2 deletions appify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ EOF
echo "Application bundle created at '$PWD/$APPNAME.app'"
echo

mv $PWD/$APPNAME.app dist/darwin_amd64
rm $APPSCRIPT
#mv $PWD/$APPNAME.app dist/darwin_amd64
#rm $APPSCRIPT

0 comments on commit ad66477

Please sign in to comment.