Compare commits

...

4 Commits

5 changed files with 13 additions and 51 deletions

View File

@ -8,6 +8,9 @@ import (
_ "opslag.de/schobers/zntg/allg5ui" // rendering backend
)
// #cgo windows,allegro LDFLAGS: -Wl,-subsystem,windows
import "C"
func init() {
log.Println("Using Allegro5 rendering backend")
}

View File

@ -1,6 +0,0 @@
// +build windows,allegro
package main
// #cgo LDFLAGS: -Wl,-subsystem,windows
import "C"

View File

@ -66,7 +66,7 @@ type LargeDialogTitleBar struct {
ui.ContainerBase
title ui.Label
close IconButton
close ui.Button
}
func NewLargeDialogTitleBar(title string, closeRequested ui.EventFn) *LargeDialogTitleBar {

View File

@ -1,43 +0,0 @@
package tins2020
import (
rice "github.com/GeertJohan/go.rice"
"github.com/spf13/afero"
"opslag.de/schobers/fs/ricefs"
"opslag.de/schobers/fs/vfs"
)
type Resources struct {
box *rice.Box
fs afero.Fs
copy vfs.CopyDir
}
func (r *Resources) Box() *rice.Box {
return r.box
}
func (r *Resources) Destroy() {
r.copy.Destroy()
}
func (r *Resources) Fs() afero.Fs {
return r.fs
}
func (r *Resources) Open(box *rice.Box) error {
r.box = box
r.fs = vfs.NewOsFsFallback(r.box.Name(), ricefs.NewFs(box))
copy, err := vfs.NewCopyDir(r.fs)
if err != nil {
return err
}
r.copy = copy
return nil
}
func (r *Resources) Copy() vfs.CopyDir { return r.copy }
func (r *Resources) Retrieve(name string) (string, error) {
return r.copy.Retrieve(name)
}

View File

@ -11,8 +11,8 @@ version_safe=${version//\./_}
echo "Creating ${version} release"
rm -rf build/linux*
rm -rf build/macosx*
rm -rf build/windows*
mkdir -p build/release
@ -35,6 +35,14 @@ zip -9 -q ../release/botanim_allegro_${version_safe}_linux_amd64.zip *
echo "Created Linux (Allegro) release: build/release/botanim_allegro_${version_safe}_linux_amd64.zip"
cd ../..
mkdir -p build/macosx
CGO_ENABLED=1 CC=o64-clang CXX=o64-clang++ GOOS=darwin GOARCH=amd64 go build -tags static -ldflags "-s -w" -o build/macosx/botanim ../cmd/tins2020
cp ../README.md build/macosx
cd build/macosx
zip -9 -q ../release/botanim_${version_safe}_macosx_amd64.zip *
echo "Created Mac OS X release: build/release/botanim_${version_safe}_macosx_amd64.zip"
cd ../..
mkdir -p build/windows
CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -tags static -ldflags "-s -w" -o build/windows/botanim.exe ../cmd/tins2020
cp ../README.md build/windows