feat: Makefile and bundled resources

pull/1/head
José Carlos Cuevas 5 months ago
parent f5bec00a1b
commit 24a7e1b4ed

2
.gitignore vendored

@ -21,3 +21,5 @@
# Go workspace file
go.work
radiospiral
radiospiral.log

@ -0,0 +1,20 @@
# Makefile for the RadioSpiral project
#
GO=go build
GO_OPTIONS=-buildmode=default
all: radiospiral
radiospiral: main.go bundle.go
$(GO) -o radiospiral $(GO_OPTIONS) main.go bundle.go
# It's a phony so we can always call it and regenerate the file
.PHONY: generate
generate:
go generate main.go
.PHONY: clean
clean:
rm radiospiral

File diff suppressed because one or more lines are too long

@ -1,3 +1,6 @@
//go:generate fyne bundle -o bundle.go res/icon.png
//go:generate fyne bundle -o bundle.go -append res/header.png
package main
/*
@ -199,13 +202,7 @@ func main() {
window := app.NewWindow("RadioSpiral Player")
window.Resize(fyne.NewSize(400, 600))
icon, err := fyne.LoadResourceFromPath("./res/icon.png")
if err != nil {
log.Println("[ERROR] Couldn't load the app icon!")
log.Println(err)
} else {
window.SetIcon(icon)
}
window.SetIcon(resourceIconPng)
// Keep the status of the player
playStatus := false
@ -214,7 +211,7 @@ func main() {
radioSpiralAvatar := loadImageURL("https://radiospiral.net/wp-content/uploads/2018/03/Radio-Spiral-Logo-1.png")
// Header section
radioSpiralImage := canvas.NewImageFromFile("./res/header.png")
radioSpiralImage := canvas.NewImageFromResource(resourceHeaderPng)
header := container.NewCenter(radioSpiralImage)
// Next show section

Loading…
Cancel
Save