[Libreoffice-commits] .: 5 commits - cpputools/Executable_regcomp.mk cpputools/Module_cpputools.mk cpputools/Package_bin.mk cpputools/source odk/docs odk/settings odk/util Repository.mk scp2/source solenv/bin solenv/inc ure/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 18 07:23:46 PST 2012


 Repository.mk                                            |    1 
 cpputools/Executable_regcomp.mk                          |   44 
 cpputools/Module_cpputools.mk                            |    1 
 cpputools/Package_bin.mk                                 |    1 
 cpputools/source/registercomponent/registercomponent.cxx |  841 ---------------
 cpputools/source/unoexe/unoexe.cxx                       |   68 -
 odk/docs/tools.html                                      |   68 -
 odk/settings/std.mk                                      |    1 
 odk/util/odk_rules.pmk                                   |    4 
 scp2/source/ooo/ure.scp                                  |   31 
 solenv/bin/guw.pl                                        |    1 
 solenv/inc/settings.mk                                   |    5 
 ure/source/README                                        |   16 
 ure/source/uretest/JavaTest.java                         |    6 
 ure/source/uretest/Makefile                              |    9 
 ure/source/uretest/Makefile.pln                          |   22 
 ure/source/uretest/cpptest.cc                            |    7 
 ure/source/uretest/services.rdb.in                       |   24 
 18 files changed, 65 insertions(+), 1085 deletions(-)

New commits:
commit b7215602c00f392e30e0e23e21f32dd37fba07dd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Dec 17 15:29:12 2012 +0100

    API CHANGE: Remove obsolete regcomp from URE
    
    Change-Id: Iaec5e0fd53d340f028e271f28e99a73dedc636f7

diff --git a/Repository.mk b/Repository.mk
index 6f62ae2..5479d36 100755
--- a/Repository.mk
+++ b/Repository.mk
@@ -176,7 +176,6 @@ endif
 ifneq ($(OS),IOS)
 
 $(eval $(call gb_Helper_register_executables,UREBIN,\
-	regcomp \
 	regmerge \
 	regview \
 	uno \
diff --git a/cpputools/Executable_regcomp.mk b/cpputools/Executable_regcomp.mk
deleted file mode 100644
index 844fd94..0000000
--- a/cpputools/Executable_regcomp.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2012 David Ostrovsky <d.ostrovsky at gmx.de> (initial developer)
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Executable_Executable,regcomp))
-
-$(eval $(call gb_Executable_use_internal_comprehensive_api,regcomp,\
-    udkapi \
-))
-
-$(eval $(call gb_Executable_use_libraries,regcomp,\
-    cppu \
-    cppuhelper \
-    sal \
-	$(gb_UWINAPI) \
-))
-
-$(eval $(call gb_Executable_add_exception_objects,regcomp,\
-    cpputools/source/registercomponent/registercomponent \
-))
-
-# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/cpputools/Module_cpputools.mk b/cpputools/Module_cpputools.mk
index 9f5e932..504d281 100644
--- a/cpputools/Module_cpputools.mk
+++ b/cpputools/Module_cpputools.mk
@@ -33,7 +33,6 @@ $(eval $(call gb_Module_add_targets,cpputools,\
 ))
 
 $(eval $(call gb_Module_add_targets,cpputools,\
-    Executable_regcomp \
     Executable_regsingleton \
     Executable_uno \
 ))
diff --git a/cpputools/Package_bin.mk b/cpputools/Package_bin.mk
index 9a0b8d4..1a22247 100644
--- a/cpputools/Package_bin.mk
+++ b/cpputools/Package_bin.mk
@@ -28,7 +28,6 @@
 # because the installation system is so incredibly inflexible...
 $(eval $(call gb_Package_Package,cpputools_bin,$(gb_Executable_BINDIR)))
 
-$(eval $(call gb_Package_add_file,cpputools_bin,bin/regcomp.bin,regcomp))
 $(eval $(call gb_Package_add_file,cpputools_bin,bin/uno.bin,uno))
 
 # vim: set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/cpputools/source/registercomponent/registercomponent.cxx b/cpputools/source/registercomponent/registercomponent.cxx
