Browse Source

Work-around for Python bug when dealing with space in script path on Windows.

pull/7/head
shypike 14 years ago
parent
commit
a39cfa485b
  1. 9
      tools/make_mo.py

9
tools/make_mo.py

@ -145,7 +145,7 @@ def process_po_folder(domain, folder):
# Create the MO file
mo_file = os.path.join(mo_path, mo_name)
print 'Compile %s' % mo_file
ret = os.system('"%s" -o "%s" "%s"' % (TOOL, mo_file, fname))
ret = os.system('%s -o "%s" "%s"' % (TOOL, mo_file, fname))
if ret != 0:
print '\nMissing %s. Please install this package first.' % TOOL
exit(1)
@ -278,7 +278,12 @@ def patch_nsis():
path, py = os.path.split(sys.argv[0])
tl = os.path.abspath(os.path.normpath(os.path.join(path, 'msgfmt.py')))
if os.path.exists(tl):
TOOL = tl
if os.name == 'nt':
import win32api
# Work-around for Python bug
TOOL = win32api.GetShortPathName(tl)
else:
TOOL = '"%s"' % tl
# Fix up Romanian texts
fix_ro()

Loading…
Cancel
Save