Windows: Update how gtk-win32.rc is generated

On Visual Studio, unlike MinGW, manifest files are embedded via
including the manifest file as a resource file in the projects, not
via the .rc file.  This means that the line in the .rc file that
specifies the manifest file would cause trouble, so that line gets
removed when the full gtk3-win32.rc is generated on Visual Studio builds,
otherwise 2010+ Visual Studio will complain when compiling the .rc file.
Also, the inclusion of winuser.h will cause warnings during the
compilation of the .rc file.

Fix this by isolating the Win32 resource portions of gtk-win32.rc.in to
gtk-win32.rc.body.in and:
-On MinGW, construct the full gtk-win32.rc by doing the winver.h and
 winuser.h inclusion first, then append the contents of gtk-win32.rc.body,
 and then appending the line to embed the manifest file.
-On Visual Studio, simply copy the gtk-win32.rc.body to gtk-win32.rc,
 and generate the full libgtk3.manifest file.

https://bugzilla.gnome.org/show_bug.cgi?id=762311
This commit is contained in:
Chun-wei Fan 2016-02-22 17:38:15 +08:00
parent 6c0270bbcb
commit 5962daef4f
11 changed files with 271 additions and 144 deletions

View File

@ -8,6 +8,6 @@ SUBDIRS = \
vs12 \
vs14
EXTRA_DIST += process-in-win32.py
EXTRA_DIST += replace.py
-include $(top_srcdir)/git.mk

View File

@ -1,109 +0,0 @@
#!/usr/bin/python
# vim: encoding=utf-8
# expand Windows-specific *.in files
# for Visual Studio Builds
import os
import sys
import re
import string
import argparse
def open_compat(src, mode):
if (sys.version_info.major < 3):
return open(src, mode)
else:
return open(src, mode, encoding='utf-8', errors='surrogateescape')
def get_version(srcroot):
ver = {}
RE_VERSION = re.compile(r'^m4_define\(\[(gtk_\w+)\],\s*\[(\d+)\]\)')
RE_FLOAT_VERSION = re.compile(r'^m4_define\(\[(gtk_\w+)\],\s*\[(\d+\.\d*)\]\)')
with open(os.path.join(srcroot, 'configure.ac'), 'r') as ac:
for i in ac:
mo = RE_VERSION.search(i)
if mo:
ver[mo.group(1).upper()] = int(mo.group(2))
mo = RE_FLOAT_VERSION.search(i)
if mo:
ver[mo.group(1).upper()] = float(mo.group(2))
ver['GTK_BINARY_AGE'] = 100 * ver['GTK_MINOR_VERSION'] + ver['GTK_MICRO_VERSION']
ver['GTK_VERSION'] = '%d.%d.%d' % (ver['GTK_MAJOR_VERSION'],
ver['GTK_MINOR_VERSION'],
ver['GTK_MICRO_VERSION'])
ver['LT_RELEASE'] = '%d.%d' % (ver['GTK_MAJOR_VERSION'], ver['GTK_MINOR_VERSION'])
ver['LT_CURRENT'] = 100 * \
ver['GTK_MINOR_VERSION'] + \
ver['GTK_MICRO_VERSION'] - \
ver['GTK_INTERFACE_AGE']
ver['LT_REVISION'] = ver['GTK_INTERFACE_AGE']
ver['LT_AGE'] = ver['GTK_BINARY_AGE'] - ver['GTK_INTERFACE_AGE']
ver['LT_CURRENT_MINUS_AGE'] = ver['LT_CURRENT'] - ver['LT_AGE']
return ver
def process_in(src, dest, vars):
RE_VARS = re.compile(r'@(\w+?)@')
with open_compat(src, 'r') as s:
with open_compat(dest, 'w') as d:
for i in s:
i = RE_VARS.sub(lambda x: str(vars[x.group(1)]), i)
d.write(i)
def get_srcroot():
if not os.path.isabs(__file__):
path = os.path.abspath(__file__)
else:
path = __file__
dirname = os.path.dirname(path)
return os.path.abspath(os.path.join(dirname, '..', '..'))
def main(argv):
prog_desc = 'Create Various autogenerated Win32-specific Source Files'
parser = argparse.ArgumentParser(description=prog_desc)
parser.add_argument('--gtkwin32rc', dest='gtkwin32rc', action='store_const',
const=1,
help='Generate gtk-win32.rc')
parser.add_argument('--gtk3manifest', dest='gtk3manifest', action='store_const',
const=1,
help='Generate libgtk3.manifest')
args = parser.parse_args()
no_args = True
if args.gtkwin32rc is not None:
srcroot = get_srcroot()
ver = get_version(srcroot)
target = os.path.join(srcroot, 'gtk', 'gtk-win32.rc')
process_in(os.path.join(srcroot, 'gtk', 'gtk-win32.rc.in'),
target + '.intermediate',
ver)
fp_r = open_compat(target + '.intermediate', 'r')
lines = fp_r.readlines()
fp_r.close()
fp_w = open_compat(target, 'w')
fp_w.writelines([item for item in lines[:-1]])
fp_w.close()
os.unlink(target + '.intermediate')
no_args = False
if args.gtk3manifest is not None:
manifest = {}
manifest['EXE_MANIFEST_ARCHITECTURE'] = '*'
process_in(os.path.join(srcroot, 'gtk', 'libgtk3.manifest.in'),
os.path.join(srcroot, 'gtk', 'libgtk3.manifest'),
manifest)
no_args = False
if no_args is True:
raise SystemExit('Action argument required. Please see %s --help for details.' % __file__)
if __name__ == '__main__':
sys.exit(main(sys.argv))

