• Chromium 修改chrome.exe


    具体可以参考这个:

    https://stackoverflow.com/questions/50307180/chromium-mini-installer-ignores-branding/50308199#50308199

    以及对比:https://blog.csdn.net/longji/article/details/81902251

    主要改:

      chrome.exe 改成CustomProductName.exe

    srcchromeBUILD.gn 

    if (is_win) {
    action("reorder_imports") {
    script = "//build/win/reorder-imports.py"
    
    # See comment in chrome_dll.gypi in the hardlink_to_output
    # target for why this cannot be 'initial' like the DLL.
    inputs = [
      "$root_out_dir/initialexe/CustomProductName.exe",
    ]
    outputs = [
      "$root_out_dir/CustomProductName.exe",
      "$root_out_dir/CustomProductName.exe.pdb"
    ]
    
    ... later in the file ...
    chrome_binary("chrome_initial") {
      if (is_win) {
        output_name = "initialexe/CustomProductName"

    srcchromeinstallermini_installerBUILD.gn:

    action(archive_name) {
    script = "//chrome/tools/build/win/create_installer_archive.py"
    
    release_file = "chrome.release"
    
    inputs = [
      "$chrome_dll_file",
      "$root_out_dir/CustomProductName.exe",
      "$root_out_dir/locales/en-US.pak",
      "$root_out_dir/setup.exe",
      "//chrome/tools/build/win/makecab.py",
      release_file,
    ]

    chrome/installer/mini_installer/chrome.release

    CustomProductName.exe: %(ChromeDir)s

    srcchromeinstall_staticchromium_install_modes.cc

    const wchar_t kCompanyPathName[] = L"CompanyName";
    
    const wchar_t kProductPathName[] = L"CustomProductName";
    
    

    build/win/reorder-imports.py

    input_image = os.path.join(input_dir, 'CustomProductName.exe')
    output_image = os.path.join(output_dir, 'CustomProductName.exe')
    ... later on in the file ...
    for fname in glob.iglob(os.path.join(input_dir, 'CustomProductName.exe.*')):

    srcchromeinstallerutilutil_constants.cc

    const wchar_t kChromeExe[] = L"CustomProductName.exe";

    srcchromeappchrome_exe.vsprops

            Name="VCLinkerTool"
            DelayLoadDLLs="ole32.dll;oleaut32.dll"
            OutputFile="$(OutDir)CustomProductName.exe"

    srcchromeappchrome_exe.ver

    ORIGINAL_FILENAME=CustomProductName.exe

    这个能改。。也能安装!

    但是奥

    改完之后会报错...........绝望.............

    以后有大哥看到了能救救我吗

    [0805/151941.623:ERROR:install_worker.cc(142)] Failed creating a firewall rules. Continuing with install.
    [0805/151941.826:ERROR:create_reg_key_work_item.cc(82)] Failed to create SoftwareMicrosoftMediaPlayerShimInclusionListXXXXXXXXXXXXexe
    [0805/151941.826:ERROR:install.cc(142)] Could not add Chrome to media player inclusion list.

  • 相关阅读:
    VC++读写文件
    VC++编译说明
    VC++时间函数总结
    VC++多工程项目
    VC++全局变量初始化
    Linux 系统免密码登陆远程服务器
    debian 系统安装配置apache
    数据库授权
    Mysql 主从服务器数据同步
    centos Install Docker
  • 原文地址:https://www.cnblogs.com/Galesaur-wcy/p/15103475.html
Copyright © 2020-2023  润新知