electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 864974aa48d4072a86e49fe227a78e13884b7488
parent b0d223e6bb957dbdd8c3735301723f73af8c867b
Author: ecdsa <ecdsa@github>
Date:   Sat, 13 Apr 2013 18:50:17 +0200

update make_download

Diffstat:
Acontrib/make_download | 46++++++++++++++++++++++++++++++++++++++++++++++
Acontrib/make_packages | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Dmake_packages | 52----------------------------------------------------
3 files changed, 99 insertions(+), 52 deletions(-)

diff --git a/contrib/make_download b/contrib/make_download @@ -0,0 +1,46 @@ +#!/usr/bin/python +import sys +string = sys.stdin.read() + + +import hashlib, os +version = "1.7.3" +version_win = "1.7.2" +version_mac = "1.7.2" + +_tgz="Electrum-%s.tar.gz"%version +_zip="Electrum-%s.zip"%version + +_mac="electrum-v%s.dmg"%version_mac +_win="Electrum-%s.exe"%version_win +_win_setup="Electrum-%s-setup.exe"%version_win +_win_portable="Electrum-%s-portable.exe"%version_win + +md5_tgz = hashlib.md5(file('dist/'+_tgz, 'r').read()).digest().encode('hex') +md5_zip = hashlib.md5(file('dist/'+_zip, 'r').read()).digest().encode('hex') + +for n in [_win, _win_portable, _win_setup, _mac]: + if not os.path.exists("binaries/%s"%n): + os.system("wget http://download.electrum.org/download/%s -O binaries/%s"%(n,n)) + +md5_mac = hashlib.md5(file('binaries/'+_mac, 'r').read()).digest().encode('hex') +md5_win = hashlib.md5(file('binaries/'+_win, 'r').read()).digest().encode('hex') +md5_win_setup = hashlib.md5(file('binaries/'+_win_setup, 'r').read()).digest().encode('hex') +md5_win_portable = hashlib.md5(file('binaries/'+_win_portable, 'r').read()).digest().encode('hex') + + +string = string.replace("##VERSION##", version) +string = string.replace("##VERSION_WIN##", version_win) +string = string.replace("##VERSION_MAC##", version_mac) +string = string.replace("##md5_tgz##", md5_tgz) +string = string.replace("##md5_zip##", md5_zip) +string = string.replace("##md5_mac##", md5_mac) +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) + + +print string + + +# diff --git a/contrib/make_packages b/contrib/make_packages @@ -0,0 +1,53 @@ +#!/usr/bin/python + +from lib.version import ELECTRUM_VERSION as version + +if __name__ == '__main__': + import sys, re, shutil, os, hashlib + + if not ( os.path.exists('aes') and os.path.exists('ecdsa') ): + print "aes and ecdsa are missing. copy them locally before." + sys.exit() + + os.system("python mki18n.py") + os.system("pyrcc4 icons.qrc -o gui/icons_rc.py") + os.system("python setup.py sdist --format=zip,gztar") + + _tgz="Electrum-%s.tar.gz"%version + _zip="Electrum-%s.zip"%version + + + # android + 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("ecdsa",'dist/e4a-%s/ecdsa'%version) + shutil.copytree("aes",'dist/e4a-%s/aes'%version) + shutil.copytree("lib",'dist/e4a-%s/lib'%version) + os.mkdir('dist/e4a-%s/gui'%version) + for n in ['gui_android.py', 'pyqrnative.py', 'bmp.py']: + shutil.copy("gui/%s"%n,'dist/e4a-%s/gui'%version) + open('dist/e4a-%s/gui/__init__.py'%version,'w').close() + + os.chdir("dist") + # create the zip file + os.system( "zip -r 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) ) + os.chdir("..") + + md5_tgz = hashlib.md5(file('dist/'+_tgz, 'r').read()).digest().encode('hex') + md5_zip = hashlib.md5(file('dist/'+_zip, 'r').read()).digest().encode('hex') + md5_android = hashlib.md5(file('dist/'+e4a_name2, 'r').read()).digest().encode('hex') + + print "" + print "Packages are ready:" + print "dist/%s "%_tgz, md5_tgz + print "dist/%s "%_zip, md5_zip + print "dist/%s "%e4a_name2, md5_android + print "To make a release, upload the files to the server, and update the webpages in branch gh-pages" + diff --git a/make_packages b/make_packages @@ -1,52 +0,0 @@ -#!/usr/bin/python - -from lib.version import ELECTRUM_VERSION as version - -if __name__ == '__main__': - import sys, re, shutil, os, hashlib - - if not ( os.path.exists('aes') and os.path.exists('ecdsa') ): - print "aes and ecdsa are missing. copy them locally before." - sys.exit() - - os.system("python mki18n.py") - os.system("pyrcc4 icons.qrc -o gui/icons_rc.py") - os.system("python setup.py sdist --format=zip,gztar") - - _tgz="Electrum-%s.tar.gz"%version - _zip="Electrum-%s.zip"%version - - - # android - 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("ecdsa",'dist/e4a-%s/ecdsa'%version) - shutil.copytree("aes",'dist/e4a-%s/aes'%version) - shutil.copytree("lib",'dist/e4a-%s/lib'%version) - os.mkdir('dist/e4a-%s/gui'%version) - for n in ['gui_android.py', 'pyqrnative.py', 'bmp.py']: - shutil.copy("gui/%s"%n,'dist/e4a-%s/gui'%version) - open('dist/e4a-%s/gui/__init__.py'%version,'w').close() - - os.chdir("dist") - # create the zip file - os.system( "zip -r e4a-%s.zip e4a-%s"%(version, 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( "cp %s %s"%(e4a_name, e4a_name2) ) - os.chdir("..") - - md5_tgz = hashlib.md5(file('dist/'+_tgz, 'r').read()).digest().encode('hex') - md5_zip = hashlib.md5(file('dist/'+_zip, 'r').read()).digest().encode('hex') - md5_android = hashlib.md5(file('dist/'+e4a_name2, 'r').read()).digest().encode('hex') - - print "" - print "Packages are ready:" - print "dist/%s "%_tgz, md5_tgz - print "dist/%s "%_zip, md5_zip - print "dist/%s "%e4a_name2, md5_android - print "To make a release, upload the files to the server, and update the webpages in branch gh-pages" -