X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=make_packages;h=22e01a30cd93654d5890ac2222819d8cfe0db9f4;hb=7338ac3c5417d037b5c7a4fed4f66bdc20a322e9;hp=936c48a913c665870dfd5a72c68ce44e1780fd74;hpb=b1a727ef49624f11984b79b12d8ec1f709748006;p=electrum-nvc.git diff --git a/make_packages b/make_packages index 936c48a..22e01a3 100755 --- a/make_packages +++ b/make_packages @@ -5,12 +5,12 @@ 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." + if not ( os.path.exists('packages')): + print "The packages directory is missing." sys.exit() - os.system("python mki18n.py") - os.system("pyrcc4 icons.qrc -o lib/icons_rc.py") + # os.system("python mki18n.py") + os.system("pyrcc4 icons.qrc -o gui/qt/icons_rc.py") os.system("python setup.py sdist --format=zip,gztar") _tgz="Electrum-%s.tar.gz"%version @@ -21,26 +21,32 @@ if __name__ == '__main__': 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("packages",'dist/e4a-%s/packages'%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) + for n in ['android.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( "cp %s %s"%(e4a_name, e4a_name2) ) - os.chdir("..") + os.system( "mv %s %s"%(e4a_name, e4a_name2) ) + + import getpass + password = getpass.getpass("Password:") + for f in os.listdir("."): + os.system( "gpg --sign --armor --detach --passphrase \"%s\" %s"%(password, f) ) - 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') + md5_tgz = hashlib.md5(file(_tgz, 'r').read()).digest().encode('hex') + md5_zip = hashlib.md5(file(_zip, 'r').read()).digest().encode('hex') + md5_android = hashlib.md5(file(e4a_name2, 'r').read()).digest().encode('hex') + os.chdir("..") print "" print "Packages are ready:"