Files
RetroArch/samples/input/win32_ime/Makefile
LibretroAdmin 5f9088ee51 win32: the IME's window code is a header, and Wine tests it
The window's input context - and so the IME - is attached only while a
line of text is open; that code moves from win32_common.c to
gfx/common/win32_ime.h, unchanged, as win32_ime_set(), _post() and
_sync(), so that a test can drive the same code.

samples/input/win32_ime builds with mingw-w64 and runs under Wine in
the Wine input job. As RetroArch does with threaded video, the window
is made and pumped on its own thread, a line of text is opened and
closed from another, and the window is asked on its own thread whether
it has an input context: none when made with no line open, one once a
line is opened, none once it is closed, one when made while a line is
open, and closing a closed line posts nothing. With the header changed
to keep the context always, the test fails.
2026-10-06 03:02:37 +02:00

23 lines
699 B
Makefile

# Built with mingw-w64 and run under Wine (or on Windows).
TARGET := win32_ime_test.exe
REPO_ROOT := ../../..
CC := x86_64-w64-mingw32-gcc
CFLAGS += -Wall -std=gnu99 -O1 -I$(REPO_ROOT) -I$(REPO_ROOT)/libretro-common/include
LDLIBS += -limm32 -luser32 -lgdi32
# wine goes by several names; the first one found is used
WINE ?= $(shell for w in wine wine64 /usr/lib/wine/wine64; do \
command -v $$w >/dev/null 2>&1 && { echo $$w; break; }; done)
all: $(TARGET)
$(TARGET): win32_ime_test.c $(REPO_ROOT)/gfx/common/win32_ime.h
$(CC) $(CFLAGS) -o $@ win32_ime_test.c $(LDLIBS)
check: all
WINEDEBUG=-all $(WINE) ./$(TARGET)
clean:
rm -f $(TARGET)
.PHONY: all check clean