win32 fix

svn: r21529
This commit is contained in:
Josip Pisoj 2013-03-03 00:08:15 +00:00
parent 4ca0c9f8c9
commit 8ea29ede81
2 changed files with 9 additions and 1 deletions

View File

@ -45,7 +45,10 @@ else:
try:
codeset = glocale.get_translation().info()["charset"]
except KeyError:
codeset = "UTF-8"
if win():
codeset = locale.getlocale()[1]
else:
codeset = "UTF-8"
try:

View File

@ -243,6 +243,9 @@ def write_const_py(command):
data_dir = os.path.join(share_dir, 'gramps')
image_dir = os.path.join(share_dir, 'gramps', 'icons', 'hicolor')
doc_dir = os.path.join(share_dir, 'doc', 'gramps')
if sys.platform == 'win32':
locale_dir= locale_dir.replace('\\', '\\\\')
else:
#in build
if 'install' in command.distribution.command_obj:
@ -253,6 +256,8 @@ def write_const_py(command):
data_dir = os.path.join(base_dir, 'data')
image_dir = os.path.join(base_dir, 'images')
doc_dir = base_dir
if sys.platform == 'win32':
locale_dir= locale_dir.replace('\\', '\\\\')
subst_vars = (('@VERSIONSTRING@', VERSION),
('@LOCALE_DIR@', locale_dir),