Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 205 lines (197 sloc) 4.19 KB
from bbfreeze import Freezer
import os
import sys
import shutil
## This will build a standalone exe version of the app
## Run on any windows machine, no python install necessary.
## Props to the bbfreeze team for sure, but this file is still a MAJOR CLUDGE!
install_root = "target"
install_path = "steamgamefaqs"
# clean the target directory
if os.path.isdir(install_root):
shutil.rmtree(install_root)
# The project needs to be built first
# (This seems REALLY cludgy)
sys.argv.append("build")
import setup
# ARG! I can get bbfreeze to include all the 3rd party packages just fine,
# but it doesn't grab the ones from the stdlib! This is just a list of the ones
# I grabbed from sys.modules when it was running.
f = Freezer(os.path.join(install_root,install_path), includes=(
"steamgamefaqs",
"xml.dom.minidom",
'_bisect',
'distutils',
'weberror',
'functools',
'random',
'heapq',
'datetime',
'__future__',
'gc',
'msvcrt',
'xml',
'pyquery',
'struct',
'tempfile',
'pprint',
'_json',
'imp',
'collections',
'smtplib',
'zipimport',
'string',
'SocketServer',
'zipfile',
'repr',
'ssl',
'_bytesio',
'subprocess',
'decorator',
'ConfigParser',
'httplib',
'bisect',
'nt',
'decimal',
'webhelpers',
'threading',
'token',
'quopri',
'signal',
'dis',
'cStringIO',
'cmd',
'locale',
'mimetypes',
'atexit',
'_winreg',
'encodings',
'BaseHTTPServer',
'calendar',
'abc',
'formencode',
'bdb',
'rfc822',
'tarfile',
'_subprocess',
'urllib',
're',
'ntpath',
'new',
'email',
'math',
'cgi',
'pylons',
'optparse',
'UserDict',
'inspect',
'_ctypes',
'Queue',
'exceptions',
'ctypes',
'codecs',
'paste',
'pkgutil',
'beaker',
'_locale',
'logging',
'socket',
'thread',
'StringIO',
'traceback',
'pkg_resources',
'weakref',
'itertools',
'opcode',
'routes',
'os',
'pdb',
'base64',
'_collections',
'_sre',
'__builtin__',
'HTMLParser',
'pygments',
'operator',
'array',
'select',
'_heapq',
'posixpath',
'errno',
'_socket',
'binascii',
'tempita',
'sre_constants',
'json',
'Cookie',
'tokenize',
'_warnings',
'_functools',
'cPickle',
'simplejson',
'_codecs',
'commands',
'_bsddb',
'nturl2path',
'copy',
'_struct',
'hashlib',
'anydbm',
'_ast',
'keyword',
'uu',
'zlib',
'modulefinder',
'markupbase',
'fnmatch',
'sre_parse',
'pickle',
'_fileio',
'mimetools',
'copy_reg',
'sre_compile',
'_hashlib',
'_random',
'parser',
'site',
'getpass',
'numbers',
'io',
'__main__',
'pyexpat',
'shutil',
'mako',
'lxml',
'strop',
'gettext',
'dumbdbm',
'_abcoll',
'bsddb',
'getopt',
'webob',
'genericpath',
'stat',
'_ssl',
'warnings',
'glob',
'time',
'htmlentitydefs',
'urllib2',
'textwrap',
'sys',
'types',
'_weakref',
'xmlrpclib',
'marshal',
'urlparse',
'linecache',
'steamgamefaqs',
'sets',
'gzip',
'dbhash',
'hmac',
))
f.addScript(os.path.join("scripts","go.py"))
f()
shutil.copyfile("app.ini",os.path.join(install_root,install_path,"app.ini"))
shutil.copyfile(os.path.join("scripts","run_server.bat"), os.path.join(install_root,"start_steam_gamefaqs.bat"))