[gtk+/gtk-2-24] MSVC 2010+ Projects: Update "Installation" Process



commit a3d672a415447bc252cb2333bdc0226765f6a198
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jun 9 12:21:23 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/gtk-install.props |   22 +++++++++++++++++-----
 build/win32/vs10/install.vcxproj   |   28 ++++++++++++++++------------
 2 files changed, 33 insertions(+), 17 deletions(-)
---
diff --git a/build/win32/vs10/gtk-install.props b/build/win32/vs10/gtk-install.props
index 30e4a80..766f4fc 100644
--- a/build/win32/vs10/gtk-install.props
+++ b/build/win32/vs10/gtk-install.props
@@ -4,17 +4,20 @@
     <Import Project="gtk-build-defines.props" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros">
+    <BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
+    
<InstalledDlls>$(BinDir)\$(GtkDllPrefix)gdk-win32(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gtk-win32(GtkDllSuffix).dll;$(BinDir)\libwimp.dll</InstalledDlls>
+    <InstalledBins>$(BinDir)\gtk-demo.exe</InstalledBins>
     <GtkDoInstall>
 mkdir $(CopyDir)\bin
 
-copy $(Configuration)\$(Platform)\bin\*-vs$(VSVer).dll $(CopyDir)\bin
+copy $(BinDir)\*-vs$(VSVer).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\gtk-$(ApiVersion)\gdk
@@ -533,11 +536,11 @@ copy ..\..\..\modules\other\gail\libgail-util\gailtextutil.h $(CopyDir)\include\
 copy ..\..\..\modules\other\gail\libgail-util\gail-util.h $(CopyDir)\include\gail-1.0\libgail-util
 
 
-copy $(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(CopyDir)\lib
+copy $(BinDir)\*-$(ApiVersion).lib $(CopyDir)\lib
 
 mkdir $(CopyDir)\lib\gtk-$(ApiVersion)\$(GtkHost)\engines
 
-copy $(Configuration)\$(Platform)\bin\libwimp.dll $(CopyDir)\lib\gtk-$(ApiVersion)\$(GtkHost)\engines
+copy $(BinDir)\libwimp.dll $(CopyDir)\lib\gtk-$(ApiVersion)\$(GtkHost)\engines
 
 
 mkdir $(CopyDir)\share\gtk-$(ApiVersion)\demo
@@ -579,6 +582,15 @@ copy ..\..\..\gtk\gtkrc.default $(CopyDir)\share\themes\Raleigh\gtk-2.0\gtkrc
     <_PropertySheetDisplayName>gtkinstallprops</_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="GtkDoInstall">
       <Value>$(GtkDoInstall)</Value>
     </BuildMacro>
diff --git a/build/win32/vs10/install.vcxproj b/build/win32/vs10/install.vcxproj
index ebf0278..2cc66c0 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'">
-    <PreBuildEvent>
-      <Command>$(GtkDoInstall)</Command>
-    </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <PreBuildEvent>
-      <Command>$(GtkDoInstall)</Command>
-    </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <PreBuildEvent>
-      <Command>$(GtkDoInstall)</Command>
-    </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <PreBuildEvent>
-      <Command>$(GtkDoInstall)</Command>
-    </PreBuildEvent>
   </ItemDefinitionGroup>
   <ItemGroup>
+    <CustomBuild Include="..\..\..\config.h.win32">
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Installing Build 
Results...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkDoInstall)</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'">$(GtkDoInstall)</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'">$(GtkDoInstall)</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'">$(GtkDoInstall)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
     <ProjectReference Include="libwimp.vcxproj">
       <Project>{7660fb4e-2ae6-483e-8813-0974cbe6f97f}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>


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