Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

Commit

Permalink
Make it possible to change gobin
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Jun 15, 2020
1 parent 6f6d023 commit 7aa8d7a
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
# Constant variables for simplifying code below.
appID=com.github.jacalz.sparta
icon=internal/assets/icon-512.png
name=Sparta
# Constants for cross compilation and packaging.
appID = com.github.jacalz.sparta
icon = internal/assets/icon-512.png
name = Sparta

# Default path to the go binary directory.
GOBIN ?= ~/go/bin/

bundle:
# Bundle the correct logo into sparta/src/bundled/bundled.go
~/go/bin/fyne bundle -package assets internal/assets/icon-256.png > internal/assets/bundled.go
${GOBIN}fyne bundle -package assets internal/assets/icon-256.png > internal/assets/bundled.go

# Modify the variable name to be correct.
sed -i 's/resourceIcon256Png/AppIcon/g' internal/assets/bundled.go

check:
# Check the whole codebase for misspellings.
~/go/bin/misspell -w .
${GOBIN}misspell -w .

# Run full formating on the code.
gofmt -s -w .

# Check the whole program for security issues.
~/go/bin/gosec ./...
${GOBIN}gosec ./...

darwin:
~/go/bin/fyne-cross darwin -arch amd64 -app-id ${appID} -icon ${icon} -output ${name}
${GOBIN}fyne-cross darwin -arch amd64 -app-id ${appID} -icon ${icon} -output ${name}

linux:
~/go/bin/fyne-cross linux -arch amd64 -app-id ${appID} -icon ${icon}
${GOBIN}fyne-cross linux -arch amd64 -app-id ${appID} -icon ${icon}

windows:
~/go/bin/fyne-cross windows -arch amd64 -app-id ${appID} -icon ${icon}
${GOBIN}fyne-cross windows -arch amd64 -app-id ${appID} -icon ${icon}

cross-compile: darwin linux windows

0 comments on commit 7aa8d7a

Please sign in to comment.