summaryrefslogtreecommitdiff
path: root/desktop/win32
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-05-15 14:12:42 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-05-15 14:12:42 +0000
commit21dd6b720957943ca1349e19c186cb5ce9d2b519 (patch)
treec52657581d0a05411591548755b11808340b0ef2 /desktop/win32
parentbc033eb3dcee2456f783da72ce5c64195e627ab6 (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
Diffstat (limited to 'desktop/win32')
-rw-r--r--desktop/win32/source/applauncher/makefile.mk21
-rw-r--r--desktop/win32/source/applauncher/ooo/makefile.mk21
-rw-r--r--desktop/win32/source/applauncher/ooo/verinfo.rc97
-rw-r--r--desktop/win32/source/applauncher/verinfo.rc102
-rw-r--r--desktop/win32/source/setup/Resource.h5
-rw-r--r--desktop/win32/source/setup/rctmpl.txt3
-rw-r--r--desktop/win32/source/setup/setup.cpp148
-rw-r--r--desktop/win32/source/setup/setup.hxx3
-rw-r--r--desktop/win32/source/setup/setup.ulf7
-rw-r--r--desktop/win32/source/setup/setup_main.cxx3
10 files changed, 267 insertions, 143 deletions
diff --git a/desktop/win32/source/applauncher/makefile.mk b/desktop/win32/source/applauncher/makefile.mk
index c6a24ca372..278c8e23e9 100644
--- a/desktop/win32/source/applauncher/makefile.mk
+++ b/desktop/win32/source/applauncher/makefile.mk
@@ -58,6 +58,7 @@ OBJFILES= \
# SO launcher
.IF "$(BUILD_SPECIAL)"!=""
+APP1DEPN= $(APP1RES) verinfo.rc
APP1TARGET=so$/swriter
APP1NOSAL=TRUE
APP1LINKRES=$(MISC)$/$(TARGET)1.res
@@ -66,6 +67,8 @@ APP1OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/swriter.obj
APP1STDLIBS = $(SHELL32LIB)
+APP1VERINFO=verinfo.rc
+APP1PRODUCTDEF+=-DRES_APP_NAME=swriter
APP2TARGET=so$/scalc
APP2NOSAL=TRUE
@@ -75,6 +78,9 @@ APP2OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/scalc.obj
APP2STDLIBS = $(SHELL32LIB)
+APP2DEPN=verinfo.rc
+APP2VERINFO=verinfo.rc
+APP2PRODUCTDEF+=-DRES_APP_NAME=scalc
APP3TARGET=so$/sdraw
APP3NOSAL=TRUE
@@ -84,6 +90,9 @@ APP3OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/sdraw.obj
APP3STDLIBS = $(SHELL32LIB)
+APP3DEPN=verinfo.rc
+APP3VERINFO=verinfo.rc
+APP3PRODUCTDEF+=-DRES_APP_NAME=sdraw
APP4TARGET=so$/simpress
APP4NOSAL=TRUE
@@ -93,6 +102,9 @@ APP4OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/simpress.obj
APP4STDLIBS = $(SHELL32LIB)
+APP4DEPN=verinfo.rc
+APP4VERINFO=verinfo.rc
+APP4PRODUCTDEF+=-DRES_APP_NAME=simpress
APP5TARGET=so$/sbase
APP5NOSAL=TRUE
@@ -102,6 +114,9 @@ APP5OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/sbase.obj
APP5STDLIBS = $(SHELL32LIB)
+APP5DEPN=verinfo.rc
+APP5VERINFO=verinfo.rc
+APP5PRODUCTDEF+=-DRES_APP_NAME=sbase
APP6TARGET=so$/smath
APP6NOSAL=TRUE
@@ -111,6 +126,9 @@ APP6OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/smath.obj
APP6STDLIBS = $(SHELL32LIB)
+APP6DEPN=verinfo.rc
+APP6VERINFO=verinfo.rc
+APP6PRODUCTDEF+=-DRES_APP_NAME=smath
APP7TARGET=so$/sweb
APP7NOSAL=TRUE
@@ -120,6 +138,9 @@ APP7OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/sweb.obj
APP7STDLIBS = $(SHELL32LIB)
+APP7DEPN=verinfo.rc
+APP7VERINFO=verinfo.rc
+APP7PRODUCTDEF+=-DRES_APP_NAME=sweb
.ENDIF # "$(BUILD_SPECIAL)"!=""
diff --git a/desktop/win32/source/applauncher/ooo/makefile.mk b/desktop/win32/source/applauncher/ooo/makefile.mk
index 65ad16fe00..ad4c7c96b7 100644
--- a/desktop/win32/source/applauncher/ooo/makefile.mk
+++ b/desktop/win32/source/applauncher/ooo/makefile.mk
@@ -44,6 +44,8 @@ UWINAPILIB=
# --- Files --------------------------------------------------------
APP1TARGET=swriter
+APP1DEPN=verinfo.rc
+APP1VERINFO=verinfo.rc
APP1NOSAL=TRUE
APP1LINKRES=$(MISC)$/$(TARGET)1.res
APP1ICON=$(SOLARRESDIR)$/icons/ooo3_writer_app.ico
@@ -51,8 +53,11 @@ APP1OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/swriter.obj
APP1STDLIBS = $(SHELL32LIB)
+APP1PRODUCTDEF+=-DRES_APP_NAME=$(APP1TARGET)
APP2TARGET=scalc
+APP2DEPN=verinfo.rc
+APP2VERINFO=verinfo.rc
APP2NOSAL=TRUE
APP2LINKRES=$(MISC)$/$(TARGET)2.res
APP2ICON=$(SOLARRESDIR)$/icons/ooo3_calc_app.ico
@@ -60,8 +65,11 @@ APP2OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/scalc.obj
APP2STDLIBS = $(SHELL32LIB)
+APP2PRODUCTDEF+=-DRES_APP_NAME=$(APP2TARGET)
APP3TARGET=sdraw
+APP3DEPN=verinfo.rc
+APP3VERINFO=verinfo.rc
APP3NOSAL=TRUE
APP3LINKRES=$(MISC)$/$(TARGET)3.res
APP3ICON=$(SOLARRESDIR)$/icons/ooo3_draw_app.ico
@@ -69,8 +77,11 @@ APP3OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/sdraw.obj
APP3STDLIBS = $(SHELL32LIB)
+APP3PRODUCTDEF+=-DRES_APP_NAME=$(APP3TARGET)
APP4TARGET=simpress
+APP4DEPN=verinfo.rc
+APP4VERINFO=verinfo.rc
APP4NOSAL=TRUE
APP4LINKRES=$(MISC)$/$(TARGET)4.res
APP4ICON=$(SOLARRESDIR)$/icons/ooo3_impress_app.ico
@@ -78,8 +89,11 @@ APP4OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/simpress.obj
APP4STDLIBS = $(SHELL32LIB)
+APP4PRODUCTDEF+=-DRES_APP_NAME=$(APP4TARGET)
APP5TARGET=smath
+APP5DEPN=verinfo.rc
+APP5VERINFO=verinfo.rc
APP5NOSAL=TRUE
APP5LINKRES=$(MISC)$/$(TARGET)5.res
APP5ICON=$(SOLARRESDIR)$/icons/ooo3_math_app.ico
@@ -87,8 +101,11 @@ APP5OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/smath.obj
APP5STDLIBS = $(SHELL32LIB)
+APP5PRODUCTDEF+=-DRES_APP_NAME=$(APP5TARGET)
APP6TARGET=sbase
+APP6DEPN=verinfo.rc
+APP6VERINFO=verinfo.rc
APP6NOSAL=TRUE
APP6LINKRES=$(MISC)$/$(TARGET)6.res
APP6ICON=$(SOLARRESDIR)$/icons/ooo3_base_app.ico
@@ -96,8 +113,11 @@ APP6OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/sbase.obj
APP6STDLIBS = $(SHELL32LIB)
+APP6PRODUCTDEF+=-DRES_APP_NAME=$(APP6TARGET)
APP7TARGET=sweb
+APP7DEPN=verinfo.rc
+APP7VERINFO=verinfo.rc
APP7NOSAL=TRUE
APP7LINKRES=$(MISC)$/$(TARGET)7.res
APP7ICON=$(SOLARRESDIR)$/icons/ooo3_html_doc.ico
@@ -105,6 +125,7 @@ APP7OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/sweb.obj
APP7STDLIBS = $(SHELL32LIB)
+APP7PRODUCTDEF+=-DRES_APP_NAME=$(APP7TARGET)
# --- Targets ------------------------------------------------------
diff --git a/desktop/win32/source/applauncher/ooo/verinfo.rc b/desktop/win32/source/applauncher/ooo/verinfo.rc
new file mode 100644
index 0000000000..b96dc400c5
--- /dev/null
+++ b/desktop/win32/source/applauncher/ooo/verinfo.rc
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2009 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ *************************************************************************/
+
+#if !defined(ENGLISH)
+#define LG_D // generate always german version
+#endif
+
+#define VER_FIRSTYEAR 2009
+
+#include <windows.h>
+#include "version.hrc"
+
+// -----------------------------------------------------------------------
+// version information
+// -----------------------------------------------------------------------
+
+VS_VERSION_INFO versioninfo
+ fileversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT
+ productversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT
+ fileflagsmask 0x3F
+ fileflags
+#if defined(DEBUG)
+ VS_FF_DEBUG |
+#endif
+#ifdef VER_PREL
+ VS_FF_PRERELEASE |
+#endif
+ 0
+#ifndef WIN32
+ fileos VOS_DOS_WINDOWS16
+#else
+ fileos VOS_NT_WINDOWS32
+#endif
+ filetype VFT_APP
+ {
+ block "StringFileInfo"
+ {
+#ifdef LG_D
+ block "040704E4"
+ {
+ // German StringTable
+ value "CompanyName", "OpenOffice.org\0"
+ value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
+ value "FileVersion", PPS(VER_LEVEL) "\0"
+ value "ProductVersion", PPS(VER_LEVEL) "\0"
+ value "OriginalFilename", PPS(RES_APP_NAME) ".exe\0"
+ value "InternalName", PPS(RES_APP_NAME) "\0"
+ value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ }
+#else
+ block "040904E4"
+ {
+ // International StringTable
+ value "CompanyName", "OpenOffice.org\0"
+ value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
+ value "FileVersion", PPS(VER_LEVEL) "\0"
+ value "ProductVersion", PPS(VER_LEVEL) "\0"
+ value "OriginalFilename", PPS(RES_APP_NAME) ".exe\0"
+ value "InternalName", PPS(RES_APP_NAME) "\0"
+ value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ }
+#endif
+ }
+
+ block "VarFileInfo"
+ {
+#ifdef LG_D
+ value "Translation", 0x0407, 1252
+#else
+ value "Translation", 0x0409, 1252
+#endif
+ }
+ }
diff --git a/desktop/win32/source/applauncher/verinfo.rc b/desktop/win32/source/applauncher/verinfo.rc
new file mode 100644
index 0000000000..f1e1bbcefe
--- /dev/null
+++ b/desktop/win32/source/applauncher/verinfo.rc
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2009 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ *************************************************************************/
+
+#if !defined(ENGLISH)
+#define LG_D // generate always german version
+#endif
+
+#define VER_FIRSTYEAR 2009
+
+#include <windows.h>
+#include "version_so.hrc"
+
+// -----------------------------------------------------------------------
+// version information
+// -----------------------------------------------------------------------
+
+VS_VERSION_INFO versioninfo
+#ifndef SUBVERSION
+ fileversion VERSION, 0, VERVARIANT, VER_COUNT
+ productversion VERSION, 0, VERVARIANT, VER_COUNT
+#else
+ fileversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT
+ productversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT
+#endif
+ fileflagsmask 0x3F
+ fileflags
+#if defined(DEBUG)
+ VS_FF_DEBUG |
+#endif
+#ifdef VER_PREL
+ VS_FF_PRERELEASE |
+#endif
+ 0
+#ifndef WIN32
+ fileos VOS_DOS_WINDOWS16
+#else
+ fileos VOS_NT_WINDOWS32
+#endif
+ filetype VFT_APP
+ {
+ block "StringFileInfo"
+ {
+#ifdef LG_D
+ block "040704E4"
+ {
+ // German StringTable
+ value "CompanyName", "Sun Microsystems, Inc.\0"
+ value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
+ value "FileVersion", PPS(VER_LEVEL) "\0"
+ value "ProductVersion", PPS(VER_LEVEL) "\0"
+ value "OriginalFilename", PPS(RES_APP_NAME) ".exe\0"
+ value "InternalName", PPS(RES_APP_NAME) "\0"
+ value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ }
+#else
+ block "040904E4"
+ {
+ // International StringTable
+ value "CompanyName", "Sun Microsystems, Inc.\0"
+ value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
+ value "FileVersion", PPS(VER_LEVEL) "\0"
+ value "ProductVersion", PPS(VER_LEVEL) "\0"
+ value "OriginalFilename", PPS(RES_APP_NAME) ".exe\0"
+ value "InternalName", PPS(RES_APP_NAME) "\0"
+ value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ }
+#endif
+ }
+
+ block "VarFileInfo"
+ {
+#ifdef LG_D
+ value "Translation", 0x0407, 1252
+#else
+ value "Translation", 0x0409, 1252
+#endif
+ }
+ }
diff --git a/desktop/win32/source/setup/Resource.h b/desktop/win32/source/setup/Resource.h
index 521d8a0b0f..c2f9288754 100644
--- a/desktop/win32/source/setup/Resource.h
+++ b/desktop/win32/source/setup/Resource.h
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: Resource.h,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -45,6 +42,8 @@
#define IDS_UNKNOWN_ERROR 21
#define IDS_INVALID_PROFILE 22
#define IDS_UNKNOWN_LANG 23
+#define IDS_SETUP_TO_OLD 24
+#define IDS_SETUP_NOT_FOUND 25
#define IDS_LANGUAGE_ENGLISH 50
#define IDS_LANGUAGE_SPAIN 51
#define IDS_LANGUAGE_GERMAN 52
diff --git a/desktop/win32/source/setup/rctmpl.txt b/desktop/win32/source/setup/rctmpl.txt
index 226390672c..59f454f70c 100644
--- a/desktop/win32/source/setup/rctmpl.txt
+++ b/desktop/win32/source/setup/rctmpl.txt
@@ -10,7 +10,8 @@ BEGIN
IDS_REQUIRES_ADMIN_PRIV %REQUIRES_ADMIN_PRIV%
IDS_FILE_NOT_FOUND %FILE_NOT_FOUND%
IDS_INVALID_PARAM %INVALID_PARAM%
- IDS_ALLOW_MSI_UPDATE %ALLOW_MSI_UPDATE%
+ IDS_SETUP_TO_OLD %SETUP_TO_OLD%
+ IDS_SETUP_NOT_FOUND %SETUP_NOT_FOUND%
IDS_USAGE %USAGE%
IDS_ALREADY_RUNNING %ALREADY_RUNNING%
IDS_UNKNOWN_ERROR %UNKNOWN_ERROR%
diff --git a/desktop/win32/source/setup/setup.cpp b/desktop/win32/source/setup/setup.cpp
index 1f79bc3ebb..af50d912ef 100644
--- a/desktop/win32/source/setup/setup.cpp
+++ b/desktop/win32/source/setup/setup.cpp
@@ -64,6 +64,8 @@
#define PRODUCT_NAME_VAR TEXT( "%PRODUCTNAME" )
#define PRODUCT_VERSION TEXT( "ProductVersion" )
#define ERROR_SHOW_USAGE -2
+#define ERROR_SETUP_TO_OLD -3
+#define ERROR_SETUP_NOT_FOUND -4
#define PARAM_SETUP_USED TEXT( " SETUP_USED=1 " )
#define PARAM_PACKAGE TEXT( "/I " )
@@ -124,8 +126,6 @@ SetupAppX::SetupAppX()
m_pCmdLine = NULL;
m_pDatabase = NULL;
- m_pInstMsiW = NULL;
- m_pInstMsiA = NULL;
m_pReqVersion = NULL;
m_pProductName = NULL;
m_pAdvertise = NULL;
@@ -183,8 +183,6 @@ SetupAppX::~SetupAppX()
if ( m_pAppTitle ) delete [] m_pAppTitle;
if ( m_pDatabase ) delete [] m_pDatabase;
- if ( m_pInstMsiW ) delete [] m_pInstMsiW;
- if ( m_pInstMsiA ) delete [] m_pInstMsiA;
if ( m_pReqVersion ) delete [] m_pReqVersion;
if ( m_pProductName ) delete [] m_pProductName;
if ( m_pAdvertise ) delete [] m_pAdvertise;
@@ -346,16 +344,6 @@ boolean SetupAppX::ReadProfile()
m_pDatabase = pValue;
Log( TEXT( " Database = %s\r\n" ), pValue );
}
- else if ( lstrcmpi( TEXT( "instmsiw" ), pName ) == 0 )
- {
- m_pInstMsiW = pValue;
- Log( TEXT( " instmsiw = %s\r\n" ), pValue );
- }
- else if ( lstrcmpi( TEXT( "instmsia" ), pName ) == 0 )
- {
- m_pInstMsiA = pValue;
- Log( TEXT( " instmsia = %s\r\n" ), pValue );
- }
else if ( lstrcmpi( TEXT( "msiversion" ), pName ) == 0 )
{
m_pReqVersion = pValue;
@@ -389,7 +377,7 @@ boolean SetupAppX::ReadProfile()
}
}
- if ( bRet && ( !m_pDatabase || !m_pInstMsiW || !m_pInstMsiA || !m_pReqVersion || !m_pProductName ) )
+ if ( bRet && ( !m_pDatabase || !m_pReqVersion || !m_pProductName ) )
{
Log( TEXT( "ERROR: incomplete 'Setup' section in profile\r\n" ) );
SetError( ERROR_INVALID_DATA );
@@ -1081,6 +1069,14 @@ void SetupAppX::DisplayError( UINT nErr ) const
StringCchPrintf( sError, MAX_TEXT_LENGTH, sTmp, m_pErrorText );
break;
+ case ERROR_SETUP_TO_OLD: // - 3
+ WIN::LoadString( m_hInst, IDS_SETUP_TO_OLD, sTmp, MAX_TEXT_LENGTH );
+ StringCchPrintf( sError, MAX_TEXT_LENGTH, sTmp, m_pReqVersion, m_pErrorText );
+ break;
+ case ERROR_SETUP_NOT_FOUND: // - 4
+ WIN::LoadString( m_hInst, IDS_SETUP_NOT_FOUND, sTmp, MAX_TEXT_LENGTH );
+ StringCchPrintf( sError, MAX_TEXT_LENGTH, sTmp, m_pReqVersion );
+ break;
case ERROR_SHOW_USAGE: // - 2
nMsgType = MB_OK | MB_ICONINFORMATION;
WIN::LoadString( m_hInst, IDS_USAGE, sError, MAX_TEXT_LENGTH );
@@ -1156,15 +1152,15 @@ void SetupAppX::GetLanguageName( long nLanguage, LPTSTR sName ) const
//--------------------------------------------------------------------------
boolean SetupAppX::CheckVersion()
{
- boolean bRet = true;
- boolean bNeedUpdate = true;
+ boolean bRet = false;
HMODULE hMsi = LoadMsiLibrary();
Log( TEXT( " Looking for installed MSI with version >= %s\r\n" ), m_pReqVersion );
if ( !hMsi )
{
- Log( TEXT( "Warning: No MSI found, update needed!\r\n" ) );
+ Log( TEXT( "Error: No MSI found!\r\n" ) );
+ SetError( (UINT) ERROR_SETUP_NOT_FOUND );
}
else
{
@@ -1184,12 +1180,14 @@ boolean SetupAppX::CheckVersion()
aInfo.dwBuildNumber );
if ( _tcsncmp( pMsiVersion, m_pReqVersion, _tcslen( pMsiVersion ) ) < 0 )
{
+ StringCchCopy( m_pErrorText, MAX_TEXT_LENGTH, pMsiVersion );
+ SetError( (UINT) ERROR_SETUP_TO_OLD );
Log( TEXT( "Warning: Old MSI version found <%s>, update needed!\r\n" ), pMsiVersion );
}
else
{
Log( TEXT( " Found MSI version <%s>, no update needed\r\n" ), pMsiVersion );
- bNeedUpdate = false;
+ bRet = true;
}
if ( aInfo.dwMajorVersion >= 3 )
m_bSupportsPatch = true;
@@ -1201,26 +1199,6 @@ boolean SetupAppX::CheckVersion()
FreeLibrary( hMsi );
}
- if ( bNeedUpdate )
- {
- LPTSTR pInstaller = 0;
-
- if ( IsWin9x() )
- bRet = GetPathToFile( m_pInstMsiA, &pInstaller );
- else
- bRet = GetPathToFile( m_pInstMsiW, &pInstaller );
-
- if ( bRet )
- bRet = InstallMsi( pInstaller );
- else
- Log( TEXT( "ERROR: Could not find InstMsiA/InstMsiW!\r\n" ) );
-
- if ( bRet && IsWin9x() && ( GetMinorVersion() <= 10 ) )
- SetRebootNeeded( true );
-
- if ( pInstaller ) delete [] pInstaller;
- }
-
return bRet;
}
@@ -1278,98 +1256,6 @@ boolean SetupAppX::CheckForUpgrade()
}
//--------------------------------------------------------------------------
-boolean SetupAppX::InstallMsi( LPCTSTR pInstaller )
-{
- if ( ! IsAdmin() )
- {
- Log( TEXT( "Error: need admin rights to update/install MSI!\r\n" ) );
- SetError( ERROR_DS_INSUFF_ACCESS_RIGHTS );
- return false;
- }
-
- if ( ! m_bQuiet )
- {
- TCHAR sUserPrompt[ MAX_TEXT_LENGTH ] = {0};
- WIN::LoadString( m_hInst, IDS_ALLOW_MSI_UPDATE, sUserPrompt, MAX_TEXT_LENGTH );
- ConvertNewline( sUserPrompt );
-
- if ( IDYES != WIN::MessageBox( NULL, sUserPrompt, m_pAppTitle, MB_YESNO | MB_ICONQUESTION ) )
- {
- SetError( ERROR_INSTALL_USEREXIT );
- Log( TEXT( "Error: User canceled update/installation of new MSI!\r\n" ) );
- return false;
- }
- }
-
- STARTUPINFO aSUI;
- PROCESS_INFORMATION aPI;
-
- Log( TEXT( " Will install <%s>\r\n" ), pInstaller );
-
- ZeroMemory( (void*)&aPI, sizeof( PROCESS_INFORMATION ) );
- ZeroMemory( (void*)&aSUI, sizeof( STARTUPINFO ) );
-
- aSUI.cb = sizeof(STARTUPINFO);
- aSUI.dwFlags = STARTF_USESHOWWINDOW;
- aSUI.wShowWindow = SW_SHOW;
-
- DWORD nCmdLineLength = lstrlen( pInstaller ) + lstrlen( sDelayReboot ) + 3;
-
- if ( m_bQuiet )
- nCmdLineLength += lstrlen( sMsiQuiet );
-
- TCHAR *sCmdLine = new TCHAR[ nCmdLineLength ];
-
- if ( FAILED( StringCchCopy( sCmdLine, nCmdLineLength, TEXT("\"")) ) ||
- FAILED( StringCchCat( sCmdLine, nCmdLineLength, pInstaller) ) ||
- FAILED( StringCchCat( sCmdLine, nCmdLineLength, TEXT("\"")) ) ||
- FAILED( StringCchCat( sCmdLine, nCmdLineLength, sDelayReboot) ) ||
- ( m_bQuiet && FAILED( StringCchCat( sCmdLine, nCmdLineLength, sMsiQuiet ) ) ) )
- {
- Log( TEXT( "ERROR: Could not create command line for updating MSI.\r\n" ) );
- delete [] sCmdLine;
- SetError( ERROR_INSTALL_FAILURE );
- return false;
- }
-
- if ( !WIN::CreateProcess( NULL, sCmdLine, NULL, NULL, FALSE,
- CREATE_DEFAULT_ERROR_MODE, NULL, NULL,
- &aSUI, &aPI ) )
- {
- Log( TEXT( "ERROR: Could not create process %s.\r\n" ), sCmdLine );
- SetError( WIN::GetLastError() );
- delete [] sCmdLine;
- return false;
- }
-
- DWORD nResult = WaitForProcess( aPI.hProcess );
-
- if( ERROR_SUCCESS != nResult )
- {
- Log( TEXT( "ERROR: While waiting for %s.\r\n" ), sCmdLine );
- delete [] sCmdLine;
- SetError( nResult );
- return false;
- }
-
- GetExitCodeProcess( aPI.hProcess, &nResult );
- CloseHandle( aPI.hProcess );
-
- if ( nResult != ERROR_SUCCESS )
- {
- TCHAR sBuf[80];
- StringCchPrintf( sBuf, 80, TEXT("Warning: Installation returned %u.\r\n"), nResult );
- Log( sBuf );
- }
- else
- Log( TEXT( " Installation of new version completed successfully.\r\n" ) );
-
- delete [] sCmdLine;
-
- return true;
-}
-
-//--------------------------------------------------------------------------
boolean SetupAppX::IsTerminalServerInstalled() const
{
boolean bIsTerminalServer = false;
diff --git a/desktop/win32/source/setup/setup.hxx b/desktop/win32/source/setup/setup.hxx
index 0c0a54db2a..1393fbd326 100644
--- a/desktop/win32/source/setup/setup.hxx
+++ b/desktop/win32/source/setup/setup.hxx
@@ -75,8 +75,6 @@ class SetupAppX : public SetupApp
LPTSTR m_pAppTitle;
LPTSTR m_pCmdLine;
LPTSTR m_pDatabase;
- LPTSTR m_pInstMsiW;
- LPTSTR m_pInstMsiA;
LPTSTR m_pReqVersion;
LPTSTR m_pProductName;
LPTSTR m_pAdvertise;
@@ -123,7 +121,6 @@ private:
boolean GetCommandLine();
- boolean InstallMsi( LPCTSTR pInstaller );
boolean IsTerminalServerInstalled() const;
void AddFileToPatchList( TCHAR* pPath, TCHAR* pFile );
diff --git a/desktop/win32/source/setup/setup.ulf b/desktop/win32/source/setup/setup.ulf
index eeeb75496f..d0e867d49f 100644
--- a/desktop/win32/source/setup/setup.ulf
+++ b/desktop/win32/source/setup/setup.ulf
@@ -30,8 +30,11 @@ en-US = "Setup was unable to find the file '%s'."
en-US = "Invalid command line option '%s'. Please use '/?' for help."
-[%ALLOW_MSI_UPDATE%]
-en-US = "This package requires a newer version of the Windows Installer. \nDo you want to update the version of the Windows Installer on your system?"
+[%SETUP_TO_OLD%]
+en-US = "This package requires at least the version '%s' of the Windows Installer. \nYou have Windows Installer '%s' on your system!"
+
+[%SETUP_NOT_FOUND%]
+en-US = "This package requires the Windows Installer. \nYou need at least Windows Installer '%s' on your system!"
[%USAGE%]
diff --git a/desktop/win32/source/setup/setup_main.cxx b/desktop/win32/source/setup/setup_main.cxx
index 6f0b6b4c39..28fc251ea7 100644
--- a/desktop/win32/source/setup/setup_main.cxx
+++ b/desktop/win32/source/setup/setup_main.cxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: setup_main.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify