Ask Your Question

Revision history [back]

EXE Installer Creation for OpenCV 4.1.0

Hi!

I am trying to understand how the exe file for OpenCV 4.1.0 Installation is created. What I have figured out so far is that the installer is generated using 7Zip and that the extracted files are nothing but the built files + opencv source files. I also noticed .pyd files for multiple Python versions.

I tried to replicate the generated files using CMake on Windows. This is what I did:

git clone https://github.com/opencv/opencv.git
cd opencv
git checkout tags/4.1.0
cd ..

I also observed that .git files and the .github folder folder was not present in the extracted files so I removed them.

Then I did the following

mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" -T host=x64 -DBUILD_SHARED_LIBS=ON -DINSTALL_C_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON ../opencv/
cmake --build . --config Release --target INSTALL

After a successful build, I a lot of folders in build directory. If I enter the install directory, I was able to find bin, etc, include, samples, x64, etc. The .pyd file on the other hand was found in build/python3/Release directory and so on.

To some extent, I was able to replicate the files present in the extracted folder generated by the exe file but the folder structure is completely messed up.

Can someone please help me out in replicating those build files and the folder structure? Also, if those files are generated separately and while zipping them only a few of them are selected, can you please let me know how I can select those folders/files?

Thanks in advance

Vishwesh