catsethecat / vrmod-module

openvr module for garry's mod
zlib License
114 stars 32 forks source link

vcvarsall.bat pollutes path and breaks Windows compilation #8

Open jorjic opened 2 years ago

jorjic commented 2 years ago

When building on Windows, it's possible for vcvarsall.bat in the build script to pollute the PATH variable enough to cause the build to fail with this message:

The input line is too long.
The syntax of the command is incorrect.

This can be fixed by modifying the build.bat script to wrap each call %vcvarsallpath% with setlocal and endlocal.

See: https://stackoverflow.com/questions/16821784/input-line-is-too-long-error-in-bat-file https://stackoverflow.com/questions/64326217/batch-command-vcvarsall-bat-errors-with-input-line-is-too-long-on-azure-devops