After building chromium from source, you can create a "mini installer" for Windows by running
ninja -C out\BuildFolder mini_installer
This works fine and creates a mini_installer.exe
in out\BuildFolder
.
see Chromium - How to make an actual installer out of mini_installer.exe for more details.
But after running mini_installer.exe
, the application ignores my branding and grd
resource customizations.
It is supposed to use "IDS_PRODUCT_NAME_BASE" which I have definitely customized.
Here are the files I applied my branding in:
chrome\app\chromium_strings.grd
chrome\app\settings_chromium_strings.grdp
chrome\app\theme\chromium\BRANDING
But it seems to be ignoring them.
- The program is installed in
C:\Program Files (x86)\Chromium
instead ofC:\Program Files (x86)\CustomProductName
- The executable is still named
chrome.exe
instead ofCustomProductName.exe
How does one customize that?
Branding won't change the name of generated executable files. You should modify
src\chrome\BUILD.gn
to change the name fromchrome.exe
toCustomProductName.exe
as specified below:Doing so will generate
CustomProductName.exe
instead ofChrome.exe
in yourBuildFolder
. After that, you should notify mini installer too by modifying this file:src\chrome\installer\mini_installer\BUILD.gn
:Those changes will only change the name of executable files. You will have to modify source code to reflect those changes too.
Assign the name of your browser executable in this file:
src\chrome\installer\util\util_constants.cc
The path to installation folder should be specified in this file:
src\chrome\install_static\chromium_install_modes.cc
Similarly, you will have to change company name and app name in this file too:
src\chrome\installer\util\browser_distribution.cc
. I am not sure if the current version of Chromium still uses data fromBrowserDistribution
class.Let me know if it works. I just went through our repo history to find out those changes.
UPDATE:
The comments reveal a couple more places:
Open
chrome_elf/BUILD.gn
and change here:And change here:
chrome/installer/mini_installer/chrome.release
And change here:
build/win/reorder-imports.py