gvsbuild icon indicating copy to clipboard operation
gvsbuild copied to clipboard

Non standard VisualStudio folder is not accepted in __find_vs_path_with_vs_version.

Open xodix opened this issue 3 years ago • 1 comments

Command

gvsbuild build gtk4

Result

Cleaning up the build environment Checking msys tool Using C:\tools\msys64 for msys installation Checking Msvc tool

Visual Studio installation(s) found: Visual Studio Community 2019 @ D:\visualStudioFiles

['D:\visualStudioFiles'] PATHS ARGUMENT I PRINTED FROM AROUND builder.py:403 vs2022 Using Visual Studio at None VSPATH DOES NOT EXIST. PATH PASSED TO __check_good_vs_install in builder.py:354 Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "D:\CODE\rust\gtk\gvsbuild.venv\Scripts\gvsbuild.exe_main.py", line 7, in File "d:\code\rust\gtk\gvsbuild.venv\lib\site-packages\gvsbuild\main.py", line 45, in build args.func(args) File "d:\code\rust\gtk\gvsbuild.venv\lib\site-packages\gvsbuild\utils\parser.py", line 162, in do_build builder = Builder(opts) File "d:\code\rust\gtk\gvsbuild.venv\lib\site-packages\gvsbuild\utils\builder.py", line 126, in init self.__check_vs(opts) File "d:\code\rust\gtk\gvsbuild.venv\lib\site-packages\gvsbuild\utils\builder.py", line 428, in __check_vs output = self.__check_good_vs_install(opts, opts.vs_install_path, True) File "d:\code\rust\gtk\gvsbuild.venv\lib\site-packages\gvsbuild\utils\builder.py", line 368, in __check_good_vs_install vcvars_bat = os.path.join(vs_path, "VC", "bin", "amd64", "vcvars64.bat") File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\ntpath.py", line 78, in join path = os.fspath(path) TypeError: expected str, bytes or os.PathLike object, not NoneType

Cause

builder.py:403:16 Expects a vs version in path but this convenction is not enforced when selecting a custom folder for installing VS modules. The path would be correct otherwise.

Questions

Is this check necessary? What edge cases does it handle? Should it continue running after detecting a bad path? How do I see result of log.debug at builder.py:405?

I could make a contribution walking around the vs_version in __find_vs_path_with_vs_version if this check is not desperatly needed.

xodix avatar Jul 20 '22 19:07 xodix

@xodix Does it work if you manually set the VS path?

gvsbuild build --vs-install-path D:\visualStudioFiles gtk4

danyeaw avatar Jul 20 '22 19:07 danyeaw

Hi @xodix, I didn't hear back from you on this one. Is this still an issue?

danyeaw avatar Jan 14 '23 23:01 danyeaw

No. After providing path to VS problem was resolved. Thanks!

xodix avatar Jan 14 '23 23:01 xodix

Great!

danyeaw avatar Jan 14 '23 23:01 danyeaw