Open maska228 opened 1 year ago
maybe the ! in the path may be an issue
It could be that the !
in your path is causing issues here:
https://github.com/HaxeFoundation/hxcpp/blob/3f6de84d4decb0a7aa1131ebd527f623b1e2d2b1/toolchain/msvc-setup.bat#L14
You could double check to make sure that the Common7\Tools\VsDevCmd.bat
file exists in your Visual Studio install. (For me it's C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat
)
maybe the ! in the path may be an issue
It could be that the
!
in your path is causing issues here:
i really don't want to reinstall vs to check that.
You could double check to make sure that the
Common7\Tools\VsDevCmd.bat
file exists in your Visual Studio install. (For me it'sC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat
)
and the folder does exist, dunno why i didn't mention it in the issue.
i maybe could try to reproduce on the same machine under a different windows installation using a vs install dir that has a ! in it. dunno if it would be helpful though.
You could go to your hxcpp install, open the toolchain/msvc-setup.bat
file and replace this line:
https://github.com/HaxeFoundation/hxcpp/blob/3f6de84d4decb0a7aa1131ebd527f623b1e2d2b1/toolchain/msvc-setup.bat#L14
with:
@if exist "%InstallDir%\Common7\Tools\VsDevCmd.bat" (
And see if that makes any difference.
You could go to your hxcpp install, open the
toolchain/msvc-setup.bat
file and replace this line:with:
@if exist "%InstallDir%\Common7\Tools\VsDevCmd.bat" (
And see if that makes any difference.
nope, and running a select part of the bat through a different bat file with InstallDir pre-set yields the same result. which i think confirms that i'm a dum-dum for installing vs into a folder with an exclamation mark. also sorry for a long response, was testing a bunch.
Looks like the exclamation mark is the most likely explanation:
https://ss64.com/nt/delayedexpansion.html
If DelayedExpansion is used in conjunction with a FOR command looping through a set of files, if any file in the set has an exclamation mark '!' in the filename, that will be interpreted like a !variable!. Although this is not a common character used in filenames, it can cause scripts to fail. This happens because the parameter expansion (%%P) happens just before the delayed expansion phase tries to interpret my!filen!ame.txt
i know this is probably like the 5th issue like this but i couldn't find a solution to my specific issue in any other ones. sorry in advance if i didn't look hard enough and it's a dupe. my machine has visual studio community 2019 installed, and i have vswhere installed using winget. the bat scripts still fails.
also, the vswhere command in the bat file works properly, it outputs the correct path to vs which is E:!fuckunity\vs. also also i just realized that maybe the ! in the path may be an issue and i'm just a doofus. though it isn't an issue with unity and executing it manually in cmd works. i don't really want to try installing it into a dir without bad symbols because that'd require way too much effort. ,_,
hope the output below helps.
don't mind that i'm running this in pwsh, it still outputs the same in cmd.