automation: prompt for gtk dir location and copy files and dirs - resulting dir should be ready for distribution (once zipped up)
This commit is contained in:
parent
6ac76d2d9b
commit
a26dfa09f2
|
@ -73,6 +73,7 @@ from distutils.core import setup
|
||||||
import py2exe
|
import py2exe
|
||||||
import glob
|
import glob
|
||||||
import matplotlib
|
import matplotlib
|
||||||
|
import shutil
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,7 +112,7 @@ def test_and_remove(top):
|
||||||
# remove build and dist dirs if they exist
|
# remove build and dist dirs if they exist
|
||||||
test_and_remove('dist')
|
test_and_remove('dist')
|
||||||
test_and_remove('build')
|
test_and_remove('build')
|
||||||
test_and_remove('gfx')
|
#test_and_remove('gfx')
|
||||||
|
|
||||||
|
|
||||||
today = date.today().strftime('%Y%m%d')
|
today = date.today().strftime('%Y%m%d')
|
||||||
|
@ -174,3 +175,36 @@ dest = dest.replace('\\', '\\\\')
|
||||||
os.rename( 'pyfpdb', dest )
|
os.rename( 'pyfpdb', dest )
|
||||||
|
|
||||||
|
|
||||||
|
print "Enter directory name for GTK 2.14 (e.g. c:\code\gtk_2.14.7-20090119)\n: ", # the comma means no newline
|
||||||
|
gtk_dir = sys.stdin.readline().rstrip()
|
||||||
|
|
||||||
|
|
||||||
|
print "\ncopying files and dirs from ", gtk_dir, "to", dest.replace('\\\\', '\\'), "..."
|
||||||
|
src = os.path.join(gtk_dir, 'bin', 'libgdk-win32-2.0-0.dll')
|
||||||
|
src = src.replace('\\', '\\\\')
|
||||||
|
shutil.copy( src, dest )
|
||||||
|
|
||||||
|
src = os.path.join(gtk_dir, 'bin', 'libgobject-2.0-0.dll')
|
||||||
|
src = src.replace('\\', '\\\\')
|
||||||
|
shutil.copy( src, dest )
|
||||||
|
|
||||||
|
|
||||||
|
src_dir = os.path.join(gtk_dir, 'etc')
|
||||||
|
src_dir = src_dir.replace('\\', '\\\\')
|
||||||
|
dest_dir = os.path.join(dest, 'etc')
|
||||||
|
dest_dir = dest_dir.replace('\\', '\\\\')
|
||||||
|
shutil.copytree( src_dir, dest_dir )
|
||||||
|
|
||||||
|
src_dir = os.path.join(gtk_dir, 'lib')
|
||||||
|
src_dir = src_dir.replace('\\', '\\\\')
|
||||||
|
dest_dir = os.path.join(dest, 'lib')
|
||||||
|
dest_dir = dest_dir.replace('\\', '\\\\')
|
||||||
|
shutil.copytree( src_dir, dest_dir )
|
||||||
|
|
||||||
|
src_dir = os.path.join(gtk_dir, 'share')
|
||||||
|
src_dir = src_dir.replace('\\', '\\\\')
|
||||||
|
dest_dir = os.path.join(dest, 'share')
|
||||||
|
dest_dir = dest_dir.replace('\\', '\\\\')
|
||||||
|
shutil.copytree( src_dir, dest_dir )
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user