1
0

updates for the old android GUI

This commit is contained in:
ThomasV
2015-02-24 18:41:29 +01:00
parent 18d16ba82c
commit 80284d5516
5 changed files with 74 additions and 58 deletions

View File

@@ -7,19 +7,20 @@ if __name__ == '__main__':
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir('..')
imp.load_module('electrum', *imp.find_module('../lib'))
from electrum.version import ELECTRUM_VERSION as version
v = imp.load_source('version', 'lib/version.py')
version = v.ELECTRUM_VERSION
if not ( os.path.exists('packages')):
print "The packages directory is missing."
sys.exit()
os.system('rm -rf dist/e4a-%s'%version)
os.mkdir('dist/e4a-%s'%version)
shutil.copyfile("electrum",'dist/e4a-%s/e4a.py'%version)
shutil.copytree("packages",'dist/e4a-%s/packages'%version)
shutil.copytree("lib",'dist/e4a-%s/lib'%version)
shutil.copytree("packages",'dist/e4a-%s/packages'%version, ignore=shutil.ignore_patterns('*.pyc'))
shutil.copytree("lib",'dist/e4a-%s/lib'%version, ignore=shutil.ignore_patterns('*.pyc'))
# dns is not used by android app
os.system('rm -rf dist/e4a-%s/packages/dns')
os.mkdir('dist/e4a-%s/gui'%version)
for n in ['android.py']:
shutil.copy("gui/%s"%n,'dist/e4a-%s/gui'%version)
@@ -27,13 +28,12 @@ if __name__ == '__main__':
os.chdir("dist")
# create the zip file
os.system( "zip -r e4a-%s.zip e4a-%s"%(version, version) )
os.system( "zip -qr e4a-%s.zip e4a-%s"%(version, version) )
os.system( "rm -rf e4a-%s"%(version) )
# change filename because some 3G carriers do not allow users to download a zip file...
e4a_name = "e4a-%s.zip"%version
e4a_name2 = e4a_name.replace(".","")
os.system( "mv %s %s"%(e4a_name, e4a_name2) )
print "dist/%s "%e4a_name2
os.system("mv %s %s"%(e4a_name, e4a_name2))
print "dist/%s"%e4a_name2

View File

@@ -3,9 +3,10 @@ import sys
import hashlib
import os
from versions import version, version_win, version_mac, template_path, dl_path
from versions import version, version_win, version_mac
from versions import download_template, download_page
with open(template_path) as f:
with open(download_template) as f:
string = f.read()
_tgz = "Electrum-%s.tar.gz" % version
@@ -38,6 +39,20 @@ string = string.replace("##md5_win##", md5_win)
string = string.replace("##md5_win_setup##", md5_win_setup)
string = string.replace("##md5_win_portable##", md5_win_portable)
with open(dl_path,'w') as f:
with open(download_page,'w') as f:
f.write(string)
# android
from versions import android_template, android_page
with open(android_template) as f:
string = f.read()
e4a_name = "e4a-%s.zip"%version
e4a_zipname = e4a_name.replace(".","")
string = string.replace("##VERSION##",version)
string = string.replace("##ZIPNAME##",e4a_zipname)
with open(android_page,'w') as f:
f.write(string)