summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/inc/deployment.hrc5
-rw-r--r--desktop/source/deployment/gui/dp_gui.hrc24
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx23
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.hxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.src8
-rw-r--r--desktop/source/deployment/inc/dp_dependencies.hxx14
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx9
-rw-r--r--desktop/source/deployment/misc/dp_dependencies.cxx40
-rw-r--r--desktop/source/deployment/misc/dp_misc.src11
-rw-r--r--desktop/util/ooverinfo.rc55
-rw-r--r--desktop/util/ooverinfo2.rc7
-rw-r--r--desktop/util/verinfo.rc64
-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
23 files changed, 379 insertions, 297 deletions
diff --git a/desktop/inc/deployment.hrc b/desktop/inc/deployment.hrc
index 5cc1956b59..e82b54c012 100644
--- a/desktop/inc/deployment.hrc
+++ b/desktop/inc/deployment.hrc
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: deployment.hrc,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -79,6 +76,8 @@
#define RID_DEPLOYMENT_DEPENDENCIES_START (RID_DEPLOYMENT_START + 4400)
#define RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN RID_DEPLOYMENT_DEPENDENCIES_START
+#define RID_DEPLYOMENT_DEPENDENCIES_MIN (RID_DEPLOYMENT_DEPENDENCIES_START+1)
+#define RID_DEPLYOMENT_DEPENDENCIES_MAX (RID_DEPLOYMENT_DEPENDENCIES_START+2)
#define RID_DEPLOYMENT_LICENSE_START (RID_DEPLOYMENT_START+4500)
diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc
index d1f8607ffe..fae3b16df6 100644
--- a/desktop/source/deployment/gui/dp_gui.hrc
+++ b/desktop/source/deployment/gui/dp_gui.hrc
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_gui.hrc,v $
- * $Revision: 1.17 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -136,16 +133,17 @@
#define RID_DLG_UPDATE_UNKNOWNERROR 18
#define RID_DLG_UPDATE_NODESCRIPTION 19
#define RID_DLG_UPDATE_NOINSTALL 20
-#define RID_DLG_UPDATE_NODEPENDENCY 21
-#define RID_DLG_UPDATE_NOPERMISSION 22
-#define RID_DLG_UPDATE_NOPERMISSION_VISTA 23
-#define RID_DLG_UPDATE_BROWSERBASED 24
-#define RID_DLG_UPDATE_PUBLISHER_LABEL 25
-#define RID_DLG_UPDATE_PUBLISHER_LINK 26
-#define RID_DLG_UPDATE_RELEASENOTES_LABEL 27
-#define RID_DLG_UPDATE_RELEASENOTES_LINK 28
-#define RID_DLG_UPDATE_NOUPDATE 29
-#define RID_DLG_UPDATE_VERSION 30
+#define RID_DLG_UPDATE_NODEPENDENCY 21
+#define RID_DLG_UPDATE_NODEPENDENCY_CUR_VER 22
+#define RID_DLG_UPDATE_NOPERMISSION 23
+#define RID_DLG_UPDATE_NOPERMISSION_VISTA 24
+#define RID_DLG_UPDATE_BROWSERBASED 25
+#define RID_DLG_UPDATE_PUBLISHER_LABEL 26
+#define RID_DLG_UPDATE_PUBLISHER_LINK 27
+#define RID_DLG_UPDATE_RELEASENOTES_LABEL 28
+#define RID_DLG_UPDATE_RELEASENOTES_LINK 29
+#define RID_DLG_UPDATE_NOUPDATE 30
+#define RID_DLG_UPDATE_VERSION 31
#define RID_DLG_EXTENSION_MANAGER (RID_DEPLOYMENT_GUI_START + 6)
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index faa070c2a9..c5ad87788d 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -430,7 +430,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
++i)
{
deps.push_back(
- dp_misc::Dependencies::name( depExc.UnsatisfiedDependencies[i]) );
+ dp_misc::Dependencies::getErrorText( depExc.UnsatisfiedDependencies[i]) );
}
{
vos::OGuard guard(Application::GetSolarMutex());
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 82ee9e0c6f..c26284a8be 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_gui_updatedialog.cxx,v $
- * $Revision: 1.18.10.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -82,6 +79,7 @@
#include "com/sun/star/xml/dom/XElement.hpp"
#include "com/sun/star/xml/dom/XNode.hpp"
#include "osl/diagnose.h"
+#include "rtl/bootstrap.hxx"
#include "rtl/ref.hxx"
#include "rtl/string.h"
#include "rtl/ustrbuf.hxx"
@@ -545,7 +543,7 @@ bool UpdateDialog::Thread::update(
du.aUpdateInfo = updateInfo;
du.unsatisfiedDependencies.realloc(ds.getLength());
for (sal_Int32 i = 0; i < ds.getLength(); ++i) {
- du.unsatisfiedDependencies[i] = dp_misc::Dependencies::name(ds[i]);
+ du.unsatisfiedDependencies[i] = dp_misc::Dependencies::getErrorText(ds[i]);
}
du.permission = ! packageManager->isReadOnly();
const ::boost::optional< ::rtl::OUString> updateWebsiteURL(infoset.getLocalizedUpdateWebsiteURL());
@@ -630,6 +628,7 @@ UpdateDialog::UpdateDialog(
m_noDescription(String(DpGuiResId(RID_DLG_UPDATE_NODESCRIPTION))),
m_noInstall(String(DpGuiResId(RID_DLG_UPDATE_NOINSTALL))),
m_noDependency(String(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY))),
+ m_noDependencyCurVer(String(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY_CUR_VER))),
m_noPermission(String(DpGuiResId(RID_DLG_UPDATE_NOPERMISSION))),
m_noPermissionVista(String(DpGuiResId(RID_DLG_UPDATE_NOPERMISSION_VISTA))),
m_browserbased(String(DpGuiResId(RID_DLG_UPDATE_BROWSERBASED))),
@@ -1111,7 +1110,18 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG)
{
UpdateDialog::DisabledUpdate & data = m_disabledUpdates[
p->index.disabledUpdate];
- if (data.unsatisfiedDependencies.getLength() != 0) {
+ if (data.unsatisfiedDependencies.getLength() != 0)
+ {
+ // create error string for version mismatch
+ ::rtl::OUString sVersion( RTL_CONSTASCII_USTRINGPARAM("%VERSION") );
+ sal_Int32 nPos = m_noDependencyCurVer.indexOf( sVersion );
+ if ( nPos >= 0 )
+ {
+ ::rtl::OUString sCurVersion( RTL_CONSTASCII_USTRINGPARAM( "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":Version:OOOPackageVersion}"));
+ ::rtl::Bootstrap::expandMacros(sCurVersion);
+ m_noDependencyCurVer = m_noDependencyCurVer.replaceAt( nPos, sVersion.getLength(), sCurVersion );
+ }
+
b.append(m_noInstall);
b.append(LF);
b.append(m_noDependency);
@@ -1126,6 +1136,9 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG)
confineToParagraph(
data.unsatisfiedDependencies[i]));
}
+ b.append(LF);
+ b.appendAscii(RTL_CONSTASCII_STRINGPARAM(" "));
+ b.append(m_noDependencyCurVer);
}
if (!data.permission) {
if (b.getLength() == 0) {
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
index c27485a132..8251e910c7 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_gui_updatedialog.hxx,v $
- * $Revision: 1.9.86.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -213,6 +210,7 @@ private:
rtl::OUString m_noDescription;
rtl::OUString m_noInstall;
rtl::OUString m_noDependency;
+ rtl::OUString m_noDependencyCurVer;
rtl::OUString m_noPermission;
rtl::OUString m_noPermissionVista;
rtl::OUString m_browserbased;
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.src b/desktop/source/deployment/gui/dp_gui_updatedialog.src
index 37726e3f0b..6cbbb92e06 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.src
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.src
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_gui_updatedialog.src,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -242,7 +239,10 @@ ModalDialog RID_DLG_UPDATE {
Text[en-US] = "The extension cannot be installed because:";
};
String RID_DLG_UPDATE_NODEPENDENCY {
- Text[en-US] = "Incompatibility:";
+ Text[en-US] = "Required OpenOffice.org version doesn't match:";
+ };
+ String RID_DLG_UPDATE_NODEPENDENCY_CUR_VER {
+ Text[en-US] = "You have OpenOffice.org %VERSION";
};
String RID_DLG_UPDATE_NOPERMISSION {
Text[en-US] = "No write permission (shared extension).";
diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx
index a602bb2e9c..a516099268 100644
--- a/desktop/source/deployment/inc/dp_dependencies.hxx
+++ b/desktop/source/deployment/inc/dp_dependencies.hxx
@@ -78,6 +78,20 @@ namespace Dependencies {
DESKTOP_DEPLOYMENTMISC_DLLPUBLIC ::rtl::OUString name(
::com::sun::star::uno::Reference<
::com::sun::star::xml::dom::XElement > const & dependency);
+
+ /**
+ Obtain the (human-readable) error message of a failed dependency.
+
+ @param dependency
+ a dependency represented as a non-null XML element
+
+ @return
+ the name of the dependency; will never be empty, as a localized
+ &ldquo;unknown&rdquo; is substituted for an empty/missing name
+ */
+ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC ::rtl::OUString getErrorText(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::dom::XElement > const & dependency);
}
}
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 21300f3ac5..16a502b7b6 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_informationprovider.cxx,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -54,6 +51,7 @@
#include "rtl/ustring.hxx"
#include "ucbhelper/content.hxx"
+#include "dp_dependencies.hxx"
#include "dp_descriptioninfoset.hxx"
#include "dp_identifier.hxx"
#include "dp_version.hxx"
@@ -388,6 +386,11 @@ uno::Sequence< uno::Sequence< rtl::OUString > >
if (*id2 == id)
{
+ // check, if there are unsatisfied dependencies and ignore those updates
+ uno::Sequence< uno::Reference< xml::dom::XElement > > ds( dp_misc::Dependencies::check( infoset ) );
+ if ( ds.getLength() )
+ continue;
+
rtl::OUString v( infoset.getVersion() );
if ( dp_misc::compareVersions( v, latestVersion ) == dp_misc::GREATER )
{
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index 2482948028..b509315da6 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_dependencies.cxx,v $
- * $Revision: 1.9.156.2 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -142,6 +139,43 @@ name(css::uno::Reference< css::xml::dom::XElement > const & dependency) {
: n;
}
+::rtl::OUString getErrorText( css::uno::Reference< css::xml::dom::XElement > const & dependency )
+{
+ ::rtl::OUString sReason;
+ ::rtl::OUString sValue;
+ ::rtl::OUString sVersion(RTL_CONSTASCII_USTRINGPARAM("%VERSION"));
+
+ if ( dependency->getNamespaceURI().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( xmlNamespace ) )
+ && dependency->getTagName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenOffice.org-minimal-version" ) ) )
+ {
+ sValue = dependency->getAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "value" ) ) );
+ sReason = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_MIN)) );
+ }
+ else if ( dependency->getNamespaceURI().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( xmlNamespace ) )
+ && dependency->getTagName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenOffice.org-maximal-version" ) ) )
+ {
+ sValue = dependency->getAttribute( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value") ) );
+ sReason = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_MAX)) );
+ }
+ else if ( dependency->hasAttributeNS( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( xmlNamespace ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenOffice.org-minimal-version" ))))
+ {
+ sValue = dependency->getAttributeNS( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( xmlNamespace ) ),
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenOffice.org-minimal-version" ) ) );
+ sReason = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_MIN)) );
+ }
+ else
+ return ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN)) );
+
+ if ( sValue.getLength() == 0 )
+ sValue = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN)) );
+
+ sal_Int32 nPos = sReason.indexOf( sVersion );
+ if ( nPos >= 0 )
+ sReason = sReason.replaceAt( nPos, sVersion.getLength(), sValue );
+ return sReason;
+}
+
}
}
diff --git a/desktop/source/deployment/misc/dp_misc.src b/desktop/source/deployment/misc/dp_misc.src
index fc34758890..67a2bf054a 100644
--- a/desktop/source/deployment/misc/dp_misc.src
+++ b/desktop/source/deployment/misc/dp_misc.src
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: dp_misc.src,v $
- * $Revision: 1.6 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,3 +30,11 @@
String RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN {
Text[en-US] = "Unknown";
};
+
+String RID_DEPLYOMENT_DEPENDENCIES_MIN {
+ Text[en-US] = "Extensions requires at least OpenOffice.org %VERSION";
+};
+
+String RID_DEPLYOMENT_DEPENDENCIES_MAX {
+ Text[en-US] = "Extension doesn't support versions greater than: OpenOffice.org %VERSION";
+};
diff --git a/desktop/util/ooverinfo.rc b/desktop/util/ooverinfo.rc
index 06c8d2218e..0e9f01ddc3 100644
--- a/desktop/util/ooverinfo.rc
+++ b/desktop/util/ooverinfo.rc
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ooverinfo.rc,v $
- * $Revision: 1.12 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -28,55 +25,14 @@
*
*************************************************************************/
-#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
-
-// -----------------------------------------------------------------------
-
#if !defined(ENGLISH)
#define LG_D // generate always german version
#endif
-#define VER_FIRSTYEAR 00
+#define VER_FIRSTYEAR 2000
#include <windows.h>
-#include "verinfo.hrc"
-
-#ifdef WIN32
-#define FOR_WIN_X " (32 Bit)"
-#else
-#define FOR_WIN_X ""
-#endif
-
-// -----------------------------------------------------------------------
-// language/character set specification table
-// -----------------------------------------------------------------------
-
-RCD_LANGUAGE rcdata
-{
-#ifdef LG_D
- "040704B0", // Germany -> Unicode
- "040704E4", // Germany -> Windows, Multilingual
-#else
- "040904B0", // Germany -> Unicode
- "040904E4", // USA -> Windows, Multilingual
-#endif
- "04090000", // USA -> 7-Bit-ASCII
- 0 // end of table
-}
+#include "version.hrc"
// -----------------------------------------------------------------------
// version information
@@ -140,13 +96,6 @@ 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
-};
-
2 ICON "icons\\ooo3_writer_doc.ico"
3 ICON "icons\\ooo3_writer_tem.ico"
diff --git a/desktop/util/ooverinfo2.rc b/desktop/util/ooverinfo2.rc
index 403e0fae72..27fb7ae5c1 100644
--- a/desktop/util/ooverinfo2.rc
+++ b/desktop/util/ooverinfo2.rc
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: ooverinfo2.rc,v $
- * $Revision: 1.5 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -29,7 +26,7 @@
*************************************************************************/
#define VERSION 3
-#define SUBVERSION 1
+#define SUBVERSION 2
//#define VERVARIANT 0
// .0 + VER_CONCEPT
// .100 + VER_ALPHA
@@ -41,7 +38,7 @@
#define VER_FINAL 0
#define VER_DAY 1
-#define VER_MONTH 4
+#define VER_MONTH 9
#define VER_YEAR 2009
// -----------------------------------------------------------------------
diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc
index 1588a710e3..8f1840afbe 100644
--- a/desktop/util/verinfo.rc
+++ b/desktop/util/verinfo.rc
@@ -6,9 +6,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: verinfo.rc,v $
- * $Revision: 1.19 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -28,55 +25,14 @@
*
*************************************************************************/
-#define VERSION 9
-//#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 2009
-
-// -----------------------------------------------------------------------
-
#if !defined(ENGLISH)
#define LG_D // generate always german version
#endif
-#define VER_FIRSTYEAR VER_YEAR
+#define VER_FIRSTYEAR 2007
#include <windows.h>
-#include "verinfo.hrc"
-
-#ifdef WIN32
-#define FOR_WIN_X " (32 Bit)"
-#else
-#define FOR_WIN_X ""
-#endif
-
-// -----------------------------------------------------------------------
-// language/character set specification table
-// -----------------------------------------------------------------------
-
-RCD_LANGUAGE rcdata
-{
-#ifdef LG_D
- "040704B0", // Germany -> Unicode
- "040704E4", // Germany -> Windows, Multilingual
-#else
- "040904B0", // Germany -> Unicode
- "040904E4", // USA -> Windows, Multilingual
-#endif
- "04090000", // USA -> 7-Bit-ASCII
- 0 // end of table
-}
+#include "version_so.hrc"
// -----------------------------------------------------------------------
// version information
@@ -84,11 +40,11 @@ RCD_LANGUAGE rcdata
VS_VERSION_INFO versioninfo
#ifndef SUBVERSION
- fileversion VERSION, 0, 0, VERVARIANT
- productversion VERSION, 0, 0, VERVARIANT
+ fileversion VERSION, 0, VERVARIANT, VER_COUNT
+ productversion VERSION, 0, VERVARIANT, VER_COUNT
#else
- fileversion VERSION, VERVARIANT, VER_COUNT
- productversion VERSION, VERVARIANT, VER_COUNT
+ fileversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT
+ productversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT
#endif
fileflagsmask 0x3F
fileflags
@@ -145,14 +101,6 @@ VS_VERSION_INFO versioninfo
}
}
-// version binary entry
-VS_VERSION_INFO rcdata
-{
- 0xF0, "sw", 0x0F, VER_YEAR, VER_MONTH, VER_DAY,
- VERSION, VERVARIANT, VER_COUNT
-};
-
-
2 ICON "icons\\so9_writer_doc.ico"
3 ICON "icons\\so9_writer_tem.ico"
4 ICON "icons\\so9_calc_doc.ico"
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