1)使用action目标类型 2)使用exec_script函数 代码语言:GN AI代码解释 action("run_this_guy_once") {script = "doprocessing.py"sources = [ "my_configuration.txt" ]outputs = [ "$target_gen_dir/insightful_output.txt" ]# Our script imports this Python file so we want to rebuild if it change...
1)使用action目标类型 2)使用exec_script函数 action("run_this_guy_once") {script = "doprocessing.py"sources = [ "my_configuration.txt" ]outputs = [ "$target_gen_dir/insightful_output.txt" ]# Our script imports this Python file so we want to rebuild if it changes.inputs = [ "helper_...
1)使用action目标类型 2)使用exec_script函数 action("run_this_guy_once") {script = "doprocessing.py"sources = [ "my_configuration.txt" ]outputs = [ "$target_gen_dir/insightful_output.txt" ]# Our script imports this Python file so we want to rebuild if it changes.inputs = [ "helper_...
action:gn中的执行动作,它用于定义一个执行的脚本,一般配合python来使用,在./BUILD.gn中,我们定义了action("dispatch_for_ide”),从而指定了需要执行的脚本是dispatch_for_ide.py。 action中的deps:指定脚本的执行需要在这些依赖项完成之后,而我们定义的action中依赖项是project,也就是整个工程编译完成后才能开始执行...
action:gn中的执行动作,它用于定义一个执行的脚本,一般配合python来使用,在./BUILD.gn中,我们定义了action("dispatch_for_ide”),从而指定了需要执行的脚本是dispatch_for_ide.py。 action中的deps:指定脚本的执行需要在这些依赖项完成之后,而我们定义的action中依赖项是project,也就是整个工程编译完成后才能开始执行...
action可以用来运行脚本: action("myaction") { script = "myscript.py" inputs = [ "input.txt" ] outputs = [ ] } 总结 以上就是对gn的入门介绍。可以帮助大家快速了解gn,并完成一个gn的工程构建。如果需要深入了解gn,当然还是推荐大家多使用帮助或者看下官方文档。
使用单一 action 模板包装工具 每个工具都有一个规范模板,通过一个action就可以将其打包。该模板的工作仅仅是将 GN 参数转化为对应工具的args。这在工具上对于细节设置了一个封装界限,例如将参数转换为args。 请注意,在下面的示例中我们在一个文件中定义了executable(),在另一个文件中定义了template,因为模板和目标...
The "data_deps" will be built if the action is built, but may not have completed before all steps of the action are started. This can give additional parallelism in the build for runtime-only dependencies. OutputsThe script will be executed with the given arguments with the current ...
2.13 gn help action 英文 中文 状态:todo 2.14 gn help action_foreach 英文 中文 状态:todo 2.15 gn help bundle_data 英文 中文 状态:todo 2.16 gn help copy 英文 中文 状态:done 2.17 gn help create_bundle 英文 中文 状态:todo 2.18 gn help executable ...