gtk2/win32/vs10/gtk3-install.propsin
Chun-wei Fan cef3293184 Visual Studio projects: Generate versioned sources
Instead of relying on the ones that are currently shipped with the tarballs,
generate them from their .in counterparts prior to the build.  This includes
the Resource Scripts (.rc) for libgdk/libgtk, as well as gtkversion.h, in
addition to gdkversionmacros.h which can now be generated during prebuild.
2022-01-04 14:17:38 +08:00

223 lines
12 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
mkdir $(CopyDir)\share\gir-1.0
mkdir $(CopyDir)\lib\pkgconfig
mkdir $(CopyDir)\lib\girepository-1.0
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gdk-$(ApiVersion).lib" $(CopyDir)\lib
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_BIN
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_BIN
copy "$(BinDir)\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gailutil-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gtk3-demo.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo-application.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo-application.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.pdb" $(CopyDir)\bin
if exist $(BinDir)\Gdk-3.0.gir copy "$(BinDir)\Gdk-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\GdkWin32-3.0.gir copy "$(BinDir)\GdkWin32-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\Gtk-3.0.gir copy "$(BinDir)\Gtk-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\Gdk-3.0.typelib copy "$(BinDir)\Gdk-3.0.typelib" $(CopyDir)\lib\girepository-1.0
if exist $(BinDir)\GdkWin32-3.0.typelib copy "$(BinDir)\GdkWin32-3.0.typelib" $(CopyDir)\lib\girepository-1.0
if exist $(BinDir)\Gtk-3.0.typelib copy "$(BinDir)\Gtk-3.0.typelib" $(CopyDir)\lib\girepository-1.0
goto DONE_BIN
:DO_BROADWAY_BIN
copy "$(BinDir)\broadwayd.exe" $(CopyDir)\bin
copy "$(BinDir)\broadwayd.pdb" $(CopyDir)\bin
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_RELEASE
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_DEBUG
:DO_BROADWAY_RELEASE
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
if exist .\Release\$(Platform)\bin\Gdk-3.0.gir copy .\Release\$(Platform)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\GdkWin32-3.0.gir copy .\Release\$(Platform)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\Gtk-3.0.gir copy .\Release\$(Platform)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\Gdk-3.0.typelib copy .\Release\$(Platform)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Release\$(Platform)\bin\GdkWin32-3.0.typelib copy .\Release\$(Platform)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Release\$(Platform)\bin\Gtk-3.0.typelib copy .\Release\$(Platform)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0
goto DONE_BIN
:DO_BROADWAY_DEBUG
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
if exist .\Debug\$(Platform)\bin\Gdk-3.0.gir copy .\Debug\$(Platform)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\GdkWin32-3.0.gir copy .\Debug\$(Platform)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\Gtk-3.0.gir copy .\Debug\$(Platform)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\Gdk-3.0.typelib copy .\Debug\$(Platform)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Debug\$(Platform)\bin\GdkWin32-3.0.typelib copy .\Debug\$(Platform)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Debug\$(Platform)\bin\Gtk-3.0.typelib copy .\Debug\$(Platform)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0
:DONE_BIN
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig\gdk-win32-3.0.pc
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig
copy "..\gtk+-3.0.pc" "$(CopyDir)\lib\pkgconfig\gtk+-win32-3.0.pc"
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
</GtkDoInstallBin>
<GtkDoInstall>
echo off
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\gdk\win32\gdkwin32.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
if "$(Configuration)" == "Release" goto COPY_RELEASE_BUILT_HEADERS
if "$(Configuration)" == "Release_Broadway" goto COPY_RELEASE_BUILT_HEADERS
if "$(Configuration)" == "Debug" goto COPY_DEBUG_BUILT_HEADERS
if "$(Configuration)" == "Debug_Broadway" goto COPY_DEBUG_BUILT_HEADERS
:COPY_DEBUG_BUILT_HEADERS
copy .\Debug\$(Platform)\obj\gdk-3\gdk\gdkconfig.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy .\Debug\$(Platform)\obj\gdk-3\gdk\gdkenumtypes.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy .\Debug\$(Platform)\obj\gdk-3\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy .\Debug\$(Platform)\obj\gtk-3\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy .\Debug\$(Platform)\obj\gtk-3\gtk\gtkversion.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
goto CONTINUE_HEADERS
:COPY_RELEASE_BUILT_HEADERS
copy .\Release\$(Platform)\obj\gdk-3\gdk\gdkconfig.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy .\Release\$(Platform)\obj\gdk-3\gdk\gdkenumtypes.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy .\Release\$(Platform)\obj\gdk-3\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy .\Release\$(Platform)\obj\gtk-3\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy .\Release\$(Platform)\obj\gtk-3\gtk\gtkversion.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
goto CONTINUE_HEADERS
:CONTINUE_HEADERS
#include "gdk-3.vs10.headers"
#include "gdk3-win32.vs10.headers"
#include "gtk-3.vs10.headers"
mkdir $(CopyDir)\include\gail-$(ApiVersion)\libgail-util
#include "gailutil-3.vs10.headers"
for &#37;&#37;s in (16 22 24 32 48 256) do ((mkdir $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps) &amp; (copy /b ..\..\demos\gtk-demo\data\&#37;&#37;sx&#37;&#37;s\gtk3-demo.png $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps))
mkdir $(CopyDir)\share\glib-2.0\schemas
copy ..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\gtk\org.gtk.Settings.EmojiChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
</GtkDoInstall>
<GtkDoInstallBroadwayHeaders>
copy ..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
#include "gdk3-broadway.vs10.headers"
</GtkDoInstallBroadwayHeaders>
<GtkPostInstall>
echo "Compiling gsettings XML Files..."
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
echo "Generating icon cache......"
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
</GtkPostInstall>
<GenerateGtkPC>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3installsprops</_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="InstalledBroadwayBins">
<Value>$(InstalledBroadwayBins)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstallBin">
<Value>$(GtkDoInstallBin)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstall">
<Value>$(GtkDoInstall)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstallBroadwayHeaders">
<Value>$(GtkDoInstallBroadwayHeaders)</Value>
</BuildMacro>
<BuildMacro Include="GtkPostInstall">
<Value>$(GtkPostInstall)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkPC">
<Value>$(GenerateGtkPC)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkPCX64">
<Value>$(GenerateGtkPCX64)</Value>
</BuildMacro>
<BuildMacro Include="GtkPCFiles">
<Value>$(GtkPCFiles)</Value>
</BuildMacro>
</ItemGroup>
</Project>