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
c302afd4
Commit
c302afd4
authored
Jul 15, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
parents
28948d06
223432fa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
6 deletions
+36
-6
webapp.qml
ethereal/assets/qml/webapp.qml
+1
-2
flags.go
ethereal/flags.go
+1
-1
html_container.go
ethereal/html_container.go
+4
-3
cmd.go
utils/cmd.go
+30
-0
No files found.
ethereal/assets/qml/webapp.qml
View file @
c302afd4
...
...
@@ -191,6 +191,7 @@ ApplicationWindow {
inspector
.
visible
=
false
}
else
{
inspector
.
visible
=
true
inspector
.
url
=
webview
.
experimental
.
remoteInspectorUrl
}
}
onDoubleClicked
:
{
...
...
@@ -224,7 +225,6 @@ ApplicationWindow {
WebView
{
id
:
inspector
visible
:
false
url
:
webview
.
experimental
.
remoteInspectorUrl
anchors
{
left
:
root
.
left
right
:
root
.
right
...
...
@@ -238,7 +238,6 @@ ApplicationWindow {
name
:
"inspectorShown"
PropertyChanges
{
target
:
inspector
url
:
webview
.
experimental
.
remoteInspectorUrl
}
}
]
...
...
ethereal/flags.go
View file @
c302afd4
...
...
@@ -36,6 +36,7 @@ var LogLevel int
// flags specific to gui client
var
AssetPath
string
//TODO: If we re-use the one defined in cmd.go the binary osx image crashes. If somebody finds out why we can dry this up.
func
defaultAssetPath
()
string
{
var
assetPath
string
// If the current working directory is the go-ethereum dir
...
...
@@ -60,7 +61,6 @@ func defaultAssetPath() string {
}
return
assetPath
}
func
defaultDataDir
()
string
{
usr
,
_
:=
user
.
Current
()
return
path
.
Join
(
usr
.
HomeDir
,
".ethereal"
)
...
...
ethereal/html_container.go
View file @
c302afd4
...
...
@@ -8,7 +8,6 @@ import (
"github.com/go-qml/qml"
"github.com/howeyc/fsnotify"
"io/ioutil"
"log"
"net/url"
"os"
"path"
...
...
@@ -59,7 +58,7 @@ func (app *HtmlApplication) RootFolder() string {
if
err
!=
nil
{
return
""
}
return
path
.
Dir
(
folder
.
RequestURI
(
))
return
path
.
Dir
(
ethutil
.
WindonizePath
(
folder
.
RequestURI
()
))
}
func
(
app
*
HtmlApplication
)
RecursiveFolders
()
[]
os
.
FileInfo
{
files
,
_
:=
ioutil
.
ReadDir
(
app
.
RootFolder
())
...
...
@@ -77,11 +76,13 @@ func (app *HtmlApplication) NewWatcher(quitChan chan bool) {
app
.
watcher
,
err
=
fsnotify
.
NewWatcher
()
if
err
!=
nil
{
logger
.
Infoln
(
"Could not create new auto-reload watcher:"
,
err
)
return
}
err
=
app
.
watcher
.
Watch
(
app
.
RootFolder
())
if
err
!=
nil
{
log
.
Fatal
(
err
)
logger
.
Infoln
(
"Could not start auto-reload watcher:"
,
err
)
return
}
for
_
,
folder
:=
range
app
.
RecursiveFolders
()
{
fullPath
:=
app
.
RootFolder
()
+
"/"
+
folder
.
Name
()
...
...
utils/cmd.go
View file @
c302afd4
package
utils
import
(
"bitbucket.org/kardianos/osext"
"fmt"
"github.com/ethereum/eth-go"
"github.com/ethereum/eth-go/ethcrypto"
...
...
@@ -16,6 +17,8 @@ import (
"os"
"os/signal"
"path"
"path/filepath"
"runtime"
"time"
)
...
...
@@ -164,7 +167,34 @@ func NewKeyManager(KeyStore string, Datadir string, db ethutil.Database) *ethcry
return
keyManager
}
func
DefaultAssetPath
()
string
{
var
assetPath
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"
,
"ethereal"
)
{
assetPath
=
path
.
Join
(
pwd
,
"assets"
)
}
else
{
switch
runtime
.
GOOS
{
case
"darwin"
:
// Get Binary Directory
exedir
,
_
:=
osext
.
ExecutableFolder
()
assetPath
=
filepath
.
Join
(
exedir
,
"../Resources"
)
case
"linux"
:
assetPath
=
"/usr/share/ethereal"
case
"windows"
:
assetPath
=
"./assets"
default
:
assetPath
=
"."
}
}
return
assetPath
}
func
KeyTasks
(
keyManager
*
ethcrypto
.
KeyManager
,
KeyRing
string
,
GenAddr
bool
,
SecretFile
string
,
ExportDir
string
,
NonInteractive
bool
)
{
ethcrypto
.
InitWords
(
DefaultAssetPath
())
// Init mnemonic word list
var
err
error
switch
{
case
GenAddr
:
...
...
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