diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-07 17:24:17 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-07 17:24:17 +0000 |
commit | 663f339a1197711e5a9b0f0f382920e529f4fb3e (patch) | |
tree | ab66a4b7e8d014f3711b133db23376ba3848fe93 | |
parent | 0e7d57fa87b02031db31444a22cba54b32405896 (diff) | |
download | chromium_src-663f339a1197711e5a9b0f0f382920e529f4fb3e.zip chromium_src-663f339a1197711e5a9b0f0f382920e529f4fb3e.tar.gz chromium_src-663f339a1197711e5a9b0f0f382920e529f4fb3e.tar.bz2 |
Include the Chrome Frame binary in Chrome installers. Note that it will only be registered (and thus used) if the installer is run with the --chrome-frame flag.
Remove a bunch of CF-specific code in the process.
BUG=46818
TEST=Can use the same mini_installer.exe to install either Chrome or Chrome Frame.
Review URL: http://codereview.chromium.org/2839009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51729 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/all.gyp | 1 | ||||
-rw-r--r-- | chrome/installer/mini_installer.gyp | 56 | ||||
-rw-r--r-- | chrome/installer/mini_installer/appid.h | 1 | ||||
-rw-r--r-- | chrome/installer/mini_installer/chrome.release | 2 | ||||
-rw-r--r-- | chrome/installer/mini_installer/chrome_appid.cc | 1 | ||||
-rw-r--r-- | chrome/installer/mini_installer/chrome_frame.release | 51 | ||||
-rw-r--r-- | chrome/installer/mini_installer/chrome_frame_appid.cc | 10 | ||||
-rw-r--r-- | chrome/installer/mini_installer/mini_installer.cc | 3 | ||||
-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 | 41 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_reporting.cc | 2 |
12 files changed, 26 insertions, 146 deletions
diff --git a/build/all.gyp b/build/all.gyp index bd34a33..f6cb767 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -241,7 +241,6 @@ # mini_installer_tests depends on mini_installer. This should be # defined in installer.gyp. '../chrome/installer/mini_installer.gyp:mini_installer', - '../chrome/installer/mini_installer.gyp:chrome_frame_mini_installer', '../courgette/courgette.gyp:courgette_unittests', '../gfx/gfx.gyp:gfx_unittests', '../gpu/gpu.gyp:gpu_unittests', diff --git a/chrome/installer/mini_installer.gyp b/chrome/installer/mini_installer.gyp index dd8a888..90c5929 100644 --- a/chrome/installer/mini_installer.gyp +++ b/chrome/installer/mini_installer.gyp @@ -201,62 +201,6 @@ }, ], }, - { - 'target_name': 'chrome_frame_mini_installer', - 'type': 'executable', - 'msvs_guid': '2F3651F5-4662-4565-A4F6-AD15B0E893AA', - 'sources': [ - 'mini_installer/chrome_frame.release', - 'mini_installer/chrome_frame_appid.cc', - ], - 'dependencies': [ - # Artificially make this depend on the other to avoid - # problems with parallel packaging scripts being run. - 'mini_installer', - ], - 'rules': [ - { - 'rule_name': 'installer_archive', - 'extension': 'release', - 'variables': { - 'create_installer_archive_py_path': - '../tools/build/win/create_installer_archive.py', - }, - 'inputs': [ - '<(create_installer_archive_py_path)', - '<(PRODUCT_DIR)/chrome.exe', - '<(PRODUCT_DIR)/chrome.dll', - '<(PRODUCT_DIR)/nacl64.exe', - '<(PRODUCT_DIR)/nacl64.dll', - '<(PRODUCT_DIR)/locales/en-US.dll', - '<(PRODUCT_DIR)/icudt42.dll', - ], - 'outputs': [ - 'xxx.out', - '<(PRODUCT_DIR)/<(RULE_INPUT_NAME).7z', - '<(PRODUCT_DIR)/<(RULE_INPUT_NAME).packed.7z', - '<(PRODUCT_DIR)/setup.ex_', - '<(PRODUCT_DIR)/packed_files.txt', - ], - 'action': [ - 'python', - '<(create_installer_archive_py_path)', - '--output_dir=<(PRODUCT_DIR)', - '--input_file=<(RULE_INPUT_PATH)', - # TODO(sgk): may just use environment variables - #'--distribution=$(CHROMIUM_BUILD)', - '--distribution=_google_chrome', - '--archive_prefix=cf', - '--output_name=chrome_frame', - # Optional arguments to generate diff installer - #'--last_chrome_installer=C:/Temp/base', - #'--setup_exe_format=DIFF', - #'--diff_algorithm=COURGETTE', - ], - 'message': 'Create Chrome Frame installer archive' - }, - ], - }, ], }], [ 'branding == "Chrome"', { diff --git a/chrome/installer/mini_installer/appid.h b/chrome/installer/mini_installer/appid.h index db6fa93..6403f9b 100644 --- a/chrome/installer/mini_installer/appid.h +++ b/chrome/installer/mini_installer/appid.h @@ -9,6 +9,7 @@ namespace google_update { extern const wchar_t kAppGuid[]; extern const wchar_t kSxSAppGuid[]; +extern const wchar_t kChromeFrameAppGuid[]; } #endif // CHROME_INSTALLER_MINI_INSTALLER_APPID_H_ diff --git a/chrome/installer/mini_installer/chrome.release b/chrome/installer/mini_installer/chrome.release index 2877457..a58fc28 100644 --- a/chrome/installer/mini_installer/chrome.release +++ b/chrome/installer/mini_installer/chrome.release @@ -43,6 +43,8 @@ Resources\Inspector\Images\*.*: %(VersionDir)s\Resources\Inspector\Images Resources\gmail_app\*.*: %(VersionDir)s\Resources\gmail_app Resources\calendar_app\*.*: %(VersionDir)s\Resources\calendar_app Resources\docs_app\*.*: %(VersionDir)s\Resources\docs_app +servers\*.dll: %(VersionDir)s\ +servers\*.exe: %(VersionDir)s\ Extensions\*.*: %(VersionDir)s\Extensions\ av*.dll: %(VersionDir)s\ pdf.dll: %(VersionDir)s\ diff --git a/chrome/installer/mini_installer/chrome_appid.cc b/chrome/installer/mini_installer/chrome_appid.cc index 4f5fb5f..8b3c283 100644 --- a/chrome/installer/mini_installer/chrome_appid.cc +++ b/chrome/installer/mini_installer/chrome_appid.cc @@ -7,4 +7,5 @@ namespace google_update { const wchar_t kAppGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}"; const wchar_t kSxSAppGuid[] = L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}"; +const wchar_t kChromeFrameAppGuid[] = L"{8BA986DA-5100-405E-AA35-86F34A02ACBF}"; } diff --git a/chrome/installer/mini_installer/chrome_frame.release b/chrome/installer/mini_installer/chrome_frame.release deleted file mode 100644 index cfddf3e..0000000 --- a/chrome/installer/mini_installer/chrome_frame.release +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 2008, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -[GENERAL] -chrome.exe: %(ChromeDir)s\ -wow_helper.exe: %(ChromeDir)s\ -Dictionaries\en-US.bdic: %(ChromeDir)s\Dictionaries -chrome.dll: %(VersionDir)s\ -nacl64.exe: %(VersionDir)s\ -nacl64.dll: %(VersionDir)s\ -icudt42.dll: %(VersionDir)s\ -gears.dll: %(VersionDir)s\ -resources.pak: %(VersionDir)s\ -locales\*.dll: %(VersionDir)s\Locales -Resources\Inspector\*.*: %(VersionDir)s\Resources\Inspector -Resources\Inspector\Images\*.*: %(VersionDir)s\Resources\Inspector\Images -servers\*.dll: %(VersionDir)s\ -servers\*.exe: %(VersionDir)s\ -Extensions\*.*: %(VersionDir)s\Extensions\ -av*.dll: %(VersionDir)s\ -pdf.dll: %(VersionDir)s\ - -[GOOGLE_CHROME] -gcswf32.dll: %(VersionDir)s\ -plugin.vch: %(VersionDir)s\ diff --git a/chrome/installer/mini_installer/chrome_frame_appid.cc b/chrome/installer/mini_installer/chrome_frame_appid.cc deleted file mode 100644 index 51a74ee..0000000 --- a/chrome/installer/mini_installer/chrome_frame_appid.cc +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/installer/mini_installer/appid.h" - -namespace google_update { -const wchar_t kAppGuid[] = L"{8BA986DA-5100-405E-AA35-86F34A02ACBF}"; -const wchar_t kSxSAppGuid[] = L""; -} diff --git a/chrome/installer/mini_installer/mini_installer.cc b/chrome/installer/mini_installer/mini_installer.cc index 5a969d0..621d0cd 100644 --- a/chrome/installer/mini_installer/mini_installer.cc +++ b/chrome/installer/mini_installer/mini_installer.cc @@ -153,11 +153,14 @@ void SetFullInstallerFlag(HKEY root_key) { const wchar_t* app_guid = google_update::kAppGuid; int args_num; + wchar_t* cmd_line = ::GetCommandLine(); wchar_t** args = ::CommandLineToArgvW(cmd_line, &args_num); for (int i = 1; i < args_num; ++i) { if (0 == ::lstrcmpi(args[i], L"--chrome-sxs")) app_guid = google_update::kSxSAppGuid; + else if (0 == ::lstrcmpi(args[i], L"--chrome-frame")) + app_guid = google_update::kChromeFrameAppGuid; } if (!SafeStrCopy(ap_registry_key, _countof(ap_registry_key), diff --git a/chrome/installer/setup/setup_constants.cc b/chrome/installer/setup/setup_constants.cc index 7e79a9b..76f08bf 100644 --- a/chrome/installer/setup/setup_constants.cc +++ b/chrome/installer/setup/setup_constants.cc @@ -9,9 +9,7 @@ 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 e87e436..c25dd7a 100644 --- a/chrome/installer/setup/setup_constants.h +++ b/chrome/installer/setup/setup_constants.h @@ -12,9 +12,7 @@ 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 c32b2af..9cfbf4a 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -64,15 +64,8 @@ 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, archive_name); + file_util::AppendToPath(&uncompressed_archive, installer::kChromeArchive); // 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 @@ -90,7 +83,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, archive_name); + file_util::AppendToPath(&existing_archive, installer::kChromeArchive); if (int i = setup_util::ApplyDiffPatch(existing_archive, unpacked_file, uncompressed_archive)) { LOG(ERROR) << "Binary patching failed with error " << i; @@ -232,13 +225,9 @@ 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()); - if (InstallUtil::IsChromeFrameProcess()) { - file_util::AppendToPath(&archive, - std::wstring(installer::kChromeFrameCompressedArchive)); - } else { - file_util::AppendToPath(&archive, - std::wstring(installer::kChromeCompressedArchive)); - } + 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( @@ -296,13 +285,7 @@ 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()); - std::wstring archive_name; - if (InstallUtil::IsChromeFrameProcess()) { - archive_name = installer::kChromeFrameArchive; - } else { - archive_name = installer::kChromeArchive; - } - file_util::AppendToPath(&archive_to_copy, archive_name); + file_util::AppendToPath(&archive_to_copy, installer::kChromeArchive); std::wstring prefs_source_path = cmd_line.GetSwitchValue( installer_util::switches::kInstallerData); install_status = installer::InstallOrUpdateChrome( @@ -616,7 +599,19 @@ int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, // The exit manager is in charge of calling the dtors of singletons. base::AtExitManager exit_manager; CommandLine::Init(0, NULL); + CommandLine* mutable_command_line = CommandLine::ForCurrentProcess(); + + if (mutable_command_line->HasSwitch(installer_util::switches::kChromeFrame)) { + mutable_command_line->AppendSwitch( + WideToASCII(installer_util::switches::kDoNotCreateShortcuts)); + mutable_command_line->AppendSwitch( + WideToASCII(installer_util::switches::kDoNotLaunchChrome)); + mutable_command_line->AppendSwitch( + WideToASCII(installer_util::switches::kDoNotRegisterForUpdateLaunch)); + } + const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); + installer::InitInstallerLogging(parsed_command_line); scoped_ptr<DictionaryValue> prefs(installer_util::GetInstallPreferences( parsed_command_line)); diff --git a/chrome_frame/chrome_frame_reporting.cc b/chrome_frame/chrome_frame_reporting.cc index 807599c8..36d2d57 100644 --- a/chrome_frame/chrome_frame_reporting.cc +++ b/chrome_frame/chrome_frame_reporting.cc @@ -23,7 +23,7 @@ google_breakpad::CustomClientInfo* GetCustomInfo(const wchar_t* dll_path) { std::wstring product; std::wstring version; scoped_ptr<FileVersionInfo> - version_info(FileVersionInfo::CreateFileVersionInfo(dll_path)); + version_info(FileVersionInfo::CreateFileVersionInfo(FilePath(dll_path))); if (version_info.get()) { version = version_info->product_version(); product = version_info->product_short_name(); |