[gdk-pixbuf] MSVC 2010+ Projects: Update "Installation" Process



commit 07fa3ac7737e39976a23384244199b57d5479b56
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jun 9 11:24:29 2014 +0800

    MSVC 2010+ Projects: Update "Installation" Process
    
    Currently, due to the way that Visual Studio 2010+ projects are handled,
    the "install" project does not re-build upon changes to the sources, as it
    does not believe that its dependencies have changed, although the changed
    sources are automatically recompiled.  This means that if a part or more
    of the solution does not build, or if the sources need some other fixes
    or enhancements, the up-to-date build is not copied automatically, which
    can be misleading.
    
    Improve on the situation by forcing the "install" project to trigger its
    rebuild, so that the updated binaries can be copied.  This does trigger an
    MSBuild warning, but having that warning is way better than not having an
    up-to-date build, especially during testing and development.

 build/win32/vs10/gdk-pixbuf-install.props |   18 +++++++++++++++---
 build/win32/vs10/install.vcxproj          |   28 ++++++++++++++++------------
 2 files changed, 31 insertions(+), 15 deletions(-)
---
diff --git a/build/win32/vs10/gdk-pixbuf-install.props b/build/win32/vs10/gdk-pixbuf-install.props
index c39e08b..54bddda 100644
--- a/build/win32/vs10/gdk-pixbuf-install.props
+++ b/build/win32/vs10/gdk-pixbuf-install.props
@@ -4,19 +4,22 @@
     <Import Project="gdk-pixbuf-build-defines.props" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros">
+    <BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
+    <InstalledDlls>$(BinDir)\$(GdkPixbufDllPrefix)gdk_pixbuf(GdkPixbufDllSuffix).dll</InstalledDlls>
+    
<InstalledBins>$(BinDir)\gdk-pixbuf-csource.exe;$(BinDir)\gdk-pixbuf-pixdata.exe;$(BinDir)\gdk-pixbuf-query-loaders.exe</InstalledBins>
     <GdkPixbufDoInstall>
 echo on
 
 mkdir $(CopyDir)\bin
 
-copy $(Configuration)\$(Platform)\bin\*.dll $(CopyDir)\bin
+copy $(BinDir)\*.dll $(CopyDir)\bin
 
-copy $(Configuration)\$(Platform)\bin\*.exe $(CopyDir)\bin
+copy $(BinDir)\*.exe $(CopyDir)\bin
 
 
 mkdir $(CopyDir)\lib
 
-copy $(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(CopyDir)\lib
+copy $(BinDir)\*-$(ApiVersion).lib $(CopyDir)\lib
 
 
 mkdir $(CopyDir)\include\gdk-pixbuf-$(ApiVersion)\gdk-pixbuf
@@ -48,6 +51,15 @@ copy ..\..\..\gdk-pixbuf\gdk-pixdata.h $(CopyDir)\include\gdk-pixbuf-$(ApiVersio
     <_PropertySheetDisplayName>gdk-pixbufinstallprops</_PropertySheetDisplayName>
   </PropertyGroup>
   <ItemGroup>
+    <BuildMacro Include="BinDir">
+      <Value>$(BinDir)</Value>
+    </BuildMacro>
+    <BuildMacro Include="InstalledDlls">
+      <Value>$(InstalledDlls)</Value>
+    </BuildMacro>
+    <BuildMacro Include="InstalledBins">
+      <Value>$(InstalledBins)</Value>
+    </BuildMacro>
     <BuildMacro Include="GdkPixbufDoInstall">
       <Value>$(GdkPixbufDoInstall)</Value>
     </BuildMacro>
diff --git a/build/win32/vs10/install.vcxproj b/build/win32/vs10/install.vcxproj
index d908597..bf64dbd 100644
--- a/build/win32/vs10/install.vcxproj
+++ b/build/win32/vs10/install.vcxproj
@@ -77,26 +77,30 @@
     <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <PostBuildEvent>
-      <Command>$(GdkPixbufDoInstall)</Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <PostBuildEvent>
-      <Command>$(GdkPixbufDoInstall)</Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <PostBuildEvent>
-      <Command>$(GdkPixbufDoInstall)</Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <PostBuildEvent>
-      <Command>$(GdkPixbufDoInstall)</Command>
-    </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemGroup>
+    <CustomBuild Include="..\..\..\config.h.win32">
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Installing Build 
Results...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GdkPixbufDoInstall)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Installing Build Results...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GdkPixbufDoInstall)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Installing Build 
Results...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GdkPixbufDoInstall)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Installing Build 
Results...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GdkPixbufDoInstall)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
     <ProjectReference Include="gdk-pixbuf-csource.vcxproj">
       <Project>{3689c772-49a9-4e32-8161-686e1381adb4}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>


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