#107130# new
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
ure cli_ure : cppuhelper cppu sal codemaker offapi udkapi 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
|
||||
ure cli_ure\source\ure nmake - all ure_source_ure ure_unotypes NULL
|
||||
ure cli_ure\source\native nmake - all ure_source_native ure_source_ure ure_unotypes NULL
|
||||
#ure cli_ure\util nmake - all ure_util ure_source_ure ure_source_native NULL
|
||||
@@ -0,0 +1,5 @@
|
||||
..\%__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\cppuhelper* %_DEST%\bin%_EXT%\cppuhelper*
|
||||
@@ -0,0 +1,526 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* $RCSfile: climaker_app.cxx,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
* last change: $Author: dbo $ $Date: 2003-03-28 10:17:37 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
*
|
||||
* - GNU Lesser General Public License Version 2.1
|
||||
* - Sun Industry Standards Source License Version 1.1
|
||||
*
|
||||
* Sun Microsystems Inc., October, 2000
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2000 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Sun Industry Standards Source License Version 1.1
|
||||
* =================================================
|
||||
* The contents of this file are subject to the Sun Industry Standards
|
||||
* Source License Version 1.1 (the "License"); You may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of the
|
||||
* License at http://www.openoffice.org/license.html.
|
||||
*
|
||||
* Software provided under this License is provided on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
* See the License for the specific provisions governing your rights and
|
||||
* obligations concerning the Software.
|
||||
*
|
||||
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
*
|
||||
* Copyright: 2000 by Sun Microsystems, Inc.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): _______________________________________
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include "climaker_share.h"
|
||||
|
||||
#include "osl/process.h"
|
||||
#include "osl/file.hxx"
|
||||
#include "cppuhelper/shlib.hxx"
|
||||
#include "cppuhelper/bootstrap.hxx"
|
||||
#include "com/sun/star/lang/XInitialization.hpp"
|
||||
#include "com/sun/star/lang/XSingleComponentFactory.hpp"
|
||||
#include "com/sun/star/lang/XComponent.hpp"
|
||||
#include "com/sun/star/container/XSet.hpp"
|
||||
#include "com/sun/star/reflection/XTypeDescriptionEnumerationAccess.hpp"
|
||||
|
||||
|
||||
using namespace ::std;
|
||||
using namespace ::System::Reflection;
|
||||
|
||||
using namespace ::rtl;
|
||||
using namespace ::osl;
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::uno;
|
||||
|
||||
namespace climaker
|
||||
{
|
||||
|
||||
bool g_verbose = false;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static bool read_option(
|
||||
sal_Unicode copt, OUString const & opt, sal_uInt32 * pIndex )
|
||||
{
|
||||
if (osl_getCommandArgCount() <= *pIndex)
|
||||
return false;
|
||||
|
||||
OUString arg;
|
||||
osl_getCommandArg( *pIndex, &arg.pData );
|
||||
sal_Int32 len = arg.getLength();
|
||||
|
||||
if (len < 2 || '-' != arg[ 0 ])
|
||||
return false;
|
||||
|
||||
if (2 == len && copt == arg[ 1 ])
|
||||
{
|
||||
++(*pIndex);
|
||||
return true;
|
||||
}
|
||||
if ('-' == arg[ 1 ] && 0 == rtl_ustr_compare( arg.pData->buffer + 2, opt.pData->buffer ))
|
||||
{
|
||||
++(*pIndex);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static bool read_argument(
|
||||
OUString * pValue, sal_Unicode copt, OUString const & opt, sal_uInt32 * pIndex )
|
||||
{
|
||||
if (read_option( copt, opt, pIndex ))
|
||||
{
|
||||
if (*pIndex < osl_getCommandArgCount())
|
||||
{
|
||||
osl_getCommandArg( *pIndex, &pValue->pData );
|
||||
++(*pIndex);
|
||||
return true;
|
||||
}
|
||||
--(*pIndex);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static OUString const & path_get_working_dir()
|
||||
{
|
||||
static OUString s_workingDir;
|
||||
if (! s_workingDir.getLength())
|
||||
osl_getProcessWorkingDir( &s_workingDir.pData );
|
||||
return s_workingDir;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static OUString path_make_absolute_file_url( OUString const & path )
|
||||
{
|
||||
OUString file_url;
|
||||
oslFileError rc = osl_getFileURLFromSystemPath( path.pData, &file_url.pData );
|
||||
if (osl_File_E_None == rc)
|
||||
{
|
||||
OUString abs;
|
||||
rc = osl_getAbsoluteFileURL( path_get_working_dir().pData, file_url.pData, &abs.pData );
|
||||
if (osl_File_E_None == rc)
|
||||
{
|
||||
return abs;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUSTR("cannot make absolute: ") + file_url,
|
||||
Reference< XInterface >() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUSTR("cannot get file url from system path: ") + path,
|
||||
Reference< XInterface >() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Reference< registry::XSimpleRegistry > open_registries(
|
||||
vector< OUString > const & registries,
|
||||
Reference< XComponentContext > xContext )
|
||||
{
|
||||
if (registries.empty())
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUSTR("no registries given!"),
|
||||
Reference< XInterface >() );
|
||||
}
|
||||
|
||||
Reference< registry::XSimpleRegistry > xSimReg;
|
||||
for ( size_t nPos = registries.size(); nPos--; )
|
||||
{
|
||||
Reference< registry::XSimpleRegistry > xReg(
|
||||
xContext->getServiceManager()->createInstanceWithContext(
|
||||
OUSTR("com.sun.star.registry.SimpleRegistry"), xContext ),
|
||||
UNO_QUERY_THROW );
|
||||
xReg->open( registries[ nPos ], sal_True, sal_False );
|
||||
if (! xReg->isValid())
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUSTR("invalid registry: ") + registries[ nPos ],
|
||||
Reference< XInterface >() );
|
||||
}
|
||||
|
||||
if (xSimReg.is()) // nest?
|
||||
{
|
||||
Reference< registry::XSimpleRegistry > xNested(
|
||||
xContext->getServiceManager()->createInstanceWithContext(
|
||||
OUSTR("com.sun.star.registry.NestedRegistry"), xContext ),
|
||||
UNO_QUERY_THROW );
|
||||
Reference< lang::XInitialization > xInit( xNested, UNO_QUERY_THROW );
|
||||
Sequence< Any > args( 2 );
|
||||
args[ 0 ] <<= xReg;
|
||||
args[ 1 ] <<= xSimReg;
|
||||
xInit->initialize( args );
|
||||
xSimReg = xNested;
|
||||
}
|
||||
else
|
||||
{
|
||||
xSimReg = xReg;
|
||||
}
|
||||
}
|
||||
|
||||
return xSimReg;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static char const s_usingText [] =
|
||||
"\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"
|
||||
" --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"
|
||||
"\n";
|
||||
|
||||
}
|
||||
|
||||
using namespace ::climaker;
|
||||
|
||||
//##################################################################################################
|
||||
extern "C" int SAL_CALL main( int argc, char const * argv [] )
|
||||
{
|
||||
sal_uInt32 nCount = osl_getCommandArgCount();
|
||||
if (0 == nCount)
|
||||
{
|
||||
printf( s_usingText );
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ret = 0;
|
||||
Reference< XComponentContext > xContext;
|
||||
|
||||
try
|
||||
{
|
||||
OUString str_help = OUSTR("help");
|
||||
OUString str_verbose = OUSTR("verbose");
|
||||
OUString str_reference = OUSTR("reference");
|
||||
OUString str_version = OUSTR("version");
|
||||
OUString str_product = OUSTR("product");
|
||||
OUString str_description = OUSTR("description");
|
||||
OUString str_empty;
|
||||
|
||||
OUString output;
|
||||
vector< OUString > mandatory_registries;
|
||||
vector< OUString > extra_registries;
|
||||
vector< OUString > extra_assemblies;
|
||||
vector< OUString > explicit_types;
|
||||
OUString version, product, description;
|
||||
|
||||
OUString cmd_arg;
|
||||
for ( sal_uInt32 nPos = 0; nPos < nCount; )
|
||||
{
|
||||
// options
|
||||
if (read_option( 'h', str_help, &nPos ))
|
||||
{
|
||||
printf( s_usingText );
|
||||
return 0;
|
||||
}
|
||||
else if (read_option( 'v', str_verbose, &nPos ))
|
||||
{
|
||||
g_verbose = true;
|
||||
}
|
||||
else if (read_argument( &cmd_arg, 'T', str_empty, &nPos ))
|
||||
{
|
||||
sal_Int32 index = 0;
|
||||
do
|
||||
{
|
||||
explicit_types.push_back( cmd_arg.getToken( 0, ';', index ) );
|
||||
}
|
||||
while (index >= 0);
|
||||
}
|
||||
else if (read_argument( &cmd_arg, 'X', str_empty, &nPos ))
|
||||
{
|
||||
extra_registries.push_back( path_make_absolute_file_url( cmd_arg ) );
|
||||
}
|
||||
else if (read_argument( &cmd_arg, 'r', str_reference, &nPos ))
|
||||
{
|
||||
extra_assemblies.push_back( path_make_absolute_file_url( cmd_arg ) );
|
||||
}
|
||||
else if (!read_argument( &version, '\0', str_version, &nPos ) &&
|
||||
!read_argument( &product, '\0', str_product, &nPos ) &&
|
||||
!read_argument( &description, '\0', str_description, &nPos ) &&
|
||||
!read_argument( &output, 'O', str_empty, &nPos ))
|
||||
{
|
||||
OSL_VERIFY( osl_Process_E_None == osl_getCommandArg( nPos, &cmd_arg.pData ) );
|
||||
++nPos;
|
||||
if (cmd_arg.getLength() && '-' != cmd_arg[ 0 ]) // no option
|
||||
{
|
||||
mandatory_registries.push_back( path_make_absolute_file_url( cmd_arg ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUSTR("unknown option ") + cmd_arg,
|
||||
Reference< XInterface >() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// bootstrap uno
|
||||
xContext = ::cppu::bootstrap_InitialComponentContext(
|
||||
Reference< registry::XSimpleRegistry >() );
|
||||
Reference< container::XHierarchicalNameAccess > xTDmgr(
|
||||
xContext->getValueByName(
|
||||
OUSTR("/singletons/com.sun.star.reflection.theTypeDescriptionManager") ),
|
||||
UNO_QUERY_THROW );
|
||||
|
||||
// get rdb tdprovider factory
|
||||
Reference< lang::XSingleComponentFactory > xFac(
|
||||
::cppu::loadSharedLibComponentFactory(
|
||||
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
|
||||
Any arg( makeAny( open_registries( mandatory_registries, xContext ) ) );
|
||||
Reference< XInterface > xTD_provider(
|
||||
xFac->createInstanceWithArgumentsAndContext(
|
||||
Sequence< Any >( &arg, 1 ), xContext ) );
|
||||
// insert provider to tdmgr
|
||||
Reference< container::XSet > xSet( xTDmgr, UNO_QUERY_THROW );
|
||||
Any provider( makeAny( xTD_provider ) );
|
||||
xSet->insert( provider );
|
||||
OSL_ASSERT( xSet->has( provider ) );
|
||||
if (! extra_registries.empty())
|
||||
{
|
||||
arg = makeAny( open_registries( extra_registries, xContext ) );
|
||||
provider = makeAny(
|
||||
xFac->createInstanceWithArgumentsAndContext(
|
||||
Sequence< Any >( &arg, 1 ), xContext ) );
|
||||
xSet->insert( provider );
|
||||
OSL_ASSERT( xSet->has( provider ) );
|
||||
}
|
||||
|
||||
if (0 == output.getLength()) // no output file specified
|
||||
{
|
||||
// if only one rdb has been given, then take rdb name
|
||||
if (1 == mandatory_registries.size())
|
||||
{
|
||||
output = mandatory_registries[ 0 ];
|
||||
output = output.copy( output.lastIndexOf( '/' ) +1 );
|
||||
sal_Int32 dot = output.lastIndexOf( '.' );
|
||||
if (dot > 0)
|
||||
output = output.copy( 0, dot );
|
||||
}
|
||||
else
|
||||
{
|
||||
output = OUSTR("unotypes");
|
||||
}
|
||||
}
|
||||
output = path_make_absolute_file_url( output );
|
||||
sal_Int32 slash = output.lastIndexOf( '/' );
|
||||
OUString sys_output_dir;
|
||||
if (FileBase::E_None != FileBase::getSystemPathFromFileURL(
|
||||
output.copy( 0, slash ), sys_output_dir ))
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUSTR("cannot get system path from file url ") + output.copy( 0, slash ),
|
||||
Reference< XInterface >() );
|
||||
}
|
||||
OUString filename( output.copy( slash +1 ) );
|
||||
sal_Int32 dot = filename.lastIndexOf( '.' );
|
||||
OUString name( filename );
|
||||
if (dot < 0) // has no extension
|
||||
filename += OUSTR(".dll");
|
||||
else
|
||||
name = name.copy( 0, dot );
|
||||
::System::String * output_dir = ustring_to_String( sys_output_dir );
|
||||
::System::String * output_file = ustring_to_String( filename );
|
||||
|
||||
// setup assembly info: xxx todo set more? e.g. avoid strong versioning
|
||||
AssemblyName * assembly_name = new AssemblyName();
|
||||
assembly_name->set_CodeBase( output_dir );
|
||||
assembly_name->set_Name( name );
|
||||
if (0 != version.getLength())
|
||||
{
|
||||
assembly_name->set_Version( new ::System::Version( ustring_to_String( version ) ) );
|
||||
}
|
||||
|
||||
// app domain
|
||||
::System::AppDomain * current_appdomain = ::System::AppDomain::get_CurrentDomain();
|
||||
// target assembly
|
||||
Emit::AssemblyBuilder * assembly_builder =
|
||||
current_appdomain->DefineDynamicAssembly(
|
||||
assembly_name, Emit::AssemblyBuilderAccess::Save, output_dir );
|
||||
if (0 != product.getLength())
|
||||
{
|
||||
::System::Type * params __gc [] = new ::System::Type * __gc [ 1 ];
|
||||
::System::Object * args __gc [] = new ::System::Object * __gc [ 1 ];
|
||||
params[ 0 ] = __typeof (::System::String);
|
||||
args[ 0 ] = ustring_to_String( product );
|
||||
assembly_builder->SetCustomAttribute(
|
||||
new Emit::CustomAttributeBuilder(
|
||||
__typeof (AssemblyProductAttribute) ->GetConstructor( params ), args ) );
|
||||
}
|
||||
if (0 != description.getLength())
|
||||
{
|
||||
::System::Type * params __gc [] = new ::System::Type * __gc [ 1 ];
|
||||
::System::Object * args __gc [] = new ::System::Object * __gc [ 1 ];
|
||||
params[ 0 ] = __typeof (::System::String);
|
||||
args[ 0 ] = ustring_to_String( description );
|
||||
assembly_builder->SetCustomAttribute(
|
||||
new Emit::CustomAttributeBuilder(
|
||||
__typeof (AssemblyDescriptionAttribute) ->GetConstructor( params ), args ) );
|
||||
}
|
||||
|
||||
// load extra assemblies
|
||||
Assembly * assemblies __gc [] = new Assembly * __gc [ extra_assemblies.size() ];
|
||||
for ( size_t pos = 0; pos < extra_assemblies.size(); ++pos )
|
||||
{
|
||||
assemblies[ pos ] = Assembly::LoadFrom( ustring_to_String( extra_assemblies[ pos ] ) );
|
||||
}
|
||||
|
||||
// type emitter
|
||||
TypeEmitter * type_emitter =
|
||||
new TypeEmitter( assembly_builder->DefineDynamicModule( output_file ), assemblies );
|
||||
// add handler resolving assembly's types
|
||||
::System::ResolveEventHandler * type_resolver =
|
||||
new ::System::ResolveEventHandler( type_emitter, &TypeEmitter::type_resolve );
|
||||
current_appdomain->add_TypeResolve( type_resolver );
|
||||
|
||||
// and emit types to it
|
||||
if (explicit_types.empty())
|
||||
{
|
||||
Reference< reflection::XTypeDescriptionEnumeration > xTD_enum(
|
||||
Reference< reflection::XTypeDescriptionEnumerationAccess >(
|
||||
xTD_provider, UNO_QUERY_THROW )->createTypeDescriptionEnumeration(
|
||||
OUString() /* all IDL modules */,
|
||||
Sequence< TypeClass >() /* all classes of types */,
|
||||
reflection::TypeDescriptionSearchDepth_INFINITE ) );
|
||||
while (xTD_enum->hasMoreElements())
|
||||
{
|
||||
type_emitter->get_type( xTD_enum->nextTypeDescription() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Reference< container::XHierarchicalNameAccess > xHNA(
|
||||
xTD_provider, UNO_QUERY_THROW );
|
||||
for ( size_t nPos = explicit_types.size(); nPos--; )
|
||||
{
|
||||
type_emitter->get_type(
|
||||
Reference< reflection::XTypeDescription >(
|
||||
xHNA->getByHierarchicalName( explicit_types[ nPos ] ),
|
||||
UNO_QUERY_THROW ) );
|
||||
}
|
||||
}
|
||||
type_emitter->Dispose();
|
||||
|
||||
if (g_verbose)
|
||||
{
|
||||
::System::Console::Write(
|
||||
S"> saving assembly {0}{1}{2}...",
|
||||
output_dir,
|
||||
new ::System::String(
|
||||
::System::IO::Path::DirectorySeparatorChar, 1 ),
|
||||
output_file );
|
||||
}
|
||||
assembly_builder->Save( output_file );
|
||||
if (g_verbose)
|
||||
{
|
||||
::System::Console::WriteLine( S"ok." );
|
||||
}
|
||||
current_appdomain->remove_TypeResolve( type_resolver );
|
||||
}
|
||||
catch (Exception & exc)
|
||||
{
|
||||
OString msg( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
|
||||
fprintf( stderr, "\n> error: %s\n> dying abnormally...\n", msg.getStr() );
|
||||
ret = 1;
|
||||
}
|
||||
catch (::System::Exception * exc)
|
||||
{
|
||||
OString msg(
|
||||
OUStringToOString( String_to_ustring( exc->ToString() ), RTL_TEXTENCODING_ASCII_US ) );
|
||||
fprintf(
|
||||
stderr, "\n> error: .NET exception occured: %s\n> dying abnormally...", msg.getStr() );
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Reference< lang::XComponent > xComp( xContext, UNO_QUERY );
|
||||
if (xComp.is())
|
||||
xComp->dispose();
|
||||
}
|
||||
catch (Exception & exc)
|
||||
{
|
||||
OString msg( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
|
||||
fprintf(
|
||||
stderr, "\n> error disposing component context: %s\n> dying abnormally...\n",
|
||||
msg.getStr() );
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,168 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* $RCSfile: climaker_share.h,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
* last change: $Author: dbo $ $Date: 2003-03-28 10:17:38 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
*
|
||||
* - GNU Lesser General Public License Version 2.1
|
||||
* - Sun Industry Standards Source License Version 1.1
|
||||
*
|
||||
* Sun Microsystems Inc., October, 2000
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2000 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Sun Industry Standards Source License Version 1.1
|
||||
* =================================================
|
||||
* The contents of this file are subject to the Sun Industry Standards
|
||||
* Source License Version 1.1 (the "License"); You may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of the
|
||||
* License at http://www.openoffice.org/license.html.
|
||||
*
|
||||
* Software provided under this License is provided on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
* See the License for the specific provisions governing your rights and
|
||||
* obligations concerning the Software.
|
||||
*
|
||||
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
*
|
||||
* Copyright: 2000 by Sun Microsystems, Inc.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): _______________________________________
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#using <mscorlib.dll>
|
||||
#include <vcclr.h>
|
||||
|
||||
#include "osl/diagnose.h"
|
||||
#include "com/sun/star/reflection/XConstantTypeDescription.hpp"
|
||||
#include "com/sun/star/reflection/XConstantsTypeDescription.hpp"
|
||||
#include "com/sun/star/reflection/XEnumTypeDescription.hpp"
|
||||
#include "com/sun/star/reflection/XInterfaceTypeDescription.hpp"
|
||||
#include "com/sun/star/reflection/XCompoundTypeDescription.hpp"
|
||||
|
||||
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
|
||||
|
||||
|
||||
namespace css = ::com::sun::star;
|
||||
|
||||
namespace climaker
|
||||
{
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
extern bool g_verbose;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
inline ::System::String * ustring_to_String( ::rtl::OUString const & ustr )
|
||||
{
|
||||
return new ::System::String( ustr.getStr(), 0, ustr.getLength() );
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
inline ::rtl::OUString String_to_ustring( ::System::String * str )
|
||||
{
|
||||
OSL_ASSERT( sizeof (wchar_t) == sizeof (sal_Unicode) );
|
||||
wchar_t const __pin * chars = PtrToStringChars( str );
|
||||
return ::rtl::OUString( chars, str->get_Length() );
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
__gc class TypeEmitter : public ::System::IDisposable
|
||||
{
|
||||
const ::System::Reflection::MethodAttributes s_ctor_attr;
|
||||
|
||||
::System::Reflection::Emit::ModuleBuilder * m_module_builder;
|
||||
::System::Reflection::Assembly * m_extra_assemblies __gc [];
|
||||
|
||||
::System::Reflection::MethodInfo * m_method_info_Type_GetTypeFromHandle;
|
||||
|
||||
::System::Type * m_type_Exception;
|
||||
::System::Type * get_type_Exception();
|
||||
::System::Type * m_type_RuntimeException;
|
||||
::System::Type * get_type_RuntimeException();
|
||||
::System::Reflection::ConstructorInfo * m_ctor_uno_MethodAttribute;
|
||||
::System::Reflection::ConstructorInfo * m_default_ctor_uno_MethodAttribute;
|
||||
::System::Reflection::ConstructorInfo * get_ctor_uno_MethodAttribute();
|
||||
::System::Type * m_type_Any;
|
||||
::System::Type * m_type_Any_ref;
|
||||
::System::Reflection::FieldInfo * m_field_Any_VOID;
|
||||
void emit_Any_boxed_ctor(
|
||||
::System::Reflection::Emit::TypeBuilder * type_builder,
|
||||
::System::Reflection::Emit::FieldBuilder * field_Type,
|
||||
::System::Reflection::Emit::FieldBuilder * field_Value,
|
||||
::System::Type * integral_type );
|
||||
::System::Type * get_type_Any();
|
||||
|
||||
__gc class iface_entry
|
||||
{
|
||||
public:
|
||||
css::reflection::XInterfaceTypeDescription * m_xType;
|
||||
::System::Reflection::Emit::TypeBuilder * m_type_builder;
|
||||
};
|
||||
::System::Collections::Hashtable * m_incomplete_ifaces;
|
||||
::System::Type * complete_iface_type( iface_entry * entry );
|
||||
|
||||
__gc class struct_entry
|
||||
{
|
||||
public:
|
||||
::System::String * m_member_names __gc [];
|
||||
::System::Type * m_param_types __gc [];
|
||||
::System::Reflection::ConstructorInfo * m_default_ctor;
|
||||
::System::Reflection::ConstructorInfo * m_ctor;
|
||||
};
|
||||
::System::Collections::Hashtable * m_generated_structs;
|
||||
|
||||
::System::Type * get_type(
|
||||
::System::String * cli_name, bool throw_exc );
|
||||
::System::Type * get_type(
|
||||
css::uno::Reference< css::reflection::XConstantTypeDescription > const & xType );
|
||||
::System::Type * get_type(
|
||||
css::uno::Reference< css::reflection::XConstantsTypeDescription > const & xType );
|
||||
::System::Type * get_type(
|
||||
css::uno::Reference< css::reflection::XEnumTypeDescription > const & xType );
|
||||
::System::Type * get_type(
|
||||
css::uno::Reference< css::reflection::XCompoundTypeDescription > const & xType );
|
||||
::System::Type * get_type(
|
||||
css::uno::Reference< css::reflection::XInterfaceTypeDescription > const & xType );
|
||||
public:
|
||||
TypeEmitter(
|
||||
::System::Reflection::Emit::ModuleBuilder * module_builder,
|
||||
::System::Reflection::Assembly * assemblies __gc [] );
|
||||
// must be called to finish up uncompleted types
|
||||
void Dispose();
|
||||
|
||||
::System::Reflection::Assembly * type_resolve(
|
||||
::System::Object * sender, ::System::ResolveEventArgs * args );
|
||||
|
||||
::System::Type * get_type(
|
||||
css::uno::Reference< css::reflection::XTypeDescription > const & xType );
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# $RCSfile: makefile.mk,v $
|
||||
#
|
||||
# $Revision: 1.1 $
|
||||
#
|
||||
# last change: $Author: dbo $ $Date: 2003-03-28 10:17:38 $
|
||||
#
|
||||
# The Contents of this file are made available subject to the terms of
|
||||
# either of the following licenses
|
||||
#
|
||||
# - GNU Lesser General Public License Version 2.1
|
||||
# - Sun Industry Standards Source License Version 1.1
|
||||
#
|
||||
# Sun Microsystems Inc., October, 2000
|
||||
#
|
||||
# GNU Lesser General Public License Version 2.1
|
||||
# =============================================
|
||||
# Copyright 2000 by Sun Microsystems, Inc.
|
||||
# 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License version 2.1, as published by the Free Software Foundation.
|
||||
#
|
||||
# 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., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
#
|
||||
# Sun Industry Standards Source License Version 1.1
|
||||
# =================================================
|
||||
# The contents of this file are subject to the Sun Industry Standards
|
||||
# Source License Version 1.1 (the "License"); You may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of the
|
||||
# License at http://www.openoffice.org/license.html.
|
||||
#
|
||||
# Software provided under this License is provided on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
# See the License for the specific provisions governing your rights and
|
||||
# obligations concerning the Software.
|
||||
#
|
||||
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
#
|
||||
# Copyright: 2000 by Sun Microsystems, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): _______________________________________
|
||||
#
|
||||
#
|
||||
#
|
||||
#*************************************************************************
|
||||
|
||||
PRJ = ..$/..
|
||||
PRJNAME = cli_ure
|
||||
|
||||
.INCLUDE : $(PRJ)$/util$/makefile.pmk
|
||||
.IF "$(BUILD_FOR_CLI)" != ""
|
||||
|
||||
TARGET = climaker
|
||||
TARGETTYPE = CUI
|
||||
LIBTARGET = NO
|
||||
ENABLE_EXCEPTIONS = TRUE
|
||||
|
||||
.INCLUDE : settings.mk
|
||||
|
||||
UNOUCRDEP = $(SOLARBINDIR)$/udkapi.rdb
|
||||
UNOUCRRDB = $(SOLARBINDIR)$/udkapi.rdb
|
||||
CPPUMAKERFLAGS =
|
||||
|
||||
UNOTYPES = \
|
||||
com.sun.star.uno.TypeClass \
|
||||
com.sun.star.uno.XAggregation \
|
||||
com.sun.star.uno.XWeak \
|
||||
com.sun.star.uno.XComponentContext \
|
||||
com.sun.star.lang.XTypeProvider \
|
||||
com.sun.star.lang.XInitialization \
|
||||
com.sun.star.lang.XComponent \
|
||||
com.sun.star.lang.XMultiComponentFactory \
|
||||
com.sun.star.container.XSet \
|
||||
com.sun.star.container.XHierarchicalNameAccess \
|
||||
com.sun.star.loader.XImplementationLoader \
|
||||
com.sun.star.registry.XSimpleRegistry \
|
||||
com.sun.star.registry.XRegistryKey \
|
||||
com.sun.star.reflection.XTypeDescriptionEnumerationAccess \
|
||||
com.sun.star.reflection.XConstantTypeDescription \
|
||||
com.sun.star.reflection.XConstantsTypeDescription \
|
||||
com.sun.star.reflection.XIndirectTypeDescription \
|
||||
com.sun.star.reflection.XEnumTypeDescription \
|
||||
com.sun.star.reflection.XInterfaceTypeDescription \
|
||||
com.sun.star.reflection.XInterfaceMethodTypeDescription \
|
||||
com.sun.star.reflection.XInterfaceAttributeTypeDescription \
|
||||
com.sun.star.reflection.XCompoundTypeDescription \
|
||||
com.sun.star.reflection.XEnumTypeDescription
|
||||
|
||||
CFLAGS += -clr:noAssembly
|
||||
|
||||
CXXFILES = \
|
||||
climaker_emit.cxx \
|
||||
climaker_app.cxx
|
||||
|
||||
APP1TARGET = $(TARGET)
|
||||
APP1OBJS = $(foreach,i,$(subst,.cxx,.obj $(CXXFILES)) $(OBJ)$/$i)
|
||||
|
||||
APP1STDLIBS = \
|
||||
$(CPPUHELPERLIB) \
|
||||
$(CPPULIB) \
|
||||
$(SALLIB) \
|
||||
mscoree.lib
|
||||
|
||||
.INCLUDE : target.mk
|
||||
|
||||
.ENDIF
|
||||
@@ -0,0 +1,112 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# $RCSfile: makefile.mk,v $
|
||||
#
|
||||
# $Revision: 1.1 $
|
||||
#
|
||||
# last change: $Author: dbo $ $Date: 2003-03-28 10:17:40 $
|
||||
#
|
||||
# The Contents of this file are made available subject to the terms of
|
||||
# either of the following licenses
|
||||
#
|
||||
# - GNU Lesser General Public License Version 2.1
|
||||
# - Sun Industry Standards Source License Version 1.1
|
||||
#
|
||||
# Sun Microsystems Inc., October, 2000
|
||||
#
|
||||
# GNU Lesser General Public License Version 2.1
|
||||
# =============================================
|
||||
# Copyright 2000 by Sun Microsystems, Inc.
|
||||
# 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License version 2.1, as published by the Free Software Foundation.
|
||||
#
|
||||
# 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., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
#
|
||||
# Sun Industry Standards Source License Version 1.1
|
||||
# =================================================
|
||||
# The contents of this file are subject to the Sun Industry Standards
|
||||
# Source License Version 1.1 (the "License"); You may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of the
|
||||
# License at http://www.openoffice.org/license.html.
|
||||
#
|
||||
# Software provided under this License is provided on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
# See the License for the specific provisions governing your rights and
|
||||
# obligations concerning the Software.
|
||||
#
|
||||
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
#
|
||||
# Copyright: 2000 by Sun Microsystems, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): _______________________________________
|
||||
#
|
||||
#
|
||||
#
|
||||
#*************************************************************************
|
||||
|
||||
PRJ = ..$/..
|
||||
PRJNAME = cli_ure
|
||||
|
||||
.INCLUDE : $(PRJ)$/util$/makefile.pmk
|
||||
.IF "$(BUILD_FOR_CLI)" != ""
|
||||
|
||||
TARGET = cppuhelper_cli
|
||||
NO_BSYMBOLIC = TRUE
|
||||
ENABLE_EXCEPTIONS = TRUE
|
||||
USE_DEFFILE = TRUE
|
||||
|
||||
.INCLUDE : settings.mk
|
||||
|
||||
UNOUCRRDB = $(SOLARBINDIR)$/udkapi.rdb
|
||||
UNOUCRDEP = $(UNOUCRRDB)
|
||||
UNOUCROUT = $(OUT)$/inc
|
||||
INCPRE += $(OUT)$/inc
|
||||
|
||||
CPPUMAKERFLAGS =
|
||||
UNOTYPES = \
|
||||
com.sun.star.lang.XSingleComponentFactory \
|
||||
com.sun.star.loader.CannotActivateFactoryException \
|
||||
com.sun.star.registry.CannotRegisterImplementationException \
|
||||
com.sun.star.registry.XRegistryKey
|
||||
|
||||
CFLAGS += -clr -AI $(OUT)$/bin
|
||||
|
||||
SLOFILES = \
|
||||
$(SLO)$/native_ure.obj \
|
||||
$(SLO)$/native_bootstrap.obj
|
||||
|
||||
SHL1TARGET = $(TARGET)$(UDK_MAJOR)$(COMID)
|
||||
|
||||
SHL1STDLIBS = \
|
||||
$(CPPUHELPERLIB) \
|
||||
$(CPPULIB) \
|
||||
$(SALLIB) \
|
||||
mscoree.lib
|
||||
|
||||
SHL1VERSIONMAP = msvc.map
|
||||
|
||||
SHL1DEPN =
|
||||
SHL1IMPLIB = i$(TARGET)
|
||||
SHL1LIBS = $(SLB)$/$(TARGET).lib
|
||||
SHL1DEF = $(MISC)$/$(SHL1TARGET).def
|
||||
DEF1NAME = $(SHL1TARGET)
|
||||
|
||||
.INCLUDE : target.mk
|
||||
|
||||
.ENDIF
|
||||
@@ -0,0 +1,7 @@
|
||||
UDK_3.1 {
|
||||
global:
|
||||
?ServiceFactory_load@util@uno@@YA?AV?$Reference@VXSingleComponentFactory@lang@star@sun@com@@@2star@sun@com@@ABVOUString@rtl@@@Z;
|
||||
?ServiceFactory_writeInfo@util@uno@@YAXABVOUString@rtl@@ABV?$Reference@VXRegistryKey@registry@star@sun@com@@@2star@sun@com@@@Z;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
@@ -0,0 +1,148 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* $RCSfile: native_bootstrap.cxx,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
* last change: $Author: dbo $ $Date: 2003-03-28 10:17:40 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
*
|
||||
* - GNU Lesser General Public License Version 2.1
|
||||
* - Sun Industry Standards Source License Version 1.1
|
||||
*
|
||||
* Sun Microsystems Inc., October, 2000
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2000 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Sun Industry Standards Source License Version 1.1
|
||||
* =================================================
|
||||
* The contents of this file are subject to the Sun Industry Standards
|
||||
* Source License Version 1.1 (the "License"); You may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of the
|
||||
* License at http://www.openoffice.org/license.html.
|
||||
*
|
||||
* Software provided under this License is provided on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
* See the License for the specific provisions governing your rights and
|
||||
* obligations concerning the Software.
|
||||
*
|
||||
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
*
|
||||
* Copyright: 2000 by Sun Microsystems, Inc.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): _______________________________________
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#include "native_share.h"
|
||||
|
||||
#include "rtl/bootstrap.hxx"
|
||||
#include "cppuhelper/bootstrap.hxx"
|
||||
|
||||
|
||||
using namespace ::rtl;
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::uno;
|
||||
|
||||
namespace uno
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
|
||||
//==============================================================================
|
||||
__sealed __gc class Bootstrap
|
||||
{
|
||||
inline Bootstrap();
|
||||
public:
|
||||
|
||||
/** Bootstraps the initial component context from a native UNO installation.
|
||||
|
||||
@see cppuhelper/defaultBootstrap_InitialComponentContext()
|
||||
*/
|
||||
static ::unoidl::com::sun::star::uno::XComponentContext *
|
||||
defaultBootstrap_InitialComponentContext();
|
||||
|
||||
/** Bootstraps the initial component context from a native UNO installation.
|
||||
|
||||
@param ini_file
|
||||
ini_file (may be null: uno.rc besides cppuhelper lib)
|
||||
@param bootstrap_parameters
|
||||
bootstrap parameters (maybe null)
|
||||
|
||||
@see cppuhelper/defaultBootstrap_InitialComponentContext()
|
||||
*/
|
||||
static ::unoidl::com::sun::star::uno::XComponentContext *
|
||||
defaultBootstrap_InitialComponentContext(
|
||||
::System::String * ini_file,
|
||||
::System::Collections::IDictionaryEnumerator * bootstrap_parameters );
|
||||
};
|
||||
|
||||
//______________________________________________________________________________
|
||||
::unoidl::com::sun::star::uno::XComponentContext *
|
||||
Bootstrap::defaultBootstrap_InitialComponentContext()
|
||||
{
|
||||
return defaultBootstrap_InitialComponentContext( 0, 0 );
|
||||
}
|
||||
|
||||
//______________________________________________________________________________
|
||||
::unoidl::com::sun::star::uno::XComponentContext *
|
||||
Bootstrap::defaultBootstrap_InitialComponentContext(
|
||||
::System::String * ini_file,
|
||||
::System::Collections::IDictionaryEnumerator * bootstrap_parameters )
|
||||
{
|
||||
bootstrap_parameters->Reset();
|
||||
while (bootstrap_parameters->MoveNext())
|
||||
{
|
||||
OUString key(
|
||||
String_to_ustring(
|
||||
__try_cast< ::System::String * >( bootstrap_parameters->get_Key() ) ) );
|
||||
OUString value(
|
||||
String_to_ustring(
|
||||
__try_cast< ::System::String * >( bootstrap_parameters->get_Value() ) ) );
|
||||
// // xxx todo srx644 only
|
||||
// ::rtl::Bootstrap::set( key, value );
|
||||
}
|
||||
|
||||
// bootstrap native uno
|
||||
Reference< XComponentContext > xContext;
|
||||
if (0 == ini_file)
|
||||
{
|
||||
xContext = ::cppu::defaultBootstrap_InitialComponentContext();
|
||||
}
|
||||
else
|
||||
{
|
||||
xContext = ::cppu::defaultBootstrap_InitialComponentContext(
|
||||
String_to_ustring( __try_cast< ::System::String * >( ini_file ) ) );
|
||||
}
|
||||
|
||||
return __try_cast< ::unoidl::com::sun::star::uno::XComponentContext * >(
|
||||
to_cli( xContext ) );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* $RCSfile: native_share.h,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
* last change: $Author: dbo $ $Date: 2003-03-28 10:17:41 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
*
|
||||
* - GNU Lesser General Public License Version 2.1
|
||||
* - Sun Industry Standards Source License Version 1.1
|
||||
*
|
||||
* Sun Microsystems Inc., October, 2000
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2000 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Sun Industry Standards Source License Version 1.1
|
||||
* =================================================
|
||||
* The contents of this file are subject to the Sun Industry Standards
|
||||
* Source License Version 1.1 (the "License"); You may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of the
|
||||
* License at http://www.openoffice.org/license.html.
|
||||
*
|
||||
* Software provided under this License is provided on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
* See the License for the specific provisions governing your rights and
|
||||
* obligations concerning the Software.
|
||||
*
|
||||
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
*
|
||||
* Copyright: 2000 by Sun Microsystems, Inc.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): _______________________________________
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#include "rtl/ustring.hxx"
|
||||
#include "uno/mapping.hxx"
|
||||
|
||||
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
|
||||
|
||||
#using <mscorlib.dll>
|
||||
#using <cli_ure.dll>
|
||||
#using <cli_udkapi.dll>
|
||||
#include <vcclr.h>
|
||||
|
||||
|
||||
namespace uno
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
inline ::System::String * ustring_to_String( ::rtl::OUString const & ustr )
|
||||
{
|
||||
return new ::System::String( ustr.getStr(), 0, ustr.getLength() );
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
inline ::rtl::OUString String_to_ustring( ::System::String * str )
|
||||
{
|
||||
OSL_ASSERT( sizeof (wchar_t) == sizeof (sal_Unicode) );
|
||||
wchar_t const __pin * chars = PtrToStringChars( str );
|
||||
return ::rtl::OUString( chars, str->get_Length() );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
::com::sun::star::uno::Mapping const & get_uno_to_cli();
|
||||
//------------------------------------------------------------------------------
|
||||
::com::sun::star::uno::Mapping const & get_cli_to_uno();
|
||||
|
||||
template< typename T >
|
||||
inline ::System::Object * to_cli(
|
||||
::com::sun::star::uno::Reference< T > const & x )
|
||||
{
|
||||
intptr_t intptr =
|
||||
reinterpret_cast< intptr_t >(
|
||||
get_uno_to_cli().mapInterface( x.get(), ::getCppuType( &x ) ) );
|
||||
::System::Runtime::InteropServices::GCHandle handle(
|
||||
::System::Runtime::InteropServices::GCHandle::op_Explicit( intptr ) );
|
||||
::System::Object * ret = handle.get_Target();
|
||||
handle.Free();
|
||||
return ret;
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
inline void to_uno(
|
||||
::com::sun::star::uno::Reference< T > * pRet, ::System::Object * x )
|
||||
{
|
||||
::com::sun::star::uno::Mapping const & mapping = get_cli_to_uno();
|
||||
::System::Runtime::InteropServices::GCHandle handle(
|
||||
::System::Runtime::InteropServices::GCHandle::Alloc( x ) );
|
||||
T * ret = 0;
|
||||
mapping.mapInterface(
|
||||
reinterpret_cast< void ** >( &ret ),
|
||||
reinterpret_cast< void * >(
|
||||
::System::Runtime::InteropServices::GCHandle::op_Explicit( handle )
|
||||
#if defined _WIN32
|
||||
.ToInt32()
|
||||
#elif defined _WIN64
|
||||
.ToInt64()
|
||||
#else
|
||||
#error ERROR: either _WIN64 or _WIN32 must be defined
|
||||
ERROR: either _WIN64 or _WIN32 must be defined
|
||||
#endif
|
||||
),
|
||||
::getCppuType( pRet ) );
|
||||
handle.Free();
|
||||
pRet->set( ret, SAL_NO_ACQUIRE /* takeover ownership */ );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# $RCSfile: makefile.mk,v $
|
||||
#
|
||||
# $Revision: 1.1 $
|
||||
#
|
||||
# last change: $Author: dbo $ $Date: 2003-03-28 10:17:42 $
|
||||
#
|
||||
# The Contents of this file are made available subject to the terms of
|
||||
# either of the following licenses
|
||||
#
|
||||
# - GNU Lesser General Public License Version 2.1
|
||||
# - Sun Industry Standards Source License Version 1.1
|
||||
#
|
||||
# Sun Microsystems Inc., October, 2000
|
||||
#
|
||||
# GNU Lesser General Public License Version 2.1
|
||||
# =============================================
|
||||
# Copyright 2000 by Sun Microsystems, Inc.
|
||||
# 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License version 2.1, as published by the Free Software Foundation.
|
||||
#
|
||||
# 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., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
#
|
||||
# Sun Industry Standards Source License Version 1.1
|
||||
# =================================================
|
||||
# The contents of this file are subject to the Sun Industry Standards
|
||||
# Source License Version 1.1 (the "License"); You may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of the
|
||||
# License at http://www.openoffice.org/license.html.
|
||||
#
|
||||
# Software provided under this License is provided on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
# See the License for the specific provisions governing your rights and
|
||||
# obligations concerning the Software.
|
||||
#
|
||||
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
#
|
||||
# Copyright: 2000 by Sun Microsystems, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): _______________________________________
|
||||
#
|
||||
#
|
||||
#
|
||||
#*************************************************************************
|
||||
|
||||
PRJ = ..$/..
|
||||
PRJNAME = cli_ure
|
||||
|
||||
.INCLUDE : $(PRJ)$/util$/makefile.pmk
|
||||
.IF "$(BUILD_FOR_CLI)" != ""
|
||||
|
||||
# for dummy
|
||||
TARGET = cli_ure
|
||||
|
||||
.INCLUDE : settings.mk
|
||||
|
||||
.INCLUDE : $(PRJ)$/util$/target.pmk
|
||||
.INCLUDE : target.mk
|
||||
|
||||
CLI_URE = $(OUT)$/bin$/cli_ure.dll
|
||||
|
||||
ALLTAR : \
|
||||
$(CLI_URE)
|
||||
|
||||
CSFILES = \
|
||||
uno$/QueryInterface.cs \
|
||||
uno$/Runtime.cs \
|
||||
uno$/util$/ServiceImplementationAttribute.cs \
|
||||
uno$/util$/DisposeGuard.cs \
|
||||
uno$/util$/WeakAdapter.cs \
|
||||
uno$/util$/WeakBase.cs \
|
||||
uno$/util$/WeakComponentBase.cs \
|
||||
uno$/util$/ServiceBase.cs \
|
||||
uno$/util$/ServiceFactory.cs
|
||||
|
||||
$(CLI_URE) : $(CLI_UDKAPI) $(CSFILES)
|
||||
+csc.exe $(CSCFLAGS) \
|
||||
-target:library \
|
||||
-out:$@ \
|
||||
-reference:$(CLI_UDKAPI) \
|
||||
-reference:System.dll \
|
||||
$(CSFILES)
|
||||
|
||||
.ENDIF
|
||||
@@ -0,0 +1,101 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* $RCSfile: DisposeGuard.cs,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
* last change: $Author: dbo $ $Date: 2003-03-28 10:17:44 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
*
|
||||
* - GNU Lesser General Public License Version 2.1
|
||||
* - Sun Industry Standards Source License Version 1.1
|
||||
*
|
||||
* Sun Microsystems Inc., October, 2000
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2000 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Sun Industry Standards Source License Version 1.1
|
||||
* =================================================
|
||||
* The contents of this file are subject to the Sun Industry Standards
|
||||
* Source License Version 1.1 (the "License"); You may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of the
|
||||
* License at http://www.openoffice.org/license.html.
|
||||
*
|
||||
* Software provided under this License is provided on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
* See the License for the specific provisions governing your rights and
|
||||
* obligations concerning the Software.
|
||||
*
|
||||
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
*
|
||||
* Copyright: 2000 by Sun Microsystems, Inc.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): _______________________________________
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
using System;
|
||||
using unoidl.com.sun.star.lang;
|
||||
|
||||
namespace uno.util
|
||||
{
|
||||
|
||||
/** Helper class to conveniently auto dispose UNO objects from within
|
||||
managed code.
|
||||
*/
|
||||
public struct DisposeGuard : IDisposable
|
||||
{
|
||||
private XComponent m_xComponent;
|
||||
|
||||
/** ctor.
|
||||
|
||||
@param obj target object
|
||||
*/
|
||||
public DisposeGuard( Object obj )
|
||||
{
|
||||
m_xComponent = (XComponent) uno.Runtime.queryInterface_throw( typeof (XComponent), obj );
|
||||
}
|
||||
/** ctor.
|
||||
|
||||
@param obj target object
|
||||
*/
|
||||
public DisposeGuard( XComponent obj )
|
||||
{
|
||||
m_xComponent = obj;
|
||||
}
|
||||
|
||||
/** System.IDisposable impl
|
||||
*/
|
||||
public void Dispose()
|
||||
{
|
||||
if (null != m_xComponent)
|
||||
m_xComponent.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* $RCSfile: WeakAdapter.cs,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
* last change: $Author: dbo $ $Date: 2003-03-28 10:17:46 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
*
|
||||
* - GNU Lesser General Public License Version 2.1
|
||||
* - Sun Industry Standards Source License Version 1.1
|
||||
*
|
||||
* Sun Microsystems Inc., October, 2000
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2000 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Sun Industry Standards Source License Version 1.1
|
||||
* =================================================
|
||||
* The contents of this file are subject to the Sun Industry Standards
|
||||
* Source License Version 1.1 (the "License"); You may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of the
|
||||
* License at http://www.openoffice.org/license.html.
|
||||
*
|
||||
* Software provided under this License is provided on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
* See the License for the specific provisions governing your rights and
|
||||
* obligations concerning the Software.
|
||||
*
|
||||
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
*
|
||||
* Copyright: 2000 by Sun Microsystems, Inc.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): _______________________________________
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
using System;
|
||||
using unoidl.com.sun.star.uno;
|
||||
using unoidl.com.sun.star.lang;
|
||||
|
||||
namespace uno.util
|
||||
{
|
||||
|
||||
/** An XAdapter implementation that holds a weak reference
|
||||
(System.WeakReference) to an object.
|
||||
Clients can register listeners (unoidl.com.sun.star.lang.XReference)
|
||||
which are notified when the object (the one which is kept weak) is
|
||||
being finalized. That is, that object is being destroyed because there
|
||||
are not any hard references to it.
|
||||
*/
|
||||
public class WeakAdapter : XAdapter
|
||||
{
|
||||
// references the XWeak implementation
|
||||
private WeakReference m_weakRef;
|
||||
// contains XReference objects registered by addReference
|
||||
private delegate void XReference_dispose();
|
||||
private XReference_dispose m_XReference_dispose;
|
||||
|
||||
/** ctor.
|
||||
|
||||
@param obj the object that is to be held weakly
|
||||
*/
|
||||
public WeakAdapter( Object obj )
|
||||
{
|
||||
m_weakRef = new WeakReference( obj );
|
||||
m_XReference_dispose = null;
|
||||
}
|
||||
|
||||
/** Called by the XWeak implementation (WeakBase) when it is being
|
||||
finalized. It is only being called once.
|
||||
The registererd XReference listeners are notified. On notification
|
||||
they are to unregister themselves. The notification is thread-safe.
|
||||
However, it is possible to add a listener during the notification
|
||||
process, which will never receive a notification.
|
||||
To prevent this, one would have to synchronize this method with
|
||||
the addReference method. But this can result in deadlocks in a
|
||||
multithreaded environment.
|
||||
*/
|
||||
internal /* non-virtual */ void referentDying()
|
||||
{
|
||||
XReference_dispose call;
|
||||
lock (this)
|
||||
{
|
||||
call = m_XReference_dispose;
|
||||
m_XReference_dispose = null;
|
||||
}
|
||||
if (null != call)
|
||||
call();
|
||||
}
|
||||
|
||||
// XAdapter impl
|
||||
|
||||
/** Called to obtain a hard reference o the object which is kept weakly
|
||||
by this instance.
|
||||
|
||||
@return hard reference to the object
|
||||
*/
|
||||
public Object queryAdapted()
|
||||
{
|
||||
return m_weakRef.Target;
|
||||
}
|
||||
/** Called by clients to register listener which are notified when the
|
||||
weak object is dying.
|
||||
|
||||
@param xReference a listener
|
||||
*/
|
||||
public void removeReference( XReference xReference )
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
m_XReference_dispose -= new XReference_dispose( xReference.dispose );
|
||||
}
|
||||
}
|
||||
/** Called by clients to unregister listeners.
|
||||
|
||||
@param xReference a listener
|
||||
*/
|
||||
public void addReference( XReference xReference )
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
m_XReference_dispose += new XReference_dispose( xReference.dispose );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* $RCSfile: WeakBase.cs,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
* last change: $ $Date: 2003-03-28 10:17:48 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
*
|
||||
* - GNU Lesser General Public License Version 2.1
|
||||
* - Sun Industry Standards Source License Version 1.1
|
||||
*
|
||||
* Sun Microsystems Inc., October, 2000
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2000 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Sun Industry Standards Source License Version 1.1
|
||||
* =================================================
|
||||
* The contents of this file are subject to the Sun Industry Standards
|
||||
* Source License Version 1.1 (the "License"); You may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of the
|
||||
* License at http://www.openoffice.org/license.html.
|
||||
*
|
||||
* Software provided under this License is provided on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
* See the License for the specific provisions governing your rights and
|
||||
* obligations concerning the Software.
|
||||
*
|
||||
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
*
|
||||
* Copyright: 2000 by Sun Microsystems, Inc.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): _______________________________________
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using unoidl.com.sun.star.uno;
|
||||
using unoidl.com.sun.star.lang;
|
||||
|
||||
namespace uno.util
|
||||
{
|
||||
|
||||
/** This class can be used as a base class for UNO objects.
|
||||
It implements the capability to be kept weakly
|
||||
(unoidl.com.sun.star.uno.XWeak) and it implements
|
||||
unoidl.com.sun.star.lang.XTypeProvider which is necessary for
|
||||
using the object from StarBasic.
|
||||
*/
|
||||
public class WeakBase : XWeak, XTypeProvider
|
||||
{
|
||||
// Contains all WeakAdapter which have been created in this class
|
||||
// They have to be notified when this object dies
|
||||
private WeakAdapter m_adapter;
|
||||
|
||||
protected static Hashtable s_types = new Hashtable();
|
||||
protected static Hashtable s_impl_ids = new Hashtable();
|
||||
|
||||
// XWeak impl
|
||||
/** The returned XAdapter implementation can be used to keap a
|
||||
weak reference to this object.
|
||||
|
||||
@return a weak adapter
|
||||
*/
|
||||
public XAdapter queryAdapter()
|
||||
{
|
||||
if (null == m_adapter)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (null == m_adapter)
|
||||
m_adapter = new WeakAdapter( this );
|
||||
}
|
||||
}
|
||||
return m_adapter;
|
||||
}
|
||||
|
||||
/** Overrides of Object.Finalize method.
|
||||
When there are no references to this object anymore, then the
|
||||
garbage collector calls this method, thereby causing the adapter
|
||||
object to be notified. The adapter, in turn, notifies all
|
||||
listeners (unoidl.com.sun.star.uno.XReference).
|
||||
*/
|
||||
~WeakBase()
|
||||
{
|
||||
if (null != m_adapter)
|
||||
m_adapter.referentDying();
|
||||
}
|
||||
|
||||
// XTypeProvider impl
|
||||
|
||||
/** Returns an array of Type objects which represent all implemented
|
||||
UNO interfaces of this object.
|
||||
|
||||
@return Type objects of all implemented interfaces.
|
||||
*/
|
||||
public Type [] getTypes()
|
||||
{
|
||||
Type [] types;
|
||||
Type type = GetType();
|
||||
lock (s_types)
|
||||
{
|
||||
types = (Type []) s_types[ type ];
|
||||
if (null == types)
|
||||
{
|
||||
Type [] interfaces = type.GetInterfaces();
|
||||
ArrayList list = new ArrayList( interfaces.Length );
|
||||
for ( Int32 pos = 0; pos < interfaces.Length; ++pos )
|
||||
{
|
||||
Type iface = interfaces[ pos ];
|
||||
// xxx todo: as long as the bridge cannot introduce
|
||||
// native CTS types into UNO on the fly
|
||||
if (iface.FullName.StartsWith( "unoidl." ))
|
||||
{
|
||||
list.Add( iface );
|
||||
}
|
||||
}
|
||||
Int32 len = list.Count;
|
||||
Type [] ar = new Type [ len ];
|
||||
for ( Int32 pos = 0; pos < len; ++pos )
|
||||
ar[ pos ] = (Type) list[ pos ];
|
||||
s_types[ type ] = ar;
|
||||
types = ar;
|
||||
}
|
||||
}
|
||||
return types;
|
||||
}
|
||||
|
||||
/** Provides an identifier that represents the set of UNO interfaces
|
||||
implemented by this class. All instances of this class which run
|
||||
in the same CLR return the same array.
|
||||
|
||||
@return identifier as array of bytes
|
||||
*/
|
||||
public byte [] getImplementationId()
|
||||
{
|
||||
byte [] id;
|
||||
Type type = GetType();
|
||||
lock (s_impl_ids)
|
||||
{
|
||||
id = (byte []) s_impl_ids[ type ];
|
||||
if (null == id)
|
||||
{
|
||||
Int32 hash = GetHashCode();
|
||||
String name = type.FullName;
|
||||
Int32 len= name.Length;
|
||||
|
||||
id = new byte[ 4 + (2 * len) ];
|
||||
id[ 0 ]= (byte) (hash & 0xff);
|
||||
id[ 1 ]= (byte) ((hash >> 8) & 0xff);
|
||||
id[ 2 ]= (byte) ((hash >> 16) & 0xff);
|
||||
id[ 3 ]= (byte) ((hash >> 24) & 0xff);
|
||||
|
||||
for ( Int32 pos = 0; pos < len; ++pos )
|
||||
{
|
||||
UInt16 c = Convert.ToUInt16( name[ pos ] );
|
||||
id[ 4 + (2 * pos) ] = (byte) (c & 0xff);
|
||||
id[ 4 + (2 * pos) +1 ] = (byte) ((c >> 8) & 0xff);
|
||||
}
|
||||
s_impl_ids[ type ] = id;
|
||||
}
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
||||
// System.Object
|
||||
//______________________________________________________________________________________________
|
||||
public override String ToString()
|
||||
{
|
||||
System.Text.StringBuilder buf = new System.Text.StringBuilder( base.ToString(), 256 );
|
||||
buf.Append( "\nUNO Object Implementation:\n\tImplementationId: " );
|
||||
buf.Append( getImplementationId() );
|
||||
buf.Append( "\n\tInterfaces: " );
|
||||
Type [] types = getTypes();
|
||||
for ( Int32 pos = 0; pos < types.Length; ++pos )
|
||||
{
|
||||
buf.Append( types[ pos ].FullName );
|
||||
if (pos < (types.Length -1))
|
||||
buf.Append( ", " );
|
||||
}
|
||||
return buf.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* $RCSfile: WeakComponentBase.cs,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
*
|
||||
* last change: $Author: dbo $ $Date: 2003-03-28 10:17:48 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
*
|
||||
* - GNU Lesser General Public License Version 2.1
|
||||
* - Sun Industry Standards Source License Version 1.1
|
||||
*
|
||||
* Sun Microsystems Inc., October, 2000
|
||||
*
|
||||
* GNU Lesser General Public License Version 2.1
|
||||
* =============================================
|
||||
* Copyright 2000 by Sun Microsystems, Inc.
|
||||
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License version 2.1, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Sun Industry Standards Source License Version 1.1
|
||||
* =================================================
|
||||
* The contents of this file are subject to the Sun Industry Standards
|
||||
* Source License Version 1.1 (the "License"); You may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of the
|
||||
* License at http://www.openoffice.org/license.html.
|
||||
*
|
||||
* Software provided under this License is provided on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
* See the License for the specific provisions governing your rights and
|
||||
* obligations concerning the Software.
|
||||
*
|
||||
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
*
|
||||
* Copyright: 2000 by Sun Microsystems, Inc.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): _______________________________________
|
||||
*
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
using System;
|
||||
using unoidl.com.sun.star.lang;
|
||||
|
||||
namespace uno.util
|
||||
{
|
||||
|
||||
/** This class can be used as a base class for UNO objects.
|
||||
It implements the capability to be kept weakly
|
||||
(unoidl.com.sun.star.uno.XWeak) and it implements
|
||||
unoidl.com.sun.star.lang.XTypeProvider which is necessary for
|
||||
using the object from StarBasic.
|
||||
In addition, it implements the interface
|
||||
unoidl.com.sun.star.lang.XComponent to be disposed explicitly.
|
||||
*/
|
||||
public class WeakComponentBase : WeakBase, XComponent, IDisposable
|
||||
{
|
||||
private delegate void t_disposing( EventObject evt );
|
||||
private t_disposing m_disposing = null;
|
||||
|
||||
/** Disposing callback called when the object is being disposed.
|
||||
This method has to be implemented by sub classes.
|
||||
*/
|
||||
protected virtual void disposing()
|
||||
{
|
||||
}
|
||||
|
||||
// XComponent impl
|
||||
/** This method is called by the owner of this object to explicitly
|
||||
dispose it. This implementation of dispose() first notifies all
|
||||
registered event listeners and finally this object by calling its
|
||||
protected disposing().
|
||||
*/
|
||||
public void dispose()
|
||||
{
|
||||
// send disposing notifications to listeners
|
||||
t_disposing call;
|
||||
lock (this)
|
||||
{
|
||||
call = m_disposing;
|
||||
m_disposing = null;
|
||||
}
|
||||
if (null != call)
|
||||
{
|
||||
EventObject evt = new EventObject( this );
|
||||
call( evt );
|
||||
}
|
||||
// call sub class
|
||||
disposing();
|
||||
}
|
||||
/** Registers an event listener being notified when this object is disposed.
|
||||
|
||||
@param xListener event listener
|
||||
*/
|
||||
public void addEventListener( XEventListener xListener )
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
m_disposing += new t_disposing( xListener.disposing );
|
||||
}
|
||||
}
|
||||
/** Revokes an event listener from being notified when this object is disposed.
|
||||
|
||||
@param xListener event listener
|
||||
*/
|
||||
public void removeEventListener( XEventListener xListener )
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
m_disposing -= new t_disposing( xListener.disposing );
|
||||
}
|
||||
}
|
||||
|
||||
/** System.IDisposable implementation to conveniently auto dispose
|
||||
UNO objects within CLI code.
|
||||
*/
|
||||
public void Dispose()
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# $RCSfile: makefile.mk,v $
|
||||
#
|
||||
# $Revision: 1.1 $
|
||||
#
|
||||
# last change: $Author: dbo $ $Date: 2003-03-28 10:17:50 $
|
||||
#
|
||||
# The Contents of this file are made available subject to the terms of
|
||||
# either of the following licenses
|
||||
#
|
||||
# - GNU Lesser General Public License Version 2.1
|
||||
# - Sun Industry Standards Source License Version 1.1
|
||||
#
|
||||
# Sun Microsystems Inc., October, 2000
|
||||
#
|
||||
# GNU Lesser General Public License Version 2.1
|
||||
# =============================================
|
||||
# Copyright 2000 by Sun Microsystems, Inc.
|
||||
# 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License version 2.1, as published by the Free Software Foundation.
|
||||
#
|
||||
# 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., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
#
|
||||
# Sun Industry Standards Source License Version 1.1
|
||||
# =================================================
|
||||
# The contents of this file are subject to the Sun Industry Standards
|
||||
# Source License Version 1.1 (the "License"); You may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of the
|
||||
# License at http://www.openoffice.org/license.html.
|
||||
#
|
||||
# Software provided under this License is provided on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
# See the License for the specific provisions governing your rights and
|
||||
# obligations concerning the Software.
|
||||
#
|
||||
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
#
|
||||
# Copyright: 2000 by Sun Microsystems, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): _______________________________________
|
||||
#
|
||||
#
|
||||
#
|
||||
#*************************************************************************
|
||||
|
||||
PRJ = ..
|
||||
PRJNAME = cli_ure
|
||||
|
||||
.INCLUDE : $(PRJ)$/util$/makefile.pmk
|
||||
.IF "$(BUILD_FOR_CLI)" != ""
|
||||
|
||||
# for dummy
|
||||
TARGET = cli_ure
|
||||
|
||||
.INCLUDE : settings.mk
|
||||
|
||||
.INCLUDE : $(PRJ)$/util$/target.pmk
|
||||
.INCLUDE : target.mk
|
||||
|
||||
ALLTAR : \
|
||||
$(CLI_OFFAPI)
|
||||
|
||||
$(CLI_UDKAPI) : $(SOLARBINDIR)$/udkapi.rdb
|
||||
+$(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
|
||||
|
||||
$(CLI_OFFAPI) : $(CLI_UDKAPI) $(SOLARBINDIR)$/offapi.rdb
|
||||
+$(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
|
||||
|
||||
.ENDIF
|
||||
@@ -0,0 +1,70 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# $RCSfile: makefile.pmk,v $
|
||||
#
|
||||
# $Revision: 1.1 $
|
||||
#
|
||||
# last change: $Author: dbo $ $Date: 2003-03-28 10:17:51 $
|
||||
#
|
||||
# The Contents of this file are made available subject to the terms of
|
||||
# either of the following licenses
|
||||
#
|
||||
# - GNU Lesser General Public License Version 2.1
|
||||
# - Sun Industry Standards Source License Version 1.1
|
||||
#
|
||||
# Sun Microsystems Inc., October, 2000
|
||||
#
|
||||
# GNU Lesser General Public License Version 2.1
|
||||
# =============================================
|
||||
# Copyright 2000 by Sun Microsystems, Inc.
|
||||
# 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License version 2.1, as published by the Free Software Foundation.
|
||||
#
|
||||
# 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., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
#
|
||||
# Sun Industry Standards Source License Version 1.1
|
||||
# =================================================
|
||||
# The contents of this file are subject to the Sun Industry Standards
|
||||
# Source License Version 1.1 (the "License"); You may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of the
|
||||
# License at http://www.openoffice.org/license.html.
|
||||
#
|
||||
# Software provided under this License is provided on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
# See the License for the specific provisions governing your rights and
|
||||
# obligations concerning the Software.
|
||||
#
|
||||
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
#
|
||||
# Copyright: 2000 by Sun Microsystems, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): _______________________________________
|
||||
#
|
||||
#
|
||||
#
|
||||
#*************************************************************************
|
||||
|
||||
.IF "$(COM)$(COMEX)" == "MSC8"
|
||||
BUILD_FOR_CLI = "true"
|
||||
.ENDIF
|
||||
|
||||
CLIMAKER = $(OUT)$/bin$/climaker.exe
|
||||
CLI_UDKAPI = $(OUT)$/bin$/cli_udkapi.dll
|
||||
CLI_OFFAPI = $(OUT)$/bin$/cli_offapi.dll
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# $RCSfile: target.pmk,v $
|
||||
#
|
||||
# $Revision: 1.1 $
|
||||
#
|
||||
# last change: $Author: dbo $ $Date: 2003-03-28 10:17:51 $
|
||||
#
|
||||
# The Contents of this file are made available subject to the terms of
|
||||
# either of the following licenses
|
||||
#
|
||||
# - GNU Lesser General Public License Version 2.1
|
||||
# - Sun Industry Standards Source License Version 1.1
|
||||
#
|
||||
# Sun Microsystems Inc., October, 2000
|
||||
#
|
||||
# GNU Lesser General Public License Version 2.1
|
||||
# =============================================
|
||||
# Copyright 2000 by Sun Microsystems, Inc.
|
||||
# 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License version 2.1, as published by the Free Software Foundation.
|
||||
#
|
||||
# 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., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
#
|
||||
# Sun Industry Standards Source License Version 1.1
|
||||
# =================================================
|
||||
# The contents of this file are subject to the Sun Industry Standards
|
||||
# Source License Version 1.1 (the "License"); You may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of the
|
||||
# License at http://www.openoffice.org/license.html.
|
||||
#
|
||||
# Software provided under this License is provided on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
# See the License for the specific provisions governing your rights and
|
||||
# obligations concerning the Software.
|
||||
#
|
||||
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
#
|
||||
# Copyright: 2000 by Sun Microsystems, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): _______________________________________
|
||||
#
|
||||
#
|
||||
#
|
||||
#*************************************************************************
|
||||
|
||||
###### C# ######
|
||||
|
||||
CSCFLAGS = -warnaserror+ -incremental-
|
||||
|
||||
.IF "$(debug)" == ""
|
||||
|
||||
.IF "$(product)" == ""
|
||||
CSCFLAGS += -checked+ -define:DEBUG -define:TRACE
|
||||
.ELSE
|
||||
CSCFLAGS += -o
|
||||
.ENDIF
|
||||
|
||||
.ELSE # DEBUG
|
||||
|
||||
CSCFLAGS += -debug+ -checked+ -define:DEBUG -define:TRACE
|
||||
|
||||
.ENDIF
|
||||
|
||||
###### climaker ######
|
||||
|
||||
CLIMAKER_FLAGS =
|
||||
.IF "$(debug)" != ""
|
||||
CLIMAKER_FLAGS += --verbose
|
||||
.ENDIF
|
||||
|
||||
Reference in New Issue
Block a user