deleted file mode 100644
index 950952b..0000000
--- a/cpputools/source/registercomponent/registercomponent.cxx
+++ /dev/null
@@ -1,841 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
- */
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <vector>
-
-#include "sal/main.h"
-#include <rtl/strbuf.hxx>
-#include <rtl/ustrbuf.hxx>
-
-#include <cppuhelper/servicefactory.hxx>
-#include <cppuhelper/shlib.hxx>
-
-#include <com/sun/star/container/XSet.hpp>
-#include <com/sun/star/container/XContentEnumerationAccess.hpp>
-#include <com/sun/star/registry/XImplementationRegistration2.hpp>
-#include <com/sun/star/registry/XSimpleRegistry.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-
-#include <algorithm>
-#include <osl/process.h>
-#include <osl/diagnose.h>
-#include <osl/thread.h>
-#include <osl/file.hxx>
-
-#ifdef SAL_UNX
-#define SEPARATOR '/'
-#else
-#define SEPARATOR '\\'
-#endif
-
-using namespace ::rtl;
-using namespace ::osl;
-using namespace ::cppu;
-using namespace ::std;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-using com::sun::star::container::XSet;
-using com::sun::star::container::XContentEnumerationAccess;
-using com::sun::star::container::XEnumeration;
-
-namespace {
-
-OUString replacePrefix(OUString const & url, OUString const & prefix) {
-    sal_Int32 i = url.lastIndexOf('/');
-    // Backward compatibility with stoc/source/implementationregistration/
-    // implreg.cxx:1.27 l. 1892:
-    if (i == -1) {
-        i = url.lastIndexOf('\\');
-    }
-    return prefix + url.copy(i + 1);
-}
-
-}
-
-sal_Bool isFileUrl(const OUString& fileName)
-{
-    if (fileName.indexOf("file://") == 0 )
-        return sal_True;
-    return sal_False;
-}
-
-OUString convertToFileUrl(const OUString& fileName)
-{
-    if ( isFileUrl(fileName) )
-    {
-        return fileName;
-    }
-
-    OUString uUrlFileName;
-    if ( fileName.indexOf('.') == 0 || fileName.indexOf(SEPARATOR) < 0 )
-    {
-        OUString uWorkingDir;
-        if (osl_getProcessWorkingDir(&uWorkingDir.pData) != osl_Process_E_None) {
-            OSL_ASSERT(false);
-        }
-        if (FileBase::getAbsoluteFileURL(uWorkingDir, fileName, uUrlFileName)
-            != FileBase::E_None)
-        {
-            OSL_ASSERT(false);
-        }
-    } else
-    {
-        if (FileBase::getFileURLFromSystemPath(fileName, uUrlFileName)
-            != FileBase::E_None)
-        {
-            OSL_ASSERT(false);
-        }
-    }
-
-    return uUrlFileName;
-}
-static void usingRegisterImpl()
-{
-    fprintf(stderr, "usage: regcomp -register|revoke -r registryfile -c locationUrl [-br registryfile] [-l componentLoaderUrl] [-s] [-classpath path]\n");
-    fprintf(stderr, " Parameters:\n");
-    fprintf(stderr, "  -register\n"
-                    "        register a new component.\n");
-    fprintf(stderr, "  -revoke\n"
-                    "        revoke a component.\n");
-    fprintf(stderr, "  -br registryfile\n"
-                    "        the name of the registry used for bootstrapping\n"
-                    "        regcomp. The option can be given twice, each\n"
-                    "        one followed by exactly one registry file.\n"
-                    "        The registries are used to access both types and\n"
-                    "        registered components.\n");
-    fprintf(stderr, "  -r registryfile\n"
-                    "        the name of the target registry (will be created\n"
-                    "        if it does not exists). The file name may match\n"
-                    "        with one of the filenames given with the -br option.\n");
-    fprintf(stderr, "  -c locationUrls\n"
-                    "        the location of a component (a url to a shared\n"
-                    "        library or a absolute url to a .jar file) or a\n"
-                    "        list of urls seperated by ';' or ' '. Note if a\n"
-                    "        list of urls is specified, the components must\n"
-                    "        all need the same loader (quoting is possible with\n"
-                    "        \\ or \"\").\n");
-    fprintf(stderr, "  -l componentLoaderUrl\n"
-                    "        the name of the needed loader. If no loader is\n"
-                    "        specified and the components have a .jar suffix,\n"
-                    "        the default is com.sun.star.loader.Java2.\n"
-                    "        Otherwise, the default is\n"
-                    "        com.sun.star.loader.SharedLibrary\n"
-                    "  -s\n"
-                    "        silent, regcomp prints messages only on error.\n"
-                    "  -wop\n"
-                    "        register the component name only without path\n"
-                    "  -wop=prefix\n"
-                    "        register the component name with path replaced\n"
-                    "        by given prefix\n"
-                    "  -classpath path\n"
-                    "        sets the java classpath to path (overwriting the\n"
-                    "        current classpath environment variable). Note that\n"
-                    "        in case you start regcomp e.g. within an office\n"
-                    "        environment, the classpath entries in the\n"
-                    "        configuration still have precedence over this\n"
-                    "        option.\n");
-}
-
-class IllegalArgument
-{
-public:
-    IllegalArgument(const OString& rMessage)
-        : m_message(rMessage)
-        {}
-
-    OString m_message;
-};
-
-struct Options
-{
-    Options()
-        : bRegister(sal_False)
-        , bRevoke(sal_False)
-        , bSilent( sal_False )
-        , bPrefix( sal_False )
-        {}
-
-    sal_Bool bRegister;
-    sal_Bool bRevoke;
-    sal_Bool bSilent;
-    sal_Bool bPrefix;
-    OUString sPrefix;
-    OUString sProgramName;
-    OUString sBootRegName;
-    OUString sBootRegName2;
-    OUString sRegName;
-    OUString sComponentUrls;
-    OUString sLoaderName;
-};
-
-sal_Bool parseOptions(int ac, char* av[], Options& rOptions, sal_Bool bCmdFile)
-    throw( IllegalArgument )
-{
-    sal_Bool    ret = sal_True;
-    sal_uInt16  i=0;
-    sal_Bool bLoaderExplicitlyGiven = sal_False;
-
-    rOptions.sProgramName = OUString::createFromAscii(av[i++]);
-
-    if (!bCmdFile)
-    {
-        bCmdFile = sal_True;
-
-        if (ac < 2)
-        {
-            usingRegisterImpl();
-            ret = sal_False;
-        }
-    }
-
-    for (; i < ac; i++)
-    {
-        if (av[i][0] == '-')
-        {
-            switch (av[i][1])
-            {
-                case 'r':
-                    if (strcmp(av[i], "-register") == 0)
-                    {
-                        rOptions.bRegister = sal_True;
-                    } else
-                    if (strcmp(av[i], "-revoke") == 0)
-                    {
-                        rOptions.bRevoke = sal_True;
-                    } else
-                    if (av[i][2] == '\0')
-                    {
-                        if (i < ac - 1 && av[i+1][0] != '-')
-                        {
-                            i++;
-                            rOptions.sRegName = OStringToOUString(av[i], osl_getThreadTextEncoding());
-                        } else
-                        {
-                            OString tmp("'-r', please check");
-                            if (i <= ac - 1)
-                            {
-                                tmp += " your input '" + OString(av[i+1]) + "'";
-                            }
-                            throw IllegalArgument(tmp);
-                        }
-                    } else
-                    {
-                        rOptions.sRegName = OStringToOUString(av[i]+2, osl_getThreadTextEncoding());
-                    }
-                    break;
-                case 'b':
-                    if (av[i][2] != 'r')
-                    {
-                        OString tmp("'-b', invalid option!");
-                        throw IllegalArgument(tmp);
-                    }
-                    if (av[i][3] == '\0')
-                    {
-                        if (i < ac - 1 && av[i+1][0] != '-')
-                        {
-                            i++;
-                            OUString regName = OStringToOUString(av[i], osl_getThreadTextEncoding());
-                            if( rOptions.sBootRegName.isEmpty() )
-                            {
-                                rOptions.sBootRegName = regName;
-                            }
-                            else
-                            {
-                                rOptions.sBootRegName2 = regName;
-                            }
-                        } else
-                        {
-                            OString tmp("'-br', please check");
-                            if (i <= ac - 1)
-                            {
-                                tmp += " your input '" + OString(av[i+1]) + "'";
-                            }
-                            throw IllegalArgument(tmp);
-                        }
-                    } else
-                    {
-                        rOptions.sBootRegName = OStringToOUString(av[i]+3, osl_getThreadTextEncoding());
-                    }
-                    break;
-                case 'c':
-                {
-                    OUString sUrls;
-                    if (av[i][2] == '\0')
-                    {
-                        if (i < ac - 1 && av[i+1][0] != '-')
-                        {
-                            i++;
-                            sUrls = OStringToOUString(av[i], osl_getThreadTextEncoding());
-                        } else
-                        {
-                            OString tmp("'-c', please check");
-                            if (i <= ac - 1)
-                            {
-                                tmp += " your input '" + OString(av[i+1]) + "'";
-                            }
-                            throw IllegalArgument(tmp);
-                        }
-                    }
-                    else if( 0 == strncmp( av[i] , "-classpath" ,10 ) )
-                    {
-                        i++;
-                        if( i < ac )
-                        {
-                            rtl::OUString envVar(RTL_CONSTASCII_USTRINGPARAM("CLASSPATH"));
-                            rtl::OUString envValue(av[i], strlen(av[i]), osl_getThreadTextEncoding());
-                            osl_setEnvironment(envVar.pData, envValue.pData);
-                        }
-                        break;
-                    }
-                    else
-                    {
-                        sUrls = OStringToOUString(av[i]+2, osl_getThreadTextEncoding());
-                    }
-
-                    if (!rOptions.sComponentUrls.isEmpty())
-                    {
-                        OUString tmp(rOptions.sComponentUrls + OUString(";", 1, osl_getThreadTextEncoding()) + sUrls);
-                        rOptions.sComponentUrls = tmp;
-                    } else
-                    {
-                        rOptions.sComponentUrls = sUrls;
-                    }
-                    break;
-                }
-                case 'l':
-                {
-                    if (av[i][2] == '\0')
-                    {
-                        if (i < ac - 1 && av[i+1][0] != '-')
-                        {
-                            i++;
-                            rOptions.sLoaderName = OUString::createFromAscii(av[i]);
-                            bLoaderExplicitlyGiven = sal_True;
-                        } else
-                        {
-                            OString tmp("'-l', please check");
-                            if (i <= ac - 1)
-                            {
-                                tmp += " your input '" + OString(av[i+1]) + "'";
-                            }
-                            throw IllegalArgument(tmp);
-                        }
-                    } else
-                    {
-                        bLoaderExplicitlyGiven = sal_True;
-                        rOptions.sLoaderName = OUString::createFromAscii(av[i]+2);
-                    }
-                    break;
-                }
-                case 's':
-                {
-                    if( av[i][2] == 0 )
-                    {
-                        rOptions.bSilent = sal_True;
-                    }
-                    else
-                    {
-                        rtl::OStringBuffer buf;
-                        buf.append( "Unknown error " );
-                        buf.append( av[i] );
-                        throw IllegalArgument( av[i] );
-                    }
-                    break;
-                }
-                case 'e':
-                {
-                    if( av[i][2] == 'n' && av[i][3] == 'v' && av[i][4] == ':' )
-                    {
-                        // bootstrap variable, ignore it
-                        break;
-                    }
-                }
-                case 'w':
-                {
-                    if (strcmp(av[i], "-wop") == 0)
-                    {
-                        rOptions.bPrefix = sal_True;
-                        rOptions.sPrefix = OUString();
-                            // in case there are multiple -wops
-                        break;
-                    }
-                    else if (
-                        strncmp(av[i], "-wop=", RTL_CONSTASCII_LENGTH("-wop="))
-                        == 0)
-                    {
-                        rOptions.bPrefix = sal_True;
-                        rOptions.sPrefix = OStringToOUString(
-                            av[i] + RTL_CONSTASCII_LENGTH("-wop="),
-                            osl_getThreadTextEncoding());
-                        break;
-                    }
-                }
-                default:
-                {
-                    OString tmp( "unknown option " );
-                    tmp += av[i];
-                    throw IllegalArgument( tmp );
-                }
-            }
-        } else
-        {
-            if (av[i][0] == '@')
-            {
-                FILE* cmdFile = fopen(av[i]+1, "r");
-                  if( cmdFile == NULL )
-                  {
-                    usingRegisterImpl();
-                    ret = sal_False;
-                } else
-                {
-                    fseek( cmdFile , 0 , SEEK_END );
-                    sal_Int32 nLen = ftell( cmdFile);
-                    fseek( cmdFile, 0, SEEK_SET );
-
-                    // 2 chars per string is a upper limit for the number of
-                    // substrings ( at least one separator char needed for fscanf).
-                    char ** rargv = (char **)rtl_allocateMemory( nLen * sizeof( char* ) /2);
-                    if( ! rargv )
-                    {
-                        OStringBuffer buf;
-                        buf.append( "Not enough memory for reading command file " );
-                        buf.append( av[i] +1 );
-                        buf.append( " with length " );
-                        buf.append( nLen );
-                        buf.append( "." );
-                        throw IllegalArgument( buf.makeStringAndClear() );
-                    }
-                    char *buffer = ( char * )rtl_allocateMemory( nLen +1 );
-                    if( ! buffer )
-                    {
-                        OStringBuffer buf;
-                        buf.append( "Not enough memory for reading command file " );
-                        buf.append( av[i] +1 );
-                        buf.append( " with length " );
-                        buf.append( nLen );
-                        buf.append( "." );
-                        throw IllegalArgument( buf.makeStringAndClear() );
-                    }
-
-                    // we start at one to omit argv[0]
-                    sal_Int32 rargc = 1;
-                    rargv[0] = av[0];
-                    while ( fscanf(cmdFile, "%s", buffer) != EOF )
-                    {
-                        rargv[rargc]= (char * )rtl_allocateMemory( strlen( buffer ) +1 );
-                        if( ! rargv[rargc] )
-                        {
-                            OStringBuffer buf;
-                            buf.append( "Not enough memory for reading command file " );
-                            buf.append( av[i] +1 );
-                            buf.append( " with length " );
-                            buf.append( nLen );
-                            buf.append( "." );
-                            throw IllegalArgument( buf.makeStringAndClear() );
-                        }
-                        strcpy( rargv[rargc] , buffer ); // #100211# - checked
-                        rargc++;
-                    }
-                    fclose(cmdFile);
-
-                    parseOptions(rargc, rargv, rOptions, bCmdFile);
-
-                    for (long j=1; j < rargc; j++)
-                    {
-                        rtl_freeMemory(rargv[j]);
-                    }
-                    rtl_freeMemory( buffer );
-                    rtl_freeMemory( rargv );
-                }
-            } else
-            {
-                usingRegisterImpl();
-                ret = sal_False;
-            }
-        }
-    }
-
-    if( ! bLoaderExplicitlyGiven )
-    {
-        if ( rOptions.sComponentUrls.getLength() > 4 &&
-             rOptions.sComponentUrls.matchAsciiL(
-                 ".jar" , 4 , rOptions.sComponentUrls.getLength() - 4 ) )
-        {
-            if( ! rOptions.bSilent )
-            {
-                printf( "using loader com.sun.star.loader.Java2\n" );
-            }
-            rOptions.sLoaderName = OUString(
-                RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.Java2"));
-        }
-        else
-        {
-            rOptions.sLoaderName = OUString(
-                RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary") );
-        }
-    }
-
-    return ret;
-}
-
-
-struct DoIt
-{
-    sal_Bool                                _bRegister;
-    sal_Bool                                _bRevoke;
-    sal_Bool                                _bSilent;
-    sal_Bool                                _bPrefix;
-    OUString                                _sPrefix;
-    OString                                 _sRegName;
-    OUString                                _sLoaderName;
-    Reference<XImplementationRegistration2> _xImplRegistration;
-    Reference<XSimpleRegistry>              _xReg;
-    sal_uInt32                            * _exitCode;
-
-    DoIt(sal_Bool bRegister,
-         sal_Bool bRevoke,
-         sal_Bool bSilent,
-         sal_Bool bPrefix,
-         const OUString & sPrefix,
-         const Reference<XSimpleRegistry> & xReg,
-         const OString & sRegName,
-         const Reference<XImplementationRegistration2> & xImplRegistration,
-         const OUString & sLoaderName,
-         sal_uInt32 * exitCode)
-        throw();
-
-    void operator()(const OUString & url) throw();
-};
-
-DoIt::DoIt(sal_Bool bRegister,
-           sal_Bool bRevoke,
-           sal_Bool bSilent,
-           sal_Bool bPrefix,
-           const OUString & sPrefix,
-           const Reference<XSimpleRegistry> & xReg,
-           const OString & sRegName,
-           const Reference<XImplementationRegistration2> & xImplRegistration,
-           const OUString & sLoaderName,
-           sal_uInt32 * exitCode) throw()
-    : _bRegister(bRegister),
-      _bRevoke(bRevoke),
-      _bSilent( bSilent ),
-      _bPrefix( bPrefix ),
-      _sPrefix( sPrefix ),
-      _sRegName(sRegName),
-      _sLoaderName(sLoaderName),
-      _xImplRegistration(xImplRegistration),
-      _xReg(xReg),
-      _exitCode(exitCode)
-{}
-
-void DoIt::operator() (const OUString & url) throw()
-{
-    OString sUrl = OUStringToOString(url, osl_getThreadTextEncoding());
-
-    if (_bRegister)
-    {
-        try
-        {
-            Reference<XImplementationRegistration2> _xImplRegistration2(_xImplRegistration, UNO_QUERY);
-            if ( _bPrefix ) {
-                _xImplRegistration->registerImplementationWithLocation(
-                    _sLoaderName, url, replacePrefix(url, _sPrefix), _xReg);
-            } else {
-                _xImplRegistration->registerImplementation(_sLoaderName, url, _xReg);
-            }
-
-            if ( ! _bSilent )
-            {
-                fprintf(stderr, "register component '%s' in registry '%s' successful!\n", sUrl.getStr(), _sRegName.getStr());
-            }
-
-        }
-        catch(CannotRegisterImplementationException & cannotRegisterImplementationException) {
-            OString aMessage(OUStringToOString(cannotRegisterImplementationException.Message, RTL_TEXTENCODING_ASCII_US));
-            fprintf(stderr, "register component '%s' in registry '%s' failed!\n", sUrl.getStr(), _sRegName.getStr());
-            fprintf(stderr, "error (CannotRegisterImplementationException): %s\n", aMessage.getStr());
-
-            ++ (*_exitCode);
-        }
-        catch( RuntimeException & e )
-        {
-            OString aMessage(OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US));
-            fprintf(stderr, "register component '%s' in registry '%s' failed!\n", sUrl.getStr(), _sRegName.getStr());
-            fprintf(stderr, "error (RuntimeException): %s\n", aMessage.getStr());
-
-            ++ (*_exitCode);
-        }
-    }
-    else if(_bRevoke)
-    {
-        try
-        {
-            sal_Bool bRet = _xImplRegistration->revokeImplementation(url, _xReg);
-
-            if (bRet)
-            {
-                if ( ! _bSilent )
-                    fprintf(stderr, "revoke component '%s' from registry '%s' successful!\n", sUrl.getStr(), _sRegName.getStr());
-            }
-            else
-            {
-                fprintf(stderr, "revoke component '%s' from registry '%s' failed!\n", sUrl.getStr(), _sRegName.getStr());
-                ++ (*_exitCode);
-            }
-        }
-        catch( RuntimeException & e )
-        {
-            OString aMessage(OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US));
-            fprintf( stderr,
-                     "revoke component '%s' from registry '%s' failed!\n",
-                     sUrl.getStr(),
-                     _sRegName.getStr() );
-            fprintf( stderr, "RuntimeException: %s\n" , aMessage.getStr());
-            ++ (*_exitCode);
-        }
-    }
-}
-
-static bool hasService(
-    const Reference< XMultiServiceFactory > &xSMgr,
-    const sal_Char * service )
-{
-    bool ret = false;
-
-    Reference< XContentEnumerationAccess > access( xSMgr, UNO_QUERY );
-    if( access.is( ))
-    {
-        Reference< XEnumeration > enumeration = access->createContentEnumeration(
-            OUString::createFromAscii( service ) );
-
-        if( enumeration.is() && enumeration->hasMoreElements() )
-        {
-            ret = true;
-        }
-    }
-    return ret;
-}
-
-static void bootstrap(
-    Options & opt ,
-    Reference< XMultiServiceFactory > &xSMgr,
-    Reference< XSimpleRegistry > & reg ) throw ( Exception )
-{
-    if( opt.sRegName.equals( opt.sBootRegName2 ) )
-    {
-        OUString tmp2 = opt.sBootRegName;
-        opt.sBootRegName = opt.sBootRegName2;
-        opt.sBootRegName2 = tmp2;
-    }
-
-    if ( opt.sRegName.equals(opt.sBootRegName) )
-    {
-        if( !opt.sBootRegName2.isEmpty() )
-        {
-            xSMgr = createRegistryServiceFactory(
-                convertToFileUrl(opt.sRegName),
-                convertToFileUrl(opt.sBootRegName2),
-                sal_False );
-        }
-        else
-        {
-            xSMgr = createRegistryServiceFactory(
-                convertToFileUrl(opt.sRegName) , sal_False );
-        }
-    }
-    else
-    {
-        if( !opt.sBootRegName2.isEmpty() )
-        {
-            xSMgr = createRegistryServiceFactory(
-                convertToFileUrl( opt.sBootRegName2 ),
-                convertToFileUrl( opt.sBootRegName ),
-                sal_True );
-        }
-        else if ( !opt.sBootRegName.isEmpty() )
-        {
-            xSMgr = createRegistryServiceFactory(
-                convertToFileUrl( opt.sBootRegName ),
-                sal_True );
-        }
-        else
-        {
-            xSMgr = createServiceFactory();
-        }
-        reg = Reference< XSimpleRegistry >(
-            xSMgr->createInstance(
-                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.SimpleRegistry"))), UNO_QUERY);
-
-        if (reg.is())
-        {
-            try
-            {
-                reg->open( convertToFileUrl(opt.sRegName), sal_False, sal_True);
-                if (!reg->isValid())
-                {
-                    fprintf(stderr, "ERROR: open|create registry '%s' failed!\n",
-                            OUStringToOString(opt.sRegName, osl_getThreadTextEncoding() ).getStr());
-                    exit(1);
-                }
-            }
-            catch( InvalidRegistryException & e)
-            {
-                OString o = OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US );
-                fprintf(stderr,
-                        "ERROR: create registry '%s' failed!\n"
-                        "InvalidRegistryException: %s\n",
-                         OUStringToOString( opt.sRegName, osl_getThreadTextEncoding()).getStr(),
-                        o.getStr() );
-                exit(1);
-            }
-        }
-    }
-
-    if( ! opt.sLoaderName.compareToAscii( "com.sun.star.loader.Java2" ) &&
-        ! hasService( xSMgr, "com.sun.star.loader.Java2" ) )
-    {
-        // we know our java loader, so we check, whether a java-loader is
-        // registered
-        Reference< XInterface > r = loadSharedLibComponentFactory(
-            OUString(RTL_CONSTASCII_USTRINGPARAM("javavm.uno" SAL_DLLEXTENSION)),
-            OUString(),
-            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.stoc.JavaVirtualMachine")),
-            xSMgr,
-            Reference< XRegistryKey > (),
-            "javavm" );
-        Reference< XInterface > r2 = loadSharedLibComponentFactory(
-            OUString(RTL_CONSTASCII_USTRINGPARAM("javaloader.uno" SAL_DLLEXTENSION)),
-            OUString(),
-            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.stoc.JavaComponentLoader")),
-            xSMgr,
-            Reference< XRegistryKey > (),
-            "javaloader" );
-        Reference <XSet> xSet( xSMgr, UNO_QUERY );
-        if( r.is() && r2.is() && xSet.is() )
-        {
-            xSet->insert( makeAny( r ) );
-            xSet->insert( makeAny( r2 ) );
-        }
-    }
-}
-
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
-{
-    sal_Bool    bRet = sal_False;
-    sal_uInt32  exitCode = 0;
-    Options     aOptions;
-
-    try
-    {
-        if ( !parseOptions(argc, argv, aOptions, sal_False) )
-        {
-            exit(1);
-        }
-    }
-    catch ( IllegalArgument& e)
-    {
-        fprintf(stderr, "ERROR: %s\n", e.m_message.getStr());
-        exit(1);
-    }
-
-    if( aOptions.sRegName.isEmpty() )
-    {
-        fprintf( stderr, "ERROR: target registry missing (-r option)\n" );
-        exit( 1 );
-    }
-    if ( aOptions.sComponentUrls.isEmpty() )
-    {
-        fprintf(stderr, "ERROR: no component url is specified!\n");
-        exit(1);
-    }
-
-    Reference< XMultiServiceFactory >   xSMgr;
-    Reference< XSimpleRegistry >        xReg;
-    try
-    {
-        bootstrap( aOptions, xSMgr ,xReg );
-    }
-    catch( Exception& e )
-    {
-        fprintf(stderr, "ERROR: create ServiceManager failed!\n");
-        if ( !e.Message.isEmpty() )
-        {
-            fprintf(stderr, "ERROR description: %s\n",
-                    OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr());
-        }
-        exit(1);
-    }
-
-    Reference<XImplementationRegistration2> xImplRegistration(
-        xSMgr->createInstance(
-            OUString(RTL_CONSTASCII_USTRINGPARAM(
-                         "com.sun.star.registry.ImplementationRegistration"))),
-        UNO_QUERY);
-
-    if (xImplRegistration.is())
-    {
-        sal_Int32 index = 0;
-        vector<OUString> urls;
-
-        OUString urlListWithSemikolon = aOptions.sComponentUrls;
-        do {
-            OUString aToken = urlListWithSemikolon.getToken( 0, ';', index);
-            fprintf(stderr, "%s\n", OUStringToOString(aToken, osl_getThreadTextEncoding()).getStr());
-            urls.push_back(aToken);
-        } while ( index >= 0 );
-
-
-        OString sRegName = OUStringToOString( aOptions.sRegName, osl_getThreadTextEncoding() );
-        if(aOptions.bRegister || aOptions.bRevoke)
-        {
-            for_each(urls.begin(), urls.end(),
-                     DoIt(aOptions.bRegister, aOptions.bRevoke, aOptions.bSilent,
-                          aOptions.bPrefix, aOptions.sPrefix,
-                          xReg, sRegName, xImplRegistration,
-                          aOptions.sLoaderName, &exitCode));
-        }
-        else
-        {
-            ++ exitCode;
-             usingRegisterImpl();
-        }
-    }
-    else
-    {
-        fprintf(stderr, "Component registration service could not be loaded!\n");
-        exitCode++;
-    }
-
-    if (!bRet && xReg.is() && xReg->isValid())
-        xReg->close();
-
-    Reference< XComponent > xComponent( xSMgr, UNO_QUERY );
-    if ( xComponent.is() )
-        xComponent->dispose();
-
-    return exitCode;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/docs/tools.html b/odk/docs/tools.html
index ba5051a..173b116 100644
--- a/odk/docs/tools.html
+++ b/odk/docs/tools.html
@@ -117,11 +117,6 @@
             </tr>
             <tr valign="top">
               <td class="content3"><img src="images/arrow-1.gif"></td>
-              <td><a href="#regcomp"  title="link to the regcomp tool description">regcomp</a></td>
-              <td class="content87">A simple UNO component registration tool.</td>
-            </tr>
-            <tr valign="top">
-              <td class="content3"><img src="images/arrow-1.gif"></td>
               <td><a href="#regmerge"  title="link to the regmerge tool description">regmerge</a></td>
               <td class="content87">Tool to merge several registry (e.g. type
 			  libraries) files into one file.</td>
@@ -829,69 +824,6 @@ types the specified types depend on.</p>
     <td>
       <table class="table2">
         <tr>
-		  <td colspan="2" class="head1"><a name="regcomp"/>regcomp</td>
-		  <td align="right">
-		    <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
-		    <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a>
-		  </td>
-        </tr>
-		<tr>
-		  <td colspan="3">
-		  <p>'regcomp' is a tool to register|revoke external UNO components
-		  into|from a registry which is used in a UNO environment.</p>
-		  <p class="head2">Usage:</p>
-		  <blockquote>
-		  <b><code>regcomp -revoke [-br<registryfile>] -r <registryfile> -c <locationUrl>[-l<componentLoaderName>]</code></b>
-		  </blockquote>
-		  <p class="head2">Options:</p>
-		  <p>
-		  <table class="table4">
-		  <tr>
-			<td class="cell15"><code>-register|revoke</code></td>
-			<td class="cell85">register means that the components will be
-			installed and revoke means that they will be removed.</td>
-		  </tr>
-		  <tr>
-			<td class="cell15"><code>-br<registryfile></code></td>
-			<td class="cell85">the name of the registry used for bootstrapping
-			the program. If the bootstrap registry is specified and has the same
-			name as the registration registry, '-r' is optional.</td>
-		  </tr>
-		  <tr>
-			<td class="cell15"><code>-r<registryfile></code></td>
-			<td class="cell85">the name of the registry (will be created if
-			it does not exist) where the component should be registered.</td>
-		  </tr>
-		  <tr>
-			<td class="cell15"><code>-c<locationUrls></code></td>
-			<td class="cell85">the location of a component (DLL, Class name,
-			or an url of a jar file) or a list of urls separated by ';'s. Note
-			that, if a list of urls is specified, the components must all need
-			the same loader.</td>
-		  </tr>
-		  <tr>
-			<td class="cell15"><code>-l<componentLoaderName></code></td>
-			<td class="cell85">the name of the needed loader, if no loader is
-			specified the 'com.sun.star.loader.SharedLibrary' is used. Supported
-			loaders: 'com.sun.star.loader.SharedLibrary' |
-			'com.sun.star.loader.Java'.</td>
-		  </tr>
-		  </table>
-		  </p>
-		  </td>
-		</tr>
-      </table>
-    </td>
-    <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
-  </tr>
-  <tr>
-    <td colspan="3"><img class="line" src="images/sdk_line-1.gif"></td>
-  </tr>
-  <tr>
-    <td class="content1"><img class="nothing8" src="images/nada.gif"></td>
-    <td>
-      <table class="table2">
-        <tr>
 		  <td colspan="2" class="head1"><a name="regmerge"/>regmerge</td>
 		  <td align="right">
 		    <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a>
diff --git a/odk/settings/std.mk b/odk/settings/std.mk
index 31c95217..1b260b3 100644
--- a/odk/settings/std.mk
+++ b/odk/settings/std.mk
@@ -67,7 +67,6 @@ IDLC="$(OO_SDK_HOME)/bin/idlc"
 CPPUMAKER="$(OO_SDK_HOME)/bin/cppumaker"
 JAVAMAKER="$(OO_SDK_HOME)/bin/javamaker"
 REGMERGE="$(OO_SDK_URE_HOME)/bin/regmerge"
-REGCOMP="$(OO_SDK_URE_HOME)/bin/regcomp"
 
 SDK_JAVA_UNO_BOOTSTRAP_FILES=\
     -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/Loader.class$(SQM) \
diff --git a/odk/util/odk_rules.pmk b/odk/util/odk_rules.pmk
index 9b84e16..bd81942 100644
--- a/odk/util/odk_rules.pmk
+++ b/odk/util/odk_rules.pmk
@@ -89,10 +89,6 @@ $(DESTDIRBIN)/%.bin : $(BINOUT)/%.bin
     @@-rm -f $@
     $(GNUCOPY) $(BINOUT)/$(@:f) $@
 
-$(DESTDIRBIN)/regcomp : $(BINOUT)/regcomp
-    @@-rm -f $@
-    $(MY_TEXTCOPY) $< $@
-
 $(DESTDIRBIN)/unoapploader$(EXEPOSTFIX) : $(BIN)/unoapploader$(EXEPOSTFIX)
     @@-rm -f $@
     $(GNUCOPY) $(BIN)/$(@:f) $@
diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index 50c42b2..ea409f3 100755
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -91,25 +91,6 @@ Shortcut gid_Shortcut_Exe_Uno
 End
 #endif
 
-#if defined WNT
-File gid_File_Exe_Regcomp
-    BIN_FILE_BODY;
-    Dir = gid_Dir_Ure_Bin;
-    Name = EXENAME(regcomp);
-    Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "D51FA672-7C24-4E24-A282-872C4BF690A1";
-End
-#endif
-
-#ifndef WNT
-Shortcut gid_Shortcut_Exe_Regcomp
-    FileID = gid_File_Exe_StartupSh;
-    Dir = gid_Dir_Ure_Bin;
-    Name = EXENAME(regcomp);
-    Styles = (RELATIVE);
-End
-#endif
-
 File gid_File_Exe_Regmerge
     BIN_FILE_BODY;
     Dir = gid_Dir_Ure_Bin;
@@ -158,16 +139,6 @@ File gid_File_Exe_UnoBin
 End
 #endif
 
-#if !defined WNT
-File gid_File_Exe_RegcompBin
-    BIN_FILE_BODY;
-    Dir = gid_Dir_Ure_Bin;
-    Name = "regcomp.bin";
-    Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
-    // CompID = "70FBE546-A228-455F-BCBB-716BF03AD5C6";
-End
-#endif
-
 // Public Dynamic Libraries:
 
 File gid_File_Dl_Cppu
@@ -989,13 +960,11 @@ Module gid_Module_Root_Ure_Hidden
             gid_File_Readme_Ure,
             gid_File_License_Ure,
             gid_File_Exe_Uno,
-            gid_File_Exe_Regcomp,
             gid_File_Exe_Regmerge,
             gid_File_Exe_Regview,
             gid_File_Exe_Javaldx,
             gid_File_Exe_StartupSh,
             gid_File_Exe_UnoBin,
-            gid_File_Exe_RegcompBin,
             gid_File_Dl_Cli_Uno,
             gid_File_Dl_Cli_Ure_Assembly,
             gid_File_Dl_Policy_Cli_Ure_Assembly,
diff --git a/solenv/bin/guw.pl b/solenv/bin/guw.pl
index b423106..99bd4a1 100644
--- a/solenv/bin/guw.pl
+++ b/solenv/bin/guw.pl
@@ -41,7 +41,6 @@ use Text::ParseWords;
                          'MAP', 'NODEFAULTLIB', 'OPT', 'PDB', 'RELEASE',
                          'SUBSYSTEM', 'STACK', 'out:', 'map:', 'ENTRY:',
                          'implib:', 'delayload:', 'def', 'COMMENT:' ],
-               'regcomp', [ '-env:', 'vnd.sun.star.expand:' , 'vnd.openoffice.pymodule' ],
                'regmerge', [ '/UCR' ],
                'rc', [ '-D' ],
                'rsc', [ '-DOOO_' ] );
diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk
index dbb513d..c9bd344 100644
--- a/solenv/inc/settings.mk
+++ b/solenv/inc/settings.mk
@@ -974,11 +974,6 @@ IDLC*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/idlc
 REGMERGE*=$(AUGMENT_LIBRARY_PATH) $(VALGRINDTOOL) $(SOLARBINDIR)/regmerge
 REGCOMPARE*=$(AUGMENT_LIBRARY_PATH) $(VALGRINDTOOL) $(SOLARBINDIR)/regcompare
 
-.IF "$(DEBUGREGCOMP)" != "" || "$(debugregcomp)" != ""
-GDBREGCOMPTRACE=$(GDBTRACE)
-.ENDIF
-
-REGCOMP*=$(AUGMENT_LIBRARY_PATH_LOCAL) $(GDBREGCOMPTRACE) $(SOLARBINDIR)/regcomp
 CPPUMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/cppumaker
 JAVAMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/javamaker
 RDBMAKER*=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/rdbmaker
diff --git a/ure/source/README b/ure/source/README
index 7d7654d..04368d7 100644
--- a/ure/source/README
+++ b/ure/source/README
@@ -25,7 +25,6 @@ Linux x86, Solaris x86, and Solaris SPARC:
 /opt/openoffice.org/ure/THIRDPARTYLICENSEREADME.html
 /opt/openoffice.org/ure/README
 /opt/openoffice.org/ure/bin/uno
