Open erikbwu opened 2 years ago
Hi, it seems like you are using Windows, and unfortunately I have only really tested this on Linux. But I would definitely like to fix this and improve support for Windows. Would you mind sharing the script file, and what terminal/shell you are using (e.g. Powershell/cmd/MinGW)?
Hey, I'm not sure if that is the reason but I suspect that windows doesn't see .sh files as executable since you need bash and that stuff. The reason I could run it in my terminal was because bash was in my path. Unfortunately, I am not that familiar with rust and your code so I don't if the script is also executed through a terminal.
However, I got this to work by just building my engine and then accepting command-line arguments when calling the executable, so I basically didn't need a script.
I just used the normal cmd and I have git and mingw in my path i think.
The script file was just printf "%s\n%s\n%s\n" "$1" "$2" "$3" | PATH_TO_EXE/Chess.exe
, but it doesn't work now since the arguments have to be passed while calling the application and not after calling it.
I think you're on the right track, perftree just tries to "execute" the file at the path that you give it. But on Windows, I don't think you can execute POSIX shell scripts like that. EXE files will work, as you discovered, and I think Batch and maybe PowerShell scripts will too.
Hey, thanks for developing this. However, I cant run diff, because it somehow can't find my script and I get this error after
perftree ./script.sh
:cannnot compute diff: %1 is not a valid win32 application (os error 193)
But when I run my script in the same terminal with
./script.sh 3 "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
I get the desired result. I also tried with all variations of backslashes/fullpath/ etc., which all lead to some errors.