commit 07c5f026394cf1f666a6f9b2bb4cd6b0daa53273
parent f061fe047d9a6ac82ccca5e6d0911b7e088bf2f0
Author: akshayaurora <akshayaurora@gmail.com>
Date: Wed, 1 Jun 2016 01:56:34 +0530
changes for new toolchain
Diffstat:
6 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/gui/kivy/Makefile b/gui/kivy/Makefile
@@ -1,4 +1,5 @@
PYTHON = python
+
# needs kivy installed or in PYTHONPATH
.PHONY: theming apk clean
@@ -17,11 +18,11 @@ prepare:
fi
apk:
@make prepare
- @-cd ../..; buildozer android debug deploy run
+ @-cd ../..; buildozer android_new debug deploy run
@make clean
release:
@make prepare
- @-cd ../..; buildozer android release
+ @-cd ../..; buildozer android_new release
@make clean
clean:
# Cleaning up
diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py
@@ -310,7 +310,7 @@ class ElectrumWindow(App):
return
from jnius import autoclass
from android import activity
- PythonActivity = autoclass('org.renpy.android.PythonActivity')
+ PythonActivity = autoclass('org.kivy.android.PythonActivity')
Intent = autoclass('android.content.Intent')
intent = Intent("com.google.zxing.client.android.SCAN")
intent.putExtra("SCAN_MODE", "QR_CODE_MODE")
@@ -334,7 +334,7 @@ class ElectrumWindow(App):
return
from jnius import autoclass
from android import activity
- PythonActivity = autoclass('org.renpy.android.PythonActivity')
+ PythonActivity = autoclass('org.kivy.android.PythonActivity')
IntentIntegrator = autoclass('com.google.zxing.integration.android.IntentIntegrator')
integrator = IntentIntegrator(PythonActivity.mActivity)
def on_qr_result(requestCode, resultCode, intent):
@@ -370,7 +370,7 @@ class ElectrumWindow(App):
if platform == 'android':
# move activity to back
from jnius import autoclass
- python_act = autoclass('org.renpy.android.PythonActivity')
+ python_act = autoclass('org.kivy.android.PythonActivity')
mActivity = python_act.mActivity
mActivity.moveTaskToBack(True)
@@ -394,7 +394,7 @@ class ElectrumWindow(App):
if platform == 'android':
from android import activity
from jnius import autoclass
- PythonActivity = autoclass('org.renpy.android.PythonActivity')
+ PythonActivity = autoclass('org.kivy.android.PythonActivity')
mactivity = PythonActivity.mActivity
self.on_new_intent(mactivity.getIntent())
activity.bind(on_new_intent=self.on_new_intent)
diff --git a/gui/kivy/nfc_scanner/scanner_android.py b/gui/kivy/nfc_scanner/scanner_android.py
@@ -17,7 +17,7 @@ from android import activity
BUILDVERSION = autoclass('android.os.Build$VERSION').SDK_INT
NfcAdapter = autoclass('android.nfc.NfcAdapter')
-PythonActivity = autoclass('org.renpy.android.PythonActivity')
+PythonActivity = autoclass('org.kivy.android.PythonActivity')
JString = autoclass('java.lang.String')
Charset = autoclass('java.nio.charset.Charset')
locale = autoclass('java.util.Locale')
diff --git a/gui/kivy/tools/buildozer.spec.sample b/gui/kivy/tools/buildozer.spec.sample
@@ -31,7 +31,7 @@ version.filename = %(source.dir)s/lib/version.py
#version = 1.9.8
# (list) Application requirements
-requirements = openssl, pil, plyer==master, kivy==master
+requirements = hostpython2, android, openssl, pycrypto, pil, plyer, kivy==master
# (str) Presplash of the application
#presplash.filename = %(source.dir)s/gui/kivy/theming/splash.png
diff --git a/lib/bitcoin.py b/lib/bitcoin.py
@@ -208,7 +208,9 @@ def i2o_ECPublicKey(pubkey, compressed=False):
############ functions from pywallet #####################
def hash_160(public_key):
- md = hashlib.new('ripemd160')
+ #md = hashlib.new('ripemd')
+ from Crypto.Hash import RIPEMD
+ md = RIPEMD.new()
md.update(sha256(public_key))
return md.digest()
diff --git a/lib/util.py b/lib/util.py
@@ -210,7 +210,7 @@ def android_ext_dir():
def android_data_dir():
import jnius
- PythonActivity = jnius.autoclass('org.renpy.android.PythonActivity')
+ PythonActivity = jnius.autoclass('org.kivy.android.PythonActivity')
return PythonActivity.mActivity.getFilesDir().getPath() + '/data'
def android_headers_path():