Kaydet (Commit) e14095bc authored tarafından Andre Fischer's avatar Andre Fischer

122398: Fixed Mac and Linux build breaker.

üst d70e1e8e
...@@ -74,6 +74,9 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms ...@@ -74,6 +74,9 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
..\%__SRC%\bin\depl*.dll %_DEST%\bin%_EXT%\depl*.dll ..\%__SRC%\bin\depl*.dll %_DEST%\bin%_EXT%\depl*.dll
..\%__SRC%\lib\deployment*.uno.so %_DEST%\lib%_EXT%\deployment*.uno.so ..\%__SRC%\lib\deployment*.uno.so %_DEST%\lib%_EXT%\deployment*.uno.so
..\%__SRC%\lib\deployment*.uno.dylib %_DEST%\lib%_EXT%\deployment*.uno.dylib ..\%__SRC%\lib\deployment*.uno.dylib %_DEST%\lib%_EXT%\deployment*.uno.dylib
..\%__SRC%\bin\deploymentgui*.dll %_DEST%\bin%_EXT%\deploymentgui*.dll
..\%__SRC%\lib\libdeploymentgui*.uno.so %_DEST%\lib%_EXT%\libdeploymentgui*.uno.so
..\%__SRC%\lib\libdeploymentgui*.uno.dylib %_DEST%\lib%_EXT%\libdeploymentgui*.uno.dylib
..\%__SRC%\bin\deploymentmisc*.dll %_DEST%\bin%_EXT%\deploymentmisc*.dll ..\%__SRC%\bin\deploymentmisc*.dll %_DEST%\bin%_EXT%\deploymentmisc*.dll
..\%__SRC%\lib\libdeploymentmisc*.so %_DEST%\lib%_EXT%\libdeploymentmisc*.so ..\%__SRC%\lib\libdeploymentmisc*.so %_DEST%\lib%_EXT%\libdeploymentmisc*.so
..\%__SRC%\lib\libdeploymentmisc*.dylib %_DEST%\lib%_EXT%\libdeploymentmisc*.dylib ..\%__SRC%\lib\libdeploymentmisc*.dylib %_DEST%\lib%_EXT%\libdeploymentmisc*.dylib
......
...@@ -802,7 +802,7 @@ void MinimalCommandEnv::handle( ...@@ -802,7 +802,7 @@ void MinimalCommandEnv::handle(
if ( xRequest->getRequest() >>= verExc ) if ( xRequest->getRequest() >>= verExc )
{ {
// user interaction, if an extension is already been installed. // user interaction, if an extension is already been installed.
bApprove = dp_gui::handleVersionException( verExc ); bApprove = handleVersionException( verExc );
} }
const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > conts( xRequest->getContinuations()); const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > conts( xRequest->getContinuations());
......
###############################################################
#
# 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
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
###############################################################
UDK_3_0_0 {
global:
component_getImplementationEnvironment;
component_getFactory;
handleVersionException;
local:
*;
};
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <dp_gui_handleversionexception.hxx>
#include "sal/config.h" #include "sal/config.h"
...@@ -105,20 +106,6 @@ ...@@ -105,20 +106,6 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
using ::rtl::OUString; using ::rtl::OUString;
namespace {
OUString getVersion( OUString const & sVersion )
{
return ( sVersion.getLength() == 0 ) ? OUString( RTL_CONSTASCII_USTRINGPARAM( "0" ) ) : sVersion;
}
OUString getVersion( const uno::Reference< deployment::XPackage > &rPackage )
{
return getVersion( rPackage->getVersion());
}
}
namespace dp_gui { namespace dp_gui {
//============================================================================== //==============================================================================
...@@ -360,62 +347,6 @@ uno::Reference< ucb::XProgressHandler > ProgressCmdEnv::getProgressHandler() ...@@ -360,62 +347,6 @@ uno::Reference< ucb::XProgressHandler > ProgressCmdEnv::getProgressHandler()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// XInteractionHandler // XInteractionHandler
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool handleVersionException(
com::sun::star::deployment::VersionException verExc,
DialogHelper* pDialogHelper )
{
bool bApprove = false;
sal_uInt32 id;
switch (dp_misc::compareVersions(
verExc.NewVersion, verExc.Deployed->getVersion() ))
{
case dp_misc::LESS:
id = RID_WARNINGBOX_VERSION_LESS;
break;
case dp_misc::EQUAL:
id = RID_WARNINGBOX_VERSION_EQUAL;
break;
default: // dp_misc::GREATER
id = RID_WARNINGBOX_VERSION_GREATER;
break;
}
OSL_ASSERT( verExc.Deployed.is() );
const bool bEqualNames = verExc.NewDisplayName.equals(
verExc.Deployed->getDisplayName());
{
vos::OGuard guard(Application::GetSolarMutex());
WarningBox box( pDialogHelper ? pDialogHelper->getWindow() : NULL, ResId(id, *DeploymentGuiResMgr::get()));
String s;
if (bEqualNames)
{
s = box.GetMessText();
}
else if (id == RID_WARNINGBOX_VERSION_EQUAL)
{
//hypothetical: requires two instances of an extension with the same
//version to have different display names. Probably the developer forgot
//to change the version.
s = String(ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
}
else if (id == RID_WARNINGBOX_VERSION_LESS)
{
s = String(ResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
}
else if (id == RID_WARNINGBOX_VERSION_GREATER)
{
s = String(ResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
}
s.SearchAndReplaceAllAscii( "$NAME", verExc.NewDisplayName);
s.SearchAndReplaceAllAscii( "$OLDNAME", verExc.Deployed->getDisplayName());
s.SearchAndReplaceAllAscii( "$NEW", getVersion(verExc.NewVersion) );
s.SearchAndReplaceAllAscii( "$DEPLOYED", getVersion(verExc.Deployed) );
box.SetMessText(s);
bApprove = box.Execute() == RET_OK;
}
return bApprove;
}
void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & xRequest ) void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & xRequest )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
......
/**************************************************************
*
* 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
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#include "precompiled_desktop.hxx"
#include "dp_gui_handleversionexception.hxx"
#include "dp_gui_dialog2.hxx"
#include "dp_version.hxx"
#include "dp_gui_shared.hxx"
#include "dp_gui.hrc"
#include <vcl/msgbox.hxx>
using namespace dp_gui;
using namespace dp_misc;
using ::rtl::OUString;
namespace {
OUString getVersion( OUString const & sVersion )
{
return ( sVersion.getLength() == 0 ) ? OUString( RTL_CONSTASCII_USTRINGPARAM( "0" ) ) : sVersion;
}
OUString getVersion( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &rPackage )
{
return getVersion( rPackage->getVersion());
}
}
extern "C" {
bool handleVersionException(
com::sun::star::deployment::VersionException verExc,
DialogHelper* pDialogHelper )
{
bool bApprove = false;
sal_uInt32 id;
switch (dp_misc::compareVersions(
verExc.NewVersion, verExc.Deployed->getVersion() ))
{
case dp_misc::LESS:
id = RID_WARNINGBOX_VERSION_LESS;
break;
case dp_misc::EQUAL:
id = RID_WARNINGBOX_VERSION_EQUAL;
break;
default: // dp_misc::GREATER
id = RID_WARNINGBOX_VERSION_GREATER;
break;
}
OSL_ASSERT( verExc.Deployed.is() );
const bool bEqualNames = verExc.NewDisplayName.equals(
verExc.Deployed->getDisplayName());
{
vos::OGuard guard(Application::GetSolarMutex());
WarningBox box( pDialogHelper ? pDialogHelper->getWindow() : NULL, ResId(id, *DeploymentGuiResMgr::get()));
String s;
if (bEqualNames)
{
s = box.GetMessText();
}
else if (id == RID_WARNINGBOX_VERSION_EQUAL)
{
//hypothetical: requires two instances of an extension with the same
//version to have different display names. Probably the developer forgot
//to change the version.
s = String(ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
}
else if (id == RID_WARNINGBOX_VERSION_LESS)
{
s = String(ResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
}
else if (id == RID_WARNINGBOX_VERSION_GREATER)
{
s = String(ResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
}
s.SearchAndReplaceAllAscii( "$NAME", verExc.NewDisplayName);
s.SearchAndReplaceAllAscii( "$OLDNAME", verExc.Deployed->getDisplayName());
s.SearchAndReplaceAllAscii( "$NEW", getVersion(verExc.NewVersion) );
s.SearchAndReplaceAllAscii( "$DEPLOYED", getVersion(verExc.Deployed) );
box.SetMessText(s);
bApprove = box.Execute() == RET_OK;
}
return bApprove;
}
} // end of extern "C"
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "dp_gui_shared.hxx" #include "dp_gui_shared.hxx"
#include "dp_gui.h" #include "dp_gui.h"
#include "dp_gui_theextmgr.hxx" #include "dp_gui_theextmgr.hxx"
#include "dp_gui_api.hxx"
#include "cppuhelper/implbase2.hxx" #include "cppuhelper/implbase2.hxx"
#include "cppuhelper/implementationentry.hxx" #include "cppuhelper/implementationentry.hxx"
#include "unotools/configmgr.hxx" #include "unotools/configmgr.hxx"
...@@ -44,6 +45,7 @@ ...@@ -44,6 +45,7 @@
#include "dp_gui_dialog2.hxx" #include "dp_gui_dialog2.hxx"
#include "dp_gui_extensioncmdqueue.hxx" #include "dp_gui_extensioncmdqueue.hxx"
using namespace ::dp_misc; using namespace ::dp_misc;
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -346,12 +348,14 @@ sdecl::ServiceDecl const updateDecl( ...@@ -346,12 +348,14 @@ sdecl::ServiceDecl const updateDecl(
extern "C" { extern "C" {
DESKTOP_DEPLOYMENTGUI_DLLPUBLIC
void SAL_CALL component_getImplementationEnvironment( void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** ) const sal_Char ** ppEnvTypeName, uno_Environment ** )
{ {
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
} }
DESKTOP_DEPLOYMENTGUI_DLLPUBLIC
void * SAL_CALL component_getFactory( void * SAL_CALL component_getFactory(
sal_Char const * pImplName, sal_Char const * pImplName,
lang::XMultiServiceFactory * pServiceManager, lang::XMultiServiceFactory * pServiceManager,
......
...@@ -27,16 +27,20 @@ PRJNAME = desktop ...@@ -27,16 +27,20 @@ PRJNAME = desktop
TARGET = deploymentgui TARGET = deploymentgui
ENABLE_EXCEPTIONS = TRUE ENABLE_EXCEPTIONS = TRUE
USE_DEFFILE = TRUE USE_DEFFILE = TRUE
NO_BSYMBOLIC = TRUE #NO_BSYMBOLIC = TRUE
VISIBILITY_HIDDEN=TRUE
USE_PCH := USE_PCH :=
ENABLE_PCH := ENABLE_PCH :=
PRJINC:=..$/.. PRJINC:=..$/..
.INCLUDE : settings.mk .INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/source$/deployment$/inc$/dp_misc.mk .INCLUDE : $(PRJ)$/source$/deployment$/inc$/dp_misc.mk
DLLPRE = #DLLPRE =
SLOFILES = \ # Reduction of exported symbols:
CDEFS += -DDESKTOP_DEPLOYMENTGUI_DLLIMPLEMENTATION
SHL1OBJS = \
$(SLO)$/dp_gui_service.obj \ $(SLO)$/dp_gui_service.obj \
$(SLO)$/dp_gui_extlistbox.obj \ $(SLO)$/dp_gui_extlistbox.obj \
$(SLO)$/dp_gui_dialog2.obj \ $(SLO)$/dp_gui_dialog2.obj \
...@@ -49,16 +53,17 @@ SLOFILES = \ ...@@ -49,16 +53,17 @@ SLOFILES = \
$(SLO)$/dp_gui_autoscrolledit.obj \ $(SLO)$/dp_gui_autoscrolledit.obj \
$(SLO)$/dp_gui_system.obj \ $(SLO)$/dp_gui_system.obj \
$(SLO)$/dp_gui_extensioncmdqueue.obj \ $(SLO)$/dp_gui_extensioncmdqueue.obj \
$(SLO)$/dp_gui_handleversionexception.obj \
$(SLO)$/descedit.obj $(SLO)$/descedit.obj
SHL1OBJS = $(SLO)$/dp_gui_extensioncmdqueue.obj SLOFILES = $(SHL1OBJS)
.IF "$(GUI)"=="OS2" .IF "$(GUI)"=="OS2"
SHL1TARGET = deplgui$(DLLPOSTFIX) SHL1TARGET = deplgui$(DLLPOSTFIX)
.ELSE .ELSE
SHL1TARGET = $(TARGET)$(DLLPOSTFIX).uno SHL1TARGET = $(TARGET)$(DLLPOSTFIX).uno
.ENDIF .ENDIF
SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1VERSIONMAP = $(TARGET).map
SHL1STDLIBS = \ SHL1STDLIBS = \
$(SALLIB) \ $(SALLIB) \
...@@ -82,7 +87,6 @@ SHL1STDLIBS = \ ...@@ -82,7 +87,6 @@ SHL1STDLIBS = \
SHL1DEPN = SHL1DEPN =
SHL1IMPLIB = i$(TARGET) SHL1IMPLIB = i$(TARGET)
SHL1LIBS = $(SLB)$/$(TARGET).lib
SHL1DEF = $(MISC)$/$(SHL1TARGET).def SHL1DEF = $(MISC)$/$(SHL1TARGET).def
DEF1NAME = $(SHL1TARGET) DEF1NAME = $(SHL1TARGET)
......
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
# some C++ functionality: # some C++ functionality:
.IF "$(OS)" == "WNT" .IF "$(OS)" == "WNT"
.IF "$(COM)" == "GCC" .IF "$(COM)" == "GCC"
DEPLOYMENTGUILIB = -ldeploymentgui$(DLLPOSTFIX) DEPLOYMENTGUILIB = -ldeploymentgui$(DLLPOSTFIX).uno
.ELSE .ELSE
DEPLOYMENTGUILIB = ideploymentgui$(DLLPOSTFIX).lib DEPLOYMENTGUILIB = ideploymentgui$(DLLPOSTFIX).uno.lib
.ENDIF .ENDIF
.ELIF "$(OS)" == "OS2" .ELIF "$(OS)" == "OS2"
DEPLOYMENTGUILIB = -ldeplgui DEPLOYMENTGUILIB = -ldeplgui
.ELSE .ELSE
DEPLOYMENTGUILIB = -ldeploymentgui$(DLLPOSTFIX) DEPLOYMENTGUILIB = -ldeploymentgui$(DLLPOSTFIX).uno
.ENDIF .ENDIF
/**************************************************************
*
* 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
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_GUI_API_HXX
#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_GUI_API_HXX
#include "sal/config.h"
#include "sal/types.h"
#if defined DESKTOP_DEPLOYMENTGUI_DLLIMPLEMENTATION
#define DESKTOP_DEPLOYMENTGUI_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
#define DESKTOP_DEPLOYMENTGUI_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
#endif
...@@ -19,22 +19,21 @@ ...@@ -19,22 +19,21 @@
* *
*************************************************************/ *************************************************************/
#ifndef INCLUDED_DP_GUI_HANDLEVERSIONEXCEPTION_HXX #ifndef INCLUDED_DP_GUI_HANDLEVERSIONEXCEPTION_HXX
#define INCLUDED_DP_GUI_HANDLEVERSIONEXCEPTION_HXX #define INCLUDED_DP_GUI_HANDLEVERSIONEXCEPTION_HXX
#include "sal/config.h" #include "dp_gui_api.hxx"
#include "sal/types.h"
#include "com/sun/star/deployment/VersionException.hpp" #include "com/sun/star/deployment/VersionException.hpp"
namespace dp_gui { namespace dp_gui{ class DialogHelper; }
class DialogHelper; extern "C" {
SAL_DLLPUBLIC_EXPORT bool handleVersionException( DESKTOP_DEPLOYMENTGUI_DLLPUBLIC
com::sun::star::deployment::VersionException verExc, bool handleVersionException(
DialogHelper* pDialogHelper = 0 ); com::sun::star::deployment::VersionException verExc,
dp_gui::DialogHelper* pDialogHelper = 0 );
} }
#endif #endif
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
#include <com/sun/star/deployment/VersionException.hpp> #include <com/sun/star/deployment/VersionException.hpp>
#include <dp_gui_handleversionexception.hxx> #include <dp_gui_handleversionexception.hxx>
#include "com/sun/star/deployment/VersionException.hpp"
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -524,7 +526,7 @@ void TmpRepositoryCommandEnv::handle( ...@@ -524,7 +526,7 @@ void TmpRepositoryCommandEnv::handle(
if ( xRequest->getRequest() >>= verExc ) if ( xRequest->getRequest() >>= verExc )
{ {
// user interaction, if an extension is already been installed. // user interaction, if an extension is already been installed.
approve = dp_gui::handleVersionException( verExc ); approve = handleVersionException( verExc );
abort = !approve; abort = !approve;
} }
......
...@@ -1138,6 +1138,13 @@ File gid_File_Lib_Deployment ...@@ -1138,6 +1138,13 @@ File gid_File_Lib_Deployment
PACKED_LIB_FILE_BODY; PACKED_LIB_FILE_BODY;
End End
#ifdef OS2
STD_LIB_FILE(gid_File_Lib_DeploymentGui, deplgui)
#else
STD_LIB_FILE(gid_File_Lib_DeploymentGui, deploymentgui.uno)
#endif
/*
File gid_File_Lib_DeploymentGui File gid_File_Lib_DeploymentGui
#if defined UNX #if defined UNX
Name = STRING(CONCAT4(deploymentgui,DLLPOSTFIX,.uno,UNXSUFFIX)); Name = STRING(CONCAT4(deploymentgui,DLLPOSTFIX,.uno,UNXSUFFIX));
...@@ -1148,6 +1155,7 @@ File gid_File_Lib_DeploymentGui ...@@ -1148,6 +1155,7 @@ File gid_File_Lib_DeploymentGui
#endif #endif
PACKED_LIB_FILE_BODY; PACKED_LIB_FILE_BODY;
End End
*/
#ifdef OS2 #ifdef OS2
STD_LIB_FILE(gid_File_Lib_DeploymentMisc, deplmisc) STD_LIB_FILE(gid_File_Lib_DeploymentMisc, deplmisc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment