-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add msvctricks.exe to replace problematic wine-msvc.bat #68
Conversation
…limitation of CMD https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation The maximum length of the string that you can use at the command prompt is 8191 characters. This change is based on the test result of [3] below. 1. echo "%var_of_length_8191%" - Windows CMD: Outputs "The input line is too long." - Wine8.7 CMD: Crashed. 2. echo "%var_of_length_8192%" - Windows CMD: Outputs "". - Wine8.7 CMD: Crashed. 3. echo "!var_of_length_8191!" - Windows CMD: This line is silently ignored and outputs nothing. - Wine8.7 CMD: Outputs all 8191 characters. 4. echo "!var_of_length_8192!" - Windows CMD: Outputs "". - Wine8.7 CMD: Outputs first 8191 characters.
b9881b6
to
0440cd6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good overall, and thanks for the very quick followup! I can't test it right now, but hopefully I can give it a spin within a few days.
@@ -137,3 +137,17 @@ for arch in x86 x64 arm arm64; do | |||
cat msvcenv.sh | sed 's/ARCH=.*/ARCH='$arch/ > bin/$arch/msvcenv.sh | |||
done | |||
rm msvcenv.sh | |||
|
|||
host=x64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice of you to split out the host arch here! FWIW I do have an experimental branch for running on aarch64 (see the branch arm64
in this repo), so for that branch it's easy to pick the right host arch here too.
if [ -d /proc/$$/fd ]; then | ||
if ! $HAS_MSVCTRICKS; then | ||
WINEDEBUG=-all wine64 "$EXE" "${ARGS[@]}" 2> >(sed -e "$unixify_path" >&2) | sed -e "$unixify_path" | ||
exit $PIPESTATUS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exellent that this can gracefully degrade to the original form of this script, that's much appreciated! (And I see that it's necessary for bootstrapping building the msvctricks
executable anyway.)
This seems to work fine for me, thanks! |
https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation
The maximum length of the string that you can use at the command prompt is 8191 characters.
Below are tests I have done.
Even I split the argument string into multiple variables with smaller length, wine crashes when total arguments are more than 16350 characters.
The reliable way is to use a native Win32 executable replacing the bat file. Now the arguments can have more than 32700 characters (
CreateProcess
accepts at most 32767 characters).The name
msvctricks
followswinetricks
.