From b1a727ef49624f11984b79b12d8ec1f709748006 Mon Sep 17 00:00:00 2001 From: thomasv Date: Tue, 12 Mar 2013 13:48:16 +0100 Subject: [PATCH] updates fro android --- electrum | 6 ++++-- make_packages | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/electrum b/electrum index ce81f032c..c245a2a36 100755 --- a/electrum +++ b/electrum @@ -34,8 +34,10 @@ except ImportError: sys.exit("Error: AES does not seem to be installed. Try 'sudo pip install slowaes'") +is_android = 'ANDROID_DATA' in os.environ + # load local module as electrum -if os.path.exists("lib"): +if os.path.exists("lib") or is_android: import imp fp, pathname, description = imp.find_module('lib') imp.load_module('electrum', fp, pathname, description) @@ -89,7 +91,7 @@ if __name__ == '__main__': set_verbosity(options.verbose) # config is an object passed to the various constructors (wallet, interface, gui) - if 'ANDROID_DATA' in os.environ: + if is_android: config_options = {'wallet_path':"/sdcard/electrum.dat", 'portable':True, 'verbose':True, 'gui':'android'} else: config_options = eval(str(options)) diff --git a/make_packages b/make_packages index f079ab4a9..936c48a91 100755 --- a/make_packages +++ b/make_packages @@ -20,10 +20,13 @@ if __name__ == '__main__': # android os.system('rm -rf dist/e4a-%s'%version) os.mkdir('dist/e4a-%s'%version) - shutil.copyfile("electrum",'dist/e4a-%s/electrum.py'%version) + shutil.copyfile("electrum",'dist/e4a-%s/e4a.py'%version) shutil.copytree("ecdsa",'dist/e4a-%s/ecdsa'%version) shutil.copytree("aes",'dist/e4a-%s/aes'%version) - shutil.copytree("lib",'dist/e4a-%s/electrum'%version) + shutil.copytree("lib",'dist/e4a-%s/lib'%version) + os.mkdir('dist/e4a-%s/gui'%version) + shutil.copy("gui/gui_android.py",'dist/e4a-%s/gui'%version) + shutil.copy("gui/__init__.py",'dist/e4a-%s/gui'%version) os.chdir("dist") # create the zip file