diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-05-15 14:12:42 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-05-15 14:12:42 +0000 |
commit | 399748e1635d70636c0f68a840243185cd7de1b6 (patch) | |
tree | 0d6f58a8b6eee1d758de93abb55b9160660c90cf | |
parent | 4ffc989a7dacff3ad6344f43316355a1260840ff (diff) |
CWS-TOOLING: integrate CWS dv11
2009-05-13 16:50:24 +0200 dv r271863 : #i101829# Use UPGRADINGPRODUCTCODE to detect major upgrade
2009-04-17 15:55:48 +0200 dv r270953 : CWS-TOOLING: rebase CWS dv11 to trunk@270723 (milestone: DEV300:m46)
2009-04-17 09:14:21 +0200 dv r270916 : #i100915# Use better product name
2009-04-16 14:41:49 +0200 dv r270884 : #i101132# Use a waiting thread to defere update check
2009-04-07 15:46:52 +0200 dv r270599 : #i100915# Use one include file for all version.rc files
2009-04-07 13:49:56 +0200 dv r270596 : #i100915# Use one include file for all version.rc files
2009-04-03 09:04:08 +0200 dv r270447 : #100776# Added Microsoft XML file types to 'Default Applications', cleaned up Application name display in 'Default Applications'
2009-04-01 10:13:28 +0200 dv r270306 : #i100713# Remove instmsia.exe from installation set
2009-03-30 16:35:35 +0200 dv r270240 : CWS-TOOLING: rebase CWS dv11 to trunk@270033 (milestone: DEV300:m45)
2009-03-27 10:24:40 +0100 dv r270138 : #i100410# Show survey after deinstalling OpenOffice.org (Windows only)
2009-03-18 15:05:31 +0100 dv r269679 : #i98780# Use 'Desktop' folder only, if it exists
2009-03-17 11:19:47 +0100 dv r269581 : #i100082# Ignore updates with failed dependencies for automatic update check
2009-03-13 14:37:27 +0100 dv r269479 : #i100082# Use 'value' instead of 'name' to create error message
2009-03-13 10:14:48 +0100 dv r269460 : #i100082# Support better error message when extension manager update finds an incompatible update
5 files changed, 138 insertions, 54 deletions
diff --git a/crashrep/source/win32/rcheader.txt b/crashrep/source/win32/rcheader.txt index e51ed041bfdd..a33940e672b9 100755 --- a/crashrep/source/win32/rcheader.txt +++ b/crashrep/source/win32/rcheader.txt @@ -28,23 +28,6 @@ * #*************************************************************************/ -#define VERSION 3 -#define SUBVERSION 1 -//#define VERVARIANT 0 -// .0 + VER_CONCEPT -// .100 + VER_ALPHA -// .200 + VER_BETA -// .300 + VER_GAMMA -// .500 + VER_FINAL -//#define VER_CONCEPT 0 -//#define VER_BETA 6 -#define VER_FINAL 0 - -#define VER_DAY 1 -#define VER_MONTH 4 -#define VER_YEAR 09 - - // Header #include "resource.h" #if defined(_MSC_VER) && (_MSC_VER < 1500) @@ -57,9 +40,9 @@ #define IDC_STATIC (-1) #endif -#include "verinfo.hrc" +#define VER_FIRSTYEAR 2003 -#define VER_FIRSTYEAR 03 +#include "version.hrc" #ifdef FONTSIZE #undef FONTSIZE @@ -131,11 +114,4 @@ VS_VERSION_INFO versioninfo } } -// version binary entry -VS_VERSION_INFO rcdata -{ - 0xF0, "sw", 0x0F, VER_YEAR, VER_MONTH, VER_DAY, - VERSION, SUBVERSION, VERVARIANT, VER_COUNT -}; - diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx index 704b8c4fc065..45a7c15ecb2e 100644 --- a/extensions/source/update/check/updatecheckconfig.cxx +++ b/extensions/source/update/check/updatecheckconfig.cxx @@ -6,9 +6,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: updatecheckconfig.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -213,8 +210,14 @@ rtl::OUString UpdateCheckConfig::getDesktopDirectory() } #else // This should become a desktop specific setting in some system backend .. - osl::Security().getHomeDir(aRet); - aRet += rtl::OUString::createFromAscii("/Desktop"); + rtl::OUString aHomeDir; + osl::Security().getHomeDir( aHomeDir ); + aRet = aHomeDir + rtl::OUString::createFromAscii("/Desktop"); + + // Set path to home directory when there is no /Desktop directory + osl::Directory aDocumentsDir( aRet ); + if( osl::FileBase::E_None != aDocumentsDir.open() ) + aRet = aHomeDir; #endif return aRet; diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index 38abc9e28bc5..3bc292e4c8ef 100644 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -51,6 +51,27 @@ namespace uno = com::sun::star::uno ; namespace { +class InitUpdateCheckJobThread : public osl::Thread +{ +public: + InitUpdateCheckJobThread( const uno::Reference< uno::XComponentContext > &xContext, + const uno::Sequence< beans::NamedValue > &xParameters ); + + virtual void SAL_CALL run(); + virtual void SAL_CALL onTerminated(); + + void showDialog(); + +protected: + ~InitUpdateCheckJobThread(); + +private: + osl::Condition m_aCondition; + uno::Reference<uno::XComponentContext> m_xContext; + uno::Sequence<beans::NamedValue> m_xParameters; + bool m_bShowDialog; +}; + class UpdateCheckJob : public ::cppu::WeakImplHelper2< task::XJob, lang::XServiceInfo > { @@ -80,15 +101,64 @@ public: throw (uno::RuntimeException); private: - uno::Reference<uno::XComponentContext> m_xContext; + uno::Reference<uno::XComponentContext> m_xContext; + InitUpdateCheckJobThread *m_pInitThread; void handleExtensionUpdates( const uno::Sequence< beans::NamedValue > &rListProp ); }; //------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +InitUpdateCheckJobThread::InitUpdateCheckJobThread( + const uno::Reference< uno::XComponentContext > &xContext, + const uno::Sequence< beans::NamedValue > &xParameters ) : + m_xContext( xContext ), + m_xParameters( xParameters ), + m_bShowDialog( false ) +{ + create(); +} + +//------------------------------------------------------------------------------ +InitUpdateCheckJobThread::~InitUpdateCheckJobThread() +{ +} + +//------------------------------------------------------------------------------ +void SAL_CALL InitUpdateCheckJobThread::run() +{ + TimeValue tv = { 25, 0 }; + + m_aCondition.wait( &tv ); + + rtl::Reference< UpdateCheck > aController( UpdateCheck::get() ); + aController->initialize( m_xParameters, m_xContext ); + + if ( m_bShowDialog ) + aController->showDialog( true ); +} + +//------------------------------------------------------------------------------ +void SAL_CALL InitUpdateCheckJobThread::onTerminated() +{ + delete this; +} + +//------------------------------------------------------------------------------ +void InitUpdateCheckJobThread::showDialog() +{ + m_bShowDialog = true; + m_aCondition.set(); +} + +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ UpdateCheckJob::UpdateCheckJob(const uno::Reference<uno::XComponentContext>& xContext) : - m_xContext(xContext) + m_xContext(xContext), + m_pInitThread( NULL ) { } @@ -141,11 +211,10 @@ UpdateCheckJob::execute(const uno::Sequence<beans::NamedValue>& namedValues) } } } + uno::Sequence<beans::NamedValue> aConfig = getValue< uno::Sequence<beans::NamedValue> > (namedValues, "JobConfig"); - - rtl::Reference<UpdateCheck> aController(UpdateCheck::get()); - aController->initialize(aConfig, m_xContext); + m_pInitThread = new InitUpdateCheckJobThread( m_xContext, aConfig ); /* Determine the way we got invoked here - * see Developers Guide Chapter "4.7.2 Jobs" to understand the magic @@ -158,7 +227,7 @@ UpdateCheckJob::execute(const uno::Sequence<beans::NamedValue>& namedValues) if( ! aEventName.equalsAscii("onFirstVisibleTask") ) { - aController->showDialog(true); + m_pInitThread->showDialog(); } return uno::Any(); diff --git a/setup_native/source/win32/customactions/relnotes/exports.dxp b/setup_native/source/win32/customactions/relnotes/exports.dxp index 77db8f131f5f..55a454d3d58f 100644 --- a/setup_native/source/win32/customactions/relnotes/exports.dxp +++ b/setup_native/source/win32/customactions/relnotes/exports.dxp @@ -1,2 +1,3 @@ ShowReleaseNotesBefore ShowReleaseNotesAfter +ShowSurveyAfter diff --git a/setup_native/source/win32/customactions/relnotes/relnotes.cxx b/setup_native/source/win32/customactions/relnotes/relnotes.cxx index 7b1bd3a2964c..174a0d6eb120 100644 --- a/setup_native/source/win32/customactions/relnotes/relnotes.cxx +++ b/setup_native/source/win32/customactions/relnotes/relnotes.cxx @@ -6,9 +6,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: relnotes.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -42,7 +39,7 @@ #include <string.h> #include <malloc.h> #include <stdio.h> -#include "strsafe.h" +#include <strsafe.h> //---------------------------------------------------------- #ifdef DEBUG @@ -70,22 +67,28 @@ inline bool IsValidHandle( HANDLE handle ) //---------------------------------------------------------- //---------------------------------------------------------- //---------------------------------------------------------- -UINT ShowReleaseNotes( MSIHANDLE , TCHAR* pFileName ) +UINT ShowReleaseNotes( TCHAR* pFileName, TCHAR* pFilePath ) { - TCHAR szPath[MAX_PATH]; + TCHAR sFullPath[ MAX_PATH ]; - if( FAILED( SHGetSpecialFolderPath( NULL, szPath, CSIDL_COMMON_DOCUMENTS, true ) ) ) + if ( FAILED( StringCchCopy( sFullPath, MAX_PATH, pFilePath ) ) ) + { + OutputDebugStringFormat( TEXT("DEBUG: ShowReleaseNotes: Could not copy path [%s]"), pFilePath ); return ERROR_SUCCESS; + } - if ( FAILED( StringCchCat( szPath, sizeof( szPath ), pFileName ) ) ) + if ( FAILED( StringCchCat( sFullPath, MAX_PATH, pFileName ) ) ) + { + OutputDebugStringFormat( TEXT("DEBUG: ShowReleaseNotes: Could not append filename [%s]"), pFileName ); return ERROR_SUCCESS; + } - HANDLE hFile = CreateFile( szPath, 0, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + HANDLE hFile = CreateFile( sFullPath, 0, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if ( IsValidHandle(hFile) ) { CloseHandle( hFile ); - OutputDebugStringFormat( TEXT("DEBUG: ShowReleaseNotes: Found file [%s]"), szPath ); + OutputDebugStringFormat( TEXT("DEBUG: ShowReleaseNotes: Found file [%s]"), sFullPath ); SHELLEXECUTEINFOW aExecInf; ZeroMemory( &aExecInf, sizeof( aExecInf ) ); @@ -93,7 +96,7 @@ UINT ShowReleaseNotes( MSIHANDLE , TCHAR* pFileName ) aExecInf.cbSize = sizeof( aExecInf ); aExecInf.fMask = SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI; aExecInf.lpVerb = TEXT("open"); - aExecInf.lpFile = szPath; + aExecInf.lpFile = sFullPath; aExecInf.lpDirectory = NULL; aExecInf.nShow = SW_SHOWNORMAL; @@ -102,24 +105,56 @@ UINT ShowReleaseNotes( MSIHANDLE , TCHAR* pFileName ) } else { - OutputDebugStringFormat( TEXT("DEBUG: ShowReleaseNotes: File not found [%s]"), szPath ); - return ERROR_SUCCESS; + OutputDebugStringFormat( TEXT("DEBUG: ShowReleaseNotes: File not found [%s]"), sFullPath ); } return ERROR_SUCCESS; } //---------------------------------------------------------- -extern "C" UINT __stdcall ShowReleaseNotesBefore( MSIHANDLE hMSI ) +extern "C" UINT __stdcall ShowReleaseNotesBefore( MSIHANDLE ) { + TCHAR szPath[MAX_PATH]; + + if( FAILED( SHGetSpecialFolderPath( NULL, szPath, CSIDL_COMMON_DOCUMENTS, true ) ) ) + return ERROR_SUCCESS; + OutputDebugString( TEXT("DEBUG: ShowReleaseNotesBefore called") ); - return ShowReleaseNotes( hMSI, TEXT("\\sun\\releasenote1.url") ); + + return ShowReleaseNotes( TEXT("\\sun\\releasenote1.url"), szPath ); } //---------------------------------------------------------- -extern "C" UINT __stdcall ShowReleaseNotesAfter( MSIHANDLE hMSI ) +extern "C" UINT __stdcall ShowReleaseNotesAfter( MSIHANDLE ) { + TCHAR szPath[MAX_PATH]; + + if( FAILED( SHGetSpecialFolderPath( NULL, szPath, CSIDL_COMMON_DOCUMENTS, true ) ) ) + return ERROR_SUCCESS; + OutputDebugString( TEXT("DEBUG: ShowReleaseNotesAfter called") ); - return ShowReleaseNotes( hMSI, TEXT("\\sun\\releasenote2.url") ); + + return ShowReleaseNotes( TEXT("\\sun\\releasenote2.url"), szPath ); +} + +//---------------------------------------------------------- +extern "C" UINT __stdcall ShowSurveyAfter( MSIHANDLE ) +{ + OutputDebugString( TEXT("DEBUG: ShowSurveyAfter called") ); + + SHELLEXECUTEINFOW aExecInf; + ZeroMemory( &aExecInf, sizeof( aExecInf ) ); + + aExecInf.cbSize = sizeof( aExecInf ); + aExecInf.fMask = SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI; + aExecInf.lpVerb = TEXT("open"); + aExecInf.lpFile = TEXT("http://surveys.services.openoffice.org/deinstall"); + aExecInf.lpDirectory = NULL; + aExecInf.nShow = SW_SHOWNORMAL; + + SetLastError( 0 ); + ShellExecuteEx( &aExecInf ); + + return ERROR_SUCCESS; } |