You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.3 KiB
40 lines
1.3 KiB
12 years ago
|
#!/usr/bin/python
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
import sys, re, shutil, os, hashlib
|
||
10 years ago
|
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
|
||
12 years ago
|
|
||
11 years ago
|
if not ( os.path.exists('packages')):
|
||
|
print "The packages directory is missing."
|
||
12 years ago
|
sys.exit()
|
||
|
|
||
|
|
||
|
os.system('rm -rf dist/e4a-%s'%version)
|
||
|
os.mkdir('dist/e4a-%s'%version)
|
||
12 years ago
|
shutil.copyfile("electrum",'dist/e4a-%s/e4a.py'%version)
|
||
11 years ago
|
shutil.copytree("packages",'dist/e4a-%s/packages'%version)
|
||
12 years ago
|
shutil.copytree("lib",'dist/e4a-%s/lib'%version)
|
||
|
os.mkdir('dist/e4a-%s/gui'%version)
|
||
11 years ago
|
for n in ['android.py']:
|
||
12 years ago
|
shutil.copy("gui/%s"%n,'dist/e4a-%s/gui'%version)
|
||
12 years ago
|
open('dist/e4a-%s/gui/__init__.py'%version,'w').close()
|
||
12 years ago
|
|
||
12 years ago
|
os.chdir("dist")
|
||
12 years ago
|
# create the zip file
|
||
|
os.system( "zip -r e4a-%s.zip e4a-%s"%(version, version) )
|
||
12 years ago
|
os.system( "rm -rf e4a-%s"%(version) )
|
||
12 years ago
|
|
||
|
# 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(".","")
|
||
12 years ago
|
os.system( "mv %s %s"%(e4a_name, e4a_name2) )
|
||
10 years ago
|
print "dist/%s "%e4a_name2
|
||
12 years ago
|
|
||
|
|