Change the current directory on Windows.

So the application can always find it's files.
This commit is contained in:
Přemysl Eric Janouch 2011-02-13 21:14:24 +01:00
parent bc491d0d0f
commit 0841e75076
1 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,16 @@ main (int argc, char *argv[])
{
GtkWidget *window;
GError *error;
#ifdef _WIN32
gchar *install_dir;
install_dir = g_win32_get_package_installation_directory_of_module (NULL);
if (install_dir)
{
g_chdir (install_dir);
g_free (install_dir);
}
#endif
setlocale (LC_ALL, "");