diff --git a/.gitignore b/.gitignore index 6bd87787..91c873b1 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ locale/ packages env/ .tox/ +.buildozer/ +bin/ diff --git a/electrum b/electrum index a75bd2d8..c100fd8a 100755 --- a/electrum +++ b/electrum @@ -31,31 +31,32 @@ if is_local or is_android: elif is_bundle and sys.platform=='darwin': sys.path.insert(0, os.getcwd() + "/lib/python2.7/packages") -# pure-python dependencies need to be imported here for pyinstaller -try: - import dns - import aes - import ecdsa - import requests - import six - import qrcode - import pbkdf2 - import google.protobuf -except ImportError as e: - sys.exit("Error: %s. Try 'sudo pip install '"%e.message) +if not is_android: + # pure-python dependencies need to be imported here for pyinstaller + try: + import dns + import aes + import ecdsa + import requests + import six + import qrcode + import pbkdf2 + import google.protobuf + except ImportError as e: + sys.exit("Error: %s. Try 'sudo pip install '"%e.message) -# the following imports are for pyinstaller -from google.protobuf import descriptor -from google.protobuf import message -from google.protobuf import reflection -from google.protobuf import descriptor_pb2 + # the following imports are for pyinstaller + from google.protobuf import descriptor + from google.protobuf import message + from google.protobuf import reflection + from google.protobuf import descriptor_pb2 -# check that we have the correct version of ecdsa -try: - from ecdsa.ecdsa import curve_secp256k1, generator_secp256k1 -except Exception: - sys.exit("cannot import ecdsa.curve_secp256k1. You probably need to upgrade ecdsa.\nTry: sudo pip install --upgrade ecdsa") + # check that we have the correct version of ecdsa + try: + from ecdsa.ecdsa import curve_secp256k1, generator_secp256k1 + except Exception: + sys.exit("cannot import ecdsa.curve_secp256k1. You probably need to upgrade ecdsa.\nTry: sudo pip install --upgrade ecdsa") # load local module as electrum diff --git a/electrum-env b/electrum-env old mode 100755 new mode 100644 index 0c9c1d7c..a1af5a8a --- a/electrum-env +++ b/electrum-env @@ -10,11 +10,11 @@ # your package manager. if [ -e ./env/bin/activate ]; then - source ./env/bin/activate + source ./env/bin/activate else - virtualenv env - source ./env/bin/activate - python setup.py install + virtualenv env + source ./env/bin/activate + python setup.py install fi export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH" diff --git a/gui/kivy/__init__.py b/gui/kivy/__init__.py index 7a5ea716..44329358 100644 --- a/gui/kivy/__init__.py +++ b/gui/kivy/__init__.py @@ -19,6 +19,9 @@ # Kivy GUI import sys +import os +os.environ['KIVY_DATA_DIR'] = os.path.abspath(os.path.dirname(__file__)) + '/data/' + try: sys.argv = [''] import kivy diff --git a/gui/kivy/data/glsl/default.fs b/gui/kivy/data/glsl/default.fs new file mode 100644 index 00000000..19145d65 --- /dev/null +++ b/gui/kivy/data/glsl/default.fs @@ -0,0 +1,4 @@ +$HEADER$ +void main (void){ + gl_FragColor = frag_color * texture2D(texture0, tex_coord0); +} diff --git a/gui/kivy/data/glsl/default.png b/gui/kivy/data/glsl/default.png new file mode 100644 index 00000000..a14255e4 Binary files /dev/null and b/gui/kivy/data/glsl/default.png differ diff --git a/gui/kivy/data/glsl/default.vs b/gui/kivy/data/glsl/default.vs new file mode 100644 index 00000000..ac9ac4d6 --- /dev/null +++ b/gui/kivy/data/glsl/default.vs @@ -0,0 +1,6 @@ +$HEADER$ +void main (void) { + frag_color = color * vec4(1.0, 1.0, 1.0, opacity); + tex_coord0 = vTexCoords0; + gl_Position = projection_mat * modelview_mat * vec4(vPosition.xy, 0.0, 1.0); +} diff --git a/gui/kivy/data/glsl/header.fs b/gui/kivy/data/glsl/header.fs new file mode 100644 index 00000000..e9f887ba --- /dev/null +++ b/gui/kivy/data/glsl/header.fs @@ -0,0 +1,10 @@ +#ifdef GL_ES + precision highp float; +#endif + +/* Outputs from the vertex shader */ +varying vec4 frag_color; +varying vec2 tex_coord0; + +/* uniform texture samplers */ +uniform sampler2D texture0; diff --git a/gui/kivy/data/glsl/header.vs b/gui/kivy/data/glsl/header.vs new file mode 100644 index 00000000..a2638bff --- /dev/null +++ b/gui/kivy/data/glsl/header.vs @@ -0,0 +1,17 @@ +#ifdef GL_ES + precision highp float; +#endif + +/* Outputs to the fragment shader */ +varying vec4 frag_color; +varying vec2 tex_coord0; + +/* vertex attributes */ +attribute vec2 vPosition; +attribute vec2 vTexCoords0; + +/* uniform variables */ +uniform mat4 modelview_mat; +uniform mat4 projection_mat; +uniform vec4 color; +uniform float opacity; diff --git a/gui/kivy/data/images/defaulttheme-0.png b/gui/kivy/data/images/defaulttheme-0.png new file mode 100644 index 00000000..8cfc8245 Binary files /dev/null and b/gui/kivy/data/images/defaulttheme-0.png differ diff --git a/gui/kivy/data/images/defaulttheme.atlas b/gui/kivy/data/images/defaulttheme.atlas new file mode 100644 index 00000000..26ed5d0d --- /dev/null +++ b/gui/kivy/data/images/defaulttheme.atlas @@ -0,0 +1 @@ +{"defaulttheme-0.png": {"progressbar_background": [391, 227, 24, 24], "tab_btn_disabled": [264, 137, 32, 32], "tab_btn_pressed": [366, 137, 32, 32], "image-missing": [152, 171, 48, 48], "splitter_h": [174, 123, 32, 7], "splitter_down": [501, 253, 7, 32], "splitter_disabled_down": [503, 291, 7, 32], "vkeyboard_key_down": [468, 137, 32, 32], "vkeyboard_disabled_key_down": [400, 137, 32, 32], "selector_right": [248, 223, 55, 62], "player-background": [2, 287, 103, 103], "selector_middle": [191, 223, 55, 62], "spinner": [235, 82, 29, 37], "tab_btn_disabled_pressed": [298, 137, 32, 32], "switch-button_disabled": [277, 291, 43, 32], "textinput_disabled_active": [372, 326, 64, 64], "splitter_grip": [36, 50, 12, 26], "vkeyboard_key_normal": [2, 44, 32, 32], "button_disabled": [80, 82, 29, 37], "media-playback-stop": [302, 171, 48, 48], "splitter": [501, 87, 7, 32], "splitter_down_h": [140, 123, 32, 7], "sliderh_background_disabled": [72, 132, 41, 37], "modalview-background": [464, 456, 45, 54], "button": [142, 82, 29, 37], "splitter_disabled": [502, 137, 7, 32], "checkbox_radio_disabled_on": [433, 87, 32, 32], "slider_cursor": [402, 171, 48, 48], "vkeyboard_disabled_background": [68, 221, 64, 64], "checkbox_disabled_on": [297, 87, 32, 32], "sliderv_background_disabled": [2, 78, 37, 41], "button_disabled_pressed": [111, 82, 29, 37], "audio-volume-muted": [102, 171, 48, 48], "close": [417, 231, 20, 20], "action_group_disabled": [452, 171, 33, 48], "vkeyboard_background": [2, 221, 64, 64], "checkbox_off": [331, 87, 32, 32], "tab_disabled": [305, 253, 96, 32], "sliderh_background": [115, 132, 41, 37], "switch-button": [322, 291, 43, 32], "tree_closed": [439, 231, 20, 20], "bubble_btn_pressed": [435, 291, 32, 32], "selector_left": [134, 223, 55, 62], "filechooser_file": [174, 326, 64, 64], "checkbox_radio_disabled_off": [399, 87, 32, 32], "checkbox_radio_on": [196, 137, 32, 32], "checkbox_on": [365, 87, 32, 32], "button_pressed": [173, 82, 29, 37], "audio-volume-high": [464, 406, 48, 48], "audio-volume-low": [2, 171, 48, 48], "progressbar": [305, 227, 32, 24], "previous_normal": [487, 187, 19, 32], "separator": [504, 342, 5, 48], "filechooser_folder": [240, 326, 64, 64], "checkbox_radio_off": [467, 87, 32, 32], "textinput_active": [306, 326, 64, 64], "textinput": [438, 326, 64, 64], "player-play-overlay": [122, 395, 117, 115], "media-playback-pause": [202, 171, 48, 48], "sliderv_background": [41, 78, 37, 41], "ring": [354, 402, 108, 108], "bubble_arrow": [487, 175, 16, 10], "slider_cursor_disabled": [352, 171, 48, 48], "checkbox_disabled_off": [469, 291, 32, 32], "action_group_down": [2, 121, 33, 48], "spinner_disabled": [204, 82, 29, 37], "splitter_disabled_h": [106, 123, 32, 7], "bubble": [107, 325, 65, 65], "media-playback-start": [252, 171, 48, 48], "vkeyboard_disabled_key_normal": [434, 137, 32, 32], "overflow": [230, 137, 32, 32], "tree_opened": [461, 231, 20, 20], "action_item": [339, 227, 24, 24], "bubble_btn": [401, 291, 32, 32], "audio-volume-medium": [52, 171, 48, 48], "action_group": [37, 121, 33, 48], "spinner_pressed": [266, 82, 29, 37], "filechooser_selected": [2, 392, 118, 118], "tab": [403, 253, 96, 32], "action_bar": [158, 133, 36, 36], "action_view": [365, 227, 24, 24], "tab_btn": [332, 137, 32, 32], "switch-background": [192, 291, 83, 32], "splitter_disabled_down_h": [72, 123, 32, 7], "action_item_down": [367, 291, 32, 32], "switch-background_disabled": [107, 291, 83, 32], "textinput_disabled": [241, 399, 111, 111], "splitter_grip_h": [483, 239, 26, 12]}} \ No newline at end of file diff --git a/gui/kivy/data/logo/kivy-icon-128.png b/gui/kivy/data/logo/kivy-icon-128.png new file mode 100644 index 00000000..6ecb013b Binary files /dev/null and b/gui/kivy/data/logo/kivy-icon-128.png differ diff --git a/gui/kivy/data/logo/kivy-icon-16.png b/gui/kivy/data/logo/kivy-icon-16.png new file mode 100644 index 00000000..0b55e584 Binary files /dev/null and b/gui/kivy/data/logo/kivy-icon-16.png differ diff --git a/gui/kivy/data/logo/kivy-icon-24.png b/gui/kivy/data/logo/kivy-icon-24.png new file mode 100644 index 00000000..86d46436 Binary files /dev/null and b/gui/kivy/data/logo/kivy-icon-24.png differ diff --git a/gui/kivy/data/logo/kivy-icon-256.png b/gui/kivy/data/logo/kivy-icon-256.png new file mode 100644 index 00000000..9df4c879 Binary files /dev/null and b/gui/kivy/data/logo/kivy-icon-256.png differ diff --git a/gui/kivy/data/logo/kivy-icon-32.png b/gui/kivy/data/logo/kivy-icon-32.png new file mode 100644 index 00000000..89b48869 Binary files /dev/null and b/gui/kivy/data/logo/kivy-icon-32.png differ diff --git a/gui/kivy/data/logo/kivy-icon-48.png b/gui/kivy/data/logo/kivy-icon-48.png new file mode 100644 index 00000000..c295e64e Binary files /dev/null and b/gui/kivy/data/logo/kivy-icon-48.png differ diff --git a/gui/kivy/data/logo/kivy-icon-512.png b/gui/kivy/data/logo/kivy-icon-512.png new file mode 100644 index 00000000..1325da49 Binary files /dev/null and b/gui/kivy/data/logo/kivy-icon-512.png differ diff --git a/gui/kivy/data/logo/kivy-icon-64.ico b/gui/kivy/data/logo/kivy-icon-64.ico new file mode 100644 index 00000000..98f36cda Binary files /dev/null and b/gui/kivy/data/logo/kivy-icon-64.ico differ diff --git a/gui/kivy/data/logo/kivy-icon-64.png b/gui/kivy/data/logo/kivy-icon-64.png new file mode 100644 index 00000000..59f1810d Binary files /dev/null and b/gui/kivy/data/logo/kivy-icon-64.png differ diff --git a/gui/kivy/data/style.kv b/gui/kivy/data/style.kv new file mode 100644 index 00000000..90c2a634 --- /dev/null +++ b/gui/kivy/data/style.kv @@ -0,0 +1,736 @@ +#:kivy 1.0 + +