diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-08-07 23:02:13 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-08-07 23:02:13 +0800 |
commit | 37321f6fb82ab21a21f4c14ce76df24b059bdc54 (patch) | |
tree | d50db8c2109e1745f0a4569ceb0e8b6c05dc29e9 /build | |
parent | a13761ceb460347ea89ddd2963041ad6134cfb64 (diff) | |
download | gtk+-37321f6fb82ab21a21f4c14ce76df24b059bdc54.tar.gz |
MSVC Builds: Apply Visual Style for Win32 Print Dialog
Define ISOLATION_AWARE_ENABLED for the build of the GTK DLL so that visual
style can be applied to the Windows print dialog for all applications using
gtkprintoperation.
Update the script for the generation of gtk-win32.rc for MSVC to not try to
embed the manifest from it (but embed libgtk3.manifest by including it in
the project files, as we are now doing), and embedding the manifest file is
really not supported in MSVC 2010 and later.
Also fix up formatting in the GTK DLL projects.
https://bugzilla.gnome.org/show_bug.cgi?id=733773
Diffstat (limited to 'build')
-rw-r--r-- | build/win32/process-in-win32.py | 12 | ||||
-rw-r--r-- | build/win32/vs10/gtk-build-defines.props | 4 | ||||
-rw-r--r-- | build/win32/vs10/gtk.vcxprojin | 14 | ||||
-rw-r--r-- | build/win32/vs9/gtk-build-defines.vsprops | 4 | ||||
-rw-r--r-- | build/win32/vs9/gtk.vcprojin | 2 |
5 files changed, 23 insertions, 13 deletions
diff --git a/build/win32/process-in-win32.py b/build/win32/process-in-win32.py index ca5c80ad48..86be09a587 100644 --- a/build/win32/process-in-win32.py +++ b/build/win32/process-in-win32.py @@ -79,9 +79,19 @@ def main(argv): ver = get_version(srcroot) + target = os.path.join(srcroot, 'gtk', 'gtk-win32.rc') process_in(os.path.join(srcroot, 'gtk', 'gtk-win32.rc.in'), - os.path.join(srcroot, 'gtk', 'gtk-win32.rc'), + target + '.intermediate', ver) + fp_r = open_compat(target + '.intermediate', 'r') + lines = fp_r.readlines() + fp_r.close() + fp_w = open_compat(target, 'w') + fp_w.writelines([item for item in lines[:-1]]) + + fp_w.close() + os.unlink(target + '.intermediate') + no_args = False if args.gtk3manifest is not None: diff --git a/build/win32/vs10/gtk-build-defines.props b/build/win32/vs10/gtk-build-defines.props index c79f19b26c..6bc67ec2d6 100644 --- a/build/win32/vs10/gtk-build-defines.props +++ b/build/win32/vs10/gtk-build-defines.props @@ -9,7 +9,7 @@ <GtkPrefixDefine>GTK_PREFIX=\"$(GtkDummyPrefix)\"</GtkPrefixDefine> <GdkDefines>GDK_COMPILATION;G_LOG_DOMAIN="Gdk"</GdkDefines> <GtkIncludedImmodulesDefines>INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr</GtkIncludedImmodulesDefines> - <GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_PREVIEW_COMMAND="undefined-gtk-print-preview-command";$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED</GtkDefines> + <GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_PREVIEW_COMMAND="undefined-gtk-print-preview-command";$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED</GtkDefines> </PropertyGroup> <PropertyGroup> <_PropertySheetDisplayName>gtkbuilddefinesprops</_PropertySheetDisplayName> @@ -47,4 +47,4 @@ <Value>$(GtkDefines)</Value> </BuildMacro> </ItemGroup> -</Project>
\ No newline at end of file +</Project> diff --git a/build/win32/vs10/gtk.vcxprojin b/build/win32/vs10/gtk.vcxprojin index dd4213b4d7..c90d603112 100644 --- a/build/win32/vs10/gtk.vcxprojin +++ b/build/win32/vs10/gtk.vcxprojin @@ -176,16 +176,16 @@ <CustomBuild Include="..\..\..\gtk\gtk-win32.rc.in"> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ Win32 Version Resource...</Message> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkWin32RC)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ Win32 Version Resource...</Message> <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkWin32RC)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs> <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ Win32 Version Resource...</Message> <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkWin32RC)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs> <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ Win32 Version Resource...</Message> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkWin32RC)</Command> - <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs> + <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs> </CustomBuild> </ItemGroup> <ItemGroup> @@ -210,6 +210,9 @@ <ClCompile Include="..\..\..\modules\input\thai-charprop.c" /> </ItemGroup> <ItemGroup> + <Manifest Include="..\..\..\gtk\libgtk3.manifest" /> + </ItemGroup> + <ItemGroup> <ProjectReference Include="gdk.vcxproj"> <Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> @@ -219,9 +222,6 @@ <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> </ItemGroup> - <ItemGroup> - <Manifest Include="..\..\..\gtk\libgtk3.manifest" /> - </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> diff --git a/build/win32/vs9/gtk-build-defines.vsprops b/build/win32/vs9/gtk-build-defines.vsprops index 40214a61d7..733474de4c 100644 --- a/build/win32/vs9/gtk-build-defines.vsprops +++ b/build/win32/vs9/gtk-build-defines.vsprops @@ -40,6 +40,6 @@ /> <UserMacro Name="GtkDefines" - Value="GTK_COMPILATION;G_LOG_DOMAIN=\"Gtk\";GTK_HOST=\"i686-pc-vs$(VSVer)\";GTK_PRINT_BACKENDS=\"file\";GTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\";$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\"$(GtkDummyPrefix)/lib\";GTK_DATADIR=\"$(GtkDummyPrefix)/share\"GTK_DATA_PREFIX=\"$(GtkDummyPrefix)\";GTK_SYSCONFDIR=\"$(GtkDummyPrefix)/etc\";MULTIPRESS_CONFDIR=\"$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\";MULTIPRESS_LOCALEDIR=\"$(GtkDummyPrefix)/share/locale\";GTK_VERSION=\"$(GtkVersion)/etc\";GTK_BINARY_VERSION=\"$(GtkBinaryVersion)/etc\";GDK_DISABLE_DEPRECATED" + Value="GTK_COMPILATION;G_LOG_DOMAIN=\"Gtk\";GTK_HOST=\"i686-pc-vs$(VSVer)\";GTK_PRINT_BACKENDS=\"file\";GTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\";$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\"$(GtkDummyPrefix)/lib\";GTK_DATADIR=\"$(GtkDummyPrefix)/share\"GTK_DATA_PREFIX=\"$(GtkDummyPrefix)\";GTK_SYSCONFDIR=\"$(GtkDummyPrefix)/etc\";MULTIPRESS_CONFDIR=\"$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\";MULTIPRESS_LOCALEDIR=\"$(GtkDummyPrefix)/share/locale\";GTK_VERSION=\"$(GtkVersion)/etc\";GTK_BINARY_VERSION=\"$(GtkBinaryVersion)/etc\";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED" /> -</VisualStudioPropertySheet>
\ No newline at end of file +</VisualStudioPropertySheet> diff --git a/build/win32/vs9/gtk.vcprojin b/build/win32/vs9/gtk.vcprojin index 5e574a22e5..3aa923f578 100644 --- a/build/win32/vs9/gtk.vcprojin +++ b/build/win32/vs9/gtk.vcprojin @@ -223,7 +223,7 @@ </FileConfiguration> </File> <File RelativePath="..\..\..\gtk\gtk-win32.rc" /> - <File RelativePath="..\..\..\gtk\libgtk3.manifest"/> + <File RelativePath="..\..\..\gtk\libgtk3.manifest" /> </Filter> <Filter Name="Source Files" |