Commit 318931bd authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

widl: Include resource id in typelib path if not default.

parent a5975bb6
...@@ -280,6 +280,8 @@ void output_typelib_regscript( const typelib_t *typelib ) ...@@ -280,6 +280,8 @@ void output_typelib_regscript( const typelib_t *typelib )
const expr_t *lcid_expr = get_attrp( typelib->attrs, ATTR_LIBLCID ); const expr_t *lcid_expr = get_attrp( typelib->attrs, ATTR_LIBLCID );
unsigned int version = get_attrv( typelib->attrs, ATTR_VERSION ); unsigned int version = get_attrv( typelib->attrs, ATTR_VERSION );
unsigned int flags = 0; 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_RESTRICTED )) flags |= 1; /* LIBFLAG_FRESTRICTED */
if (is_attr( typelib->attrs, ATTR_CONTROL )) flags |= 2; /* LIBFLAG_FCONTROL */ if (is_attr( typelib->attrs, ATTR_CONTROL )) flags |= 2; /* LIBFLAG_FCONTROL */
...@@ -295,8 +297,11 @@ void output_typelib_regscript( const typelib_t *typelib ) ...@@ -295,8 +297,11 @@ void output_typelib_regscript( const typelib_t *typelib )
put_str( indent, "'%u.%u' = s '%s'\n", put_str( indent, "'%u.%u' = s '%s'\n",
MAJORVERSION(version), MINORVERSION(version), descr ? descr : typelib->name ); MAJORVERSION(version), MINORVERSION(version), descr ? descr : typelib->name );
put_str( indent++, "{\n" ); put_str( indent++, "{\n" );
put_str( indent, "'%x' { %s = s '%%MODULE%%' }\n", expr = get_attrp( typelib->attrs, ATTR_ID );
lcid_expr ? lcid_expr->cval : 0, typelib_kind == SYS_WIN64 ? "win64" : "win32" ); 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, "FLAGS = s '%u'\n", flags );
put_str( --indent, "}\n" ); put_str( --indent, "}\n" );
put_str( --indent, "}\n" ); put_str( --indent, "}\n" );
......
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