EXE Installer Creation for OpenCV 4.1.0

asked 2019-07-27 01:21:55 -0600

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

edit retag flag offensive close merge delete

Comments

Also, if those files are generated separately

that's imho, what is happening. e.g.you would build shared libs for a c++ dist, but static ones for python or java wrappers, debug and release libs need seperate build passes, etc.

have a look at opencv's buildbots for this

berak gravatar imageberak ( 2019-07-27 03:31:56 -0600 )edit

Thanks @berak, I will have a look at it.

vishwesh5 gravatar imagevishwesh5 ( 2019-07-27 03:33:27 -0600 )edit