Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
85e04476
Commit
85e04476
authored
Mar 16, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed asset path error. Fixes #29
parent
fbd53f0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
ui_lib.go
ui/ui_lib.go
+21
-12
No files found.
ui/ui_lib.go
View file @
85e04476
...
@@ -5,6 +5,7 @@ import (
...
@@ -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,18 +50,26 @@ func (ui *UiLib) AssetPath(p string) string {
...
@@ -49,18 +50,26 @@ func (ui *UiLib) AssetPath(p string) string {
func
AssetPath
(
p
string
)
string
{
func
AssetPath
(
p
string
)
string
{
var
base
string
var
base
string
switch
runtime
.
GOOS
{
case
"darwin"
:
// If the current working directory is the go-ethereum dir
// Get Binary Directory
// assume a debug build and use the source directory as
exedir
,
_
:=
osext
.
ExecutableFolder
()
// asset directory.
base
=
filepath
.
Join
(
exedir
,
"../Resources"
)
pwd
,
_
:=
os
.
Getwd
()
base
=
"/Users/jeffrey/go/src/github.com/ethereum/go-ethereum"
if
pwd
==
path
.
Join
(
os
.
Getenv
(
"GOPATH"
),
"src"
,
"github.com"
,
"ethereum"
,
"go-ethereum"
)
{
case
"linux"
:
base
=
pwd
base
=
"/usr/share/ethereal"
}
else
{
case
"window"
:
switch
runtime
.
GOOS
{
fallthrough
case
"darwin"
:
default
:
// Get Binary Directory
base
=
"."
exedir
,
_
:=
osext
.
ExecutableFolder
()
base
=
filepath
.
Join
(
exedir
,
"../Resources"
)
case
"linux"
:
base
=
"/usr/share/ethereal"
case
"window"
:
fallthrough
default
:
base
=
"."
}
}
}
return
path
.
Join
(
base
,
p
)
return
path
.
Join
(
base
,
p
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment