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
07734c1e
Commit
07734c1e
authored
Mar 17, 2014
by
Maran
Browse files
Options
Browse Files
Download
Plain Diff
Merge conflicts
parents
1c983ed8
85e04476
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
ui_lib.go
ui/ui_lib.go
+20
-12
No files found.
ui/ui_lib.go
View file @
07734c1e
...
@@ -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,25 @@ func (ui *UiLib) AssetPath(p string) string {
...
@@ -49,18 +50,25 @@ 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
{
// If the current working directory is the go-ethereum dir
case
"darwin"
:
// assume a debug build and use the source directory as
// Get Binary Directory
// asset directory.
exedir
,
_
:=
osext
.
ExecutableFolder
()
pwd
,
_
:=
os
.
Getwd
()
base
=
filepath
.
Join
(
exedir
,
"../Resources"
)
if
pwd
==
path
.
Join
(
os
.
Getenv
(
"GOPATH"
),
"src"
,
"github.com"
,
"ethereum"
,
"go-ethereum"
)
{
base
=
"/Users/maranhidskes/projects/go/src/github.com/ethereum/go-ethereum"
base
=
pwd
case
"linux"
:
}
else
{
base
=
"/usr/share/ethereal"
switch
runtime
.
GOOS
{
case
"window"
:
case
"darwin"
:
fallthrough
// Get Binary Directory
default
:
exedir
,
_
:=
osext
.
ExecutableFolder
()
base
=
"."
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