按照此说明页面 - https://www.electronjs.org/docs/development/build-instructions-gn构建电子。
我成功地使用了测试构建配置
gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")"
在下一步中,当我尝试使用ninja -C out/Testing electron
它进行构建时失败并出现以下错误 -
FileNotFoundError: [Errno 2] No such file or directory: 'gen/third_party/dom_distiller_js/test_sample_json_converter.h'
完整的错误日志
ninja: Entering directory `out/Testing'
[2353/26014] ACTION
//third_party/dom_distiller_js:json_values_converter_tests(//build/toolchain/win:win_clang_x64)
FAILED: gen/third_party/dom_distiller_js/json_values_converter_tests.stamp
C:/depot_tools/bootstrap-2@3_8_10_chromium_17_bin/python3/bin/python3.exe ../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py --stamp gen/third_party/dom_distiller_js/json_values_converter_tests.stamp gen/third_party/dom_distiller_js/test_sample_json_converter.h ../../third_party/dom_distiller_js/test_sample_json_converter.h.golden
Traceback (most recent call last):
File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py", line 48, in <module> sys.exit(main())
File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py", line 40, in main passed = passed and CompareFiles(i, j)
File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py", line 17, in CompareFiles
return open(file1, 'r').read() == open(file2, 'r').read()
FileNotFoundError: [Errno 2] No such file or directory: 'gen/third_party/dom_distiller_js/test_sample_json_converter.h'
[2358/26014] CXX obj/third_party/webrtc/call/bitrate_allocator/bitrate_allocator.obj
ninja: build stopped: subcommand failed.
我搜索了整个目录,只有一个带有test_sample_json_converter.h.golden的文件名。