YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
15 stars 7 forks source link

Preferences: [Windows YYC] Projects no longer compile if the VS path is set to use vcvars32.bat, so we should remove this filter from the picker #5511

Open shichen85 opened 2 months ago

shichen85 commented 2 months ago

Description

With runtime 559, Windows YYC compile failes with the error:

C:\WINDOWS\system32\cmd.exe /c ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat" -host_arch=amd64 && C: && cd "C:\temp\GMS2CACHE\BLANK_GAME_35920017\BLANK GAME\Default\Scripts\llvm-win\Win32solution" && set && msbuild /m:%NUMBER_OF_PROCESSORS% "BLANK_GAME.sln" /p:Configuration=Release /p:Platform=x64 /t:build /verbosity:normal"
[ERROR:vcvarsall.bat] Invalid argument found : -host_arch=amd64
[ERROR:vcvarsall.bat] Error in script usage. The correct usage is:

Steps To Reproduce

  1. Open any blank project
  2. Set Winodows Visual Studio path to VS2019
  3. Observe the error

Which version of GameMaker are you reporting this issue for?

IDE v2024.400.0.540 Runtime v2024.400.0.559

Which operating system(s) are you seeing the problem on?

Windows 10.0.22000.0

70a354e4-130a-4334-94c3-bff637145cd6

YYDan commented 2 months ago

I will need to confirm this theory shortly, but I think the problem is just your line above shows that you're still pointing at the old vcvars32.bat in Preferences.

VS2019 still works just fine for me in IDE v2024.400.0.543 Runtime v2024.400.0.562 when using the current Preferences default of "VsDevCmd.bat". E.g.

About to execute:C:\WINDOWS\system32\cmd.exe  /c ""c:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/Tools/VsDevCmd.bat"
C:\WINDOWS\system32\cmd.exe /c ""c:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/Common7/Tools/VsDevCmd.bat" -host_arch=amd64 && C: && cd "C:\Users\...\AppData\Roaming\GameMakerStudio2-Beta\Cache\GMS2CACHE\YYGTest_94177A84\YYGTest\Default\Scripts\llvm-win\Win32solution" && set && msbuild /m:%NUMBER_OF_PROCESSORS% "YYGTest.sln" /p:Configuration=Release /p:Platform=x64 /t:build /verbosity:normal"
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.34
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
YYDan commented 2 months ago

Yes, that's the issue:

About to execute:C:\WINDOWS\system32\cmd.exe /c ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars32.bat" C:\WINDOWS\system32\cmd.exe /c ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars32.bat" -host_arch=amd64 && C: && cd "C:\Users...\AppData\Roaming\GameMakerStudio2-Beta\Cache\GMS2CACHE\YYGTest_94177A84\YYGTest\Default\Scripts\llvm-win\Win32solution" && set && msbuild /m:%NUMBER_OF_PROCESSORS% "YYGTest.sln" /p:Configuration=Release /p:Platform=x64 /t:build /verbosity:normal" [ERROR:vcvarsall.bat] Invalid argument found : -host_arch=amd64

YYDan commented 2 months ago

Reset your Preferences > Platform Settings > Windows back to default and then change "Professional" to "Community" and you should be fine.

shichen85 commented 2 months ago

Thanks for the confirmation. The documentation on windows setup should be updated then, as it still points to the old bat file for 2019

YYDan commented 2 months ago

Yeah, that was my next step ;)

YYDan commented 2 months ago

Done - also retroactively added this into the release notes for the current Beta release.