diff --git a/configure.ac b/configure.ac index d3c93f5f3..389304ee0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -AC_INIT(gtk-sharp, 3.20.6) +AC_INIT(gtk-sharp, 3.22.1) AM_INIT_AUTOMAKE([1.10 no-dist-gzip dist-bzip2 tar-ustar foreign]) AC_CANONICAL_HOST diff --git a/sources/Generating-Sources.md b/sources/Generating-Sources.md new file mode 100644 index 000000000..708a1972d --- /dev/null +++ b/sources/Generating-Sources.md @@ -0,0 +1,112 @@ +# Generating Sources + +## Overview + +This is a quick overview of some of the commands to run when updating the sources for a new gtk version + +### Linux + +You may need to install the following package for generating the source under Linux +``` +sudo apt-get install libxml-libxml-perl +``` + +### Windows + +So far I've only managed to get this working in ubuntu, not Windows due to the way the .net app launches the perl script via libc +i.e. [DllImport ("libc")] + +It looks like we need to use the 32bit version of MinGW if we do try it this way. +The following path statements are needed in the console at the very least +``` +PATH=$PATH:/c/Program\ Files\ \(x86\)/Microsoft\ SDKs/Windows/v10.0A/bin/NETFX\ 4.6\ Tools/ +PATH=$PATH:/c/Windows/Microsoft.NET/Framework/v4.0.30319/ +``` + +Also the parser can be rebuilt via +``` +./autogen.sh --prefix=/tmp/install +cd parser +make clean +make +``` + +Also it's important to make sure MSYS2 is uptodate with +``` +pacman -Syuu +``` + +To search for a package that's been install (to see what version it is for example) +``` +pacman -Ss gtk3 +``` + + +## Editing Files for Downloaded Source + +### Configure.ac version number + +First change the version number in configure.ac to match that of the gtk version we're moving to +``` +AC_INIT(gtk-sharp, 3.22.1) +``` + +### Sources/Makefile.am + +Next change the version number in sources/Makefile.am to match +``` +TARGET_GTK_VERSION=3.22.1 +TARGET_GTK_API=3.22 +``` + +Next update the orher url's in Makefile.am, the version numbers should match those in use on the system (such as MSYS2) +``` +GTK_DOWNLOADS = \ + http://ftp.gnome.org/pub/GNOME/sources/glib/2.50/glib-2.50.0.tar.xz \ + http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-1.40.3.tar.xz \ + http://ftp.gnome.org/pub/GNOME/sources/atk/2.22/atk-2.22.0.tar.xz \ + http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.36/gdk-pixbuf-2.36.0.tar.xz \ + http://ftp.gnome.org/pub/GNOME/sources/gtk+/$(TARGET_GTK_API)/gtk+-$(TARGET_GTK_VERSION).tar.xz +``` + +### Patches + +As part of the source code download, some of the files will be patched +so you need to look at and check that all the patches apply correctly to the downloaded source when running make get-source-code + + +## Download the sources + +Next we're going to download the source +``` +./autogen.sh --prefix=/tmp/install +cd sources +make get-source-code +``` + +At this stage the sources should now be extracted within the sources sub directory + +### Update sources.xml + +One last file to update is the sources/sources.xml file +all directories in this file need to match the extracted directories + +## Generate the API Code + +### Generate the XML Files + +Next to generate the xml files needed for the generation of code +``` +make api +``` + +This should result in the following files + + * gdk/gdk-api.raw + * gio/gio-api.raw + * gtk/gtk-api.raw + * pango/pango-api.raw + +### Generate the API Code from the XML Files + +TODO we need to use generator/gapi_codegen.exe on each of the xml files to generate the .cs code within the generated sub directories diff --git a/sources/Makefile.am b/sources/Makefile.am index 2b9e8bd63..54a189d95 100644 --- a/sources/Makefile.am +++ b/sources/Makefile.am @@ -3,14 +3,14 @@ EXTRA_DIST = \ sources.xml \ gtk_tree_model_signal_fix.patch -TARGET_GTK_VERSION=3.20.6 -TARGET_GTK_API=3.20 +TARGET_GTK_VERSION=3.22.1 +TARGET_GTK_API=3.22 GTK_DOWNLOADS = \ - http://ftp.gnome.org/pub/GNOME/sources/glib/2.48/glib-2.48.0.tar.xz \ - http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-1.40.1.tar.xz \ - http://ftp.gnome.org/pub/GNOME/sources/atk/2.20/atk-2.20.0.tar.xz \ - http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.34/gdk-pixbuf-2.34.0.tar.xz \ + http://ftp.gnome.org/pub/GNOME/sources/glib/2.50/glib-2.50.0.tar.xz \ + http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-1.40.3.tar.xz \ + http://ftp.gnome.org/pub/GNOME/sources/atk/2.22/atk-2.22.0.tar.xz \ + http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.36/gdk-pixbuf-2.36.0.tar.xz \ http://ftp.gnome.org/pub/GNOME/sources/gtk+/$(TARGET_GTK_API)/gtk+-$(TARGET_GTK_VERSION).tar.xz api: @@ -21,9 +21,8 @@ get-source-code: wget $$i --output-document=- | tar -xJ ; \ done; ln -f -s gtkfilechooserprivate.h gtk+-$(TARGET_GTK_VERSION)/gtk/gtkfilechooserpriv.h - patch -p0 gtk+-$(TARGET_GTK_VERSION)/gtk/gtktreemodel.c < gtk_tree_model_signal_fix.patch + patch -p1 -d gtk+-$(TARGET_GTK_VERSION) < patches/gtk_tree_model_signal_fix.patch echo "typedef struct _GtkClipboard GtkClipboard;" >> gtk+-$(TARGET_GTK_VERSION)/gtk/gtkclipboard.h echo "typedef struct _GtkClipboardClass GtkClipboardClass;" >> gtk+-$(TARGET_GTK_VERSION)/gtk/gtkclipboard.h - patch -p0 gtk+-$(TARGET_GTK_VERSION)/gtk/gtktextattributes.h < gtktextattributes-gi-scanner.patch - patch -p0 glib-2.48.0/gio/gwin32registrykey.h < gwin32registrykey-little-endian.patch - + patch -p0 gtk+-$(TARGET_GTK_VERSION)/gtk/gtktextattributes.h < patches/gtktextattributes-gi-scanner.patch + patch -p0 glib-2.50.0/gio/gwin32registrykey.h < patches/gwin32registrykey-little-endian.patch diff --git a/sources/gtk_tree_model_signal_fix.patch b/sources/patches/gtk_tree_model_signal_fix.patch similarity index 80% rename from sources/gtk_tree_model_signal_fix.patch rename to sources/patches/gtk_tree_model_signal_fix.patch index be9c74eee..31ec6a014 100644 --- a/sources/gtk_tree_model_signal_fix.patch +++ b/sources/patches/gtk_tree_model_signal_fix.patch @@ -1,6 +1,7 @@ ---- gtk+-2.14.3/gtk/gtktreemodel.c 2009-01-04 11:52:01.000000000 -0600 -+++ gtktreemodel.c 2009-01-04 12:03:58.000000000 -0600 -@@ -193,14 +193,15 @@ +diff -Naur gtk+-3.22.1.orig/gtk/gtktreemodel.c gtk+-3.22.1/gtk/gtktreemodel.c +--- gtk+-3.22.1.orig/gtk/gtktreemodel.c 2016-08-29 18:20:43.000000000 +0100 ++++ gtk+-3.22.1/gtk/gtktreemodel.c 2016-10-17 13:57:41.204889300 +0100 +@@ -395,14 +395,15 @@ closure = g_closure_new_simple (sizeof (GClosure), NULL); g_closure_set_marshal (closure, row_inserted_marshal); tree_model_signals[ROW_INSERTED] = @@ -19,7 +20,7 @@ /** * GtkTreeModel::row-has-child-toggled: -@@ -242,14 +243,14 @@ +@@ -441,14 +442,14 @@ closure = g_closure_new_simple (sizeof (GClosure), NULL); g_closure_set_marshal (closure, row_deleted_marshal); tree_model_signals[ROW_DELETED] = @@ -30,14 +31,14 @@ - closure, + G_STRUCT_OFFSET (GtkTreeModelIface, row_deleted), NULL, NULL, - _gtk_marshal_VOID__BOXED, + NULL, G_TYPE_NONE, 1, - row_deleted_params); + GTK_TYPE_TREE_PATH); /** - * GtkTreeModel::rows-reordered: -@@ -268,14 +269,15 @@ + * GtkTreeModel::rows-reordered: (skip) +@@ -471,14 +472,15 @@ closure = g_closure_new_simple (sizeof (GClosure), NULL); g_closure_set_marshal (closure, rows_reordered_marshal); tree_model_signals[ROWS_REORDERED] = @@ -51,8 +52,8 @@ _gtk_marshal_VOID__BOXED_BOXED_POINTER, G_TYPE_NONE, 3, - rows_reordered_params); -+ GTK_TYPE_TREE_PATH | G_SIGNAL_TYPE_STATIC_SCOPE, -+ GTK_TYPE_TREE_ITER, G_TYPE_POINTER); ++ GTK_TYPE_TREE_PATH | G_SIGNAL_TYPE_STATIC_SCOPE, ++ GTK_TYPE_TREE_ITER, G_TYPE_POINTER); initialized = TRUE; } } diff --git a/sources/gtktextattributes-gi-scanner.patch b/sources/patches/gtktextattributes-gi-scanner.patch similarity index 100% rename from sources/gtktextattributes-gi-scanner.patch rename to sources/patches/gtktextattributes-gi-scanner.patch diff --git a/sources/gwin32registrykey-little-endian.patch b/sources/patches/gwin32registrykey-little-endian.patch similarity index 100% rename from sources/gwin32registrykey-little-endian.patch rename to sources/patches/gwin32registrykey-little-endian.patch diff --git a/sources/sources.xml b/sources/sources.xml index 996b8fc66..a67a511a5 100644 --- a/sources/sources.xml +++ b/sources/sources.xml @@ -2,7 +2,7 @@ - + gasynchelper.h gcontenttypeprivate.h gdelayedsettingsbackend.h @@ -91,14 +91,14 @@ - atk-2.20.0/atk + atk-2.22.0/atk - + pangoatsui.c pangoatsui.h pangoatsui-fontmap.h @@ -140,17 +140,17 @@ - + gdkalias.h gdkwindowimpl.h keyname-table.h - + - + io-gdip-native.h io-gdip-propertytags.h io-gdip-utils.h @@ -165,7 +165,7 @@ - + gtkalias.h gtkappchooseronline.h @@ -263,7 +263,7 @@ gtkcomposetable.c gtkcomposetable.h - +