Compare commits
No commits in common. "d0e67219536d04108295d2eef9b97ca3aa4d1676" and "bd1d685c20634316881a276a6ac2b82728df764e" have entirely different histories.
d0e6721953
...
bd1d685c20
@ -8,9 +8,6 @@ import (
|
|||||||
_ "opslag.de/schobers/zntg/allg5ui" // rendering backend
|
_ "opslag.de/schobers/zntg/allg5ui" // rendering backend
|
||||||
)
|
)
|
||||||
|
|
||||||
// #cgo windows,allegro LDFLAGS: -Wl,-subsystem,windows
|
|
||||||
import "C"
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
log.Println("Using Allegro5 rendering backend")
|
log.Println("Using Allegro5 rendering backend")
|
||||||
}
|
}
|
||||||
|
6
cmd/tins2020/tins2020_windows_allegro.go
Normal file
6
cmd/tins2020/tins2020_windows_allegro.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// +build windows,allegro
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
// #cgo LDFLAGS: -Wl,-subsystem,windows
|
||||||
|
import "C"
|
@ -66,7 +66,7 @@ type LargeDialogTitleBar struct {
|
|||||||
ui.ContainerBase
|
ui.ContainerBase
|
||||||
|
|
||||||
title ui.Label
|
title ui.Label
|
||||||
close ui.Button
|
close IconButton
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewLargeDialogTitleBar(title string, closeRequested ui.EventFn) *LargeDialogTitleBar {
|
func NewLargeDialogTitleBar(title string, closeRequested ui.EventFn) *LargeDialogTitleBar {
|
||||||
|
43
resources.go
Normal file
43
resources.go
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
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)
|
||||||
|
}
|
@ -11,8 +11,8 @@ version_safe=${version//\./_}
|
|||||||
|
|
||||||
echo "Creating ${version} release"
|
echo "Creating ${version} release"
|
||||||
|
|
||||||
|
|
||||||
rm -rf build/linux*
|
rm -rf build/linux*
|
||||||
rm -rf build/macosx*
|
|
||||||
rm -rf build/windows*
|
rm -rf build/windows*
|
||||||
|
|
||||||
mkdir -p build/release
|
mkdir -p build/release
|
||||||
@ -35,14 +35,6 @@ 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"
|
echo "Created Linux (Allegro) release: build/release/botanim_allegro_${version_safe}_linux_amd64.zip"
|
||||||
cd ../..
|
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
|
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
|
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
|
cp ../README.md build/windows
|
||||||
|
Loading…
Reference in New Issue
Block a user