summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-05-07 19:11:29 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-05-07 19:11:29 +0000
commit0d59c73ce3f5b569df6037436654c24f19c5e537 (patch)
treec3b6b77c6112b271ff7b920eda069641c810953c /src/main.cpp
parentFix typo in POTFILES.in (diff)
downloadinkscape-0d59c73ce3f5b569df6037436654c24f19c5e537.tar.gz
inkscape-0d59c73ce3f5b569df6037436654c24f19c5e537.zip
Use glib to get the installation prefix on Windows
(bzr r15675.1.1)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3a7050f9b..c4fcb6589 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -680,19 +680,19 @@ main(int argc, char **argv)
#endif
#ifdef WIN32
- gchar *exedir = g_strdup(win32_getExePath().data());
- _win32_set_inkscape_env(exedir);
+ gchar *datadir = g_win32_get_package_installation_directory_of_module(NULL);
+ _win32_set_inkscape_env(datadir);
# ifdef ENABLE_NLS
// obtain short path to executable dir and pass it
// to bindtextdomain (it doesn't understand UTF-8)
- gchar *shortexedir = g_win32_locale_filename_from_utf8(exedir);
- gchar *localepath = g_build_filename(shortexedir, PACKAGE_LOCALE_DIR, NULL);
+ gchar *shortdatadir = g_win32_locale_filename_from_utf8(datadir);
+ gchar *localepath = g_build_filename(shortdatadir, PACKAGE_LOCALE_DIR, NULL);
bindtextdomain(GETTEXT_PACKAGE, localepath);
- g_free(shortexedir);
+ g_free(shortdatadir);
g_free(localepath);
# endif
- g_free(exedir);
+ g_free(datadir);
// Don't touch the registry (works fine without it) for Inkscape Portable
gchar const *val = g_getenv("INKSCAPE_PORTABLE_PROFILE_DIR");