2012-12-07 07:43:16 +01:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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('..')
|
|
|
|
|
|
|
|
|
|
imp.load_module('electrum', *imp.find_module('../lib'))
|
|
|
|
|
from electrum.version import ELECTRUM_VERSION as 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()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
os.system('rm -rf dist/e4a-%s'%version)
|
|
|
|
|
os.mkdir('dist/e4a-%s'%version)
|
2013-03-12 13:48:16 +01:00
|
|
|
shutil.copyfile("electrum",'dist/e4a-%s/e4a.py'%version)
|
2014-06-20 11:55:58 +02:00
|
|
|
shutil.copytree("packages",'dist/e4a-%s/packages'%version)
|
2013-03-12 13:48:16 +01:00
|
|
|
shutil.copytree("lib",'dist/e4a-%s/lib'%version)
|
|
|
|
|
os.mkdir('dist/e4a-%s/gui'%version)
|
2013-10-07 13:26:10 +02:00
|
|
|
for n in ['android.py']:
|
2013-03-24 13:08:41 +01:00
|
|
|
shutil.copy("gui/%s"%n,'dist/e4a-%s/gui'%version)
|
2013-03-20 22:34:24 +01:00
|
|
|
open('dist/e4a-%s/gui/__init__.py'%version,'w').close()
|
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
|
|
|
|
|
os.system( "zip -r 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
|
|
|
|
|
e4a_name2 = e4a_name.replace(".","")
|
2013-04-13 18:50:17 +02:00
|
|
|
os.system( "mv %s %s"%(e4a_name, e4a_name2) )
|
2015-01-25 08:14:25 +01:00
|
|
|
print "dist/%s "%e4a_name2
|
2012-12-07 07:43:16 +01:00
|
|
|
|
|
|
|
|
|