chromium默认会安装到 %localappdata%\chromium
下面,修改这里的 chromium
需要做如下操作:
比如:chromium
修改为 ZdxBrowser
.
A: src\chrome\install_static\chromium_install_modes.cc
const wchar_t kProductPathName[] = L"ZdxBrowser";
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"Zdx ";
"", // No install switch for the primary install mode.
L"", // Empty install_suffix for the primary install mode.
L"", // No logo suffix for the primary install mode.
L"", // Empty app_guid since no integraion with Google Update.
L"Zdx", // A distinct base_app_name.
L"Zdx", // A distinct base_app_id.
L"ZdxHTM", // ProgID prefix.
L"Zdx HTML Document", // ProgID description.
L"{7D2B3E1D-D096-4594-9D8F-A6667F12E0AB}", // Active Setup GUID.
L"{A2DF06F9-A21A-44A8-8A99-8B9C84F2916C}", // CommandExecuteImpl CLSID.
L"ZdxHTM", // ProgID prefix.
.这个ProgID的长度是有限制的。不能太长,以设置默认浏览器不报错为标准。
B: src\chrome\installer\util\browser_distribution.cc中的 Software\Chromium需要修改为自己定义的值
: app_reg_data_(std::make_unique<NonUpdatingAppRegistrationData>(
L"Software\\ZdxBrowser")) {}