Skip to content

Commit

Permalink
fix: adds cgo per platform files
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Didron committed Aug 15, 2019
1 parent b38ece1 commit 68960e4
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 5 deletions.
2 changes: 0 additions & 2 deletions build.linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion wally/dfu.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"github.com/google/gousb"
"io/ioutil"
"runtime"
"time"
)

Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions wally/ergoboot_darwin.go
Original file line number Diff line number Diff line change
@@ -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()
}
8 changes: 8 additions & 0 deletions wally/ergoboot_linux.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package wally

import "C"

// Ergoboot: Placeholder
func Ergoboot() {

}
8 changes: 8 additions & 0 deletions wally/ergoboot_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package wally

import "C"

// Ergoboot: Placeholder
func Ergoboot() {

}
2 changes: 1 addition & 1 deletion wally/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion wally/usb.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package wally
import (
"fmt"
"github.com/google/gousb"
"runtime"
)

type Device struct {
Expand Down

0 comments on commit 68960e4

Please sign in to comment.