wingtk / gvsbuild

GTK stack for Windows
GNU General Public License v2.0
437 stars 165 forks source link

Doesn't install on PC where Visual Studio is on the D: drive #460

Closed PeteFraser closed 2 years ago

PeteFraser commented 2 years ago

I have a PC with a small SSD as the boot drive containing windows. Visual Studio 2019 is therefore installed on the D: driver (and vwwhere.exe does show this - vswhere is on C: drive as expected) All code following the detection of Visual studio (which does work) assumes that it's in the default directory on C drive rather than the directory shown by vswhere (see below)

C:\gtk-build\github\gvsbuild>"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" Visual Studio Locator version 2.7.1+180c706d56 [query version 2.11.47.9733] Copyright (C) Microsoft Corporation. All rights reserved.

instanceId: 06e59440 installDate: 13/10/2021 15:41:04 installationName: VisualStudio/16.11.6+31829.152 installationPath: D:\Program Files (x86)\Microsoft Visual Studio\2019\Community installationVersion: 16.11.31829.152 productId: Microsoft.VisualStudio.Product.Community

PeteFraser commented 2 years ago

NOTE: running the script with --help doesn't give all the parameters that may be added. I had to add --msys-dir= and --vs-install-path= to allow the script to work. Please could you enhance the help to include options?

maptz commented 2 years ago

I ran into this issue too. Any chance of an update to the ReadMe to show that with contemporary versions of VS, you have to do something like:

python .\build.py build -p x64 --vs-install-path="C:\Program Files\Microsoft Visual Studio\2022\Community" gtk3
danyeaw commented 2 years ago

If you run python .\build.py build --help it shows --vs-install-path and --msys-dir as options. It is also documented in the README:

For a complete list of the options accepted by the build command, run:

python .\build.py build --help

I also added a walk through how to get going to the README as well. Is there something else that could be more clear?