Commit 0bffa322 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

widl: Add initial implementation of SLTG typelib generator.

parent 85d029e3
......@@ -21,7 +21,8 @@ SOURCES = \
widl.c \
widl.man.in \
wpp.c \
write_msft.c
write_msft.c \
write_sltg.c
widl_EXTRADEFS = \
-DINCLUDEDIR="\"${includedir}\"" \
......
......@@ -316,7 +316,12 @@ void write_typelib_regscript( const statement_list_t *stmts )
if (count && !strendswith( typelib_name, ".res" ))
error( "Cannot store multiple typelibs into %s\n", typelib_name );
else
create_msft_typelib( stmt->u.lib );
{
if (do_old_typelib)
create_sltg_typelib( stmt->u.lib );
else
create_msft_typelib( stmt->u.lib );
}
count++;
}
if (count && strendswith( typelib_name, ".res" )) flush_output_resources( typelib_name );
......
......@@ -83,4 +83,5 @@ enum VARENUM {
extern unsigned short get_type_vt(type_t *t);
extern int create_msft_typelib(typelib_t *typelib);
extern int create_sltg_typelib(typelib_t *typelib);
#endif
......@@ -59,6 +59,7 @@ static const char usage[] =
" --nostdinc Do not search the standard include path\n"
" --ns_prefix Prefix namespaces with ABI namespace\n"
" --oldnames Use old naming conventions\n"
" --oldtlb Generate typelib in the old format (SLTG)\n"
" -o, --output=NAME Set the output file name\n"
" -Otype Type of stubs to generate (-Os, -Oi, -Oif)\n"
" -p Generate proxy\n"
......@@ -98,6 +99,7 @@ int do_everything = 1;
static int preprocess_only = 0;
int do_header = 0;
int do_typelib = 0;
int do_old_typelib = 0;
int do_proxies = 0;
int do_client = 0;
int do_server = 0;
......@@ -153,6 +155,7 @@ enum {
DLLDATA_ONLY_OPTION,
LOCAL_STUBS_OPTION,
NOSTDINC_OPTION,
OLD_TYPELIB_OPTION,
PACKING_OPTION,
PREFIX_ALL_OPTION,
PREFIX_CLIENT_OPTION,
......@@ -179,6 +182,7 @@ static const struct long_option long_options[] = {
{ "nostdinc", 0, NOSTDINC_OPTION },
{ "ns_prefix", 0, RT_NS_PREFIX },
{ "oldnames", 0, OLDNAMES_OPTION },
{ "oldtlb", 0, OLD_TYPELIB_OPTION },
{ "output", 0, 'o' },
{ "packing", 1, PACKING_OPTION },
{ "prefix-all", 1, PREFIX_ALL_OPTION },
......@@ -259,6 +263,7 @@ static void set_everything(int x)
{
do_header = x;
do_typelib = x;
do_old_typelib = x;
do_proxies = x;
do_client = x;
do_server = x;
......@@ -619,6 +624,9 @@ static void option_callback( int optc, char *optarg )
do_everything = 0;
do_typelib = 1;
break;
case OLD_TYPELIB_OPTION:
do_old_typelib = 1;
break;
case 'T':
typelib_name = xstrdup(optarg);
break;
......
......@@ -39,6 +39,7 @@ extern int pedantic;
extern int do_everything;
extern int do_header;
extern int do_typelib;
extern int do_old_typelib;
extern int do_proxies;
extern int do_client;
extern int do_server;
......
......@@ -61,6 +61,8 @@ binary resource file containing the type library is generated instead.
.IP "\fB-L \fIpath\fR"
Add a directory to the library search path for imported typelibs. The
option can be specified multiple times.
.IP \fB--oldtlb\fR
Generate a type library in the old format (SLTG format).
.PP
.B UUID file options:
.IP "\fB-u\fR"
......
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