2015-12-19 20:57:09 +09:00
|
|
|
#!/usr/bin/python2
|
2012-12-07 07:43:16 +01:00
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
import sys, re, shutil, os, hashlib
|
2015-01-25 08:14:25 +01:00
|
|
|
import imp
|
|
|
|
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
|
|
|
os.chdir('..')
|
|
|
|
|
|
2015-02-24 18:41:29 +01:00
|
|
|
v = imp.load_source('version', 'lib/version.py')
|
|
|
|
|
version = v.ELECTRUM_VERSION
|
2012-12-07 07:43:16 +01:00
|
|
|
|
2014-06-20 11:55:58 +02:00
|
|
|
if not ( os.path.exists('packages')):
|
|
|
|
|
print "The packages directory is missing."
|
2012-12-07 07:43:16 +01:00
|
|
|
sys.exit()
|
|
|
|
|
|
2015-03-01 13:27:18 +01:00
|
|
|
target = 'dist/e4a-%s'%version
|
|
|
|
|
os.system('rm -rf %s'%target)
|
|
|
|
|
os.mkdir(target)
|
|
|
|
|
shutil.copyfile('electrum', target + '/e4a.py')
|
|
|
|
|
shutil.copyfile('scripts/authenticator.py', target + '/authenticator.py')
|
2015-02-24 18:41:29 +01:00
|
|
|
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'))
|
2015-03-01 13:27:18 +01:00
|
|
|
os.mkdir(target + '/gui')
|
|
|
|
|
shutil.copyfile('gui/android.py', target + '/gui/android.py')
|
|
|
|
|
open(target + '/gui/__init__.py','w').close()
|
2015-10-30 21:21:20 +01:00
|
|
|
os.mkdir(target + '/plugins')
|
|
|
|
|
shutil.copyfile('plugins/__init__.py', target + '/plugins/__init__.py')
|
2012-12-07 07:43:16 +01:00
|
|
|
|
2012-12-17 11:18:49 +01:00
|
|
|
os.chdir("dist")
|
2012-12-07 07:43:16 +01:00
|
|
|
# create the zip file
|
2015-02-24 18:41:29 +01:00
|
|
|
os.system( "zip -qr e4a-%s.zip e4a-%s"%(version, version) )
|
2013-04-13 18:50:17 +02:00
|
|
|
os.system( "rm -rf e4a-%s"%(version) )
|
2012-12-18 17:14:38 +01:00
|
|
|
|
|
|
|
|
# change filename because some 3G carriers do not allow users to download a zip file...
|
|
|
|
|
e4a_name = "e4a-%s.zip"%version
|
2015-06-09 23:18:32 +02:00
|
|
|
print "dist/%s"%e4a_name
|
2012-12-07 07:43:16 +01:00
|
|
|
|