Commit 04d87250 authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Directly generate resources also for non-registered typelibs.

parent 20eabdf4
......@@ -74,6 +74,3 @@ REGINST REGINST mshtml.inf
/* @makedep: blank.htm */
blank.htm HTML "blank.htm"
/* @makedep: mshtml_private_iface.tlb */
1 TYPELIB mshtml_private_iface.tlb
......@@ -73,9 +73,6 @@ blank2.html HTML "blank.html"
/* @makedep: blank.html */
123 HTML "blank.html"
/* @makedep: test_tlb.tlb */
1 TYPELIB test_tlb.tlb
/* For res: protocol test: */
/* @makedep: jstest.html */
......
......@@ -15,7 +15,6 @@ SOURCES = \
package.c \
patch.c \
record.c \
rsrc.rc \
selfreg.c \
selfreg.spec \
source.c \
......
......@@ -5665,7 +5665,7 @@ static void test_register_typelib(void)
}
create_test_files();
extract_resource("typelib.tlb", "TYPELIB", "msitest\\typelib.dll");
extract_resource(MAKEINTRESOURCEA(1), "TYPELIB", "msitest\\typelib.dll");
create_database(msifile, tl_tables, ARRAY_SIZE(tl_tables));
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
......
/*
* Copyright 2018 Zebediah Figura
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "windef.h"
/* @makedep: typelib.tlb */
typelib.tlb TYPELIB typelib.tlb
......@@ -25,6 +25,7 @@ import "oaidl.idl"; /* needed by widl */
[
uuid(a2cfdbd3-2bbf-4b1c-a414-5a5904e634c9),
id(3),
version(1.0)
]
library register_test
......
......@@ -21,7 +21,10 @@
import "oaidl.idl"; /* needed by widl */
[uuid(8b05fe77-4a6c-4133-b9cd-8f00007af786)]
[
uuid(8b05fe77-4a6c-4133-b9cd-8f00007af786),
id(4)
]
library base
{
importlib("stdole2.tlb");
......
......@@ -30,10 +30,12 @@ midl_pragma warning ( disable : 2368 )
#define CUSTDATA_NUM b481b478-a181-4eb6-b6e0-df63069e8c80
#define CUSTDATA_HEXNUM a09d7c06-cf38-4db3-9450-10641651c35b
[uuid(8b05fe77-4a6c-4133-b9cd-8f81747af784),
custom(CUSTDATA_STRLIT,"ITypeLib2::GetCustData"),
custom(CUSTDATA_NUM,42),
custom(CUSTDATA_HEXNUM,0x1337C0D3),
[
uuid(8b05fe77-4a6c-4133-b9cd-8f81747af784),
custom(CUSTDATA_STRLIT,"ITypeLib2::GetCustData"),
custom(CUSTDATA_NUM,42),
custom(CUSTDATA_HEXNUM,0x1337C0D3),
id(2)
]
library Test
{
......
......@@ -26,15 +26,3 @@
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#include "wine/wine_common_ver.rc"
/* @makedep: tmarshal.tlb */
1 TYPELIB tmarshal.tlb
/* @makedep: test_tlb.tlb */
2 TYPELIB test_tlb.tlb
/* @makedep: test_reg.tlb */
3 TYPELIB test_reg.tlb
/* @makedep: test_simple.tlb */
4 TYPELIB test_simple.tlb
......@@ -3,9 +3,6 @@ IMPORTS = uuid shell32 oleaut32 ole32 user32 advapi32
EXTRADLLFLAGS = -mwindows -municode
RC_SRCS = \
rsrc.rc
C_SRCS = \
arguments.c \
host.c \
......
/*
* Copyright 2010 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* @makedep: ihost.tlb */
1 TYPELIB ihost.tlb
......@@ -91,7 +91,7 @@ struct incl_file
#define FLAG_IDL_SERVER 0x000400 /* generates a server (_s.c) file */
#define FLAG_IDL_IDENT 0x000800 /* generates an ident (_i.c) file */
#define FLAG_IDL_REGISTER 0x001000 /* generates a registration (_r.res) file */
#define FLAG_IDL_TYPELIB 0x002000 /* generates a typelib (.tlb) file */
#define FLAG_IDL_TYPELIB 0x002000 /* generates a typelib (_l.res) file */
#define FLAG_IDL_REGTYPELIB 0x004000 /* generates a registered typelib (_t.res) file */
#define FLAG_IDL_HEADER 0x008000 /* generates a header (.h) file */
#define FLAG_RC_PO 0x010000 /* rc file contains translations */
......@@ -105,7 +105,7 @@ static const struct
const char *ext;
} idl_outputs[] =
{
{ FLAG_IDL_TYPELIB, ".tlb" },
{ FLAG_IDL_TYPELIB, "_l.res" },
{ FLAG_IDL_REGTYPELIB, "_t.res" },
{ FLAG_IDL_CLIENT, "_c.c" },
{ FLAG_IDL_IDENT, "_i.c" },
......@@ -1331,16 +1331,6 @@ static struct file *open_include_file( const struct makefile *make, struct incl_
return file;
}
/* check for corresponding tlb file in source dir */
if (strendswith( pFile->name, ".tlb" ) &&
(file = open_local_file( make, replace_extension( pFile->name, ".tlb", ".idl" ), &filename )))
{
pFile->sourcename = filename;
pFile->filename = obj_dir_path( make, pFile->name );
return file;
}
/* check for extra targets */
if (strarray_exists( &make->extra_targets, pFile->name ))
{
......@@ -1511,8 +1501,6 @@ static void parse_file( struct makefile *make, struct incl_file *source, int src
{
unsigned int i;
if (strendswith( source->name, ".tlb" )) return; /* typelibs don't include anything */
/* generated .h file always includes these */
add_include( make, source, "rpc.h", 0, INCL_NORMAL );
add_include( make, source, "rpcndr.h", 0, INCL_NORMAL );
......@@ -1776,7 +1764,7 @@ static void add_generated_sources( struct makefile *make )
}
if (source->file->flags & FLAG_IDL_TYPELIB)
{
add_generated_source( make, replace_extension( source->name, ".idl", ".tlb" ), NULL );
add_generated_source( make, replace_extension( source->name, ".idl", "_l.res" ), NULL );
}
if (source->file->flags & FLAG_IDL_REGTYPELIB)
{
......@@ -2825,15 +2813,6 @@ static void output_source_idl( struct makefile *make, struct incl_file *source,
/*******************************************************************
* output_source_tlb
*/
static void output_source_tlb( struct makefile *make, struct incl_file *source, const char *obj )
{
strarray_add( &make->all_targets, source->name );
}
/*******************************************************************
* output_source_x
*/
static void output_source_x( struct makefile *make, struct incl_file *source, const char *obj )
......@@ -3141,7 +3120,6 @@ static const struct
{ "mc", output_source_mc },
{ "res", output_source_res },
{ "idl", output_source_idl },
{ "tlb", output_source_tlb },
{ "sfd", output_source_sfd },
{ "svg", output_source_svg },
{ "nls", output_source_nls },
......
......@@ -880,6 +880,7 @@ int main(int argc,char *argv[])
else if (strendswith( output_name, "_i.c" )) do_idfile = 1;
else if (strendswith( output_name, "_r.res" )) do_regscript = 1;
else if (strendswith( output_name, "_t.res" )) do_typelib = 1;
else if (strendswith( output_name, "_l.res" )) do_typelib = 1;
else if (strendswith( output_name, "dlldata.c" )) do_dlldata = 1;
else do_everything = 1;
}
......
......@@ -2757,6 +2757,7 @@ static void save_all_changes(msft_typelib_t *typelib)
if (expr)
sprintf( typelib_id, "#%d", expr->cval );
add_output_to_resources( "TYPELIB", typelib_id );
if (strendswith( typelib_name, "_t.res" )) /* add typelib registration */
output_typelib_regscript( typelib->typelib );
}
else flush_output_buffer( typelib_name );
......
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