[gtk+] MSVC Builds: Apply Visual Style for Win32 Print Dialog



commit 37321f6fb82ab21a21f4c14ce76df24b059bdc54
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Aug 7 23:02:13 2014 +0800

    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

 build/win32/process-in-win32.py           |   12 +++++++++++-
 build/win32/vs10/gtk-build-defines.props  |    4 ++--
 build/win32/vs10/gtk.vcxprojin            |   14 +++++++-------
 build/win32/vs9/gtk-build-defines.vsprops |    4 ++--
 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 ca5c80a..86be09a 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 c79f19b..6bc67ec 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 dd4213b..c90d603 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 40214a6..733474d 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=\&quot;Gtk\&quot;;GTK_HOST=\&quot;i686-pc-vs$(VSVer)\&quot;;GTK_PRINT_BACKENDS=\&quot;file\&quot;;GTK_PRINT_PREVIEW_COMMAND=\&quot;undefined-gtk-print-preview-command\&quot;;$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\&quot;$(GtkDummyPrefix)/lib\&quot;;GTK_DATADIR=\&quot;$(GtkDummyPrefix)/share\&quot;GTK_DATA_PREFIX=\&quot;$(GtkDummyPrefix)\&quot;;GTK_SYSCONFDIR=\&quot;$(GtkDummyPrefix)/etc\&quot;;MULTIPRESS_CONFDIR=\&quot;$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\&quot;;MULTIPRESS_LOCALEDIR=\&quot;$(GtkDummyPrefix)/share/locale\&quot;;GTK_VERSION=\&quot;$(GtkVersion)/etc\&quot;;GTK_BINARY_VERSION=\&quot;$(GtkBinaryVersion)/etc\&quot;;GDK_DISABLE_DEPRECATED"
+               
Value="GTK_COMPILATION;G_LOG_DOMAIN=\&quot;Gtk\&quot;;GTK_HOST=\&quot;i686-pc-vs$(VSVer)\&quot;;GTK_PRINT_BACKENDS=\&quot;file\&quot;;GTK_PRINT_PREVIEW_COMMAND=\&quot;undefined-gtk-print-preview-command\&quot;;$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\&quot;$(GtkDummyPrefix)/lib\&quot;;GTK_DATADIR=\&quot;$(GtkDummyPrefix)/share\&quot;GTK_DATA_PREFIX=\&quot;$(GtkDummyPrefix)\&quot;;GTK_SYSCONFDIR=\&quot;$(GtkDummyPrefix)/etc\&quot;;MULTIPRESS_CONFDIR=\&quot;$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\&quot;;MULTIPRESS_LOCALEDIR=\&quot;$(GtkDummyPrefix)/share/locale\&quot;;GTK_VERSION=\&quot;$(GtkVersion)/etc\&quot;;GTK_BINARY_VERSION=\&quot;$(GtkBinaryVersion)/etc\&quot;;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 5e574a2..3aa923f 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"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]