summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2014-06-09 11:02:06 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2014-06-09 11:02:06 +0800
commitf7b576e0bf156c35e5c4833b7c915cdbda23c240 (patch)
treec34e4b29cb2352b37275254d3ac94e0716417ff4
parent2208d0f0ed92eddd40837ca32d58e39cd0243dc3 (diff)
downloadgobject-introspection-f7b576e0bf156c35e5c4833b7c915cdbda23c240.tar.gz
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.
-rw-r--r--build/win32/vs10/gi-install.propsin22
-rw-r--r--build/win32/vs10/install.vcxproj28
2 files changed, 33 insertions, 17 deletions
diff --git a/build/win32/vs10/gi-install.propsin b/build/win32/vs10/gi-install.propsin
index b576c3b6..162a043b 100644
--- a/build/win32/vs10/gi-install.propsin
+++ b/build/win32/vs10/gi-install.propsin
@@ -4,27 +4,30 @@
<Import Project="gi-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
+ <BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
+ <InstalledDlls>$(BinDir)\$(LibGIDllPrefix)girepository$(LibGIDllSuffix).dll;$(BinDir)\_giscanner.pyd</InstalledDlls>
+ <InstalledBins>$(BinDir)\g-ir-compiler.exe;$(BinDir)\g-ir-generate.exe;..\..\..\tools\g-ir-annotation-tool;..\..\..\tools\g-ir-doc-tool;..\..\..\tools\g-ir-scanner</InstalledBins>
<GIDoInstall>
mkdir $(CopyDir)
mkdir $(CopyDir)\bin
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\$(LibGIDllPrefix)girepository$(LibGIDllSuffix).dll $(CopyDir)\bin
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\g-ir-compiler.exe $(CopyDir)\bin
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\g-ir-generate.exe $(CopyDir)\bin
+copy $(BinDir)\$(LibGIDllPrefix)girepository$(LibGIDllSuffix).dll $(CopyDir)\bin
+copy $(BinDir)\g-ir-compiler.exe $(CopyDir)\bin
+copy $(BinDir)\g-ir-generate.exe $(CopyDir)\bin
copy ..\..\..\tools\g-ir-annotation-tool $(CopyDir)\bin
copy ..\..\..\tools\g-ir-doc-tool $(CopyDir)\bin
copy ..\..\..\tools\g-ir-scanner $(CopyDir)\bin
#include "gir.vs10.install"
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\_giscanner.pyd $(CopyDir)\lib\gobject-introspection\giscanner
+copy $(BinDir)\_giscanner.pyd $(CopyDir)\lib\gobject-introspection\giscanner
mkdir $(CopyDir)\share\gir-$(ApiVersion)
mkdir $(CopyDir)\share\gobject-introspection-$(ApiVersion)
copy ..\..\..\girepository\gdump.c $(CopyDir)\share\gobject-introspection-$(ApiVersion)
mkdir $(CopyDir)\lib\girepository-$(ApiVersion)
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\girepository-$(ApiVersion).lib $(CopyDir)\lib
+copy $(BinDir)\girepository-$(ApiVersion).lib $(CopyDir)\lib
echo Please note that building GObject-Introspection with Visual Studio is now a 2-step process
echo Please open the appropriate Visual Studio (or Windows SDK) command prompt and use the NMake Makefile
@@ -35,6 +38,15 @@ echo in SRC_ROOT\build\gi-introspection-msvc.mak to build the introspection file
<_PropertySheetDisplayName>giinstallprops</_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="GIDoInstall">
<Value>$(GIDoInstall)</Value>
</BuildMacro>
diff --git a/build/win32/vs10/install.vcxproj b/build/win32/vs10/install.vcxproj
index 73e34f2d..1ee3a0bc 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>$(GIDoInstall)</Command>
- </PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PreBuildEvent>
- <Command>$(GIDoInstall)</Command>
- </PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PreBuildEvent>
- <Command>$(GIDoInstall)</Command>
- </PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PreBuildEvent>
- <Command>$(GIDoInstall)</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'">$(GIDoInstall)</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledWin32Bins);%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Installing Build Results...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GIDoInstall)</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledX64Bins);%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Installing Build Results...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GIDoInstall)</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledWin32Bins);%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Installing Build Results...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GIDoInstall)</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledX64Bins);%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="g-ir-compiler.vcxproj">
<Project>{5dcb55ce-f32c-4c77-8bf4-b4dad3ec7774}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>