From 943fc889894e157f0678a5b3e39d3d41f3eda3b7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 30 Jun 2019 01:29:06 +0200 Subject: win32: remove -municode from mpv binary If this is used, the runtime expects that wmain() instead of main() is defined. This caused me severe problems in a certain now irrelevant case. I think it's a good idea to avoid this special case. We can just use main() and call GetCommandLineW() instead. This function returns a single string, so use CommandLineToArgvW() to split it, and hope it has the same semantics. Should this ever return NULL, hope that it leaves argc at 0. Untested, I think. --- waftools/detections/compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'waftools') diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py index c382afcab7..dcfa9f1097 100644 --- a/waftools/detections/compiler.py +++ b/waftools/detections/compiler.py @@ -63,8 +63,8 @@ def __add_mswin_flags__(ctx): def __add_mingw_flags__(ctx): __add_mswin_flags__(ctx) - ctx.env.CFLAGS += ['-municode', '-D__USE_MINGW_ANSI_STDIO=1'] - ctx.env.LAST_LINKFLAGS += ['-municode', '-mwindows'] + ctx.env.CFLAGS += ['-D__USE_MINGW_ANSI_STDIO=1'] + ctx.env.LAST_LINKFLAGS += ['-mwindows'] def __add_cygwin_flags__(ctx): __add_mswin_flags__(ctx) -- cgit v1.2.3