diff --git a/go/characters/appEventListener.go b/go/characters/appEventListener.go index 0c328d90..d1ffcbc7 100644 --- a/go/characters/appEventListener.go +++ b/go/characters/appEventListener.go @@ -56,8 +56,11 @@ func AppEventListener(gcd *gothings.GrandCentralDispatcher, subscribed chan bool if e.Data[event.Error] == event.AppErrLoaded0 { // TODO: only an error if other profiles are not loaded log.Infoln("couldn't load your config file. attempting to create one now") - - the.CwtchApp.CreatePeer("alice", the.AppPassword) + if gcd.Version() == "development" { + the.CwtchApp.CreatePeer("tester", the.AppPassword) + } else { + the.CwtchApp.CreatePeer("alice", the.AppPassword) + } } case event.ReloadDone: diff --git a/main.go b/main.go index 02b06105..fa3e32dd 100644 --- a/main.go +++ b/main.go @@ -57,7 +57,9 @@ func main() { } // TESTING - //log.SetLevel(log.LevelDebug) + if buildVer == "" { + log.SetLevel(log.LevelDebug) + } //log.ExcludeFromPattern("connection/connection") //log.ExcludeFromPattern("outbound/3dhauthchannel") //log.AddNothingExceptFilter("event/eventmanager") @@ -74,6 +76,12 @@ func main() { } the.CwtchDir = path.Join(usr.HomeDir, ".cwtch") } + + if buildVer == "" && os.Getenv("CWTCH_FOLDER") == "" { + log.Infoln("Development build: using dev directory for dev profiles") + the.CwtchDir = path.Join(the.CwtchDir, "dev") + } + the.ACN = nil the.Peer = nil the.IPCBridge = nil