Browse Source

invote cwtch App so as tor manager starts properly

Dan Ballard 5 months ago
parent
commit
91ebd8b5be
2 changed files with 18 additions and 1 deletions
  1. 12 0
      README.md
  2. 6 1
      main.go

+ 12 - 0
README.md

@@ -0,0 +1,12 @@
+# Setup
+
+## Android 
+
+A arm-pie version of tor like [tor-0.3.4.8.arm-pie](https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/tor-0.3.4.8.arm-pie) is required to be placed in `android/libs/armeabi-v7a` with the name `libtor.so`
+
+# Deployment
+
+## Android
+
+    qtdeploy -docker build android
+    adb install deploy/android/build-debug.apk

+ 6 - 1
main.go

@@ -22,6 +22,7 @@ import (
 	"log"
 	"cwtch.im/cwtch/model"
 	"encoding/hex"
+	"cwtch.im/cwtch/app"
 )
 
 var gcd *GrandCentralDispatcher
@@ -259,7 +260,10 @@ func initialize(view *quick.QQuickView) {
 	}
 
 	os.MkdirAll(dirname, 0700)
-	var err error
+
+	_, err := app.NewApp("/data/data/org.qtproject.example.go/files/", "/data/data/org.qtproject.example.go/lib/libtor.so")
+	log.Printf("starting Swtch app: err: %v\n", err)
+
 	peer, err = libpeer.LoadCwtchPeer(filename, "be gay do crime")
 	if err != nil {
 		fmt.Println("couldn't load your config file, attempting to create a new one now")
@@ -307,6 +311,7 @@ func initialize(view *quick.QQuickView) {
 		gcd.AddContact(group.GroupID[:12], group.GroupID, group.GroupServer, randomGroupImage(groups[i]), "0", group.Accepted)
 		log.Printf("GROUP %s@%s", group.GroupID, group.GroupServer)
 	}
+
 }
 
 // temporary until we do real picture selection