diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-30 22:56:56 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-30 22:56:56 +0800 |
commit | 65c5a20e1c04c996f96f81cd959ab986b8482b6a (patch) | |
tree | 9f34f820c3667cd586d8f09ef7954bb10eb2c3d5 /ethereal/ethereum.go | |
parent | 1020d7ff67e4888abbe27f8e1a4d516b4c48231c (diff) | |
download | go-tangerine-65c5a20e1c04c996f96f81cd959ab986b8482b6a.tar go-tangerine-65c5a20e1c04c996f96f81cd959ab986b8482b6a.tar.gz go-tangerine-65c5a20e1c04c996f96f81cd959ab986b8482b6a.tar.bz2 go-tangerine-65c5a20e1c04c996f96f81cd959ab986b8482b6a.tar.lz go-tangerine-65c5a20e1c04c996f96f81cd959ab986b8482b6a.tar.xz go-tangerine-65c5a20e1c04c996f96f81cd959ab986b8482b6a.tar.zst go-tangerine-65c5a20e1c04c996f96f81cd959ab986b8482b6a.zip |
Added config file setup. Fixes #59
* Also fixes asset path problems
Diffstat (limited to 'ethereal/ethereum.go')
-rw-r--r-- | ethereal/ethereum.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ethereal/ethereum.go b/ethereal/ethereum.go index 2867e30d4..a7e43cd9a 100644 --- a/ethereal/ethereum.go +++ b/ethereal/ethereum.go @@ -8,9 +8,11 @@ import ( "github.com/ethereum/go-ethereum/ethereal/ui" "github.com/ethereum/go-ethereum/utils" "github.com/go-qml/qml" + "github.com/rakyll/globalconf" "log" "os" "os/signal" + "path" "runtime" ) @@ -39,7 +41,16 @@ func main() { runtime.GOMAXPROCS(runtime.NumCPU()) ethchain.InitFees() - ethutil.ReadConfig(DataDir, ethutil.LogFile|ethutil.LogStd, Identifier) + + g, err := globalconf.NewWithOptions(&globalconf.Options{ + Filename: path.Join(ethutil.ApplicationFolder(".ethereal"), "conf.ini"), + }) + if err != nil { + fmt.Println(err) + } else { + g.ParseAll() + } + ethutil.ReadConfig(".ethereal", ethutil.LogFile|ethutil.LogStd, Identifier) // Instantiated a eth stack ethereum, err := eth.New(eth.CapDefault, UseUPnP) |