Kaydet (Commit) d1b2853e authored tarafından Daniel Boelzle's avatar Daniel Boelzle

#107130#

+ cli_udkapi.dll, cli_offapi.dll -> cli_types.dll
+ support for deployed type metadata (->pkgchk)
+ different implementation loading
+ misc climaker fixes
+ misc code cleanup
üst a2a7384e
ure cli_ure : cppuhelper cppu sal codemaker offapi udkapi NULL
ure cli_ure : cppuhelper cppu sal codemaker offapi NULL
ure cli_ure usr1 - all tt_mkout NULL
ure cli_ure\source\climaker nmake - all ure_source_climaker NULL
ure cli_ure\unotypes nmake - all ure_unotypes ure_source_climaker NULL
......
..\%__SRC%\bin\climaker.exe %_DEST%\bin%_EXT%\climaker.exe
..\%__SRC%\bin\climaker.pdb %_DEST%\bin%_EXT%\climaker.pdb
..\%__SRC%\bin\cli_* %_DEST%\bin%_EXT%\cli_*
..\%__SRC%\bin\cli_*.dll %_DEST%\bin%_EXT%\cli_*.dll
..\%__SRC%\bin\cli_*.pdb %_DEST%\bin%_EXT%\cli_*.pdb
......@@ -2,9 +2,9 @@
*
* $RCSfile: climaker_app.cxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: dbo $ $Date: 2003-04-07 09:40:41 $
* last change: $Author: dbo $ $Date: 2003-05-08 12:40:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -67,6 +67,7 @@
#include "osl/process.h"
#include "osl/file.hxx"
#include "osl/thread.h"
#include "cppuhelper/shlib.hxx"
#include "cppuhelper/bootstrap.hxx"
#include "com/sun/star/lang/XInitialization.hpp"
......@@ -227,23 +228,29 @@ Reference< registry::XSimpleRegistry > open_registries(
//------------------------------------------------------------------------------
static char const s_usingText [] =
"\n"
"using: climaker <switches> [registry-file-1 registry-file-2 ...]\n\n"
"using: climaker <switches> [registry-file-1 registry-file-2 ...]\n"
"\n"
"switches:\n"
" -O <output-file> output assembly (default is unotypes.dll)\n"
" -T <type1[;type2;...]> types to be generated (if none is given,\n"
" then all types\n"
" of given registries are created\n"
" -X <extra-rdb> extra rdb to saturate referenced types in given\n"
" registry-file(s)\n"
" these types will not be generated into\n"
" output assembly\n"
" -r, --reference <assembly> reference meta-data from assembly\n"
" -O, --out <output-file> output assembly file;\n"
" defaults to cli_unotypes.dll if more than one\n"
" registry-file is given, else <registry-file>.dll\n"
" -T, --types types to be generated (if none is given,\n"
" <type1[;type2;...]> then all types of given registries are emitted\n"
" -X, --extra <rdb-file> additional rdb to saturate referenced types in\n"
" given registry file(s); these types will not be\n"
" emitted into the output assembly file\n"
" -r, --reference reference metadata from assembly file\n"
" <assembly-file>\n"
" --version <version> sets assembly version\n"
" --product <name> sets assembly product name\n"
" --description <text> sets assembly description text\n"
" -v, --verbose verbose output to stdout\n"
" -h, --help this message\n\n"
"example: climaker -O my_types.dll -r udkapi.dll -X udkapi.rdb my_types.rdb\n"
" -h, --help this message\n"
"\n"
"example: climaker --out cli_mytypes.dll \\\n"
" --reference cli_types.dll \\\n"
" --extra types.rdb \\\n"
" mytypes.rdb\n"
"\n";
}
......@@ -267,11 +274,13 @@ extern "C" int SAL_CALL main( int argc, char const * argv [] )
{
OUString str_help = OUSTR("help");
OUString str_verbose = OUSTR("verbose");
OUString str_out = OUSTR("out");
OUString str_reference = OUSTR("reference");
OUString str_types = OUSTR("types");
OUString str_extra = OUSTR("extra");
OUString str_version = OUSTR("version");
OUString str_product = OUSTR("product");
OUString str_description = OUSTR("description");
OUString str_empty;
OUString output;
vector< OUString > mandatory_registries;
......@@ -293,7 +302,7 @@ extern "C" int SAL_CALL main( int argc, char const * argv [] )
{
g_verbose = true;
}
else if (read_argument( &cmd_arg, 'T', str_empty, &nPos ))
else if (read_argument( &cmd_arg, 'T', str_types, &nPos ))
{
sal_Int32 index = 0;
do
......@@ -303,7 +312,7 @@ extern "C" int SAL_CALL main( int argc, char const * argv [] )
}
while (index >= 0);
}
else if (read_argument( &cmd_arg, 'X', str_empty, &nPos ))
else if (read_argument( &cmd_arg, 'X', str_extra, &nPos ))
{
extra_registries.push_back(
path_make_absolute_file_url( cmd_arg ) );
......@@ -317,7 +326,7 @@ extern "C" int SAL_CALL main( int argc, char const * argv [] )
!read_argument( &product, '\0', str_product, &nPos ) &&
!read_argument(
&description, '\0', str_description, &nPos ) &&
!read_argument( &output, 'O', str_empty, &nPos ))
!read_argument( &output, 'O', str_out, &nPos ))
{
OSL_VERIFY(
osl_Process_E_None == osl_getCommandArg(
......@@ -347,17 +356,26 @@ extern "C" int SAL_CALL main( int argc, char const * argv [] )
UNO_QUERY_THROW );
// get rdb tdprovider factory
Reference< lang::XSingleComponentFactory > xFac(
Reference< lang::XSingleComponentFactory > xTDprov_factory(
::cppu::loadSharedLibComponentFactory(
// OUSTR("regtypeprov.uno" SAL_DLLEXTENSION), OUString(),
OUSTR("rdbtdp"), OUString(),
OUSTR("com.sun.star.comp.stoc.RegistryTypeDescriptionProvider"),
Reference< lang::XMultiServiceFactory >(
xContext->getServiceManager(), UNO_QUERY ),
Reference< registry::XRegistryKey >() ), UNO_QUERY_THROW );
// create registry td provider
Reference< registry::XRegistryKey >() ), UNO_QUERY );
if (! xTDprov_factory.is())
{
throw RuntimeException(
OUSTR("cannot get registry typedescription provider: "
"regtypeprov.uno" SAL_DLLEXTENSION "!"),
Reference< XInterface >() );
}
// create registry td provider for mandatory registry files
Any arg( makeAny( open_registries( mandatory_registries, xContext ) ) );
Reference< XInterface > xTD_provider(
xFac->createInstanceWithArgumentsAndContext(
xTDprov_factory->createInstanceWithArgumentsAndContext(
Sequence< Any >( &arg, 1 ), xContext ) );
// insert provider to tdmgr
Reference< container::XSet > xSet( xTDmgr, UNO_QUERY_THROW );
......@@ -368,7 +386,7 @@ extern "C" int SAL_CALL main( int argc, char const * argv [] )
{
arg = makeAny( open_registries( extra_registries, xContext ) );
provider = makeAny(
xFac->createInstanceWithArgumentsAndContext(
xTDprov_factory->createInstanceWithArgumentsAndContext(
Sequence< Any >( &arg, 1 ), xContext ) );
xSet->insert( provider );
OSL_ASSERT( xSet->has( provider ) );
......@@ -387,7 +405,7 @@ extern "C" int SAL_CALL main( int argc, char const * argv [] )
}
else
{
output = OUSTR("unotypes");
output = OUSTR("cli_unotypes");
}
}
output = path_make_absolute_file_url( output );
......@@ -517,7 +535,7 @@ extern "C" int SAL_CALL main( int argc, char const * argv [] )
catch (Exception & exc)
{
OString msg(
OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
OUStringToOString( exc.Message, osl_getThreadTextEncoding() ) );
fprintf(
stderr, "\n> error: %s\n> dying abnormally...\n", msg.getStr() );
ret = 1;
......@@ -526,7 +544,7 @@ extern "C" int SAL_CALL main( int argc, char const * argv [] )
{
OString msg( OUStringToOString(
String_to_ustring( exc->ToString() ),
RTL_TEXTENCODING_ASCII_US ) );
osl_getThreadTextEncoding() ) );
fprintf(
stderr,
"\n> error: .NET exception occured: %s\n> dying abnormally...",
......@@ -543,7 +561,7 @@ extern "C" int SAL_CALL main( int argc, char const * argv [] )
catch (Exception & exc)
{
OString msg(
OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
OUStringToOString( exc.Message, osl_getThreadTextEncoding() ) );
fprintf(
stderr,
"\n> error disposing component context: %s\n"
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: climaker_emit.cxx,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: dbo $ $Date: 2003-04-25 15:14:33 $
* last change: $Author: dbo $ $Date: 2003-05-08 12:40:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -178,7 +178,8 @@ Assembly * TypeEmitter::type_resolve(
::System::Object * sender, ::System::ResolveEventArgs * args )
{
::System::String * cts_name = args->get_Name();
::System::Type * ret_type = m_module_builder->GetType( cts_name, false );
::System::Type * ret_type = m_module_builder->GetType(
cts_name, false /* no exc */ );
if (0 == ret_type)
{
iface_entry * entry = dynamic_cast< iface_entry * >(
......@@ -191,7 +192,8 @@ Assembly * TypeEmitter::type_resolve(
sal_Int32 len = m_extra_assemblies->get_Length();
for ( sal_Int32 pos = 0; pos < len; ++pos )
{
ret_type = m_extra_assemblies[ pos ]->GetType( cts_name, false );
ret_type = m_extra_assemblies[ pos ]->GetType(
cts_name, false /* no exc */ );
if (0 != ret_type)
{
if (g_verbose)
......@@ -1551,6 +1553,7 @@ ConstructorInfo * TypeEmitter::get_ctor_uno_MethodAttribute()
xType, UNO_QUERY_THROW ) );
case TypeClass_SERVICE:
case TypeClass_MODULE:
case TypeClass_SINGLETON:
// ignore these
return 0;
default:
......
UDK_3.1 {
global:
?ServiceFactory_load@util@uno@@YA?AV?$Reference@VXSingleComponentFactory@lang@star@sun@com@@@2star@sun@com@@ABVOUString@rtl@@0@Z;
?ServiceFactory_writeInfo@util@uno@@YAXABVOUString@rtl@@ABV?$Reference@VXRegistryKey@registry@star@sun@com@@@2star@sun@com@@@Z;
?ServiceFactory_load@util@uno@@YA?AV?$Reference@VXSingleComponentFactory@lang@star@sun@com@@@2star@sun@com@@ABV?$Reference@VXComponentContext@uno@star@sun@com@@@2456@ABVOUString@rtl@@1@Z;
?ServiceFactory_writeInfo@util@uno@@YAXABV?$Reference@VXComponentContext@uno@star@sun@com@@@2star@sun@com@@ABVOUString@rtl@@ABV?$Reference@VXRegistryKey@registry@star@sun@com@@@2456@@Z;
local:
*;
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: native_share.h,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: dbo $ $Date: 2003-04-11 17:08:46 $
* last change: $Author: dbo $ $Date: 2003-05-08 12:41:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -61,7 +61,7 @@
#using <mscorlib.dll>
#using "cli_ure.dll"
#using "cli_udkapi.dll"
#using "cli_types.dll"
#include <vcclr.h>
......
......@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.2 $
# $Revision: 1.3 $
#
# last change: $Author: dbo $ $Date: 2003-04-25 14:04:53 $
# last change: $Author: dbo $ $Date: 2003-05-08 12:41:02 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
......@@ -74,10 +74,8 @@ TARGET = cli_ure
.INCLUDE : $(PRJ)$/util$/target.pmk
.INCLUDE : target.mk
CLI_URE = $(OUT)$/bin$/cli_ure.dll
ALLTAR : \
$(CLI_URE)
$(OUT)$/bin$/cli_ure.dll
CSFILES = \
uno$/QueryInterface.cs \
......@@ -89,13 +87,14 @@ CSFILES = \
uno$/util$/WeakBase.cs \
uno$/util$/WeakComponentBase.cs \
uno$/util$/ServiceBase.cs \
uno$/util$/ServiceFactory.cs
uno$/util$/ServiceFactory.cs \
uno$/util$/DeployedTypeResolver.cs
$(CLI_URE) : $(CLI_UDKAPI) $(CSFILES)
+csc.exe $(CSCFLAGS) \
$(OUT)$/bin$/cli_ure.dll : $(CSFILES) $(OUT)$/bin$/cli_types.dll
+csc $(CSCFLAGS) \
-target:library \
-out:$@ \
-reference:$(CLI_UDKAPI) \
-reference:$(OUT)$/bin$/cli_types.dll \
-reference:System.dll \
$(CSFILES)
......
......@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.2 $
# $Revision: 1.3 $
#
# last change: $Author: dbo $ $Date: 2003-04-25 15:14:34 $
# last change: $Author: dbo $ $Date: 2003-05-08 12:41:05 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
......@@ -69,27 +69,25 @@ PRJNAME = cli_ure
# for dummy
TARGET = cli_ure
CLIMAKERFLAGS =
.IF "$(debug)" != ""
CLIMAKERFLAGS += --verbose
.ENDIF
.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/util$/target.pmk
.INCLUDE : target.mk
ALLTAR : \
$(CLI_OFFAPI)
$(CLI_UDKAPI) : $(SOLARBINDIR)$/udkapi.rdb $(CLIMAKER)
+$(CLIMAKER) -O $@ $(CLIMAKER_FLAGS) \
--version "3.1.0.0" \
--product "OpenOffice.org SDK" \
--description "This assembly contains UNO-API metadata of the OpenOffice.org Software Development Kit (SDK)." \
$(SOLARBINDIR)$/udkapi.rdb
$(OUT)$/bin$/cli_types.dll
$(CLI_OFFAPI) : $(CLI_UDKAPI) $(SOLARBINDIR)$/offapi.rdb $(CLIMAKER)
+$(CLIMAKER) -O $@ $(CLIMAKER_FLAGS) \
--version "1.0.0.0" \
--product "OpenOffice.org SDK" \
--description "This assembly contains API metadata of the OpenOffice.org Software Development Kit (SDK)." \
--reference $(CLI_UDKAPI) \
-X $(SOLARBINDIR)$/udkapi.rdb $(SOLARBINDIR)$/offapi.rdb
$(OUT)$/bin$/cli_types.dll : $(OUT)$/bin$/climaker.exe $(SOLARBINDIR)$/types.rdb
+$(OUT)$/bin$/climaker.exe $(CLIMAKERFLAGS) \
--out $@ \
--version "1.0.0.0" \
--product "OpenOffice.org SDK" \
--description "This assembly contains API metadata of the OpenOffice.org Software Development Kit (SDK)." \
$(SOLARBINDIR)$/types_doc.rdb
.ENDIF
......@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.pmk,v $
#
# $Revision: 1.1 $
# $Revision: 1.2 $
#
# last change: $Author: dbo $ $Date: 2003-03-28 10:17:51 $
# last change: $Author: dbo $ $Date: 2003-05-08 12:41:06 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
......@@ -64,7 +64,3 @@
BUILD_FOR_CLI = "true"
.ENDIF
CLIMAKER = $(OUT)$/bin$/climaker.exe
CLI_UDKAPI = $(OUT)$/bin$/cli_udkapi.dll
CLI_OFFAPI = $(OUT)$/bin$/cli_offapi.dll
......@@ -2,9 +2,9 @@
#
# $RCSfile: target.pmk,v $
#
# $Revision: 1.1 $
# $Revision: 1.2 $
#
# last change: $Author: dbo $ $Date: 2003-03-28 10:17:51 $
# last change: $Author: dbo $ $Date: 2003-05-08 12:41:06 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
......@@ -77,11 +77,3 @@ CSCFLAGS += -o
CSCFLAGS += -debug+ -checked+ -define:DEBUG -define:TRACE
.ENDIF
###### climaker ######
CLIMAKER_FLAGS =
.IF "$(debug)" != ""
CLIMAKER_FLAGS += --verbose
.ENDIF
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