gpt4 book ai didi

opencv - 使用 NSIS 创建 OpenCV 安装程序

转载 作者:太空宇宙 更新时间:2023-11-03 21:38:07 25 4
gpt4 key购买 nike

我正在使用特定构建选项(例如 64 位、QT 和 OpenNI)为我们的项目编译 OpenCV。我能够按照此处给出的说明进行操作:http://opencv.itseez.com/doc/tutorials/introduction/windows_install/windows_install.html

在 2-3 小时的构建过程结束时,我得到了 \install\build\,在各自的文件夹中收集了 bin、dll 和 lib。我想向研究组的其他成员分发一个 .exe 安装程序。但我不能,因为找不到 _CPack_Packages/win32/NSIS

Note: To create an installer you need to install NSIS. Then just build the Package project to build the installer into the Build/_CPack_Packages/win32/NSIS folder. You can then use this to distribute OpenCV with your build settings on other systems.

在 cmake-gui 屏幕中,我勾选了“Build Package”,希望它能让我看到 Build/_CPack_Packages/win32/NSIS 文件夹。在构建过程之后,找不到它。

有人可以给我一个建议,为什么我看不到这个 _CPack_Packages/win32/NSIS 文件夹?我可以用吗 Inno setup反而?如果是这样,我是否只需打包所有 \build\install 文件夹并在系统中设置路径以包含 \build\install\bin?谢谢。

最佳答案

坚持 KISS 原则(保持简单,愚蠢!):

您是否在构建Package 项目之前安装了 NSIS?

INSTRUCTIONS TO BUILD WIN32 PACKAGES WITH CMAKE+CPACK
------------------------------------------------------

- Install NSIS.
- Generate OpenCV solutions for MSVC using CMake as usual.
- In cmake-gui:
- Mark BUILD_PACKAGE
- Mark BUILD_EXAMPLES (If examples are desired to be shipped as binaries...)
- Unmark ENABLE_OPENMP, since this feature seems to have some issues yet...
- Mark INSTALL_*_EXAMPLES
- Open the OpenCV solution and build ALL in Debug and Release.
- Build PACKAGE, from the Release configuration. An NSIS installer package will be
created with both release and debug LIBs and DLLs.


Jose Luis Blanco, 2009/JUL/29

我建议您不要使用 Visual Studio 进行构建,而应尝试使用 CMake。

http://www.cmake.org/

如果这有帮助,请告诉我。

关于opencv - 使用 NSIS 创建 OpenCV 安装程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11787458/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com