How to remove mini_installer from ninja for chromium debug build?

178 views
Skip to first unread message

Jon Pfeffer

unread,
Dec 3, 2016, 2:16:23 PM12/3/16
to Chromium-discuss
Has anyone encountered the following?
I am looking for a why to alter the Ninja files so a debug build does not try to build a mini installer:

1) Setup Chromium build environment
2) Use gn gen to create a debug build to Debug directory (args: is_component_build = true, is_debug = true)
3) Use gn gen to create a release build to Release directory  (arg: is_component_build = false, is_debug = false, symbol_level = 0)
4) Create a mini_installer for release build: ninja -C out\Release mini_installer

Steps 1-4 are successful. However, after step 4, the Debug build will no longer build:

5) When running ninja -C out\Debug (e.g. try to build Debug build) it errors trying to build mini installer related files:

//chrome/installer/mini_installer:mini_installer_archive(//build/toolchain/win:x64)

FAILED: chrome.7z setup.ex_ gen/chrome/installer/mini_installer/mini_installer/packed_files.rc
d:/Workspace/depot_tools/python276_bin/python.exe ../../chrome/tools/build/win/create_installer_archive.py --build_dir ../Debug --staging_dir gen/chrome/installer/mini_installer/mini_installer --input_file ../../chrome/installer/mini_installer/chrome.release --resource_file_path gen/chrome/installer/mini_installer/mini_installer/packed_files.rc --target_arch=x64 --distribution=_google_chrome --output_dir ../DebugLockdownPr --chrome_runtime_deps gen/chrome_component.runtime_deps --setup_runtime_deps gen/setup.runtime_deps --enable_hidpi=1 --component_build=1 --depfile gen/chrome/installer/mini_installer/archive.d
Traceback (most recent call last):
  File "../../chrome/tools/build/win/create_installer_archive.py", line 693, in <module>
    sys.exit(main(options))
  File "../../chrome/tools/build/win/create_installer_archive.py", line 588, in main
    options.chrome_runtime_deps, current_version)
  File "../../chrome/tools/build/win/create_installer_archive.py", line 544, in DoComponentBuildTasks
    shutil.copy(component_dll, version_dir)
  File "d:\Workspace\depot_tools\python276_bin\lib\shutil.py", line 119, in copy
    copyfile(src, dst)
  File "d:\Workspace\depot_tools\python276_bin\lib\shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '..\\Debug\\api-ms-win-crt-multibyte-l1-1-0.dll'

Christian Biesinger

unread,
Dec 4, 2016, 9:18:38 AM12/4/16
to jondp...@gmail.com, Chromium-discuss
If you don't care about mini installer why not just build the target you need? E.g. ninja -C out/Debug chrome

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

Jon Pfeffer

unread,
Dec 4, 2016, 10:35:46 AM12/4/16
to Christian Biesinger, Chromium-discuss
Thank you Christian.
That's what I ended up doing (ninja -C out/Debug chrome). I saw it mentioned elsewhere in groups later that day and it got around the problem.
Eventually, I still need to understand how to be able to remove a file from the build process and correct build errors like I was seeing, but for now, I'm on my way. With targeting the build, it is allowing me to make small changes and run the Visual Studio 2015 IDE to step through those changes and see what's happening.

Regards,
Jon

Trương Bảo Nam

unread,
Dec 5, 2016, 7:33:21 AM12/5/16
to Chromium-discuss, jondp...@gmail.com
I guess that something get stucked in your build process (such as sequence stop / edit / build/ stop, etc). That prolem I've encountered sereral times, and could be easy resolved by some task kill/ process kill some underly process. And as described in your build log, its process has successful and nearly complete, except some last step when this call external utility to compress final file. 
 
Btw, mini_ínstalller usually for setup/ installer purpose.

Vào 21:18:38 UTC+7 Chủ Nhật, ngày 04 tháng 12 năm 2016, Christian Biesinger đã viết:
Reply all
Reply to author
Forward
0 new messages