Merge branch 'master' of git://git.assembla.com/fpdb-eric
This commit is contained in:
commit
da9900caef
1
pyfpdb/makeexe.bat
Normal file
1
pyfpdb/makeexe.bat
Normal file
|
@ -0,0 +1 @@
|
|||
python makeexe.py py2exe
|
10
pyfpdb/makeexe.py
Normal file
10
pyfpdb/makeexe.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from distutils.core import setup
|
||||
import py2exe
|
||||
opts = {
|
||||
'py2exe': {
|
||||
'includes': "pango,atk,gobject",
|
||||
}
|
||||
}
|
||||
|
||||
setup(name='Free Poker Database', version='0.12', console=[{"script":"fpdb.py"}])
|
||||
|
|
@ -1,47 +1,47 @@
|
|||
|
||||
# create .bat scripts in windows to try out different gtk dirs
|
||||
|
||||
try:
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
|
||||
if os.name != 'nt':
|
||||
print "\nThis script is only for windows\n"
|
||||
exit()
|
||||
|
||||
dirs = re.split(os.pathsep, os.environ['PATH'])
|
||||
# remove any trailing / or \ chars from dirs:
|
||||
dirs = [re.sub('[\\/]$','',p) for p in dirs]
|
||||
# remove any dirs containing 'python' apart from those ending in 'python25', 'python26' or 'python':
|
||||
dirs = [p for p in dirs if not re.search('python', p, re.I) or re.search('python25$', p, re.I) or re.search('python26$', p, re.I)]
|
||||
# find gtk dirs:
|
||||
gtkdirs = [p for p in dirs if re.search('gtk', p, re.I)]
|
||||
|
||||
lines = [ '@echo off\n\n'
|
||||
, '<path goes here>'
|
||||
, 'python fpdb.py\n\n'
|
||||
, 'pause\n\n'
|
||||
]
|
||||
if gtkdirs:
|
||||
i = 1
|
||||
for gpath in gtkdirs: # enumerate converts the \\ into \
|
||||
tmpdirs = [p for p in dirs if not re.search('gtk', p, re.I) or p == gpath]
|
||||
tmppath = ";".join(tmpdirs)
|
||||
lines[1] = 'PATH=' + tmppath + '\n\n'
|
||||
bat = open('run_fpdb'+str(i)+'.bat', 'w')
|
||||
bat.writelines(lines)
|
||||
bat.close()
|
||||
i = i + 1
|
||||
else:
|
||||
print "\nno gtk directories found in your path - install gtk or edit the path manually\n"
|
||||
|
||||
except SystemExit:
|
||||
pass
|
||||
|
||||
except:
|
||||
print "Error:", str(sys.exc_info())
|
||||
pass
|
||||
|
||||
# sys.stdin.readline()
|
||||
|
||||
# create .bat scripts in windows to try out different gtk dirs
|
||||
|
||||
try:
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
|
||||
if os.name != 'nt':
|
||||
print "\nThis script is only for windows\n"
|
||||
exit()
|
||||
|
||||
dirs = re.split(os.pathsep, os.environ['PATH'])
|
||||
# remove any trailing / or \ chars from dirs:
|
||||
dirs = [re.sub('[\\/]$','',p) for p in dirs]
|
||||
# remove any dirs containing 'python' apart from those ending in 'python25', 'python26' or 'python':
|
||||
dirs = [p for p in dirs if not re.search('python', p, re.I) or re.search('python25$', p, re.I) or re.search('python26$', p, re.I)]
|
||||
# find gtk dirs:
|
||||
gtkdirs = [p for p in dirs if re.search('gtk', p, re.I)]
|
||||
|
||||
lines = [ '@echo off\n\n'
|
||||
, '<path goes here>'
|
||||
, 'python fpdb.py\n\n'
|
||||
, 'pause\n\n'
|
||||
]
|
||||
if gtkdirs:
|
||||
i = 1
|
||||
for gpath in gtkdirs: # enumerate converts the \\ into \
|
||||
tmpdirs = [p for p in dirs if not re.search('gtk', p, re.I) or p == gpath]
|
||||
tmppath = ";".join(tmpdirs)
|
||||
lines[1] = 'PATH=' + tmppath + '\n\n'
|
||||
bat = open('run_fpdb'+str(i)+'.bat', 'w')
|
||||
bat.writelines(lines)
|
||||
bat.close()
|
||||
i = i + 1
|
||||
else:
|
||||
print "\nno gtk directories found in your path - install gtk or edit the path manually\n"
|
||||
|
||||
except SystemExit:
|
||||
pass
|
||||
|
||||
except:
|
||||
print "Error:", str(sys.exc_info())
|
||||
pass
|
||||
|
||||
# sys.stdin.readline()
|
||||
|
|
Loading…
Reference in New Issue
Block a user