[gtksourceview] Visual Studio builds: Generate .pc files upon "install"
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Visual Studio builds: Generate .pc files upon "install"
- Date: Wed, 8 Mar 2017 10:50:27 +0000 (UTC)
commit 714b5ef61412c104588ca5ad5c1ff774f668b354
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Mar 8 17:20:05 2017 +0800
Visual Studio builds: Generate .pc files upon "install"
Use the added scripts to generate the .pc files upon completion of build.
win32/vs10/Makefile.am | 1 +
win32/vs10/gtksourceview4-install.propsin | 9 ++++
win32/vs10/gtksourceview4-install.vcxproj | 10 ++++
win32/vs10/gtksourceview4-install.vcxproj.filters | 13 +++++
win32/vs11/Makefile.am | 1 +
win32/vs12/Makefile.am | 3 +-
win32/vs14/Makefile.am | 3 +-
win32/vs15/Makefile.am | 3 +-
win32/vs9/gtksourceview4-install.vcproj | 50 +++++++++++++++++++--
win32/vs9/gtksourceview4-install.vspropsin | 7 +++-
10 files changed, 92 insertions(+), 8 deletions(-)
---
diff --git a/win32/vs10/Makefile.am b/win32/vs10/Makefile.am
index 11b9483..88b6e6d 100644
--- a/win32/vs10/Makefile.am
+++ b/win32/vs10/Makefile.am
@@ -16,6 +16,7 @@ EXTRA_DIST = \
gtksourceview-@GSV_API_VERSION@.vcxprojin \
gtksourceview-@GSV_API_VERSION@.vcxproj.filtersin \
gtksourceview@GSV_API_VERSION@-install.vcxproj \
+ gtksourceview@GSV_API_VERSION@-install.vcxproj.filters \
$(GENERATED_ITEMS)
gtksourceview@GSV_API_VERSION@-install.props:
$(top_srcdir)/win32/vs10/gtksourceview@GSV_API_VERSION@-install.propsin $(MSVC10_HEADERS_LISTS)
diff --git a/win32/vs10/gtksourceview4-install.propsin b/win32/vs10/gtksourceview4-install.propsin
index 8c60d50..b6747ad 100644
--- a/win32/vs10/gtksourceview4-install.propsin
+++ b/win32/vs10/gtksourceview4-install.propsin
@@ -16,6 +16,7 @@ copy ..\..\gtksourceview\completion-providers\words\gtksourcecompletionwords.h $
mkdir $(CopyDir)\lib
copy $(SolutionDir)$(Configuration)\$(Platform)\bin\gtksourceview-$(ApiVersion).lib $(CopyDir)\lib
+copy ..\gtksourceview-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig
mkdir $(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs
copy ..\..\data\language-specs\*.lang $(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs
@@ -28,6 +29,8 @@ copy ..\..\data\styles\*.xml $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles
copy ..\..\data\styles\styles.rng $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles
copy ..\..\data\styles\check-style.sh $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles
</GtkSourceviewDoInstall>
+ <GtkSourceviewPCFiles>..\gtksourceview-$(ApiVersion).pc</GtkSourceviewPCFiles>
+ <GtkSourceviewGenPC>(if not exist $(CopyDir)\lib\pkgconfig mkdir $(CopyDir)\lib\pkgconfig) &
($(PythonPath)\python ..\gtksourceviewpc.py --prefix=$(CopyDir)
--version=$(GtkSourceviewMajorVersion).$(GtkSourceviewMinorVersion).$(GtkSourceviewMicroVersion))</GtkSourceviewGenPC>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtksourceview4installprops</_PropertySheetDisplayName>
@@ -38,5 +41,11 @@ copy ..\..\data\styles\check-style.sh $(CopyDir)\share\gtksourceview-$(ApiVersio
<BuildMacro Include="GtkSourceviewDoInstall">
<Value>$(GtkSourceviewDoInstall)</Value>
</BuildMacro>
+ <BuildMacro Include="GtkSourceviewPCFiles">
+ <Value>$(GtkSourceviewPCFiles)</Value>
+ </BuildMacro>
+ <BuildMacro Include="GtkSourceviewGenPC">
+ <Value>$(GtkSourceviewGenPC)</Value>
+ </BuildMacro>
</ItemGroup>
</Project>
diff --git a/win32/vs10/gtksourceview4-install.vcxproj b/win32/vs10/gtksourceview4-install.vcxproj
index 2a2429a..72909f6 100644
--- a/win32/vs10/gtksourceview4-install.vcxproj
+++ b/win32/vs10/gtksourceview4-install.vcxproj
@@ -89,12 +89,22 @@
<ItemGroup>
<CustomBuild Include="..\..\config.h.win32">
<Message Condition="'$(Configuration)'=='Debug'">Copying build results...</Message>
+ <AdditionalInputs Condition="'$(Configuration)'=='Debug'">$(GtkSourceviewPCFiles)</AdditionalInputs>
<Command Condition="'$(Configuration)'=='Debug'">$(GtkSourceviewDoInstall)</Command>
<Outputs Condition="'$(Configuration)'=='Debug'">..\..\blah;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)'=='Release'">Copying build results...</Message>
+ <AdditionalInputs Condition="'$(Configuration)'=='Release'">$(GtkSourceviewPCFiles)</AdditionalInputs>
<Command Condition="'$(Configuration)'=='Release'">$(GtkSourceviewDoInstall)</Command>
<Outputs Condition="'$(Configuration)'=='Release'">..\..\blah;%(Outputs)</Outputs>
</CustomBuild>
+ <CustomBuild Include="..\..\gtksourceview.pc.in">
+ <Message Condition="'$(Configuration)'=='Debug'">Generating .pc files...</Message>
+ <Command Condition="'$(Configuration)'=='Debug'">$(GtkSourceviewGenPC)</Command>
+ <Outputs Condition="'$(Configuration)'=='Debug'">$(GtkSourceviewPCFiles);%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)'=='Release'">Generating .pc files...</Message>
+ <Command Condition="'$(Configuration)'=='Release'">$(GtkSourceviewGenPC)</Command>
+ <Outputs Condition="'$(Configuration)'=='Release'">$(GtkSourceviewPCFiles);%(Outputs)</Outputs>
+ </CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/win32/vs10/gtksourceview4-install.vcxproj.filters
b/win32/vs10/gtksourceview4-install.vcxproj.filters
new file mode 100644
index 0000000..6148656
--- /dev/null
+++ b/win32/vs10/gtksourceview4-install.vcxproj.filters
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
+ <CustomBuild Include="..\..\gtksourceview.pc.in"><Filter>Resource Files</Filter></CustomBuild>
+ </ItemGroup>
+</Project>
diff --git a/win32/vs11/Makefile.am b/win32/vs11/Makefile.am
index d43b868..7a3599b 100644
--- a/win32/vs11/Makefile.am
+++ b/win32/vs11/Makefile.am
@@ -7,6 +7,7 @@ EXTRA_DIST = \
gtksourceview-@GSV_API_VERSION@.vcxproj \
gtksourceview-@GSV_API_VERSION@.vcxproj.filters \
gtksourceview@GSV_API_VERSION@-install.vcxproj \
+ gtksourceview@GSV_API_VERSION@-install.vcxproj.filters \
math.h
math.h: $(top_srcdir)/win32/vs9/math.h
diff --git a/win32/vs12/Makefile.am b/win32/vs12/Makefile.am
index f86efcc..4d4b21a 100644
--- a/win32/vs12/Makefile.am
+++ b/win32/vs12/Makefile.am
@@ -6,7 +6,8 @@ EXTRA_DIST = \
gtksourceview@GSV_API_VERSION@-version-paths.props \
gtksourceview-@GSV_API_VERSION@.vcxproj \
gtksourceview-@GSV_API_VERSION@.vcxproj.filters \
- gtksourceview@GSV_API_VERSION@-install.vcxproj
+ gtksourceview@GSV_API_VERSION@-install.vcxproj \
+ gtksourceview@GSV_API_VERSION@-install.vcxproj.filters
DISTCLEANFILES = $(EXTRA_DIST)
diff --git a/win32/vs14/Makefile.am b/win32/vs14/Makefile.am
index ea35666..22159f0 100644
--- a/win32/vs14/Makefile.am
+++ b/win32/vs14/Makefile.am
@@ -6,7 +6,8 @@ EXTRA_DIST = \
gtksourceview@GSV_API_VERSION@-version-paths.props \
gtksourceview-@GSV_API_VERSION@.vcxproj \
gtksourceview-@GSV_API_VERSION@.vcxproj.filters \
- gtksourceview@GSV_API_VERSION@-install.vcxproj
+ gtksourceview@GSV_API_VERSION@-install.vcxproj \
+ gtksourceview@GSV_API_VERSION@-install.vcxproj.filters
DISTCLEANFILES = $(EXTRA_DIST)
diff --git a/win32/vs15/Makefile.am b/win32/vs15/Makefile.am
index af23f6b..300ccb8 100644
--- a/win32/vs15/Makefile.am
+++ b/win32/vs15/Makefile.am
@@ -6,7 +6,8 @@ EXTRA_DIST = \
gtksourceview@GSV_API_VERSION@-version-paths.props \
gtksourceview-@GSV_API_VERSION@.vcxproj \
gtksourceview-@GSV_API_VERSION@.vcxproj.filters \
- gtksourceview@GSV_API_VERSION@-install.vcxproj
+ gtksourceview@GSV_API_VERSION@-install.vcxproj \
+ gtksourceview@GSV_API_VERSION@-install.vcxproj.filters
DISTCLEANFILES = $(EXTRA_DIST)
diff --git a/win32/vs9/gtksourceview4-install.vcproj b/win32/vs9/gtksourceview4-install.vcproj
index ba4fd12..4d2658b 100644
--- a/win32/vs9/gtksourceview4-install.vcproj
+++ b/win32/vs9/gtksourceview4-install.vcproj
@@ -28,7 +28,7 @@
DeleteExtensionsOnClean=""
>
<Tool
- Name="VCPreBuildEventTool"
+ Name="VCPostBuildEventTool"
CommandLine="$(GtkSourceviewDoInstall)"
/>
</Configuration>
@@ -41,7 +41,7 @@
DeleteExtensionsOnClean=""
>
<Tool
- Name="VCPreBuildEventTool"
+ Name="VCPostBuildEventTool"
CommandLine="$(GtkSourceviewDoInstall)"
/>
</Configuration>
@@ -55,7 +55,7 @@
DeleteExtensionsOnClean=""
>
<Tool
- Name="VCPreBuildEventTool"
+ Name="VCPostBuildEventTool"
CommandLine="$(GtkSourceviewDoInstall)"
/>
</Configuration>
@@ -69,9 +69,51 @@
DeleteExtensionsOnClean=""
>
<Tool
- Name="VCPreBuildEventTool"
+ Name="VCPostBuildEventTool"
CommandLine="$(GtkSourceviewDoInstall)"
/>
</Configuration>
</Configurations>
+ <Files>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File RelativePath="..\..\gtksourceview.pc.in">
+ <FileConfiguration Name="Debug|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Generating .pc files..."
+ CommandLine="$(GtkSourceviewGenPC)"
+ Outputs="..\gtksourceview-$(ApiVersion).pc"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Release|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Generating .pc files..."
+ CommandLine="$(GtkSourceviewGenPC)"
+ Outputs="..\gtksourceview-$(ApiVersion).pc"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Debug|x64">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Generating .pc files..."
+ CommandLine="$(GtkSourceviewGenPC)"
+ Outputs="..\gtksourceview-$(ApiVersion).pc"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Release|x64">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Generating .pc files..."
+ CommandLine="$(GtkSourceviewGenPC)"
+ Outputs="..\gtksourceview-$(ApiVersion).pc"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Files>
</VisualStudioProject>
diff --git a/win32/vs9/gtksourceview4-install.vspropsin b/win32/vs9/gtksourceview4-install.vspropsin
index 217c448..42067af 100644
--- a/win32/vs9/gtksourceview4-install.vspropsin
+++ b/win32/vs9/gtksourceview4-install.vspropsin
@@ -18,7 +18,8 @@ mkdir $(CopyDir)\include\gtksourceview-$(ApiVersion)\gtksourceview\completion-pr
copy ..\..\gtksourceview\completion-providers\words\gtksourcecompletionwords.h
$(CopyDir)\include\gtksourceview-$(ApiVersion)\gtksourceview\completion-providers\words

mkdir $(CopyDir)\lib

-copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib

+copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\gtksourceview-$(ApiVersion).lib
$(CopyDir)\lib

+copy ..\gtksourceview-$(ApiVersion).pc $(CopyDir)\lib\pkgconfig

mkdir $(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs

copy ..\..\data\language-specs\*.lang $(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs

@@ -30,4 +31,8 @@ copy ..\..\data\styles\*.xml $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles
copy ..\..\data\styles\styles.rng $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles

"
/>
+ <UserMacro
+ Name="GtkSourceviewGenPC"
+ Value="(if not exist $(CopyDir)\lib\pkgconfig mkdir $(CopyDir)\lib\pkgconfig) &
($(PythonPath)\python ..\gtksourceviewpc.py --prefix=$(CopyDir)
--version=$(GtkSourceviewMajorVersion).$(GtkSourceviewMinorVersion).$(GtkSourceviewMicroVersion))"
+ />
</VisualStudioPropertySheet>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]