diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-27 02:51:42 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-27 02:51:42 +0000 |
commit | 7eb2110136de4cb6b31c76f489e6290b1ce8b6fd (patch) | |
tree | 56a0397e61fb414102572e69c4d9cfb663086e48 /chrome/installer | |
parent | d191f2c56ad72d9ada2f9e5dd51d57387c7d41f9 (diff) | |
download | chromium_src-7eb2110136de4cb6b31c76f489e6290b1ce8b6fd.zip chromium_src-7eb2110136de4cb6b31c76f489e6290b1ce8b6fd.tar.gz chromium_src-7eb2110136de4cb6b31c76f489e6290b1ce8b6fd.tar.bz2 |
Fix chrome_frame_mini_installer.exe to use the right archive names for installing / patching.
BUG=33217
TEST=chrome_frame_mini_installer.exe installs chrome frame correctly.
Review URL: http://codereview.chromium.org/557011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/setup/setup_constants.cc | 2 | ||||
-rw-r--r-- | chrome/installer/setup/setup_constants.h | 2 | ||||
-rw-r--r-- | chrome/installer/setup/setup_main.cc | 33 |
3 files changed, 29 insertions, 8 deletions
diff --git a/chrome/installer/setup/setup_constants.cc b/chrome/installer/setup/setup_constants.cc index 76f08bf..7e79a9b 100644 --- a/chrome/installer/setup/setup_constants.cc +++ b/chrome/installer/setup/setup_constants.cc @@ -9,7 +9,9 @@ namespace installer { const wchar_t kWowHelperExe[] = L"wow_helper.exe"; const wchar_t kDictionaries[] = L"Dictionaries"; const wchar_t kChromeArchive[] = L"chrome.7z"; +const wchar_t kChromeFrameArchive[] = L"chrome_frame.7z"; const wchar_t kChromeCompressedArchive[] = L"chrome.packed.7z"; +const wchar_t kChromeFrameCompressedArchive[] = L"chrome_frame.packed.7z"; // Sub directory of install source package under install temporary directory. const wchar_t kInstallSourceDir[] = L"source"; diff --git a/chrome/installer/setup/setup_constants.h b/chrome/installer/setup/setup_constants.h index c25dd7a..e87e436 100644 --- a/chrome/installer/setup/setup_constants.h +++ b/chrome/installer/setup/setup_constants.h @@ -12,7 +12,9 @@ namespace installer { extern const wchar_t kWowHelperExe[]; extern const wchar_t kDictionaries[]; extern const wchar_t kChromeArchive[]; +extern const wchar_t kChromeFrameArchive[]; extern const wchar_t kChromeCompressedArchive[]; +extern const wchar_t kChromeFrameCompressedArchive[]; extern const wchar_t kInstallSourceDir[]; extern const wchar_t kInstallSourceChromeDir[]; diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index c23b8db..59589b6 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -39,7 +39,7 @@ namespace { - // This method unpacks and uncompresses the given archive file. For Chrome +// This method unpacks and uncompresses the given archive file. For Chrome // install we are creating a uncompressed archive that contains all the files // needed for the installer. This uncompressed archive is later compressed. // @@ -61,8 +61,15 @@ DWORD UnPackArchive(const std::wstring& archive, bool system_install, if (ret != NO_ERROR) return ret; + std::wstring archive_name; + if (InstallUtil::IsChromeFrameProcess()) { + archive_name = installer::kChromeFrameArchive; + } else { + archive_name = installer::kChromeArchive; + } + std::wstring uncompressed_archive(temp_path); - file_util::AppendToPath(&uncompressed_archive, installer::kChromeArchive); + file_util::AppendToPath(&uncompressed_archive, archive_name); // Check if this is differential update and if it is, patch it to the // installer archive that should already be on the machine. We assume @@ -80,7 +87,7 @@ DWORD UnPackArchive(const std::wstring& archive, bool system_install, file_util::AppendToPath(&existing_archive, installed_version->GetString()); file_util::AppendToPath(&existing_archive, installer_util::kInstallerDir); - file_util::AppendToPath(&existing_archive, installer::kChromeArchive); + file_util::AppendToPath(&existing_archive, archive_name); if (int i = setup_util::ApplyDiffPatch(existing_archive, unpacked_file, uncompressed_archive)) { LOG(ERROR) << "Binary patching failed with error " << i; @@ -191,8 +198,13 @@ installer_util::InstallStatus InstallChrome(const CommandLine& cmd_line, // For install the default location for chrome.packed.7z is in current // folder, so get that value first. std::wstring archive = file_util::GetDirectoryFromPath(cmd_line.program()); - file_util::AppendToPath(&archive, - std::wstring(installer::kChromeCompressedArchive)); + if (InstallUtil::IsChromeFrameProcess()) { + file_util::AppendToPath(&archive, + std::wstring(installer::kChromeFrameCompressedArchive)); + } else { + file_util::AppendToPath(&archive, + std::wstring(installer::kChromeCompressedArchive)); + } // If --install-archive is given, get the user specified value if (cmd_line.HasSwitch(installer_util::switches::kInstallArchive)) { archive = cmd_line.GetSwitchValue( @@ -250,8 +262,13 @@ installer_util::InstallStatus InstallChrome(const CommandLine& cmd_line, // We want to keep uncompressed archive (chrome.7z) that we get after // uncompressing and binary patching. Get the location for this file. std::wstring archive_to_copy(temp_path.ToWStringHack()); - file_util::AppendToPath(&archive_to_copy, - std::wstring(installer::kChromeArchive)); + std::wstring archive_name; + if (InstallUtil::IsChromeFrameProcess()) { + archive_name = installer::kChromeFrameArchive; + } else { + archive_name = installer::kChromeArchive; + } + file_util::AppendToPath(&archive_to_copy, archive_name); std::wstring prefs_source_path = cmd_line.GetSwitchValue( installer_util::switches::kInstallerData); install_status = installer::InstallOrUpdateChrome( @@ -295,7 +312,7 @@ installer_util::InstallStatus InstallChrome(const CommandLine& cmd_line, &do_not_launch_chrome); if (!system_level && !do_not_launch_chrome) installer::LaunchChrome(system_level); - } else if ((install_status == installer_util::NEW_VERSION_UPDATED) || + } else if ((install_status == installer_util::NEW_VERSION_UPDATED) || (install_status == installer_util::IN_USE_UPDATED)) { installer_setup::RemoveLegacyRegistryKeys(); } |