2008-01-24 04:06:41 +00:00
|
|
|
from allmydata.util import pkgresutil # override the pkg_resources zip provider for py2exe deployment
|
|
|
|
pkgresutil.install() # this is done before nevow is imported by depends
|
2008-01-10 02:25:38 +00:00
|
|
|
import depends # import dependencies so that py2exe finds them
|
|
|
|
_junk = depends # appease pyflakes
|
|
|
|
|
2010-06-07 01:02:15 +00:00
|
|
|
import sys
|
|
|
|
from ctypes import WINFUNCTYPE, POINTER, byref, c_wchar_p, c_int, windll
|
2008-01-10 02:01:56 +00:00
|
|
|
from allmydata.scripts import runner
|
2010-06-07 01:02:15 +00:00
|
|
|
|
|
|
|
GetCommandLineW = WINFUNCTYPE(c_wchar_p)(("GetCommandLineW", windll.kernel32))
|
|
|
|
CommandLineToArgvW = WINFUNCTYPE(POINTER(c_wchar_p), c_wchar_p, POINTER(c_int)) \
|
|
|
|
(("CommandLineToArgvW", windll.shell32))
|
|
|
|
|
|
|
|
argc = c_int(0)
|
|
|
|
argv = CommandLineToArgvW(GetCommandLineW(), byref(argc))
|
|
|
|
argv_utf8 = [argv[i].encode('utf-8') for i in xrange(1, argc.value)]
|
|
|
|
|
|
|
|
rc = runner(argv_utf8, install_node_control=False)
|
|
|
|
sys.exit(rc)
|