Change the current directory on Windows.
So the application can always find it's files.
This commit is contained in:
parent
bc491d0d0f
commit
0841e75076
|
@ -21,6 +21,16 @@ main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GError *error;
|
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, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue