If I forget how to do this or someone else runs into the same problem, in order not to reinvent the wheel, it's worth using a ready-made solution such as CQtDeployer. The release build will be executed in one command and it turns out to be a beautiful installer, and most importantly a working one.