AndreRH / hangover

Hangover runs simple Win32 applications on arm64 Linux
GNU Lesser General Public License v2.1
1.24k stars 91 forks source link

cmdline handling broken #120

Closed cwabbott0 closed 2 years ago

cwabbott0 commented 2 years ago

After rebasing against the wine bump it seems the fixing up of the command line isn't happening, I'm seeing qemu_x86.exe.so as the first argument still. I saw this with apitrace compiled with mingw 10.2 although I guess the same problem will occur for any command line program compiled with this toolchain.

cwabbott0 commented 2 years ago

Looks like only the ANSI string is fixed up when msvcrt creates argc/argv, and it uses the wide one:

0024:trace:msvcrt:msvcrt_init_args got "./build-mingw64/d3dretrace.exe /home/cwabbott/Downloads/Overcooked2.trace", wide = L"\"G:\\home\\cwabbott\\src\\hangover\\build\\qemu\\x86_64-windows-user\\qemu-x86_64.exe.so\" ./build-mingw64/d3dretrace.exe /home/cwabbott/Downloads/Overcooked2.trace" argc=3