Module: wine Branch: master Commit: 318931bd46e3c526b2ec5e2d5bcecaa704e123be URL: http://source.winehq.org/git/wine.git/?a=commit;h=318931bd46e3c526b2ec5e2d5b...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Nov 12 17:30:45 2013 +0100
widl: Include resource id in typelib path if not default.
---
tools/widl/register.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/widl/register.c b/tools/widl/register.c index d8b34d9..9a4f219 100644 --- a/tools/widl/register.c +++ b/tools/widl/register.c @@ -280,6 +280,8 @@ void output_typelib_regscript( const typelib_t *typelib ) const expr_t *lcid_expr = get_attrp( typelib->attrs, ATTR_LIBLCID ); unsigned int version = get_attrv( typelib->attrs, ATTR_VERSION ); unsigned int flags = 0; + char id_part[12] = ""; + expr_t *expr;
if (is_attr( typelib->attrs, ATTR_RESTRICTED )) flags |= 1; /* LIBFLAG_FRESTRICTED */ if (is_attr( typelib->attrs, ATTR_CONTROL )) flags |= 2; /* LIBFLAG_FCONTROL */ @@ -295,8 +297,11 @@ void output_typelib_regscript( const typelib_t *typelib ) put_str( indent, "'%u.%u' = s '%s'\n", MAJORVERSION(version), MINORVERSION(version), descr ? descr : typelib->name ); put_str( indent++, "{\n" ); - put_str( indent, "'%x' { %s = s '%%MODULE%%' }\n", - lcid_expr ? lcid_expr->cval : 0, typelib_kind == SYS_WIN64 ? "win64" : "win32" ); + expr = get_attrp( typelib->attrs, ATTR_ID ); + if (expr) + sprintf(id_part, "\%d", expr->cval); + put_str( indent, "'%x' { %s = s '%%MODULE%%%s' }\n", + lcid_expr ? lcid_expr->cval : 0, typelib_kind == SYS_WIN64 ? "win64" : "win32", id_part ); put_str( indent, "FLAGS = s '%u'\n", flags ); put_str( --indent, "}\n" ); put_str( --indent, "}\n" );