-/opt/openoffice.org/ure/bin/regcomp
 /opt/openoffice.org/ure/bin/regmerge
 /opt/openoffice.org/ure/bin/regview
 /opt/openoffice.org/ure/bin/javaldx
@@ -48,7 +47,6 @@ Linux x86, Solaris x86, and Solaris SPARC:
 /opt/openoffice.org/ure/lib/libstdc++.so.6  [external; Linux x86 only]
 /opt/openoffice.org/ure/bin/startup.sh  [private]
 /opt/openoffice.org/ure/bin/uno.bin  [private]
-/opt/openoffice.org/ure/bin/regcomp.bin  [private]
 /opt/openoffice.org/ure/lib/unorc  [private]
 /opt/openoffice.org/ure/lib/libreg.so.3  [private]
 /opt/openoffice.org/ure/lib/libstore.so.3  [private]
@@ -95,7 +93,6 @@ Program Files\URE\LICENSE
 Program Files\URE\THIRDPARTYLICENSEREADME.html
 Program Files\URE\README
 Program Files\URE\bin\uno.exe
-Program Files\URE\bin\regcomp.exe
 Program Files\URE\bin\regmerge.exe
 Program Files\URE\bin\regview.exe
 Program Files\URE\bin\cppu3.dll
@@ -183,13 +180,13 @@ A URE installation contains the following public files:
 - uno is the executable file that runs UNO components.  For more details, see
 the SDK Developer's Guide.
 
