diff --git a/app/dialogs/user-install-dialog.c b/app/dialogs/user-install-dialog.c index b2a93ac952..8146805a9e 100644 --- a/app/dialogs/user-install-dialog.c +++ b/app/dialogs/user-install-dialog.c @@ -20,6 +20,7 @@ #include #include +#include #include #ifdef HAVE_UNISTD_H #include @@ -35,7 +36,12 @@ #include "libgimp/gimpenv.h" #ifndef NATIVE_WIN32 +# ifndef __EMX__ # define USER_INSTALL "user_install" +# else +# include +# define USER_INSTALL "user_install.cmd" +# endif #else # define STRICT # include @@ -488,9 +494,23 @@ install_run (InstallCallback callback) "was successful! Otherwise, quit and investigate\n" "the possible reason...\n", -1); #else +#ifndef __EMX__ g_snprintf (buffer, sizeof(buffer), "%s" G_DIR_SEPARATOR_S USER_INSTALL " %s %s", gimp_data_directory (), gimp_data_directory(), gimp_directory ()); +#else + g_snprintf (buffer, sizeof(buffer), "cmd.exe /c %s" G_DIR_SEPARATOR_S USER_INSTALL " %s %s", + gimp_data_directory (), gimp_data_directory(), + gimp_directory ()); + { + char *s = buffer + 10; + while (*s) + { + if (*s == '/') *s = '\\'; + s++; + } + } +#endif /* urk - should really use something better than popen(), since * we can't tell if the installation script failed --austin */ diff --git a/app/gui/user-install-dialog.c b/app/gui/user-install-dialog.c index b2a93ac952..8146805a9e 100644 --- a/app/gui/user-install-dialog.c +++ b/app/gui/user-install-dialog.c @@ -20,6 +20,7 @@ #include #include +#include #include #ifdef HAVE_UNISTD_H #include @@ -35,7 +36,12 @@ #include "libgimp/gimpenv.h" #ifndef NATIVE_WIN32 +# ifndef __EMX__ # define USER_INSTALL "user_install" +# else +# include +# define USER_INSTALL "user_install.cmd" +# endif #else # define STRICT # include @@ -488,9 +494,23 @@ install_run (InstallCallback callback) "was successful! Otherwise, quit and investigate\n" "the possible reason...\n", -1); #else +#ifndef __EMX__ g_snprintf (buffer, sizeof(buffer), "%s" G_DIR_SEPARATOR_S USER_INSTALL " %s %s", gimp_data_directory (), gimp_data_directory(), gimp_directory ()); +#else + g_snprintf (buffer, sizeof(buffer), "cmd.exe /c %s" G_DIR_SEPARATOR_S USER_INSTALL " %s %s", + gimp_data_directory (), gimp_data_directory(), + gimp_directory ()); + { + char *s = buffer + 10; + while (*s) + { + if (*s == '/') *s = '\\'; + s++; + } + } +#endif /* urk - should really use something better than popen(), since * we can't tell if the installation script failed --austin */ diff --git a/app/install.c b/app/install.c index b2a93ac952..8146805a9e 100644 --- a/app/install.c +++ b/app/install.c @@ -20,6 +20,7 @@ #include #include +#include #include #ifdef HAVE_UNISTD_H #include @@ -35,7 +36,12 @@ #include "libgimp/gimpenv.h" #ifndef NATIVE_WIN32 +# ifndef __EMX__ # define USER_INSTALL "user_install" +# else +# include +# define USER_INSTALL "user_install.cmd" +# endif #else # define STRICT # include @@ -488,9 +494,23 @@ install_run (InstallCallback callback) "was successful! Otherwise, quit and investigate\n" "the possible reason...\n", -1); #else +#ifndef __EMX__ g_snprintf (buffer, sizeof(buffer), "%s" G_DIR_SEPARATOR_S USER_INSTALL " %s %s", gimp_data_directory (), gimp_data_directory(), gimp_directory ()); +#else + g_snprintf (buffer, sizeof(buffer), "cmd.exe /c %s" G_DIR_SEPARATOR_S USER_INSTALL " %s %s", + gimp_data_directory (), gimp_data_directory(), + gimp_directory ()); + { + char *s = buffer + 10; + while (*s) + { + if (*s == '/') *s = '\\'; + s++; + } + } +#endif /* urk - should really use something better than popen(), since * we can't tell if the installation script failed --austin */ diff --git a/app/user_install.c b/app/user_install.c index b2a93ac952..8146805a9e 100644 --- a/app/user_install.c +++ b/app/user_install.c @@ -20,6 +20,7 @@ #include #include +#include #include #ifdef HAVE_UNISTD_H #include @@ -35,7 +36,12 @@ #include "libgimp/gimpenv.h" #ifndef NATIVE_WIN32 +# ifndef __EMX__ # define USER_INSTALL "user_install" +# else +# include +# define USER_INSTALL "user_install.cmd" +# endif #else # define STRICT # include @@ -488,9 +494,23 @@ install_run (InstallCallback callback) "was successful! Otherwise, quit and investigate\n" "the possible reason...\n", -1); #else +#ifndef __EMX__ g_snprintf (buffer, sizeof(buffer), "%s" G_DIR_SEPARATOR_S USER_INSTALL " %s %s", gimp_data_directory (), gimp_data_directory(), gimp_directory ()); +#else + g_snprintf (buffer, sizeof(buffer), "cmd.exe /c %s" G_DIR_SEPARATOR_S USER_INSTALL " %s %s", + gimp_data_directory (), gimp_data_directory(), + gimp_directory ()); + { + char *s = buffer + 10; + while (*s) + { + if (*s == '/') *s = '\\'; + s++; + } + } +#endif /* urk - should really use something better than popen(), since * we can't tell if the installation script failed --austin */