Chromium - How to make an actual installer out of

2019-03-06 21:47发布

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.

But when I launch mini_installer.exe it just launches chromium. It doesn't open a nice installer interface.

So instead I am using InnoSetup to install the chromium files, and I'm not even using mini_installer.exe.

Can someone please describe what this "mini_installer" is supposed to accomplish? Can it prevent me from having to go through the trouble of making my own InnoSetup installer for my fork of Chromium?

1条回答
聊天终结者
2楼-- · 2019-03-06 22:32

mini_installer is just a packer which packs the following files:

 1. CHROME.PACKED.7z
 2. setup.exe

These files should be present in your BuildFolder. CHROME.PACKED.7z packs Chrome.7z which includes your Chromium files and folders.

mini_installer will extract those two files to a temporary directory and then execute setup.exe. For instance if mini_installer.exe was executed with --system-level argument, it will pass those arguments to setup.exe:

"C:\Users\Username\AppData\Local\Temp\CWB_341A7.tmp\setup.exe" --install-archive="C:\Users\Username\AppData\Local\Temp\CWB_341A7.tmp\CHROME.PACKED.7Z" --system-level

That temporary folder name should be different for Chromium and Chrome cause we modified our fork to use CWB prefix

So, it's setup.exe which is responsible for the actual installation and uninstallation process. When you uninstall your Chromium fork setup.exe will be executed with the following arguments:

 C:\Program Files (x86)\YourChromium\Application\66.0.3359.139\Installer\setup.exe --uninstall --system-level

Note: if you pass --system-level then it will be installed for all the users.

The arguments you pass to mini_installer will be stored in registry so the same argument will be passed to setup.exe when you uninstall it. It should typically be stored here:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\CompanyName\Update\ClientState\{Your-Chromium-fork-GUID} (for system-level installations)

The value of UninstallArguments and UninstallString will be read and used when uninstalling your Chromium fork.

Hope that helps

EDIT:

Just adding this info for anyone who might find this useful. There are various command line options for the installer which you can find here:

chrome\installer\util\master_preferences_constants.cc

查看更多
登录 后发表回答