-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GUI] - Include version and avoid windows to open cmd
- Loading branch information
Showing
3 changed files
with
28 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,40 @@ | ||
#get latest git tag | ||
# get latest git tag | ||
TAG = $$(git describe --abbrev=0 --tags) | ||
#get current date and time | ||
# get current date and time | ||
NOW = $$(date +'%Y-%m-%d_%T') | ||
#use the linker to inject the informations | ||
LDFLAGS = -ldflags="-X main.release=${TAG} -X main.buildTime=${NOW}" | ||
# use the linker to inject the informations | ||
LDFLAGS = "-X main.release=${TAG} -X main.buildTime=${NOW}" | ||
LDFLAGSWINDOWS = "-H windowsgui -X main.release=${TAG} -X main.buildTime=${NOW}" | ||
|
||
help: # this command | ||
# [generating help from tasks header] | ||
@egrep '^[A-Za-z0-9_-]+:' Makefile | ||
|
||
osx-build: # Create the executable for OSX | ||
@GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o build/comics-downloader-osx ./cmd/downloader | ||
osx-build: # Creates OSX executable | ||
@GOOS=darwin GOARCH=amd64 go build -ldflags=${LDFLAGS} -o build/comics-downloader-osx ./cmd/downloader | ||
|
||
windows-build: # Create the executable for WINDOWS | ||
@GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o build/comics-downloader.exe ./cmd/downloader | ||
windows-build: # Creates Windows executable | ||
@GOOS=windows GOARCH=amd64 go build -ldflags=${LDFLAGS} -o build/comics-downloader.exe ./cmd/downloader | ||
|
||
linux-build: # Create the executable for LINUX | ||
@GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o build/comics-downloader ./cmd/downloader | ||
linux-build: # Creates Linux executable | ||
@GOOS=linux GOARCH=amd64 go build -ldflags=${LDFLAGS} -o build/comics-downloader ./cmd/downloader | ||
|
||
gui-builds: # Creates GUI executables for LINUX OSX WINDOWS | ||
fyne-cross --output comics-downloader-gui --targets=linux/amd64,windows/amd64,darwin/amd64 ./cmd/gui | ||
osx-gui-build: # Creates OSX Gui executable | ||
@GOOS=darwin GOARCH=amd64 go build -ldflags=${LDFLAGS} -o build/comics-downloader-gui-osx ./cmd/gui | ||
|
||
builds: # Create the executables for OSX/Windows/Linux | ||
windows-gui-build: # Creates Window GUI executable | ||
@CGO_ENABLED=1 GOOS=windows CC=x86_64-w64-mingw32-gcc go build -ldflags=${LDFLAGSWINDOWS} -o build/comics-downloader-gui-windows ./cmd/gui | ||
|
||
linux-gui-build: # Creates LINUX executable | ||
@fyne-cross --ldflags=${LDFLAGS} --output=comics-downloader-gui --targets=linux/amd64 ./cmd/gui | ||
|
||
builds: # Creates executables for OSX/Windows/Linux | ||
@make osx-build | ||
@make windows-build | ||
@make linux-build | ||
@make gui-builds | ||
@make windows-gui-build | ||
@make osx-gui-build | ||
@make linux-gui-build | ||
|
||
remove-builds: # Remove executables | ||
@rm -rf build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters