Page 1 of 1

How to build CC Source on Windows without Installing Qt Directly

Posted: Mon Sep 25, 2023 5:44 pm
by CKirby21
My goal is to create a plugin for CloudCompare. My first step was to try building the source code on Windows by following the steps in BUILD.md. I am unable to install Qt from their website because of my company's security so I used conda to install qt and the other dependencies. My conda environment is activated but when I try to build CloudCompare using cmake I get the error:

Code: Select all

Unable to find dependent libraries of C:\Users\ckirby\AppData\Local\miniconda3\envs\cloud-compare\Library\bin\Qt5OpenGL.dll :Cannot open 'C:/Users/ckirby/AppData/Local/miniconda3/envs/cloud-compare/Library/
  bin/Qt5OpenGL.dll': The system cannot find the file specified.
 
When I went to this folder location, I found `Qt5OpenGL_conda.dll` was there, but not `Qt5OpenGL.dll`. I find this curious as I wouldn't expect conda to have anything to do with the qt dlls.

Any ideas on how to effectively build the source code without installing qt from their website?

Re: How to build CC Source on Windows without Installing Qt Directly

Posted: Mon Sep 25, 2023 7:58 pm
by daniel
Hum, I don't think conda includes the whole Qt compilation environment (all the headers, libs and dlls).

Re: How to build CC Source on Windows without Installing Qt Directly

Posted: Mon Sep 25, 2023 8:04 pm
by CKirby21
Then how do your ci builds work? I thought they relied upon a conda environment based on the .ci/conda.yml file?

Re: How to build CC Source on Windows without Installing Qt Directly

Posted: Wed Sep 27, 2023 6:24 am
by daniel
Don't they pull also additional dependencies? But I am not the expert ;)

Re: How to build CC Source on Windows without Installing Qt Directly

Posted: Wed Sep 27, 2023 1:11 pm
by CKirby21
I ended up abandoning conda and installing Qt open source on another laptop I have. CloudCompare built successfully with this setup. I also had to run cmake --install . with administrator privileges to get it to work. Before installing, I figured I could run CloudCompare.exe from the build/qCC/Debug directory but that does not work.

Re: How to build CC Source on Windows without Installing Qt Directly

Posted: Thu Sep 28, 2023 7:07 am
by daniel
To avoid needing admin rights, you just need to change the CMAKE_INSTALL_PREFIX to somewhere else than "Program files" (otherwise you'll need the admin rights just to copy the files there).

And yes it's mandatory to 'install' and launch the installed version so that all files are copied next to each other at the right place (especially shader files, plugins, DLL dependencies, etc.).