diff options
author | Florian Didron <florian@111studio.jp> | 2019-08-15 11:31:11 +0900 |
---|---|---|
committer | Florian Didron <florian@111studio.jp> | 2019-08-15 11:31:11 +0900 |
commit | 68960e452ee0f6c7142f5008d4b1cdc6284d3de7 (patch) | |
tree | aa1bf315791609fb41f14cfdbe909df316995f5e | |
parent | b38ece1a67500a96e45daa2a48c86ad9290e67a4 (diff) |
fix: adds cgo per platform files1.1.2-osx1.1.1-linux
-rwxr-xr-x | build.linux.sh | 2 | ||||
-rw-r--r-- | wally/dfu.go | 1 | ||||
-rw-r--r-- | wally/ergoboot_darwin.c (renamed from wally/ergoboot.c) | 0 | ||||
-rw-r--r-- | wally/ergoboot_darwin.go | 15 | ||||
-rw-r--r-- | wally/ergoboot_linux.go | 8 | ||||
-rw-r--r-- | wally/ergoboot_windows.go | 8 | ||||
-rw-r--r-- | wally/state.go | 2 | ||||
-rw-r--r-- | wally/usb.go | 1 |
8 files changed, 32 insertions, 5 deletions
diff --git a/build.linux.sh b/build.linux.sh index fd5ee9b..c07a8ce 100755 --- a/build.linux.sh +++ b/build.linux.sh @@ -5,5 +5,3 @@ cd .. go-bindata -prefix "ui/build" -o assets.go ui/build/index.dist.js go build -tags dist -o dist/linux64/wally go build -o dist/linux64/wally-cli cli/main.go -upx dist/linux64/wally -upx dist/linux64/wally-cli diff --git a/wally/dfu.go b/wally/dfu.go index 42a1927..6dbcd57 100644 --- a/wally/dfu.go +++ b/wally/dfu.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/google/gousb" "io/ioutil" - "runtime" "time" ) diff --git a/wally/ergoboot.c b/wally/ergoboot_darwin.c index 879db75..879db75 100644 --- a/wally/ergoboot.c +++ b/wally/ergoboot_darwin.c diff --git a/wally/ergoboot_darwin.go b/wally/ergoboot_darwin.go new file mode 100644 index 0000000..1af46d6 --- /dev/null +++ b/wally/ergoboot_darwin.go @@ -0,0 +1,15 @@ +// +build darwin + +package wally + +/* +#cgo darwin CFLAGS: -O2 -Wall -mmacosx-version-min=10.8 +#cgo darwin LDFLAGS: -framework IOKit -framework CoreFoundation -mmacosx-version-min=10.8 +#include "ergoboot.h" + +*/ +import "C" + +func Ergoboot() { + C.ergoboot() +} diff --git a/wally/ergoboot_linux.go b/wally/ergoboot_linux.go new file mode 100644 index 0000000..a4446ef --- /dev/null +++ b/wally/ergoboot_linux.go @@ -0,0 +1,8 @@ +package wally + +import "C" + +// Ergoboot: Placeholder +func Ergoboot() { + +} diff --git a/wally/ergoboot_windows.go b/wally/ergoboot_windows.go new file mode 100644 index 0000000..a4446ef --- /dev/null +++ b/wally/ergoboot_windows.go @@ -0,0 +1,8 @@ +package wally + +import "C" + +// Ergoboot: Placeholder +func Ergoboot() { + +} diff --git a/wally/state.go b/wally/state.go index 0d64fb1..b25d9f3 100644 --- a/wally/state.go +++ b/wally/state.go @@ -44,7 +44,7 @@ func NewState(step int8, filePath string) State { case "darwin": s.AppVersion = "1.1.1" case "linux": - s.AppVersion = "1.1.0" + s.AppVersion = "1.1.1" case "windows": s.AppVersion = "1.1.4" default: diff --git a/wally/usb.go b/wally/usb.go index 83a04a7..8d1d27e 100644 --- a/wally/usb.go +++ b/wally/usb.go @@ -3,7 +3,6 @@ package wally import ( "fmt" "github.com/google/gousb" - "runtime" ) type Device struct { |