From: Chun-wei Fan Date: Mon, 28 Aug 2017 08:18:24 +0000 (+0800) Subject: build: Integrate introspection builds into MSVC projects X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~302 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=09b7dc81a67f0dd3750c5c892730d48b360c266e;p=gtk%2B3.0.git build: Integrate introspection builds into MSVC projects This is so that it is easier for one building GTK+ with Visual Studio to build the introspection files as well in one shot. Note that this is not built by default, so one needs to select the gtk3-introspect explicitly to build (and clean up) the introspection files. For this to work, one needs to ensure the following: -A complete build of GObject-Introspection in $(GlibEtcInstallRoot), that is built with the same installation of the Python interpretor that is used here (see PythonDir and PythonDirX64 in gtk3-version-paths.[vsprops|props]). -Introspection files for ATK, GDK-Pixbuf and Pango, also in their proper locations under $(GlibEtcInstallRoot), which should be built with the same G-I installation. --- diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am index cb2b2c9e11..f0ff2756f9 100644 --- a/build/win32/vs10/Makefile.am +++ b/build/win32/vs10/Makefile.am @@ -62,6 +62,7 @@ EXTRA_DIST += \ gailutil-3.vcxproj.filtersin \ gtk3-install.vcxproj \ gtk3-install.vcxproj.filters \ + gtk3-introspect.vcxproj \ gtk3-build-defines.props \ gtk3-copy-gdk-broadway.props \ gtk3-gen-srcs.props \ diff --git a/build/win32/vs10/README.txt b/build/win32/vs10/README.txt index 13ae0e3c5b..ef9c39c34f 100644 --- a/build/win32/vs10/README.txt +++ b/build/win32/vs10/README.txt @@ -81,6 +81,21 @@ built DLLs go into \vs10\\bin, built LIBs into project files higher in the stack are supposed to look for them, not from a specific GLib source tree. +There is now a "gtk3-introspect" project that is used to build the +introspection files. In order for this to work, check that the paths for +PythonDir (32-bit builds) and PythonDirX64 (x64 builds) are correct for your +system. Note that it must be the same Python installation that was used to +build GObject-Introspection (G-I), and a complete G-I build/installation +needs to be found in \vs10\\, with the introspection files +for ATK, Pango and GDK-Pixbuf. Note also that this is not built by default, +so you will need to right-click on the project to build it, which will build +and "install" the other projects that are normally built, if those were not yet +built. The introspection files that are built will be "installed" to +\vs10\\share\gir-1.0 (the .gir file(s)) and +\vs10\\lib\girepository-1.0 (the .typelib files(s)) upon +successful build. for building this in a different configuration, therefore, +you will need to clean this project specifically and then rebuild. + Please note, as GTK+ uses the Adwaita theme for all platforms by default, most icons used are not included with GTK+ (which *are* needed), so please see https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack (under the diff --git a/build/win32/vs10/gtk+.sln b/build/win32/vs10/gtk+.sln index 1e9a52e035..841f7233bb 100644 --- a/build/win32/vs10/gtk+.sln +++ b/build/win32/vs10/gtk+.sln @@ -30,6 +30,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-query-settings", "gtk-q EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-install.vcxproj", "{23BBF35F-78AF-4E8C-983F-7B90448CD7DF}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-introspect", "gtk3-introspect.vcxproj", "{A8092C4E-0A21-4B1D-AC82-16764E418D1F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -274,6 +276,14 @@ Global {9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|Win32.Build.0 = Release|Win32 {9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.ActiveCfg = Release|x64 {9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.Build.0 = Release|x64 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|x64.ActiveCfg = Debug|x64 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|Win32.ActiveCfg = Release|Win32 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|x64.ActiveCfg = Release|x64 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|x64.ActiveCfg = Debug|x64 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|Win32.ActiveCfg = Release|Win32 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|x64.ActiveCfg = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/win32/vs10/gtk3-build-defines.props b/build/win32/vs10/gtk3-build-defines.props index d695642cb4..091bb5589b 100644 --- a/build/win32/vs10/gtk3-build-defines.props +++ b/build/win32/vs10/gtk3-build-defines.props @@ -13,7 +13,11 @@ imm32.lib winmm.lib;dwmapi.lib;setupapi.lib;$(GtkGdkCommonLibs) ws2_32.lib - atk-1.0.lib;pangowin32-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs) + atk-1.0.lib;pango-1.0.lib;pangowin32-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs) + cd .. +set VCInstallDir=$(VCInstallDir) +nmake -f gtk-introspection-msvc.mak CFG=$(Configuration) PREFIX=$(GlibEtcInstallRoot) + $(SolutionDir)\..\Gtk-3.0.gir;$(SolutionDir)\..\Gtk-3.0.typelib <_PropertySheetDisplayName>gtk3builddefinesprops @@ -64,5 +68,11 @@ $(GtkAdditionalLibs) + + $(GtkIntrospectNMakeCmd) + + + $(GtkIntrospectBuiltFiles) + diff --git a/build/win32/vs10/gtk3-introspect.vcxproj b/build/win32/vs10/gtk3-introspect.vcxproj new file mode 100644 index 0000000000..b02b33cde3 --- /dev/null +++ b/build/win32/vs10/gtk3-introspect.vcxproj @@ -0,0 +1,103 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {A8092C4E-0A21-4B1D-AC82-16764E418D1F} + gtk3introspect + + + + Makefile + true + MultiByte + v100 + + + Makefile + false + true + MultiByte + v100 + + + Makefile + MultiByte + v100 + + + Makefile + MultiByte + true + v100 + + + + + + + + + + + + + + + + + + + + + + + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean + $(GtkIntrospectBuiltFiles) + + + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean + $(GtkIntrospectBuiltFiles) + + + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean + $(GtkIntrospectBuiltFiles) + + + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection + $(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean + $(GtkIntrospectBuiltFiles) + + + + {23bbf35f-78af-4e8c-983f-7b90448cd7df} + false + + + + + + \ No newline at end of file diff --git a/build/win32/vs10/gtk3-version-paths.props.in b/build/win32/vs10/gtk3-version-paths.props.in index b5f7a098e9..fe306c4682 100644 --- a/build/win32/vs10/gtk3-version-paths.props.in +++ b/build/win32/vs10/gtk3-version-paths.props.in @@ -18,6 +18,8 @@ c:\python36 c:\python36 $(PythonDir).x64 + PYTHON=$(PythonDir)\python.exe + PYTHON=$(PythonDirX64)\python.exe <_PropertySheetDisplayName>gtk3versionpathsprops @@ -62,5 +64,11 @@ $(PythonDirX64) + + $(IntrospectPythonParam) + + + $(IntrospectPythonParamX64) + diff --git a/build/win32/vs11/Makefile.am b/build/win32/vs11/Makefile.am index 3ced683539..d81e885371 100644 --- a/build/win32/vs11/Makefile.am +++ b/build/win32/vs11/Makefile.am @@ -29,6 +29,7 @@ EXTRA_DIST += \ gailutil-3.vcxproj.filters \ gtk3-install.vcxproj \ gtk3-install.vcxproj.filters \ + gtk3-introspect.vcxproj \ broadwayd.vcxproj \ broadwayd.vcxproj.filters \ gdk3-broadway.vcxproj \ diff --git a/build/win32/vs12/Makefile.am b/build/win32/vs12/Makefile.am index 766ccd69f5..057aa5ff65 100644 --- a/build/win32/vs12/Makefile.am +++ b/build/win32/vs12/Makefile.am @@ -29,6 +29,7 @@ EXTRA_DIST += \ gailutil-3.vcxproj.filters \ gtk3-install.vcxproj \ gtk3-install.vcxproj.filters \ + gtk3-introspect.vcxproj \ broadwayd.vcxproj \ broadwayd.vcxproj.filters \ gdk3-broadway.vcxproj \ diff --git a/build/win32/vs14/Makefile.am b/build/win32/vs14/Makefile.am index dfa6c328e2..67922fe7ac 100644 --- a/build/win32/vs14/Makefile.am +++ b/build/win32/vs14/Makefile.am @@ -29,6 +29,7 @@ EXTRA_DIST += \ gailutil-3.vcxproj.filters \ gtk3-install.vcxproj \ gtk3-install.vcxproj.filters \ + gtk3-introspect.vcxproj \ broadwayd.vcxproj \ broadwayd.vcxproj.filters \ gdk3-broadway.vcxproj \ diff --git a/build/win32/vs15/Makefile.am b/build/win32/vs15/Makefile.am index 6f62580230..9164736cf5 100644 --- a/build/win32/vs15/Makefile.am +++ b/build/win32/vs15/Makefile.am @@ -29,6 +29,7 @@ EXTRA_DIST += \ gailutil-3.vcxproj.filters \ gtk3-install.vcxproj \ gtk3-install.vcxproj.filters \ + gtk3-introspect.vcxproj \ broadwayd.vcxproj \ broadwayd.vcxproj.filters \ gdk3-broadway.vcxproj \ diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am index 4e31db7b9f..39637f3a6d 100644 --- a/build/win32/vs9/Makefile.am +++ b/build/win32/vs9/Makefile.am @@ -36,6 +36,7 @@ EXTRA_DIST += \ gtk3-icon-browser.vcprojin \ gailutil-3.vcprojin \ gtk3-install.vcproj \ + gtk3-introspect.vcproj \ broadwayd.vcprojin \ gdk3-broadway.vcprojin \ gtk3-build-defines.vsprops \ diff --git a/build/win32/vs9/README.txt b/build/win32/vs9/README.txt index 7f83daaeea..f0b876cc7b 100644 --- a/build/win32/vs9/README.txt +++ b/build/win32/vs9/README.txt @@ -80,6 +80,21 @@ built DLLs go into \vs9\\bin, built LIBs into project files higher in the stack are supposed to look for them, not from a specific GLib source tree. +There is now a "gtk3-introspect" project that is used to build the +introspection files. In order for this to work, check that the paths for +PythonDir (32-bit builds) and PythonDirX64 (x64 builds) are correct for your +system. Note that it must be the same Python installation that was used to +build GObject-Introspection (G-I), and a complete G-I build/installation +needs to be found in \vs9\\, with the introspection files +for ATK, Pango and GDK-Pixbuf. Note also that this is not built by default, +so you will need to right-click on the project to build it, which will build +and "install" the other projects that are normally built, if those were not yet +built. The introspection files that are built will be "installed" to +\vs9\\share\gir-1.0 (the .gir file(s)) and +\vs9\\lib\girepository-1.0 (the .typelib files(s)) upon +successful build. for building this in a different configuration, therefore, +you will need to clean this project specifically and then rebuild. + Please note, as GTK+ uses the Adwaita theme for all platforms by default, most icons used are not included with GTK+ (which *are* needed), so please see https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack (under the diff --git a/build/win32/vs9/gtk+.sln b/build/win32/vs9/gtk+.sln index be494e2acb..2ec6217334 100644 --- a/build/win32/vs9/gtk+.sln +++ b/build/win32/vs9/gtk+.sln @@ -89,6 +89,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-instal {9F22107A-3EF7-4B52-B269-747B65307F36} = {9F22107A-3EF7-4B52-B269-747B65307F36} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-introspect", "gtk3-introspect.vcproj", "{A8092C4E-0A21-4B1D-AC82-16764E418D1F}" + ProjectSection(ProjectDependencies) = postProject + {23BBF35F-78AF-4E8C-983F-7B90448CD7DF} = {23BBF35F-78AF-4E8C-983F-7B90448CD7DF} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -325,6 +330,14 @@ Global {9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|Win32.Build.0 = Release|Win32 {9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.ActiveCfg = Release|x64 {9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.Build.0 = Release|x64 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|x64.ActiveCfg = Debug|x64 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|Win32.ActiveCfg = Release|Win32 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|x64.ActiveCfg = Release|x64 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|x64.ActiveCfg = Debug|x64 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|Win32.ActiveCfg = Release|Win32 + {A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|x64.ActiveCfg = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/win32/vs9/gtk3-build-defines.vsprops b/build/win32/vs9/gtk3-build-defines.vsprops index 4bade71526..ab77577ebf 100644 --- a/build/win32/vs9/gtk3-build-defines.vsprops +++ b/build/win32/vs9/gtk3-build-defines.vsprops @@ -59,4 +59,12 @@ Name="GtkAdditionalLibs" Value="atk-1.0.lib pangowin32-1.0.lib winspool.lib comctl32.lib $(GtkGdkCommonLibs)" /> + + diff --git a/build/win32/vs9/gtk3-introspect.vcproj b/build/win32/vs9/gtk3-introspect.vcproj new file mode 100644 index 0000000000..91e1b1d62c --- /dev/null +++ b/build/win32/vs9/gtk3-introspect.vcproj @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/win32/vs9/gtk3-version-paths.vsprops.in b/build/win32/vs9/gtk3-version-paths.vsprops.in index 90b03bef3a..3024bb2cfd 100644 --- a/build/win32/vs9/gtk3-version-paths.vsprops.in +++ b/build/win32/vs9/gtk3-version-paths.vsprops.in @@ -58,4 +58,12 @@ Name="PythonDirX64" Value="$(PythonDir).x64" /> + +