Commit e9846a7c authored by Chun-wei Fan's avatar Chun-wei Fan

Visual Studio builds: Redo utility script generation

Use the new gen_util_scripts.py script to generate the glib-mkenums and
gdbus-codegen scripts with the proper info in them so that they can be
used properly by other build systems such as Meson, during "install".
parent 79e73da2
......@@ -8,7 +8,6 @@
<GenGLibConfigH>copy ..\..\glib\glibconfig.h.win32 ..\..\glib\glibconfig.h</GenGLibConfigH>
<GenGModuleConfH>copy ..\..\gmodule\gmoduleconf.h.win32 ..\..\gmodule\gmoduleconf.h</GenGModuleConfH>
<GenGNetworkingH>copy ..\..\gio\gnetworking.h.win32 ..\..\gio\gnetworking.h</GenGNetworkingH>
<GenGLibMKEnums>if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\replace.py --action=replace-var --input=..\..\gobject\glib-mkenums.in --output=..\..\gobject\glib-mkenums --var=GLIB_VERSION --outstring=$(GlibVersion)</GenGLibMKEnums>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>glibgensrcsprops</_PropertySheetDisplayName>
......@@ -26,8 +25,5 @@
<BuildMacro Include="GenGNetworkingH">
<Value>$(GenGNetworkingH)</Value>
</BuildMacro>
<BuildMacro Include="GenGLibMKEnums">
<Value>$(GenGLibMKEnums)</Value>
</BuildMacro>
</ItemGroup>
</Project>
......@@ -36,8 +36,8 @@ copy $(BinDir)\gdbus.exe $(CopyDir)\bin
copy $(BinDir)\gdbus.pdb $(CopyDir)\bin
copy $(BinDir)\gio.exe $(CopyDir)\bin
copy $(BinDir)\gio.pdb $(CopyDir)\bin
copy ..\..\gio\gdbus-2.0\codegen\gdbus-codegen.in $(CopyDir)\bin\gdbus-codegen
if exist ..\..\gio\gdbus-2.0\codegen\gdbus-codegen copy ..\..\gio\gdbus-2.0\codegen\gdbus-codegen $(CopyDir)\bin
if exist ..\..\gobject\glib-mkenums copy ..\..\gobject\glib-mkenums $(CopyDir)\bin
mkdir $(CopyDir)\include\glib-$(ApiVersion)\glib\deprecated
......@@ -83,7 +83,10 @@ copy ..\..\gio\gschema.dtd $(CopyDir)\share\glib-$(ApiVersion)\schemas
mkdir $(CopyDir)\share\glib-$(ApiVersion)\codegen
copy ..\..\gio\gdbus-2.0\codegen\*.py $(CopyDir)\share\glib-$(ApiVersion)\codegen
</GlibDoInstall>
<GlibUtilScripts>..\..\gobject\glib-mkenums;..\..\gio\gdbus-2.0\codegen\gdbus-codegen</GlibUtilScripts>
<GlibPCFiles>..\gio-windows-2.0.pc;..\gio-2.0.pc;..\gobject-2.0.pc;..\gmodule-no-export-2.0.pc;..\gmodule-export-2.0.pc;..\gmodule-2.0.pc;..\gthread-2.0.pc;..\glib-2.0.pc</GlibPCFiles>
<GenGLibMKEnums>if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\gen_util_scripts.py --type=glib-mkenums --version=$(GlibVersion)</GenGLibMKEnums>
<GenGDBusCodegen>if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\gen_util_scripts.py --type=gdbus-codegen --version=$(GlibVersion)</GenGDBusCodegen>
<GlibGenPC>(if not exist $(CopyDir) mkdir $(CopyDir)) &amp; (if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\glibpc.py --prefix=$(CopyDir) --version=$(GlibVersion))</GlibGenPC>
</PropertyGroup>
<PropertyGroup>
......@@ -96,9 +99,18 @@ copy ..\..\gio\gdbus-2.0\codegen\*.py $(CopyDir)\share\glib-$(ApiVersion)\codege
<BuildMacro Include="GlibDoInstall">
<Value>$(GlibDoInstall)</Value>
</BuildMacro>
<BuildMacro Include="GlibUtilScripts">
<Value>$(GlibUtilScripts)</Value>
</BuildMacro>
<BuildMacro Include="GlibPCFiles">
<Value>$(GlibPCFiles)</Value>
</BuildMacro>
<BuildMacro Include="GenGLibMKEnums">
<Value>$(GenGLibMKEnums)</Value>
</BuildMacro>
<BuildMacro Include="GenGDBusCodegen">
<Value>$(GenGDBusCodegen)</Value>
</BuildMacro>
<BuildMacro Include="GlibGenPC">
<Value>$(GlibGenPC)</Value>
</BuildMacro>
......
......@@ -89,13 +89,29 @@
<Command Condition="'$(Configuration)'=='Release'">$(GlibGenPC)</Command>
<Outputs Condition="'$(Configuration)'=='Release'">$(GlibPCFiles);%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\config.h.win32">
<CustomBuild Include="..\..\gobject\glib-mkenums.in">
<Message Condition="'$(Configuration)'=='Debug'">Generating glib-mkenums...</Message>
<Command Condition="'$(Configuration)'=='Debug'">$(GenGLibMKEnums)</Command>
<Outputs Condition="'$(Configuration)'=='Debug'">..\..\gobject\glib-mkenums;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)'=='Release'">Generating glib-mkenums...</Message>
<Command Condition="'$(Configuration)'=='Release'">$(GenGLibMKEnums)</Command>
<Outputs Condition="'$(Configuration)'=='Release'">..\..\gobject\glib-mkenums;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\gio\gdbus-2.0\codegen\gdbus-codegen.in">
<Message Condition="'$(Configuration)'=='Debug'">Generating gdbus-codegen...</Message>
<Command Condition="'$(Configuration)'=='Debug'">$(GenGDBusCodegen)</Command>
<Outputs Condition="'$(Configuration)'=='Debug'">..\..\gio\gdbus-2.0\codegen\gdbus-codegen;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)'=='Release'">Generating gdbus-codegen...</Message>
<Command Condition="'$(Configuration)'=='Release'">$(GenGDBusCodegen)</Command>
<Outputs Condition="'$(Configuration)'=='Release'">..\..\gio\gdbus-2.0\codegen\gdbus-codegen;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="glib_install_placeholder">
<Message Condition="'$(Configuration)'=='Debug'">Installing Build Results...</Message>
<AdditionalInputs Condition="'$(Configuration)'=='Debug'">$(GlibPCFiles)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)'=='Debug'">$(GlibPCFiles);$(GlibUtilScripts)</AdditionalInputs>
<Command Condition="'$(Configuration)'=='Debug'">$(GlibDoInstall)</Command>
<Outputs Condition="'$(Configuration)'=='Debug'">blah;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)'=='Release'">Installing Build Results...</Message>
<AdditionalInputs Condition="'$(Configuration)'=='Release'">$(GlibPCFiles)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)'=='Release'">$(GlibPCFiles);$(GlibUtilScripts)</AdditionalInputs>
<Command Condition="'$(Configuration)'=='Release'">$(GlibDoInstall)</Command>
<Outputs Condition="'$(Configuration)'=='Release'">blah;%(Outputs)</Outputs>
</CustomBuild>
......
......@@ -7,7 +7,9 @@
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\gobject\glib-mkenums.in"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\gio\gdbus-2.0\codegen\gdbus-codegen.in"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="glib_install_placeholder"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\glibpc.py"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
</Project>
......@@ -18,11 +18,6 @@
#include "gobject.vs10.sourcefiles.filters"
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\gobject\glib-mkenums.in"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\gobject\gobject.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
<ResourceCompile Include="..\..\gobject\gobject.rc"><Filter>Resource Files</Filter></ResourceCompile>
</ItemGroup>
</Project>
......@@ -51,19 +51,19 @@
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glib-gen-srcs.props" />
<Import Project="glib-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glib-gen-srcs.props" />
<Import Project="glib-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glib-gen-srcs.props" />
<Import Project="glib-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="glib-gen-srcs.props" />
<Import Project="glib-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
......@@ -171,16 +171,6 @@
<ItemGroup>
#include "gobject.vs10.sourcefiles"
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\gobject\glib-mkenums.in">
<Message Condition="'$(Configuration)'=='Debug'">Generating glib-mkenums...</Message>
<Command Condition="'$(Configuration)'=='Debug'">$(GenGLibMKEnums)</Command>
<Outputs Condition="'$(Configuration)'=='Debug'">..\..\gobject\glib-mkenums;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)'=='Release'">Generating glib-mkenums...</Message>
<Command Condition="'$(Configuration)'=='Release'">$(GenGLibMKEnums)</Command>
<Outputs Condition="'$(Configuration)'=='Release'">..\..\gobject\glib-mkenums;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\gobject\gobject.rc" />
</ItemGroup>
......
......@@ -21,8 +21,4 @@
Name="GenGNetworkingH"
Value="copy ..\..\gio\gnetworking.h.win32 ..\..\gio\gnetworking.h"
/>
<UserMacro
Name="GenGLibMKEnums"
Value="if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\replace.py --action=replace-var --input=..\..\gobject\glib-mkenums.in --output=..\..\gobject\glib-mkenums --var=GLIB_VERSION --outstring=$(GlibVersion)"
/>
</VisualStudioPropertySheet>
......@@ -114,6 +114,74 @@
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\gobject\glib-mkenums.in">
<FileConfiguration Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating glib-mkenums..."
CommandLine="$(GenGLibMKEnums)"
Outputs="..\..\gobject\glib-mkenums"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating glib-mkenums..."
CommandLine="$(GenGLibMKEnums)"
Outputs="..\..\gobject\glib-mkenums"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool
Name="VCCustomBuildTool"
Description="Generating glib-mkenums..."
CommandLine="$(GenGLibMKEnums)"
Outputs="..\..\gobject\glib-mkenums"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool
Name="VCCustomBuildTool"
Description="Generating glib-mkenums..."
CommandLine="$(GenGLibMKEnums)"
Outputs="..\..\gobject\glib-mkenums"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\gio\gdbus-2.0\codegen\gdbus-codegen.in">
<FileConfiguration Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating gdbus-codegen..."
CommandLine="$(GenGDBusCodegen)"
Outputs="..\..\gio\gdbus-2.0\codegen\gdbus-codegen"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating gdbus-codegen..."
CommandLine="$(GenGDBusCodegen)"
Outputs="..\..\gio\gdbus-2.0\codegen\gdbus-codegen"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool
Name="VCCustomBuildTool"
Description="Generating gdbus-codegen..."
CommandLine="$(GenGDBusCodegen)"
Outputs="..\..\gio\gdbus-2.0\codegen\gdbus-codegen"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool
Name="VCCustomBuildTool"
Description="Generating gdbus-codegen..."
CommandLine="$(GenGDBusCodegen)"
Outputs="..\..\gio\gdbus-2.0\codegen\gdbus-codegen"
/>
</FileConfiguration>
</File>
</Filter>
</Files>
</VisualStudioProject>
......@@ -38,7 +38,7 @@ copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\gdbus.exe $(CopyDir)
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\gdbus.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\gio.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\gio.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy ..\..\gio\gdbus-2.0\codegen\gdbus-codegen.in $(CopyDir)\bin\gdbus-codegen&#x0D;&#x0A;
if exist ..\..\gio\gdbus-2.0\codegen\gdbus-codegen copy ..\..\gio\gdbus-2.0\codegen\gdbus-codegen $(CopyDir)\bin&#x0D;&#x0A;
if exist ..\..\gobject\glib-mkenums copy ..\..\gobject\glib-mkenums $(CopyDir)\bin&#x0D;&#x0A;
mkdir $(CopyDir)\include\glib-$(ApiVersion)\glib\deprecated&#x0D;&#x0A;
......@@ -85,6 +85,14 @@ mkdir $(CopyDir)\share\glib-$(ApiVersion)\codegen&#x0D;&#x0A;
copy ..\..\gio\gdbus-2.0\codegen\*.py $(CopyDir)\share\glib-$(ApiVersion)\codegen&#x0D;&#x0A;
"
/>
<UserMacro
Name="GenGLibMKEnums"
Value="if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\gen_util_scripts.py --type=glib-mkenums --version=$(GlibVersion)"
/>
<UserMacro
Name="GenGDBusCodegen"
Value="if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\gen_util_scripts.py --type=gdbus-codegen --version=$(GlibVersion)"
/>
<UserMacro
Name="GlibGenPC"
Value="(if not exist $(CopyDir) mkdir $(CopyDir)) &amp; (if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\glibpc.py --prefix=$(CopyDir) --version=$(GlibVersion))"
......
......@@ -21,7 +21,7 @@
<Configurations>
<Configuration
Name="Debug|Win32"
InheritedPropertySheets=".\glib-gen-srcs.vsprops"
InheritedPropertySheets=".\glib-build-defines.vsprops"
ConfigurationType="2"
CharacterSet="2"
>
......@@ -51,7 +51,7 @@
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\glib-gen-srcs.vsprops"
InheritedPropertySheets=".\glib-build-defines.vsprops"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
......@@ -81,7 +81,7 @@
</Configuration>
<Configuration
Name="Debug|x64"
InheritedPropertySheets=".\glib-gen-srcs.vsprops"
InheritedPropertySheets=".\glib-build-defines.vsprops"
ConfigurationType="2"
CharacterSet="2"
>
......@@ -111,7 +111,7 @@
</Configuration>
<Configuration
Name="Release|x64"
InheritedPropertySheets=".\glib-gen-srcs.vsprops"
InheritedPropertySheets=".\glib-build-defines.vsprops"
ConfigurationType="2"
CharacterSet="2"
WholeProgramOptimization="1"
......@@ -161,40 +161,6 @@
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="..\..\gobject\glib-mkenums.in">
<FileConfiguration Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating glib-mkenums..."
CommandLine="$(GenGLibMKEnums)"
Outputs="..\..\gobject\glib-mkenums"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Generating glib-mkenums..."
CommandLine="$(GenGLibMKEnums)"
Outputs="..\..\gobject\glib-mkenums"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool
Name="VCCustomBuildTool"
Description="Generating glib-mkenums..."
CommandLine="$(GenGLibMKEnums)"
Outputs="..\..\gobject\glib-mkenums"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool
Name="VCCustomBuildTool"
Description="Generating glib-mkenums..."
CommandLine="$(GenGLibMKEnums)"
Outputs="..\..\gobject\glib-mkenums"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\gobject\gobject.rc" />
</Filter>
</Files>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment