我有一个只包含 exe 文件(没有源代码)的 hello 工具。
你好工具结构:
bin
helloBin.exe
helloRoot.exe
conanfile.py
conanfile.py
内容:
class ToolHelloConan(ConanFile):
name = "ToolHello"
version = "0.1"
settings = "os", "compiler", "build_type", "arch"
def package(self):
self.copy("*")
def package_info(self):
self.cpp_info.libs = self.collect_libs()
我已将 hello 工具导出到本地缓存:conan export-pkg . ToolHello/0.1@user/testing
. 这复制了所有 exe 文件local_cache/ToolHello/0.1/user/testing/package/hash/bin
。本地缓存中的 bin 如下所示:
bin
helloBin.exe
helloRoot.exe
我已经定义了一个工具集成项目,它只包含conanfile.txt
[requires]
ToolHello/0.1@user/testing
[generators]
virtualrunenv
在工具集成项目中运行conan install .
并激活虚拟运行环境后,我只能调用它,helloRoot.exe
因为它位于 bin 目录中,但我无法执行 bin/bin/helloBin.exe
问题:我如何运行不直接位于local_cache/ToolHello/0.1/user/testing/package/hash/bin
,而是位于的 exe 文件local_cache/ToolHello/0.1/user/testing/package/hash/bin/directory
?