forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change introduces install_static::InstallDetails, a module-global holder of details relating to the current install. It also more clearly defines the concept of a primary install mode and one or more secondary install modes (e.g., "Chrome SxS" for Google Chrome's canary channel). Furthermore, it creates a clear boundary for brand-specific constants so that Chromium and Google Chrome don't bleed into one another. See chrome/install_static/README.md for more information. BUG=373987 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Review-Url: https://codereview.chromium.org/2422643002 Cr-Commit-Position: refs/heads/master@{#430728}
- Loading branch information
Showing
36 changed files
with
1,930 additions
and
960 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Install Static Library | ||
|
||
The install_static library for Windows contains the minimum functionality to | ||
determine the fundamental properties of Chrome's installation plus various | ||
installation-related utility functions. It has no dependencies beyond | ||
kernel32.dll and version.dll, thereby making it suitable for use within | ||
chrome_elf. | ||
|
||
Key concepts for the library are documented in `install_modes.h`, | ||
`install_constants.h`, and `install_details.h`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright 2016 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. | ||
|
||
// Brand-specific constants and install modes for Chromium. | ||
|
||
#include <stdlib.h> | ||
|
||
#include "chrome/install_static/install_modes.h" | ||
|
||
namespace install_static { | ||
|
||
const wchar_t kCompanyPathName[] = L""; | ||
|
||
const wchar_t kProductPathName[] = L"Chromium"; | ||
|
||
const size_t kProductPathNameLength = _countof(kProductPathName) - 1; | ||
|
||
// No integration with Google Update, so no app GUID. | ||
const wchar_t kBinariesAppGuid[] = L""; | ||
|
||
const wchar_t kBinariesPathName[] = L"Chromium Binaries"; | ||
|
||
const InstallConstants kInstallModes[] = { | ||
// The primary (and only) install mode for Chromium. | ||
{ | ||
sizeof(kInstallModes[0]), | ||
CHROMIUM_INDEX, | ||
L"", // Empty install_suffix for the primary install mode. | ||
L"", // Empty app_guid since no integraion with Google Update. | ||
L"", // Empty default channel name as above. | ||
ChannelStrategy::UNSUPPORTED, | ||
true, // Supports system-level installs. | ||
true, // Supports multi-install. | ||
}, | ||
}; | ||
|
||
static_assert(_countof(kInstallModes) == NUM_INSTALL_MODES, | ||
"Imbalance between kInstallModes and InstallConstantIndex"); | ||
|
||
} // namespace install_static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2016 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. | ||
|
||
// Brand-specific types and constants for Chromium. | ||
|
||
#ifndef CHROME_INSTALL_STATIC_CHROMIUM_INSTALL_MODES_H_ | ||
#define CHROME_INSTALL_STATIC_CHROMIUM_INSTALL_MODES_H_ | ||
|
||
namespace install_static { | ||
|
||
enum : bool { | ||
kUseGoogleUpdateIntegration = false, | ||
}; | ||
|
||
enum InstallConstantIndex { | ||
CHROMIUM_INDEX, | ||
NUM_INSTALL_MODES, | ||
}; | ||
|
||
} // namespace install_static | ||
|
||
#endif // CHROME_INSTALL_STATIC_CHROMIUM_INSTALL_MODES_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright 2016 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. | ||
|
||
// Brand-specific constants and install modes for Google Chrome. | ||
|
||
#include <stdlib.h> | ||
|
||
#include "chrome/install_static/install_modes.h" | ||
|
||
namespace install_static { | ||
|
||
const wchar_t kCompanyPathName[] = L"Google"; | ||
|
||
const wchar_t kProductPathName[] = L"Chrome"; | ||
|
||
const size_t kProductPathNameLength = _countof(kProductPathName) - 1; | ||
|
||
const wchar_t kBinariesAppGuid[] = L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}"; | ||
|
||
// Google Chrome integrates with Google Update, so the app GUID above is used. | ||
const wchar_t kBinariesPathName[] = L""; | ||
|
||
const InstallConstants kInstallModes[] = { | ||
// The primary install mode for stable Google Chrome. | ||
{ | ||
sizeof(kInstallModes[0]), | ||
STABLE_INDEX, | ||
L"", // Empty install_suffix for the primary install mode. | ||
L"{8A69D345-D564-463c-AFF1-A69D9E530F96}", | ||
L"", // The empty string means "stable". | ||
ChannelStrategy::ADDITIONAL_PARAMETERS, | ||
true, // Supports system-level installs. | ||
true, // Supports multi-install. | ||
}, | ||
{ | ||
sizeof(kInstallModes[0]), | ||
CANARY_INDEX, | ||
L" SxS", | ||
L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}", | ||
L"canary", | ||
ChannelStrategy::FIXED, | ||
true, // Does not support system-level installs. | ||
false, // Does not support multi-install. | ||
}, | ||
}; | ||
|
||
static_assert(_countof(kInstallModes) == NUM_INSTALL_MODES, | ||
"Imbalance between kInstallModes and InstallConstantIndex"); | ||
|
||
} // namespace install_static |
Oops, something went wrong.