wrljet / hercules-helper-windows

Utility scripts to help with building and deploying the Hercules emulator on Windows
MIT License
13 stars 3 forks source link

Hercules Step 2 fails if Visual Studio is installed on D: drive #11

Open petermacd opened 1 day ago

petermacd commented 1 day ago

I had an existing copy of VS 2002 installed on my D: drive before running hercules helper. It updated VS2002 correctly but when it ran the hercules-step2.cmd it got the following errors:

Preparation is complete! Proceeding to Step 2 in a Visual Studio CMD shell

Starting Hercules-Step 2... The system cannot find the path specified.

←[40;92m==> Build Hercules - Press return to continue ...←[0m

makefile.bat begun on Tue 29/10/2024 at 23:25:47.01 cmdline: makefile.bat RETAIL-X64 makefile.msvc 8 -title " Hercules-Helper Test Build " -a vstools.cmd: ERROR: No supported version of Visual Studio is installed makefile.bat ended on Tue 29/10/2024 at 23:25:47.09, rc=1

This was because the variable "%HERCULES_HELPER_VCVARS_CMD%" was set to "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" instead of the correct directory "D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat".

This causes the statement "_call "%HERCULES_HELPER_VCVARSCMD%"" in hercules-step2.cmd to fail and the build fails. Hardcoding "call "D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"" resolved the problem and the build was successful.

wrljet commented 1 day ago

Thanks for the bug report. I'll look into a fix.

Bill