102
build/win32/replace.py Normal file
View File

@ -0,0 +1,102 @@
#!/usr/bin/python
#
# Simple utility script to manipulate
# certain types of strings in a file
# This can be used in various projects where
# there is the need to replace strings in files,
# and is copied from GLib's $(srcroot)/build/win32
# Author: Fan, Chun-wei
# Date: September 03, 2014
import os
import sys
import re
import string
import argparse
valid_actions = ['remove-prefix',
'replace-var',
'replace-str',
'remove-str']
def replace(src, dest, instring, outstring):
with open(src, 'r') as s:
with open(dest, 'w') as d:
for line in s:
i = line.replace(instring, outstring)
d.write(i)
def check_required_args(args, params):
for param in params:
if getattr(args, param, None) is None:
raise SystemExit('%s: error: --%s argument is required' % (__file__, param))
def warn_ignored_args(args, params):
for param in params:
if getattr(args, param, None) is not None:
print('%s: warning: --%s argument is ignored' % (__file__, param))
def main(argv):
parser = argparse.ArgumentParser(description='Process strings in a file.')
parser.add_argument('-a',
'--action',
help='Action to carry out. Can be one of:\n'
'remove-prefix\n'
'replace-var\n'
'replace-str\n'
'remove-str',
choices=valid_actions)
parser.add_argument('-i', '--input', help='Input file')
parser.add_argument('-o', '--output', help='Output file')
parser.add_argument('--instring', help='String to replace or remove')
parser.add_argument('--var', help='Autotools variable name to replace')
parser.add_argument('--outstring',
help='New String to replace specified string or variable')
parser.add_argument('--removeprefix', help='Prefix of string to remove')
args = parser.parse_args()
input_string = ''
output_string = ''
# We must have action, input, output for all operations
check_required_args(args, ['action','input','output'])
# Build the arguments by the operation that is to be done,
# to be fed into replace()
# Get rid of prefixes from a string
if args.action == 'remove-prefix':
check_required_args(args, ['instring','removeprefix'])
warn_ignored_args(args, ['outstring','var'])
input_string = args.removeprefix + args.instring
output_string = args.instring
# Replace an m4-style variable (those surrounded by @...@)
if args.action == 'replace-var':
check_required_args(args, ['var','outstring'])
warn_ignored_args(args, ['instring','removeprefix'])
input_string = '@' + args.var + '@'
output_string = args.outstring
# Replace a string
if args.action == 'replace-str':
check_required_args(args, ['instring','outstring'])
warn_ignored_args(args, ['var','removeprefix'])
input_string = args.instring
output_string = args.outstring
# Remove a string
if args.action == 'remove-str':
check_required_args(args, ['instring'])
warn_ignored_args(args, ['var','outstring','removeprefix'])
input_string = args.instring
output_string = ''
replace(args.input, args.output, input_string, output_string)
if __name__ == '__main__':
sys.exit(main(sys.argv))

