Use `aqt` instead of `vcpkg` to install Qt on Windows
Feature Request
vcpkg builds Qt from source which is overkill and wasteful; it is incredibly time consuming when setting up a new Windows dev env ~~and building a new PR takes a long time as the cache cannot be used~~ (thakfully we removed this on CI already).
Change build instructions to use aqt and remove Qt from the vcpkg config; aqt works perfectly well for installing Qt on Windows, and it's the de facto method for most dev envs. This also allows the developer to use an existing Qt install, or install it in whatever way they want.
Something like...
winget install python3
$qtVersion = "6.9.0"
pip install --upgrade pip
pip install --upgrade aqtinstall
aqt install-qt windows desktop $qtVersion win64_msvc2022_64 --autodesktop --outputdir C:/Qt
[Environment]::SetEnvironmentVariable("QT_PATH", "C:/Qt/$qtVersion/msvc2022_64", "User")
-1 . vcpkg works fine for local builds. If you want to use a local non vcpkg install tell people either how to remove Qt from the vcpkg list and install it manually or provide an optional override to use the system install of Qt (if detected) The whole point of using vcpkg is it gets all the things you need on windows. After Qt make instructions for google test that takes forever to build too oh and might as well just give instructions for all the depends cuase why build them if you dont' have too.
Edit: also aqtinstall does not work on arm windows (see my arm windows build pr)
OK... How about a CMake option to prevent vcpkg from running? That way I can run it manually and choose what packages I want to install.
when you run cmake from the cli it will not pick up vcpkg on its own. you have to set a CMAKE_TOOLCHAIN_FILE to the cmake file that vcpkg ships to use it. QtCreator and (maybe) VSCode do this on their own. either via a env var or by using a cmake preset.
In our ci our install depends action has an output we use to set the var
The "correct" way to tell vcpkg to use a system depend is to make an overlay file(s) for each package you want find on the system. I had attempted this here at one point but was unable to get it to work correctly.
FYI: the vcpkg files in the repo are only used for dev builds our CI does not use them. So you can just remove your local copy to install what you want via vcpkg but you will want to get the CMAKE_TOOLCHAIN_FILE to the one inside your VCPKG_ROOT dir.
I updated https://github.com/deskflow/deskflow/wiki/Building with some info about manual install and how to not use VCPKG lets add to that and get this closed after.