我有一个GEM命令,该命令在SPEC测试中运行时可工作。但是,当主应用程序运行origen h
命令时,我看不到命令显示。我将此文档作为指南。这是我创建的GEM帮助命令,该命令在主应用中不起作用(仅在GEM本身中(。
else
# You probably want to also add the your commands to the help shown via
# origen -h, you can do this by assigning the required text to @application_commands
# before handing control back to Origen.
@application_commands = <<-EOT
fetch_test_module <testmodule> --path <dir>
EOT
end
thx
您链接到的文档涵盖了如何在应用程序中添加命令,或者在插件中添加命令,仅在从其自己的工作区运行插件时才可用。集成插件命令的过程,您要向父级应用程序提供的过程略有不同。
您必须在插件的config/application.rb
中声明共享命令启动器,如下所示:http://origen-sdk.org/origen/guides/guides/plugins/creating/#sharing/#sharing_ip_ip
然后创建共享命令启动器,如下所示:http://origen-sdk.org/origen/guides/guides/plugins/creating/#sharing_application_commands
这样做后,命令将在插件自己的工作区和应用程序的工作区中显示,其中包括上述插件。