Commit 516fb890 authored by Alexander Larsson's avatar Alexander Larsson

gtk-demo: Find gtk-demo-application.exe on win32

We need to append the ".exe" extension when looking for the
application file on windows.
parent aa3d30e2
......@@ -427,6 +427,12 @@ on_name_vanished (GDBusConnection *connection,
}
}
#ifdef G_OS_WIN32
#define APP_EXTENSION ".exe"
#else
#define APP_EXTENSION
#endif
GtkWidget *
do_application (GtkWidget *toplevel)
{
......@@ -445,8 +451,8 @@ do_application (GtkWidget *toplevel)
const gchar *command;
GError *error = NULL;
if (g_file_test ("./gtk3-demo-application", G_FILE_TEST_IS_EXECUTABLE))
command = "./gtk3-demo-application";
if (g_file_test ("./gtk3-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
command = "./gtk3-demo-application" APP_EXTENSION;
else
command = "gtk3-demo-application";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment