MSVC: meson fails to generate .vcxproj for custom targets with spaces
When GTK and Libadwaita are built directly from meson subprojects, they will fail to generate the corresponding .vcxproj
for custom targets with spaces:
Traceback (most recent call last):
File "C:\Users\wroy\AppData\Local\Programs\Python\Python310\lib\site-packages\mesonbuild\mesonmain.py", line 153, in run
return options.run_func(options)
File "C:\Users\wroy\AppData\Local\Programs\Python\Python310\lib\site-packages\mesonbuild\msetup.py", line 303, in run
app.generate()
File "C:\Users\wroy\AppData\Local\Programs\Python\Python310\lib\site-packages\mesonbuild\msetup.py", line 186, in generate
self._generate(env)
File "C:\Users\wroy\AppData\Local\Programs\Python\Python310\lib\site-packages\mesonbuild\msetup.py", line 248, in _generate
intr.backend.generate()
File "C:\Users\wroy\AppData\Local\Programs\Python\Python310\lib\site-packages\mesonbuild\backend\vs2010backend.py", line 226, in generate
projlist = self.generate_projects()
File "C:\Users\wroy\AppData\Local\Programs\Python\Python310\lib\site-packages\mesonbuild\backend\vs2010backend.py", line 478, in generate_projects
self.gen_vcxproj(target, str(projfile_path), proj_uuid)
File "C:\Users\wroy\AppData\Local\Programs\Python\Python310\lib\site-packages\mesonbuild\backend\vs2010backend.py", line 869, in gen_vcxproj
return self.gen_custom_target_vcxproj(target, ofname, guid)
File "C:\Users\wroy\AppData\Local\Programs\Python\Python310\lib\site-packages\mesonbuild\backend\vs2010backend.py", line 677, in gen_custom_target_vcxproj
self._prettyprint_vcxproj_xml(ET.ElementTree(root), ofname)
File "C:\Users\wroy\AppData\Local\Programs\Python\Python310\lib\site-packages\mesonbuild\backend\vs2010backend.py", line 849, in _prettyprint_vcxproj_xml
replace_if_different(ofname, ofname_tmp)
File "C:\Users\wroy\AppData\Local\Programs\Python\Python310\lib\site-packages\mesonbuild\mesonlib\universal.py", line 1312, in replace_if_different
os.replace(dst_tmp, dst)
OSError: [WinError 87] The parameter is incorrect: 'C:\\Users\\wroy\\Desktop\\echox\\builddir\\subprojects\\gtk\\gtk\\theme\\Default\\ab1e1b6@@Default theme variant: light@cus.vcxproj~' -> 'C:\\Users\\wroy\\Desktop\\echox\\builddir\\subprojects\\gtk\\gtk\\theme\\Default\\ab1e1b6@@Default theme variant: light@cus.vcxproj'
ERROR: Unhandled python exception
The parameter is incorrect - (22, 'The parameter is incorrect')
Edited by William Roy