View File

@ -19,7 +19,8 @@
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.in"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.body"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gtk\libgtk3.manifest.in"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
<ItemGroup>
#include "gtk-3.vs10.sourcefiles.filters"

View File

@ -177,19 +177,33 @@
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.in">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.body">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gtk\libgtk3.manifest.in">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>

View File

@ -64,7 +64,8 @@ $(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix
cd $(SolutionDir)
</GenerateGtkDbusBuiltSources>
<GenerateGtkWin32RC>$(PythonPath)\python ..\process-in-win32.py --gtkwin32rc --gtk3manifest</GenerateGtkWin32RC>
<CopyGtkWin32RC>copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc</CopyGtkWin32RC>
<GenerateGtkWin32Manifest>$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*</GenerateGtkWin32Manifest>
<CopyDemosH>copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h</CopyDemosH>
</PropertyGroup>
<PropertyGroup>
@ -83,8 +84,11 @@ cd $(SolutionDir)
<BuildMacro Include="GenerateGtkDbusBuiltSources">
<Value>$(GenerateGtkDbusBuiltSources)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkWin32RC">
<Value>$(GenerateGtkWin32RC)</Value>
<BuildMacro Include="CopyGtkWin32RC">
<Value>$(CopyGtkWin32RC)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkWin32Manifest">
<Value>$(GenerateGtkWin32Manifest)</Value>
</BuildMacro>
<BuildMacro Include="CopyDemosH">
<Value>$(CopyDemosH)</Value>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="gtk3gensrcsprops"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<UserMacro
Name="GenConfigH"
Value="
copy ..\..\..\config.h.win32 ..\..\..\config.h
"
/>
<UserMacro
Name="GenGdkConfigHWin32"
Value="
if exist ..\..\..\MSVC_$(ConfigurationName) goto DONE_GDKCONFIG_H&#x0D;&#x0A;
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
if exist ..\..\..\GDK_BROADWAY_BUILD del ..\..\..\GDK_BROADWAY_BUILD&#x0D;&#x0A;
if exist ..\..\..\MSVC_$(ConfigurationName)_Broadway del ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll del $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib del $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release&quot; del ..\..\..\MSVC_Debug&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug&quot; del ..\..\..\MSVC_Release&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\GDK_WIN32ONLY_BUILD&#x0D;&#x0A;
echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)&#x0D;&#x0A;
:DONE_GDKCONFIG_H&#x0D;&#x0A;
"
/>
<UserMacro
Name="GenGdkConfigHBroadway"
Value="
if exist ..\..\..\MSVC_$(ConfigurationName)_Broadway goto DONE_GDKCONFIG_H&#x0D;&#x0A;
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
if exist ..\..\..\GDK_WIN32ONLY_BUILD del ..\..\..\GDK_WIN32ONLY_BUILD&#x0D;&#x0A;
if exist ..\..\..\MSVC_Release del ..\..\..\MSVC_Release&#x0D;&#x0A;
if exist ..\..\..\MSVC_Debug del ..\..\..\MSVC_Debug&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; del ..\..\..\MSVC_Debug_Broadway&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; del ..\..\..\MSVC_Release_Broadway&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD&#x0D;&#x0A;
echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;&#x0A;
:DONE_GDKCONFIG_H&#x0D;&#x0A;
"
/>
<UserMacro
Name="GenerateGtkDbusBuiltSources"
Value="
cd ..\..\..\gtk&#x0D;&#x0A;
$(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml&#x0D;&#x0A;
cd $(SolutionDir)&#x0D;&#x0A;
"
/>
<UserMacro
Name="CopyGtkWin32RC"
Value="copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc"
/>
<UserMacro
Name="GenerateGtkWin32Manifest"
Value="$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*"
/>
<UserMacro
Name="CopyDemosH"
Value="copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h"
/>
</VisualStudioPropertySheet>

View File

@ -192,33 +192,63 @@
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gtk\gtk-win32.rc.in">
<File RelativePath="..\..\..\gtk\gtk-win32.rc.body">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Version Resource..."
CommandLine="$(GenerateGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
Description="Copying GTK+ Win32 Version Resource..."
CommandLine="$(CopyGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Version Resource..."
CommandLine="$(GenerateGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
Description="Copying GTK+ Win32 Version Resource..."
CommandLine="$(CopyGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Version Resource..."
CommandLine="$(GenerateGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
Description="Copying GTK+ Win32 Version Resource..."
CommandLine="$(CopyGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Version Resource..."
CommandLine="$(GenerateGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
Description="Copying GTK+ Win32 Version Resource..."
CommandLine="$(CopyGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gtk\libgtk3.manifest.in">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Manifest..."
CommandLine="$(GenerateGtkWin32Manifest)"
Outputs="..\..\..\gtk\libgtk3.manifest"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Manifest..."
CommandLine="$(GenerateGtkWin32Manifest)"
Outputs="..\..\..\gtk\libgtk3.manifest"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Manifest..."
CommandLine="$(GenerateGtkWin32Manifest)"
Outputs="..\..\..\gtk\libgtk3.manifest"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Manifest..."
CommandLine="$(GenerateGtkWin32Manifest)"
Outputs="..\..\..\gtk\libgtk3.manifest"
/>
</FileConfiguration>
</File>

View File

@ -1943,7 +1943,7 @@ gdk/gdkversionmacros.h
gtk/Makefile
gtk/makefile.msc
gtk/gtkversion.h
gtk/gtk-win32.rc
gtk/gtk-win32.rc.body
gtk/libgtk3.manifest
libgail-util/Makefile
modules/Makefile

View File

@ -35,6 +35,11 @@ gtk_win32_res_ldflag = -Wl,gtk-win32-res.o
gtk-win32-res.o : gtk-win32.rc libgtk3.manifest
$(WINDRES) gtk-win32.rc $@
gtk-win32.rc: gtk-win32.rc.body
echo "#include <winuser.h>" >>$@
cat $< >>$@
echo "ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST libgtk3.manifest" >>$@
gtk.def: libgtk-3.la
echo "LIBRARY libgtk-$(GTK_MAJOR_VERSION)-@LT_CURRENT_MINUS_AGE@" >$@
echo "EXPORTS" >>$@
@ -1124,6 +1129,10 @@ MAINTAINERCLEANFILES = \
DISTCLEANFILES =
if OS_WIN32
DISTCLEANFILES += gtk-win32.rc
endif
EXTRA_DIST += $(gtk_all_private_h_sources) $(gtk_extra_sources)
EXTRA_DIST += $(gtk_built_sources)
@ -1587,7 +1596,8 @@ EXTRA_DIST += \
deprecated/Makefile.inc \
inspector/Makefile.inc \
libgtk3.manifest.in \
gtk-win32.rc.in \
gtk-win32.rc.body.in \
gtk-win32.rc.body \
gtkwin32embed.h \
gtkwin32embedwidget.h \
gtkwin32embedwidget.c \

View File

@ -1,5 +1,4 @@
#include <winver.h>
#include <winuser.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION @GTK_MAJOR_VERSION@,@GTK_MINOR_VERSION@,@GTK_MICRO_VERSION@,0
@ -29,4 +28,3 @@ VS_VERSION_INFO VERSIONINFO
VALUE "Translation", 0x409, 1200
END
END
ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST libgtk3.manifest