Build gtk-2.24.8 on windows
This commit is contained in:
parent
bb7f11fb97
commit
f247be360f
@ -1,7 +1,7 @@
|
||||
m4_define([_moo_major_version_],[1])
|
||||
m4_define([_moo_minor_version_],[0])
|
||||
m4_define([_moo_micro_version_],[94])
|
||||
m4_define([_moo_version_suffix_],[])
|
||||
m4_define([_moo_version_suffix_],[devel])
|
||||
m4_define([_moo_module_major_version_],[2])
|
||||
m4_define([_moo_module_minor_version_],[0])
|
||||
m4_define([_moo_version_],[_moo_major_version_._moo_minor_version_._moo_micro_version_])
|
||||
|
@ -320,7 +320,12 @@ project_mode (const char *file)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
#undef WANT_SYNAPTICS_FIX
|
||||
#if defined(GDK_WINDOWING_WIN32) && !GTK_CHECK_VERSION(2,24,8)
|
||||
#define WANT_SYNAPTICS_FIX 1
|
||||
#endif
|
||||
|
||||
#ifdef WANT_SYNAPTICS_FIX
|
||||
|
||||
static GdkWindow *
|
||||
_moo_get_toplevel_window_at_pointer (void)
|
||||
@ -512,7 +517,7 @@ hookup_synaptics_touchpad (void)
|
||||
gdk_window_add_filter (NULL, touchpad_filter_func, NULL);
|
||||
}
|
||||
|
||||
#endif // GDK_WINDOWING_WIN32
|
||||
#endif // WANT_SYNAPTICS_FIX
|
||||
|
||||
static void
|
||||
unit_test_func (void)
|
||||
@ -558,7 +563,7 @@ medit_main (int argc, char *argv[])
|
||||
|
||||
stamp = get_time_stamp ();
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
#ifdef WANT_SYNAPTICS_FIX
|
||||
hookup_synaptics_touchpad ();
|
||||
#endif
|
||||
|
||||
|
@ -15,6 +15,12 @@
|
||||
<source href="http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz"
|
||||
md5sum="7ab33ebd26687c744a37264a330bbe9a"/>
|
||||
</tarball>
|
||||
<!-- does not link
|
||||
<tarball id="libiconv" version="1.14">
|
||||
<source href="http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz"
|
||||
md5sum="e34509b1623cec449dfeb73d7ce9c6c6"/>
|
||||
</tarball>
|
||||
-->
|
||||
|
||||
<tarball id="gettext" version="0.17">
|
||||
<source href="http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz"
|
||||
@ -57,22 +63,6 @@
|
||||
</dependencies>
|
||||
</tarball>
|
||||
|
||||
<!-- GOOD -->
|
||||
<!-- <tarball id="glib">
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/glib/2.24/glib-2.24.2.tar.bz2"
|
||||
sha256sum="3aeb521abd3642dd1224379f0e54915957e5010f888a4ae74afa0ad54da0160c"/>
|
||||
<dependencies>
|
||||
<dep package="libiconv"/>
|
||||
<dep package="gettext"/>
|
||||
<dep package="zlib"/>
|
||||
</dependencies>
|
||||
<patches>
|
||||
<patch file="glib-2.24.patch" strip="1"/>
|
||||
<patch file="glib-spawn-win32.patch" strip="1"/>
|
||||
<patch file="glib-spawn-win32-moo.patch" strip="1"/>
|
||||
</patches>
|
||||
</tarball>-->
|
||||
|
||||
<tarball id="glib">
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/glib/2.28/glib-2.28.5.tar.bz2"
|
||||
md5sum="ddf80a060ec9039ad40452ba3ca2311b"/>
|
||||
@ -87,6 +77,22 @@
|
||||
<patch file="glib-2.28-spawn-win32-moo.patch" strip="1"/>
|
||||
</patches>
|
||||
</tarball>
|
||||
<!-- glib-2.30 requires libffi
|
||||
<tarball id="glib">
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/glib/2.30/glib-2.30.2.tar.bz2"
|
||||
md5sum="b40f3889e8d24e1b367763673ca6deb5"/>
|
||||
<dependencies>
|
||||
<dep package="libiconv"/>
|
||||
<dep package="gettext"/>
|
||||
<dep package="zlib"/>
|
||||
</dependencies>
|
||||
<patches>
|
||||
<patch file="glib-2.30.patch" strip="1"/>
|
||||
<patch file="glib-2.30-spawn-win32.patch" strip="1"/>
|
||||
<patch file="glib-2.30-spawn-win32-moo.patch" strip="1"/>
|
||||
</patches>
|
||||
</tarball>
|
||||
-->
|
||||
|
||||
<tarball id="pkgconfig" version="0.23">
|
||||
<source href="http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz"
|
||||
@ -99,35 +105,16 @@
|
||||
</patches>
|
||||
</tarball>
|
||||
|
||||
<!-- <tarball id="pixman-0.17.14">
|
||||
<source href="http://cairographics.org/releases/pixman-0.17.14.tar.gz"
|
||||
md5sum="b0ad87c2cc9346056698eaf6af1933a6"/>
|
||||
<patches>
|
||||
<patch file="pixman-0.17.patch" strip="1"/>
|
||||
</patches>
|
||||
</tarball>-->
|
||||
|
||||
<!-- <tarball id="pixman-0.19.2">
|
||||
<source href="http://cairographics.org/releases/pixman-0.19.2.tar.gz"
|
||||
md5sum="dfb84c9f402fbba5047f0e0a69c17518"/>
|
||||
</tarball>-->
|
||||
|
||||
<!-- GOOD -->
|
||||
<!-- GOOD
|
||||
<tarball id="pixman">
|
||||
<source href="http://cairographics.org/releases/pixman-0.21.2.tar.gz"
|
||||
md5sum="9e09fd6e58cbf9717140891e0b7d4a7a"/>
|
||||
</tarball>
|
||||
|
||||
<!-- THIS ONE WORKS -->
|
||||
<!-- <tarball id="cairo" supports-non-srcdir-builds="no">
|
||||
<source href="http://cairographics.org/releases/cairo-1.8.4.tar.gz"
|
||||
md5sum="a5067e355e78294db2485aa97afd1115"/>
|
||||
<dependencies>
|
||||
<dep package="pixman"/>
|
||||
<dep package="gettext"/>
|
||||
<dep package="libpng"/>
|
||||
</dependencies>
|
||||
</tarball>-->
|
||||
-->
|
||||
<tarball id="pixman">
|
||||
<source href="http://cairographics.org/releases/pixman-0.24.0.tar.gz"
|
||||
md5sum="a2d0b120509bdccb10aa7f4bec3730e4"/>
|
||||
</tarball>
|
||||
|
||||
<!-- GOOD -->
|
||||
<tarball id="cairo" supports-non-srcdir-builds="no">
|
||||
@ -167,15 +154,6 @@
|
||||
</dependencies>
|
||||
</tarball>
|
||||
|
||||
<!-- GOOD -->
|
||||
<!-- <tarball id="atk" supports-non-srcdir-builds="no">
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/atk/1.30/atk-1.30.0.tar.bz2"
|
||||
sha256sum="92b9b1213cafc68fe9c3806273b968c26423237d7b1f631dd83dc5270b8c268c"/>
|
||||
<dependencies>
|
||||
<dep package="glib"/>
|
||||
</dependencies>
|
||||
</tarball>-->
|
||||
|
||||
<tarball id="atk" supports-non-srcdir-builds="no">
|
||||
<source href="http://ftp.acc.umu.se/pub/GNOME/sources/atk/1.32/atk-1.32.0.tar.bz2"
|
||||
sha256sum="b9a19a3e426cd9ca930f0108c4ee343f"/>
|
||||
@ -184,6 +162,7 @@
|
||||
</dependencies>
|
||||
</tarball>
|
||||
|
||||
<!-- GOOD
|
||||
<tarball id="gtk+">
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/gtk+/2.16/gtk+-2.16.6.tar.bz2"
|
||||
sha256sum="18e0f9792028e6cc5108447678f17d396f9a2cdfec1e6ab5dca98cb844f954af"/>
|
||||
@ -198,52 +177,10 @@
|
||||
<patch file="gtk-2.16.patch" strip="1"/>
|
||||
</patches>
|
||||
</tarball>
|
||||
|
||||
<!-- <tarball id="gtk+-2.18">
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/gtk+/2.18/gtk+-2.18.9.tar.bz2"
|
||||
sha256sum="5dcd8c406acbb8779c0b081a089fa87dfd7ab4d7d4c6075db478997ce96aa9b4"/>
|
||||
<dependencies>
|
||||
<dep package="cairo"/>
|
||||
<dep package="pango"/>
|
||||
<dep package="atk"/>
|
||||
<dep package="glib"/>
|
||||
<dep package="libpng"/>
|
||||
</dependencies>
|
||||
<patches>
|
||||
<patch file="gtk-2.18.patch" strip="1"/>
|
||||
</patches>
|
||||
</tarball>-->
|
||||
|
||||
<!-- <tarball id="gtk+-2.20">
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/gtk+/2.20/gtk+-2.20.0.tar.bz2"
|
||||
sha256sum="8ea7e11ff88e9a8867b7d9221d40a3bfce5c648ce27cd6bac422ff8f6cca414d"/>
|
||||
<dependencies>
|
||||
<dep package="cairo"/>
|
||||
<dep package="pango"/>
|
||||
<dep package="atk"/>
|
||||
<dep package="glib"/>
|
||||
<dep package="libpng"/>
|
||||
</dependencies>
|
||||
<patches>
|
||||
<patch file="gtk-2.20.patch" strip="1"/>
|
||||
</patches>
|
||||
</tarball>-->
|
||||
|
||||
<tarball id="gdk-pixbuf">
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.23/gdk-pixbuf-2.23.3.tar.bz2"
|
||||
md5sum="5d50c5311b4ce460d33983938d92109e"/>
|
||||
<dependencies>
|
||||
<dep package="cairo"/>
|
||||
<dep package="pango"/>
|
||||
<dep package="atk"/>
|
||||
<dep package="glib"/>
|
||||
<dep package="libpng"/>
|
||||
</dependencies>
|
||||
</tarball>
|
||||
|
||||
-->
|
||||
<tarball id="gtk+">
|
||||
<source href="http://ftp.gnome.org/pub/GNOME/sources/gtk+/2.24/gtk+-2.24.4.tar.bz2"
|
||||
md5sum="e05a700ba79c8813d56e83e80636ee21"/>
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.8.tar.bz2"
|
||||
md5sum="0413187f7e596aef00ccd1b54776ff03"/>
|
||||
<dependencies>
|
||||
<dep package="cairo"/>
|
||||
<dep package="pango"/>
|
||||
@ -253,15 +190,19 @@
|
||||
<dep package="gdk-pixbuf"/>
|
||||
</dependencies>
|
||||
<patches>
|
||||
<patch file="gtk-2.22.patch" strip="1"/>
|
||||
<patch file="gtk-2.24.patch" strip="1"/>
|
||||
</patches>
|
||||
</tarball>
|
||||
|
||||
<tarball id="gtk-engines">
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/gtk-engines/2.20/gtk-engines-2.20.0.tar.bz2"
|
||||
sha256sum="69b2e6798cfdcf7366b025b8f59fc63f658474f823d185473e94f969bae8cad1"/>
|
||||
<tarball id="gdk-pixbuf">
|
||||
<source href="http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.24/gdk-pixbuf-2.24.0.tar.bz2"
|
||||
md5sum="d8ece3a4ade4a91c768328620e473ab8"/>
|
||||
<dependencies>
|
||||
<dep package="gtk+"/>
|
||||
<dep package="cairo"/>
|
||||
<dep package="pango"/>
|
||||
<dep package="atk"/>
|
||||
<dep package="glib"/>
|
||||
<dep package="libpng"/>
|
||||
</dependencies>
|
||||
</tarball>
|
||||
|
||||
@ -324,7 +265,6 @@
|
||||
<dependencies>
|
||||
<dep package="hicolor-icon-theme"/>
|
||||
<dep package="libxml2"/>
|
||||
<dep package="pkgconfig"/>
|
||||
<dep package="gtk+"/>
|
||||
<dep package="intltool"/>
|
||||
<dep package="pygtk"/>
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff -r aee1c0eff1fd glib/gspawn.h
|
||||
--- a/glib/gspawn.h Sat Nov 26 03:25:11 2011 -0800
|
||||
+++ b/glib/gspawn.h Sat Nov 26 03:28:20 2011 -0800
|
||||
@@ -118,6 +118,8 @@
|
||||
*/
|
||||
typedef void (* GSpawnChildSetupFunc) (gpointer user_data);
|
||||
|
||||
+#define MOO_PATCHED_G_SPAWN_WIN32_HIDDEN_CONSOLE 1
|
||||
+
|
||||
/**
|
||||
* GSpawnFlags:
|
||||
* @G_SPAWN_LEAVE_DESCRIPTORS_OPEN: the parent's open file descriptors will be
|
312
plat/win32/gtk-win/jhbuildrc/patches/glib-2.30-spawn-win32.patch
Normal file
312
plat/win32/gtk-win/jhbuildrc/patches/glib-2.30-spawn-win32.patch
Normal file
@ -0,0 +1,312 @@
|
||||
diff -r 038508fce142 glib/gspawn-win32-helper.c
|
||||
--- a/glib/gspawn-win32-helper.c Sat Nov 26 03:24:16 2011 -0800
|
||||
+++ b/glib/gspawn-win32-helper.c Sat Nov 26 03:25:08 2011 -0800
|
||||
@@ -147,6 +147,16 @@
|
||||
return argc;
|
||||
}
|
||||
|
||||
+static int
|
||||
+get_file_descriptor (const gchar *arg,
|
||||
+ gboolean is_handle)
|
||||
+{
|
||||
+ if (is_handle)
|
||||
+ return _open_osfhandle (atoi (arg), 0);
|
||||
+ else
|
||||
+ return atoi (arg);
|
||||
+}
|
||||
+
|
||||
#ifndef HELPER_CONSOLE
|
||||
int _stdcall
|
||||
WinMain (struct HINSTANCE__ *hInstance,
|
||||
@@ -170,6 +180,7 @@
|
||||
wchar_t **new_wargv;
|
||||
int argc;
|
||||
wchar_t **wargv, **wenvp;
|
||||
+ gboolean handles_in_argv;
|
||||
_startupinfo si = { 0 };
|
||||
char c;
|
||||
|
||||
@@ -184,10 +195,17 @@
|
||||
*/
|
||||
g_assert (argc == __argc);
|
||||
|
||||
- /* argv[ARG_CHILD_ERR_REPORT] is the file descriptor number onto
|
||||
+ /* argv[ARG_HANDLES_IN_ARGV] is "y" or "n" telling whether
|
||||
+ * file handle arguments contain HANDLE's or file descriptors.
|
||||
+ */
|
||||
+ handles_in_argv = __argv[ARG_HANDLES_IN_ARGV][0] == 'y';
|
||||
+
|
||||
+ /* argv[ARG_CHILD_ERR_REPORT] is the pipe handle onto
|
||||
* which write error messages.
|
||||
*/
|
||||
- child_err_report_fd = atoi (__argv[ARG_CHILD_ERR_REPORT]);
|
||||
+ child_err_report_fd = get_file_descriptor (__argv[ARG_CHILD_ERR_REPORT], handles_in_argv);
|
||||
+ if (child_err_report_fd < 0)
|
||||
+ g_error ("child_err_report_fd not set");
|
||||
|
||||
/* Hack to implement G_SPAWN_FILE_AND_ARGV_ZERO. If
|
||||
* argv[ARG_CHILD_ERR_REPORT] is suffixed with a '#' it means we get
|
||||
@@ -204,7 +222,7 @@
|
||||
*/
|
||||
helper_sync_fd = atoi (__argv[ARG_HELPER_SYNC]);
|
||||
|
||||
- /* argv[ARG_STDIN..ARG_STDERR] are the file descriptor numbers that
|
||||
+ /* argv[ARG_STDIN..ARG_STDERR] are the pipe handles that
|
||||
* should be dup2'd to 0, 1 and 2. '-' if the corresponding fd
|
||||
* should be left alone, and 'z' if it should be connected to the
|
||||
* bit bucket NUL:.
|
||||
@@ -222,7 +240,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- fd = atoi (__argv[ARG_STDIN]);
|
||||
+ fd = get_file_descriptor (__argv[ARG_STDIN], handles_in_argv);
|
||||
+ if (fd < 0)
|
||||
+ g_error ("could not open stdin pipe");
|
||||
if (fd != 0)
|
||||
{
|
||||
dup2 (fd, 0);
|
||||
@@ -243,7 +263,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- fd = atoi (__argv[ARG_STDOUT]);
|
||||
+ fd = get_file_descriptor (__argv[ARG_STDOUT], handles_in_argv);
|
||||
+ if (fd < 0)
|
||||
+ g_error ("could not open stdout pipe");
|
||||
if (fd != 1)
|
||||
{
|
||||
dup2 (fd, 1);
|
||||
@@ -264,7 +286,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- fd = atoi (__argv[ARG_STDERR]);
|
||||
+ fd = get_file_descriptor (__argv[ARG_STDERR], handles_in_argv);
|
||||
+ if (fd < 0)
|
||||
+ g_error ("could not open stderr pipe");
|
||||
if (fd != 2)
|
||||
{
|
||||
dup2 (fd, 2);
|
||||
diff -r 038508fce142 glib/gspawn-win32.c
|
||||
--- a/glib/gspawn-win32.c Sat Nov 26 03:24:16 2011 -0800
|
||||
+++ b/glib/gspawn-win32.c Sat Nov 26 03:25:08 2011 -0800
|
||||
@@ -87,7 +87,8 @@
|
||||
};
|
||||
|
||||
enum {
|
||||
- ARG_CHILD_ERR_REPORT = 1,
|
||||
+ ARG_HANDLES_IN_ARGV = 1,
|
||||
+ ARG_CHILD_ERR_REPORT,
|
||||
ARG_HELPER_SYNC,
|
||||
ARG_STDIN,
|
||||
ARG_STDOUT,
|
||||
@@ -352,7 +353,11 @@
|
||||
}
|
||||
|
||||
if (bytes < sizeof(gintptr)*2)
|
||||
- return FALSE;
|
||||
+ {
|
||||
+ g_set_error (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED,
|
||||
+ _("Failed to read from child pipe"));
|
||||
+ return FALSE;
|
||||
+ }
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -513,6 +518,77 @@
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+static int
|
||||
+spawn_with_hidden_console (wchar_t **wargv,
|
||||
+ wchar_t **wenvp,
|
||||
+ GError **error)
|
||||
+{
|
||||
+ GArray *cmd_line;
|
||||
+ STARTUPINFOW sinfo;
|
||||
+ PROCESS_INFORMATION pinfo;
|
||||
+ wchar_t **p;
|
||||
+ wchar_t *env_string = NULL;
|
||||
+ int rc = -1;
|
||||
+ guint flags;
|
||||
+
|
||||
+ cmd_line = g_array_new (FALSE, FALSE, sizeof (wchar_t));
|
||||
+ for (p = wargv; *p; p++)
|
||||
+ {
|
||||
+ if (p > wargv)
|
||||
+ g_array_append_vals (cmd_line, L" ", 1);
|
||||
+ g_array_append_vals (cmd_line, *p, wcslen (*p));
|
||||
+ }
|
||||
+ g_array_append_vals (cmd_line, L"", 1);
|
||||
+
|
||||
+ memset (&sinfo, 0, sizeof sinfo);
|
||||
+ sinfo.cb = sizeof (STARTUPINFO);
|
||||
+ sinfo.dwFlags = STARTF_USESHOWWINDOW;
|
||||
+ sinfo.wShowWindow = SW_HIDE;
|
||||
+ flags = CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP;
|
||||
+
|
||||
+ if (wenvp)
|
||||
+ {
|
||||
+ GArray *tmp;
|
||||
+
|
||||
+ flags |= CREATE_UNICODE_ENVIRONMENT;
|
||||
+
|
||||
+ /* format is "var=value\0var=value\0\0" */
|
||||
+ tmp = g_array_new (FALSE, FALSE, sizeof (wchar_t));
|
||||
+ for (p = wenvp; p && *p; p++)
|
||||
+ g_array_append_vals (tmp, *p, wcslen (*p) + 1);
|
||||
+ g_array_append_vals (tmp, L"", 1);
|
||||
+ env_string = (wchar_t*) g_array_free (tmp, FALSE);
|
||||
+ }
|
||||
+
|
||||
+ if (CreateProcessW (NULL, (wchar_t*) cmd_line->data, NULL, NULL, TRUE,
|
||||
+ flags, env_string, NULL, &sinfo, &pinfo))
|
||||
+ {
|
||||
+ rc = (int) pinfo.hProcess;
|
||||
+ CloseHandle (pinfo.hThread);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ g_set_error (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED,
|
||||
+ _("Failed to execute helper program (%s)"),
|
||||
+ g_win32_error_message (GetLastError ()));
|
||||
+ }
|
||||
+
|
||||
+ g_free (env_string);
|
||||
+ g_array_free (cmd_line, TRUE);
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+sprintf_file_descriptor (gchar *dest,
|
||||
+ gint fd,
|
||||
+ gboolean print_handle)
|
||||
+{
|
||||
+ if (print_handle)
|
||||
+ _g_sprintf (dest, "%ld", _get_osfhandle (fd));
|
||||
+ else
|
||||
+ _g_sprintf (dest, "%d", fd);
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
do_spawn_with_pipes (gint *exit_status,
|
||||
gboolean do_return_handle,
|
||||
@@ -549,6 +625,8 @@
|
||||
wchar_t *whelper, **wargv, **wenvp;
|
||||
extern gchar *_glib_get_dll_directory (void);
|
||||
gchar *glib_dll_directory;
|
||||
+ gboolean error_set = FALSE;
|
||||
+ gboolean handles_in_argv = FALSE;
|
||||
|
||||
if (child_setup && !warned_about_child_setup)
|
||||
{
|
||||
@@ -559,6 +637,7 @@
|
||||
argc = protect_argv (argv, &protected_argv);
|
||||
|
||||
if (!standard_input && !standard_output && !standard_error &&
|
||||
+ !(flags & G_SPAWN_WIN32_HIDDEN_CONSOLE) &&
|
||||
(flags & G_SPAWN_CHILD_INHERITS_STDIN) &&
|
||||
!(flags & G_SPAWN_STDOUT_TO_DEV_NULL) &&
|
||||
!(flags & G_SPAWN_STDERR_TO_DEV_NULL) &&
|
||||
@@ -590,7 +669,8 @@
|
||||
goto cleanup_and_fail;
|
||||
|
||||
new_argv = g_new (char *, argc + 1 + ARG_COUNT);
|
||||
- if (GetConsoleCursorInfo (GetStdHandle (STD_OUTPUT_HANDLE), &cursor_info))
|
||||
+ if ((flags & G_SPAWN_WIN32_HIDDEN_CONSOLE) ||
|
||||
+ GetConsoleCursorInfo (GetStdHandle (STD_OUTPUT_HANDLE), &cursor_info))
|
||||
helper_process = HELPER_PROCESS "-console.exe";
|
||||
else
|
||||
helper_process = HELPER_PROCESS ".exe";
|
||||
@@ -606,9 +686,16 @@
|
||||
|
||||
new_argv[0] = protect_argv_string (helper_process);
|
||||
|
||||
- _g_sprintf (args[ARG_CHILD_ERR_REPORT], "%d", child_err_report_pipe[1]);
|
||||
+ if (flags & G_SPAWN_WIN32_HIDDEN_CONSOLE)
|
||||
+ handles_in_argv = TRUE;
|
||||
+
|
||||
+ strcpy (args[ARG_HANDLES_IN_ARGV], handles_in_argv ? "y" : "n");
|
||||
+ new_argv[ARG_HANDLES_IN_ARGV] = args[ARG_HANDLES_IN_ARGV];
|
||||
+
|
||||
+ sprintf_file_descriptor (args[ARG_CHILD_ERR_REPORT],
|
||||
+ child_err_report_pipe[1], handles_in_argv);
|
||||
new_argv[ARG_CHILD_ERR_REPORT] = args[ARG_CHILD_ERR_REPORT];
|
||||
-
|
||||
+
|
||||
/* Make the read end of the child error report pipe
|
||||
* noninherited. Otherwise it will needlessly be inherited by the
|
||||
* helper process, and the started actual user process. As such that
|
||||
@@ -637,7 +724,7 @@
|
||||
|
||||
if (standard_input)
|
||||
{
|
||||
- _g_sprintf (args[ARG_STDIN], "%d", stdin_pipe[0]);
|
||||
+ sprintf_file_descriptor (args[ARG_STDIN], stdin_pipe[0], handles_in_argv);
|
||||
new_argv[ARG_STDIN] = args[ARG_STDIN];
|
||||
}
|
||||
else if (flags & G_SPAWN_CHILD_INHERITS_STDIN)
|
||||
@@ -653,7 +740,7 @@
|
||||
|
||||
if (standard_output)
|
||||
{
|
||||
- _g_sprintf (args[ARG_STDOUT], "%d", stdout_pipe[1]);
|
||||
+ sprintf_file_descriptor (args[ARG_STDOUT], stdout_pipe[1], handles_in_argv);
|
||||
new_argv[ARG_STDOUT] = args[ARG_STDOUT];
|
||||
}
|
||||
else if (flags & G_SPAWN_STDOUT_TO_DEV_NULL)
|
||||
@@ -667,7 +754,7 @@
|
||||
|
||||
if (standard_error)
|
||||
{
|
||||
- _g_sprintf (args[ARG_STDERR], "%d", stderr_pipe[1]);
|
||||
+ sprintf_file_descriptor (args[ARG_STDERR], stderr_pipe[1], handles_in_argv);
|
||||
new_argv[ARG_STDERR] = args[ARG_STDERR];
|
||||
}
|
||||
else if (flags & G_SPAWN_STDERR_TO_DEV_NULL)
|
||||
@@ -750,7 +837,13 @@
|
||||
whelper = g_utf8_to_utf16 (helper_process, -1, NULL, NULL, NULL);
|
||||
g_free (helper_process);
|
||||
|
||||
- if (wenvp != NULL)
|
||||
+ if (flags & G_SPAWN_WIN32_HIDDEN_CONSOLE)
|
||||
+ {
|
||||
+ rc = spawn_with_hidden_console (wargv, wenvp, error);
|
||||
+ if (rc == -1)
|
||||
+ error_set = TRUE;
|
||||
+ }
|
||||
+ else if (wenvp != NULL)
|
||||
rc = _wspawnvpe (P_NOWAIT, whelper, (const wchar_t **) wargv, (const wchar_t **) wenvp);
|
||||
else
|
||||
rc = _wspawnvp (P_NOWAIT, whelper, (const wchar_t **) wargv);
|
||||
@@ -777,11 +870,12 @@
|
||||
g_free (new_argv);
|
||||
|
||||
/* Check if gspawn-win32-helper couldn't be run */
|
||||
- if (rc == -1 && saved_errno != 0)
|
||||
+ if (rc == -1 && (saved_errno != 0 || error_set))
|
||||
{
|
||||
- g_set_error (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED,
|
||||
- _("Failed to execute helper program (%s)"),
|
||||
- g_strerror (saved_errno));
|
||||
+ if (!error_set)
|
||||
+ g_set_error (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED,
|
||||
+ _("Failed to execute helper program (%s)"),
|
||||
+ g_strerror (saved_errno));
|
||||
goto cleanup_and_fail;
|
||||
}
|
||||
|
||||
diff -r 038508fce142 glib/gspawn.h
|
||||
--- a/glib/gspawn.h Sat Nov 26 03:24:16 2011 -0800
|
||||
+++ b/glib/gspawn.h Sat Nov 26 03:25:08 2011 -0800
|
||||
@@ -152,7 +152,8 @@
|
||||
G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3,
|
||||
G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4,
|
||||
G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5,
|
||||
- G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6
|
||||
+ G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6,
|
||||
+ G_SPAWN_WIN32_HIDDEN_CONSOLE = 1 << 7
|
||||
} GSpawnFlags;
|
||||
|
||||
GQuark g_spawn_error_quark (void);
|
60
plat/win32/gtk-win/jhbuildrc/patches/glib-2.30.patch
Normal file
60
plat/win32/gtk-win/jhbuildrc/patches/glib-2.30.patch
Normal file
@ -0,0 +1,60 @@
|
||||
diff -r 2220df6e493a Makefile.in
|
||||
--- a/Makefile.in Sat Nov 26 03:19:36 2011 -0800
|
||||
+++ b/Makefile.in Sat Nov 26 03:24:02 2011 -0800
|
||||
@@ -431,7 +431,7 @@
|
||||
gio-2.0-uninstalled.pc.in gio-unix-2.0-uninstalled.pc.in
|
||||
TEST_PROGS =
|
||||
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
|
||||
-SUBDIRS = . m4macros glib gmodule gthread gobject gio tests po docs
|
||||
+SUBDIRS = . glib gmodule gthread gobject gio po
|
||||
DIST_SUBDIRS = $(SUBDIRS) build
|
||||
bin_SCRIPTS = glib-gettextize
|
||||
AM_CPPFLAGS = \
|
||||
diff -r 2220df6e493a gio/Makefile.in
|
||||
--- a/gio/Makefile.in Sat Nov 26 03:19:36 2011 -0800
|
||||
+++ b/gio/Makefile.in Sat Nov 26 03:24:02 2011 -0800
|
||||
@@ -710,7 +710,7 @@
|
||||
TEST_PROGS =
|
||||
NULL =
|
||||
SUBDIRS = gdbus-2.0/codegen $(am__append_1) $(am__append_3) \
|
||||
- $(am__append_7) $(am__append_10) . $(am__append_13) tests
|
||||
+ $(am__append_7) $(am__append_10) . $(am__append_13)
|
||||
@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@noinst_DATA = gio-2.0.lib
|
||||
@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
|
||||
@MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
|
||||
diff -r 2220df6e493a glib/Makefile.in
|
||||
--- a/glib/Makefile.in Sat Nov 26 03:19:36 2011 -0800
|
||||
+++ b/glib/Makefile.in Sat Nov 26 03:24:02 2011 -0800
|
||||
@@ -553,7 +553,7 @@
|
||||
@ENABLE_REGEX_TRUE@gregex_c = gregex.c
|
||||
@ENABLE_REGEX_FALSE@gregex_h =
|
||||
@ENABLE_REGEX_TRUE@gregex_h = gregex.h
|
||||
-SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests
|
||||
+SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre .
|
||||
DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests
|
||||
AM_CPPFLAGS = \
|
||||
$(glib_INCLUDES) \
|
||||
diff -r 2220df6e493a gobject/Makefile.in
|
||||
--- a/gobject/Makefile.in Sat Nov 26 03:19:36 2011 -0800
|
||||
+++ b/gobject/Makefile.in Sat Nov 26 03:24:02 2011 -0800
|
||||
@@ -458,7 +458,7 @@
|
||||
# GObject - GLib Type, Object, Parameter and Signal Library
|
||||
# Copyright (C) 1997,98,99,2000 Tim Janik and Red Hat, Inc.
|
||||
#
|
||||
-SUBDIRS = . tests
|
||||
+SUBDIRS = .
|
||||
BUILT_SOURCES = $(am__append_1)
|
||||
CLEANFILES = $(am__append_2) gobject-public-headers.txt $(gen_sources)
|
||||
@HAVE_THREADS_TRUE@THREAD_FLAGS = -DG_THREADS_MANDATORY
|
||||
diff -r 2220df6e493a gthread/Makefile.in
|
||||
--- a/gthread/Makefile.in Sat Nov 26 03:19:36 2011 -0800
|
||||
+++ b/gthread/Makefile.in Sat Nov 26 03:24:02 2011 -0800
|
||||
@@ -406,7 +406,7 @@
|
||||
EXTRA_DIST = makefile.msc.in gthread-posix.c gthread-win32.c \
|
||||
gthread-none.c gthread.def gthread.rc.in
|
||||
TEST_PROGS =
|
||||
-SUBDIRS = . tests
|
||||
+SUBDIRS = .
|
||||
DIST_SUBDIRS = tests
|
||||
AM_CPPFLAGS = \
|
||||
$(glib_INCLUDES) \
|
75
plat/win32/gtk-win/jhbuildrc/patches/gtk-2.24.patch
Normal file
75
plat/win32/gtk-win/jhbuildrc/patches/gtk-2.24.patch
Normal file
@ -0,0 +1,75 @@
|
||||
diff -r 959ff2e88f4a Makefile.in
|
||||
--- a/Makefile.in Sat Nov 26 03:37:47 2011 -0800
|
||||
+++ b/Makefile.in Sat Nov 26 03:40:41 2011 -0800
|
||||
@@ -457,8 +457,8 @@
|
||||
|| { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \
|
||||
&& DISPLAY=:$$XID && export DISPLAY
|
||||
|
||||
-SRC_SUBDIRS = gdk gtk modules demos tests perf
|
||||
-SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
||||
+SRC_SUBDIRS = gdk gtk modules
|
||||
+SUBDIRS = po po-properties $(SRC_SUBDIRS) m4macros build
|
||||
|
||||
# require automake 1.4
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
diff -r 959ff2e88f4a gdk/Makefile.in
|
||||
--- a/gdk/Makefile.in Sat Nov 26 03:37:47 2011 -0800
|
||||
+++ b/gdk/Makefile.in Sat Nov 26 03:40:41 2011 -0800
|
||||
@@ -516,7 +516,7 @@
|
||||
--includedir=$(srcdir) \
|
||||
--includedir=.
|
||||
|
||||
-SUBDIRS = $(gdktarget) . tests
|
||||
+SUBDIRS = $(gdktarget) .
|
||||
DIST_SUBDIRS = win32 x11 quartz directfb tests
|
||||
CLEANFILES = $(am__append_4)
|
||||
INCLUDES = \
|
||||
diff -r 959ff2e88f4a gdk/win32/gdkwindow-win32.c
|
||||
--- a/gdk/win32/gdkwindow-win32.c Sat Nov 26 03:37:47 2011 -0800
|
||||
+++ b/gdk/win32/gdkwindow-win32.c Sat Nov 26 03:40:41 2011 -0800
|
||||
@@ -1260,7 +1260,7 @@
|
||||
{
|
||||
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNOACTIVATE);
|
||||
}
|
||||
- else
|
||||
+ else if (!IsWindowVisible (GDK_WINDOW_HWND (window)))
|
||||
{
|
||||
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
|
||||
}
|
||||
@@ -3695,6 +3695,8 @@
|
||||
gdk_window_focus (GdkWindow *window,
|
||||
guint32 timestamp)
|
||||
{
|
||||
+ GdkWindowObject *private = (GdkWindowObject *) window;
|
||||
+
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
@@ -3704,10 +3706,13 @@
|
||||
GDK_WINDOW_HWND (window),
|
||||
_gdk_win32_window_state_to_string (((GdkWindowObject *) window)->state)));
|
||||
|
||||
- if (((GdkWindowObject *) window)->state & GDK_WINDOW_STATE_MAXIMIZED)
|
||||
+ if (private->state & GDK_WINDOW_STATE_MAXIMIZED)
|
||||
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWMAXIMIZED);
|
||||
- else
|
||||
+ else if (private->state & GDK_WINDOW_STATE_ICONIFIED)
|
||||
+ ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
|
||||
+ else if (!IsWindowVisible (GDK_WINDOW_HWND (window)))
|
||||
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
|
||||
+
|
||||
SetFocus (GDK_WINDOW_HWND (window));
|
||||
}
|
||||
|
||||
diff -r 959ff2e88f4a gtk/Makefile.in
|
||||
--- a/gtk/Makefile.in Sat Nov 26 03:37:47 2011 -0800
|
||||
+++ b/gtk/Makefile.in Sat Nov 26 03:40:41 2011 -0800
|
||||
@@ -1230,7 +1230,7 @@
|
||||
|
||||
@USE_QUARTZ_FALSE@GTK_PRINT_PREVIEW_COMMAND = "evince --unlink-tempfile --preview --print-settings %s %f"
|
||||
@USE_QUARTZ_TRUE@GTK_PRINT_PREVIEW_COMMAND = "open -a /Applications/Preview.app %f"
|
||||
-SUBDIRS = theme-bits . tests
|
||||
+SUBDIRS = theme-bits .
|
||||
DIST_SUBDIRS = theme-bits tests
|
||||
@HAVE_CUPS_FALSE@@HAVE_PAPI_CUPS_FALSE@@HAVE_PAPI_FALSE@GTK_PRINT_BACKENDS = file,lpr
|
||||
@HAVE_CUPS_FALSE@@HAVE_PAPI_CUPS_FALSE@@HAVE_PAPI_TRUE@GTK_PRINT_BACKENDS = file,papi
|
Loading…
x
Reference in New Issue
Block a user