summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-17 18:43:43 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-17 18:43:43 +0000
commita3b82be177993e41fc47999a2e9714e6d238406e (patch)
tree2508ab0fe75876dfb85a470a36a163301630b1db
parent954bc8a57743da5092b218285b4b8f14239235dd (diff)
downloadchromium_src-a3b82be177993e41fc47999a2e9714e6d238406e.zip
chromium_src-a3b82be177993e41fc47999a2e9714e6d238406e.tar.gz
chromium_src-a3b82be177993e41fc47999a2e9714e6d238406e.tar.bz2
Add gears.dll to Chrome installer. Also uninstall gears.msi if new installer succeeds.
Review URL: http://codereview.chromium.org/2938 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2320 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/installer/mini_installer/chrome.release1
-rw-r--r--chrome/installer/setup/main.cc19
2 files changed, 20 insertions, 0 deletions
diff --git a/chrome/installer/mini_installer/chrome.release b/chrome/installer/mini_installer/chrome.release
index 2eeb953..f6b2cbd 100644
--- a/chrome/installer/mini_installer/chrome.release
+++ b/chrome/installer/mini_installer/chrome.release
@@ -33,6 +33,7 @@ wow_helper.exe: %(ChromeDir)s\
Dictionaries\en-US.bdic: %(ChromeDir)s\Dictionaries
chrome.dll: %(VersionDir)s\
icudt38.dll: %(VersionDir)s\
+plugins\gears\gears.dll: %(VersionDir)s\
Themes\default.dll: %(VersionDir)s\Themes
locales\*.dll: %(VersionDir)s\Locales
Resources\Inspector\*.*: %(VersionDir)s\Resources\Inspector
diff --git a/chrome/installer/setup/main.cc b/chrome/installer/setup/main.cc
index 1925e22..54e66b8 100644
--- a/chrome/installer/setup/main.cc
+++ b/chrome/installer/setup/main.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include <string>
+#include <windows.h>
+#include <msi.h>
#include "base/at_exit.h"
#include "base/basictypes.h"
@@ -240,6 +242,23 @@ installer_util::InstallStatus InstallChrome(const CommandLine& cmd_line,
if (install_status == installer_util::FIRST_INSTALL_SUCCESS) {
LOG(INFO) << "First install successful. Launching Chrome.";
installer::LaunchChrome(system_install);
+ } else if (install_status == installer_util::NEW_VERSION_UPDATED) {
+#if defined(GOOGLE_CHROME_BUILD)
+ // TODO(kuchhal): This is just temporary until all users move to the
+ // new Chromium version which ships with gears.dll.
+ LOG(INFO) << "Google Chrome updated. Uninstalling gears msi.";
+ wchar_t product[39]; // GUID + '\0'
+ MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); // Don't show any UI
+ for (int i = 0;
+ MsiEnumRelatedProducts(google_update::kGearsUpgradeCode, 0,
+ i, product) != ERROR_NO_MORE_ITEMS; ++i) {
+ LOG(INFO) << "Uninstalling Gears - " << product;
+ unsigned int ret = MsiConfigureProduct(product,
+ INSTALLLEVEL_MAXIMUM, INSTALLSTATE_ABSENT);
+ if (ret != ERROR_SUCCESS)
+ LOG(ERROR) << "Failed to uninstall Gears " << product;
+ }
+#endif
}
}
}