-- regcomp, regmerge, and regview are tools that work with binary registries that
-contain UNO type or UNO service information.  For more details, see the SDK
-Developer's Guide.
+- regmerge and regview are tools that work with binary registries that contain
+UNO type or UNO service information.  For more details, see the SDK Developer's
+Guide.
 
 - javaldx is a helper program on Linux x86, Solaris x86, and Solaris SPARC that
 enables Java executables to use a Java VM, such as the Sun JDK/JRE.  Executables
-such as uno and regcomp run this helper automatically.
+such as uno run this helper automatically.
 
 - cppu, cppuhelper, purpenvhelper, sal, and salhelper are the public C++ UNO
 runtime dynamic libraries that client code can call.  For details on the
@@ -264,11 +261,6 @@ For details on how to override the UNO deployment variables, see the SDK
 Developer's Guide or go to http://udk.openoffice.org/common/man/concept/
 micro_deployment.html.
 
-If you want to deploy additional UNO types and services, use regcomp.
-
-CAUTION: Do not deploy these types and services to the types.rdb and
-services.rdb in the URE installation.
-
 
 URE Java Framework
 ------------------
commit b980eca67edd8e3dd43d8717dbd90a2104450f85
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Dec 18 14:19:01 2012 +0100

    Adapt ure/source/uretest/ to passive component registration
    
    (regview only works for old binary .rdb files, so test-regview needs to use
    types.rdb now)
    
    Change-Id: Icd68122c08ae723010c42a8515e09c2d81f0cdda

diff --git a/ure/source/uretest/JavaTest.java b/ure/source/uretest/JavaTest.java
index a57c248..2bc1b0c 100644
--- a/ure/source/uretest/JavaTest.java
+++ b/ure/source/uretest/JavaTest.java
@@ -32,12 +32,6 @@ public final class JavaTest implements XTest {
         throw new TestException("test", this);
     }
 
-    public static boolean __writeRegistryServiceInfo(XRegistryKey key) {
-        return
-            FactoryHelper.writeRegistryServiceInfo(
-                IMPLEMENTATION_NAME, SERVICE_NAME, key);
-    }
-
     public static XSingleServiceFactory __getServiceFactory(
         String name, XMultiServiceFactory factory, XRegistryKey key)
     {
diff --git a/ure/source/uretest/Makefile b/ure/source/uretest/Makefile
index e988a70..8c39907 100644
--- a/ure/source/uretest/Makefile
+++ b/ure/source/uretest/Makefile
@@ -279,13 +279,10 @@ out.sdk/types.urd: types.idl | out.sdk
 	$(IDLC) -O$(@D) -I$(IDL_DIR) -cid -we $<
 
 
-out.sdk/services.rdb: out.sdk/cpptest.uno.$(SHAREDLIB_EXT) \
-            out.sdk/javatest.uno.jar | out.sdk
+out.sdk/services.rdb: services.rdb.in | out.sdk/cpptest.uno.$(SHAREDLIB_EXT) \
+            out.sdk/javatest.uno.jar out.sdk
 	$(DEL) $(subst /,$(PS),$@)
-	$(REGCOMP) -register -r $@ \
-            -c $(URLPREFIX)$(cwd)/out.sdk/cpptest.uno.$(SHAREDLIB_EXT)
-	$(REGCOMP) -register -br "$(URE_TYPES)" -br "$(URE_SERVICES)" -r $@ \
-            -c $(URLPREFIX)$(cwd)/out.sdk/javatest.uno.jar
+	sed -e s/@SHAREDLIB_EXT@/$(SHAREDLIB_EXT)/ < $^ > $@
 
 
 out.sdk:
diff --git a/ure/source/uretest/Makefile.pln b/ure/source/uretest/Makefile.pln
index 9a21e4a..fef981a 100644
--- a/ure/source/uretest/Makefile.pln
+++ b/ure/source/uretest/Makefile.pln
@@ -33,7 +33,7 @@ URE_HOME ?= /opt/openoffice.org/ure
 check: test-regview test-cpptest test-javatest test-javanative test-clientserver
 
 .PHONY: test-regview
-test-regview: out.pln/services.rdb
+test-regview: out.pln/types.rdb
 	$(URE_HOME)/bin/regview $< > /dev/null
 
 .PHONY: test-cpptest
@@ -263,14 +263,9 @@ out.pln/types.urd: types.idl | out.pln
             -I$(SDK_HOME)/idl -cid -we $<
 
 
-out.pln/services.rdb: out.pln/cpptest.uno.so out.pln/javatest.uno.jar | out.pln
-	rm -f $@
-	$(URE_HOME)/bin/regcomp -register -r $@ \
-            -c file://$(PWD)/out.pln/cpptest.uno.so
-	$(URE_HOME)/bin/regcomp -register \
-            -br $(URE_HOME)/share/misc/types.rdb \
-            -br $(URE_HOME)/share/misc/services.rdb -r $@ \
-            -c file://$(PWD)/out.pln/javatest.uno.jar
+out.pln/services.rdb: services.rdb.in | out.pln/cpptest.uno.so \
+            out.pln/javatest.uno.jar out.pln
+	sed -e s/@SHAREDLIB_EXT@/so/ < $^ > $@
 
 
 out.pln/lib/libuno_cppu.so: | out.pln/lib
diff --git a/ure/source/uretest/cpptest.cc b/ure/source/uretest/cpptest.cc
index d1d6415..30950ec 100644
--- a/ure/source/uretest/cpptest.cc
+++ b/ure/source/uretest/cpptest.cc
@@ -93,13 +93,6 @@ cppu::ImplementationEntry entries[] = {
 
 }
 
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
-    void * serviceManager, void * registryKey)
-{
-    return cppu::component_writeInfoHelper(
-        serviceManager, registryKey, entries);
-}
-
 extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
     char const * implName, void * serviceManager, void * registryKey)
 {
diff --git a/ure/source/uretest/services.rdb.in b/ure/source/uretest/services.rdb.in
new file mode 100644
index 0000000..0bec749
--- /dev/null
+++ b/ure/source/uretest/services.rdb.in
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<components xmlns="http://openoffice.org/2010/uno-components">
+  <component
+      loader="com.sun.star.loader.SharedLibrary"
+      uri="./cpptest.uno. at SHAREDLIB_EXT@">
+    <implementation name="test.cpp.cpptest.Component">
+      <service name="test.types.CppTest"/>
+    </implementation>
+  </component>
+  <component loader="com.sun.star.loader.Java2" uri="./javatest.uno.jar">
+    <implementation name="test.java.javatest.Component">
+      <service name="test.types.JavaTest"/>
+    </implementation>
+  </component>
+</components>
commit a25bec0cb20671a8a8e2eacd61138773f4275875
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Dec 18 14:38:39 2012 +0100

    Properly absolutize all registry arguments of uno executable
    
    What was found to not work is something like "-ro services.rdb" referencing an
    XML-format services.rdb that itself contains relative uri attributes.  The uno
    executable would not make an absolute file URL from "services.rdb" due to no
    leading ".", so trying to absolutize any relative uri attributes against the
    relative .rdb URL lead to MalformedUriExceptions.
    
    Change-Id: Ib41fc8e42b9848f5e77f44c86e1857a3d287d634

diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index e6590a3..20256ae 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -29,6 +29,7 @@
 #include <rtl/process.h>
 #include <rtl/string.h>
 #include <rtl/strbuf.hxx>
+#include <rtl/uri.hxx>
 #include <rtl/ustrbuf.hxx>
 
 #include <uno/environment.h>
@@ -58,12 +59,6 @@
 #include <osl/thread.h>
 #include <osl/file.hxx>
 
-#ifdef SAL_UNX
-#define SEPARATOR '/'
-#else
-#define SEPARATOR '\\'
-#endif
-
 using namespace std;
 using namespace osl;
 using namespace cppu;
@@ -83,42 +78,18 @@ using ::rtl::OUStringBuffer;
 namespace unoexe
 {
 
-static sal_Bool isFileUrl(const OUString& fileName)
-{
-    if (fileName.indexOf("file://") == 0 )
-        return sal_True;
-    return sal_False;
-}
-
 static OUString convertToFileUrl(const OUString& fileName)
 {
-    if ( isFileUrl(fileName) )
-    {
-        return fileName;
+    OUString uWorkingDir;
+    if (osl_getProcessWorkingDir(&uWorkingDir.pData) != osl_Process_E_None) {
+        OSL_ASSERT(false);
     }
-
-    OUString uUrlFileName;
-    if ( fileName.indexOf('.') == 0 || fileName.indexOf(SEPARATOR) < 0 )
+    if (!uWorkingDir.isEmpty()
+        && uWorkingDir[uWorkingDir.getLength() - 1] != '/')
     {
-        OUString uWorkingDir;
-        if (osl_getProcessWorkingDir(&uWorkingDir.pData) != osl_Process_E_None) {
-            OSL_ASSERT(false);
-        }
-        if (FileBase::getAbsoluteFileURL(uWorkingDir, fileName, uUrlFileName)
-            != FileBase::E_None)
-        {
-            OSL_ASSERT(false);
-        }
-    } else
-    {
-        if (FileBase::getFileURLFromSystemPath(fileName, uUrlFileName)
-            != FileBase::E_None)
-        {
-            OSL_ASSERT(false);
-        }
+        uWorkingDir += "/";
     }
-
-    return uUrlFileName;
+    return rtl::Uri::convertRelToAbs(uWorkingDir, fileName);
 }
 
 static sal_Bool s_quiet = false;
@@ -363,6 +334,13 @@ static Reference< XSimpleRegistry > openRegistry(
         out( ": " );
         out( e.Message );
     }
+    catch (rtl::MalformedUriException & e)
+    {
+        out( "\n> warning: cannot open registry " );
+        out( rURL );
+        out( ": " );
+        out( e.getMessage() );
+    }
 
     return Reference< XSimpleRegistry >();
 }
commit 7b01977c7a50ab5b16d894a0760d61bf04970766
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Dec 18 14:18:28 2012 +0100

    Improve error reporting
    
    Change-Id: I430344cfe70134fb18bd884056261b11924c71d0

diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index db3e63b..e6590a3 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -350,18 +350,20 @@ static Reference< XSimpleRegistry > openRegistry(
         if (xNewReg->isValid())
             return xNewReg;
         else
+        {
             xNewReg->close();
+            out( "\n> warning: cannot open registry " );
+            out( rURL );
+        }
     }
-    catch (Exception &)
+    catch (Exception & e)
     {
+        out( "\n> warning: cannot open registry " );
+        out( rURL );
+        out( ": " );
+        out( e.Message );
     }
 
-    out( "\n> warning: cannot open registry \"" );
-    out( rURL );
-    if (bReadOnly)
-        out( "\" for reading, ignoring!" );
-    else
-        out( "\" for reading and writing, ignoring!" );
     return Reference< XSimpleRegistry >();
 }
 //--------------------------------------------------------------------------------------------------
commit 7068cad92490e45c75214ba33a9102df24b6653d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Dec 18 13:39:32 2012 +0100

    -fvisibility=hidden requires HAVE_GCC_VISIBILITY_FEATURE
    
    ...had been forgotten in f98379816411f932ccdafede5f9b25c260c17361 "Make
    ure/source/uretest work again"
    
    Change-Id: I9175118126124eba4ea750914d588f6c1ccb2604

diff --git a/ure/source/uretest/Makefile.pln b/ure/source/uretest/Makefile.pln
index 23e1f05..9a21e4a 100644
--- a/ure/source/uretest/Makefile.pln
+++ b/ure/source/uretest/Makefile.pln
@@ -87,7 +87,8 @@ out.pln/cppmain.o: cppmain.cc out.pln/cpputypes.cppumaker.flag \
             out.pln/types.cppumaker.flag | out.pln
 	g++ -c -o $@ -fpic -fvisibility=hidden -Wall -Wno-ctor-dtor-privacy \
             -I $(SDK_HOME)/include -I out.pln/include/cpputypes \
-            -I out.pln/include/types -DCPPU_ENV=gcc3 -DLINUX -DUNX $<
+            -I out.pln/include/types -DCPPU_ENV=gcc3 \
+            -DHAVE_GCC_VISIBILITY_FEATURE -DLINUX -DUNX $<
 
 
 out.pln/cpptest.uno.so: out.pln/cpptest.o | out.pln out.pln/lib/libuno_cppu.so \
@@ -99,7 +100,8 @@ out.pln/cpptest.o: cpptest.cc out.pln/cpputypes.cppumaker.flag \
             out.pln/types.cppumaker.flag | out.pln
 	g++ -c -o $@ -fpic -fvisibility=hidden -Wall -Wno-ctor-dtor-privacy \
             -I $(SDK_HOME)/include -I out.pln/include/cpputypes \
-            -I out.pln/include/types -DCPPU_ENV=gcc3 -DLINUX -DUNX $<
+            -I out.pln/include/types -DCPPU_ENV=gcc3 \
+            -DHAVE_GCC_VISIBILITY_FEATURE -DLINUX -DUNX $<
 
 
 out.pln/cppserver.uno.so: out.pln/cppserver.o | out.pln \
@@ -112,7 +114,8 @@ out.pln/cppserver.o: cppserver.cc out.pln/cpputypes.cppumaker.flag \
             out.pln/types.cppumaker.flag | out.pln
 	g++ -c -o $@ -fpic -fvisibility=hidden -Wall -Wno-ctor-dtor-privacy \
             -I $(SDK_HOME)/include -I out.pln/include/cpputypes \
-            -I out.pln/include/types -DCPPU_ENV=gcc3 -DLINUX -DUNX $<
+            -I out.pln/include/types -DCPPU_ENV=gcc3 \
+            -DHAVE_GCC_VISIBILITY_FEATURE -DLINUX -DUNX $<
 
 
 out.pln/cpputypes.cppumaker.flag: | out.pln


More information about the Libreoffice-commits mailing list