[json-glib] MSVC 2010+ Projects: Update "Installation" Process
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] MSVC 2010+ Projects: Update "Installation" Process
- Date: Mon, 9 Jun 2014 10:30:16 +0000 (UTC)
commit e1141c9ea04a9f11b60d5278693edb819bcac7d9
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Jun 9 18:29:01 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/install.vcxproj | 28 ++++++++++++++++------------
build/win32/vs10/json-glib-install.props | 20 ++++++++++++++++----
2 files changed, 32 insertions(+), 16 deletions(-)
---
diff --git a/build/win32/vs10/install.vcxproj b/build/win32/vs10/install.vcxproj
index b7875f5..3c8348a 100644
--- a/build/win32/vs10/install.vcxproj
+++ b/build/win32/vs10/install.vcxproj
@@ -67,26 +67,30 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PostBuildEvent>
- <Command>$(JsonGlibDoInstall)</Command>
- </PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PostBuildEvent>
- <Command>$(JsonGlibDoInstall)</Command>
- </PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PostBuildEvent>
- <Command>$(JsonGlibDoInstall)</Command>
- </PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <PostBuildEvent>
- <Command>$(JsonGlibDoInstall)</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'">$(JsonGlibDoInstall)</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'">$(JsonGlibDoInstall)</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'">$(JsonGlibDoInstall)</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'">$(JsonGlibDoInstall)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="json-glib.vcxproj">
<Project>{469db0a8-e33e-4112-a38c-52a168ecdc03}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/build/win32/vs10/json-glib-install.props b/build/win32/vs10/json-glib-install.props
index 996b24c..4933295 100644
--- a/build/win32/vs10/json-glib-install.props
+++ b/build/win32/vs10/json-glib-install.props
@@ -4,6 +4,9 @@
<Import Project="json-glib-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
+ <BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
+ <InstalledDlls>$(BinDir)\$(JsonGlibDllPrefix)json-glib(JsonGlibDllSuffix).dll</InstalledDlls>
+ <InstalledBins>$(BinDir)\json-glib-format.exe;$(BinDir)\json-glib-validate.exe</InstalledBins>
<JsonGlibDoInstall>
mkdir $(CopyDir)
@@ -12,14 +15,14 @@ mkdir $(CopyDir)\bin
mkdir $(CopyDir)\lib
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\json-glib-$(ApiVersion).lib $(CopyDir)\lib
+copy $(BinDir)\json-glib-$(ApiVersion).lib $(CopyDir)\lib
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\$(JsonGlibDllPrefix)json-glib$(JsonGlibDllSuffix).dll
$(CopyDir)\bin
+copy $(BinDir)\$(JsonGlibDllPrefix)json-glib$(JsonGlibDllSuffix).dll $(CopyDir)\bin
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\json-glib-format.exe $(CopyDir)\bin
+copy $(BinDir)\json-glib-format.exe $(CopyDir)\bin
-copy $(SolutionDir)$(Configuration)\$(Platform)\bin\json-glib-validate.exe $(CopyDir)\bin
+copy $(BinDir)\json-glib-validate.exe $(CopyDir)\bin
mkdir $(CopyDir)\include\json-glib-$(ApiVersion)\json-glib
@@ -55,6 +58,15 @@ copy ..\..\..\json-glib\json-version-macros.h $(CopyDir)\include\json-glib-$(Api
<_PropertySheetDisplayName>jsonglibinstallprops</_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="JsonGlibDoInstall">
<Value>$(JsonGlibDoInstall)</Value>
</BuildMacro>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]