Merge conflicts
This commit is contained in:
commit
07734c1e1c
10
ui/ui_lib.go
10
ui/ui_lib.go
@ -5,6 +5,7 @@ import (
|
|||||||
"github.com/ethereum/eth-go"
|
"github.com/ethereum/eth-go"
|
||||||
"github.com/ethereum/eth-go/ethutil"
|
"github.com/ethereum/eth-go/ethutil"
|
||||||
"github.com/niemeyer/qml"
|
"github.com/niemeyer/qml"
|
||||||
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
@ -49,12 +50,18 @@ func (ui *UiLib) AssetPath(p string) string {
|
|||||||
|
|
||||||
func AssetPath(p string) string {
|
func AssetPath(p string) string {
|
||||||
var base string
|
var base string
|
||||||
|
// If the current working directory is the go-ethereum dir
|
||||||
|
// assume a debug build and use the source directory as
|
||||||
|
// asset directory.
|
||||||
|
pwd, _ := os.Getwd()
|
||||||
|
if pwd == path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum") {
|
||||||
|
base = pwd
|
||||||
|
} else {
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "darwin":
|
case "darwin":
|
||||||
// Get Binary Directory
|
// Get Binary Directory
|
||||||
exedir, _ := osext.ExecutableFolder()
|
exedir, _ := osext.ExecutableFolder()
|
||||||
base = filepath.Join(exedir, "../Resources")
|
base = filepath.Join(exedir, "../Resources")
|
||||||
base = "/Users/maranhidskes/projects/go/src/github.com/ethereum/go-ethereum"
|
|
||||||
case "linux":
|
case "linux":
|
||||||
base = "/usr/share/ethereal"
|
base = "/usr/share/ethereal"
|
||||||
case "window":
|
case "window":
|
||||||
@ -62,6 +69,7 @@ func AssetPath(p string) string {
|
|||||||
default:
|
default:
|
||||||
base = "."
|
base = "."
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return path.Join(base, p)
|
return path.Join(base, p)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user