diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-11-10 23:16:52 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-11-10 23:16:52 +0300 |
commit | 605bd59516b0868cc73ed01f913eeb331033a84b (patch) | |
tree | 6745f8d098b70dcdb580764b36117310fd409e8e /src/Makefile.am | |
parent | cdd0133947bf6b8b9679c47e067134db31e0ee48 (diff) | |
download | sciteco-605bd59516b0868cc73ed01f913eeb331033a84b.tar.gz |
Win32: fixed Unicode commandlines with newer MinGW runtimes
* should also fix Win32 nightly builds
* Even though we weren't using main's argv, but were using glib
API for retrieving the command line in UTF-8, newer MinGW runtimes
would fail when converting the Unicode command line into the system codepage
would be lossy.
* Most people seem to compile in a "manifest" to work around this issue.
But this requires newer Windows versions and using some Microsoft tool which isn't
even in $PATH.
Instead, we now link with -municode and define wmain() instead, even though we still
ignore argv. wmain() proabably get's the command line in UTF-16 and we'd have to
convert it anyway.
* See https://github.com/msys2/MINGW-packages/issues/22462
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 5b2572e..1e2056e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -86,8 +86,12 @@ sciteco_LDADD = $(sciteco_minimal_LDADD) # see above nodist_EXTRA_sciteco_SOURCES = fuck-this-shit.cpp -# For MinGW: Compile in resource (contains the icon) if WIN32 +# Prevent MinGW from failing on non-Unicode command lines that cannot +# be converted into the system code page. +AM_LDFLAGS += -municode + +# Compile in resource (contains the icon) sciteco_SOURCES += sciteco.rc .rc.o: @RC@ $< $@ |