I have written the “recipe” for the MinGW/Msys2 version. There is some yet-to-be-resolved problem with the terminal, so swipl appears unresponsive (especially, there is no prompt). Though it’s actually working, at least on my computer, see below.
Matthias@DESKTOP-A2T8IFC MINGW64 ~
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.5.9-38-g21d9cac38-DIRTY)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
member(X, [1, 2, 3]).
X = 1 ;
X = 2 ;
X = 3.
halt.
Matthias@DESKTOP-A2T8IFC MINGW64 ~
$
Please give it a try. If you want a prompt and better “readline” support, use “start”:
$ start swipl
Then a new window should open and you should also see a prompt and have readline support. I don’t know how to fix this properly.
Matthias@DESKTOP-A2T8IFC MINGW64 ~/swipl-devel
$ pacman -S winpty
(omitted the output)
Matthias@DESKTOP-A2T8IFC MINGW64 ~/swipl-devel
$ alias swipl="winpty swipl"
Matthias@DESKTOP-A2T8IFC MINGW64 ~/swipl-devel
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.4.2)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
1 ?- member(X, [1, 2, 3]).
X = 1 ;
X = 2 ;
X = 3.
2 ?- member(X, [1, 2, 3]). %%%% obtained this one by "cursor up"
X = 1 .
2 ?- halt.
to make the system believe it is talking to a terminal. Normally it tries to detect the Windows console and assumes it is not talking to a terminal if that discovery fails.
In general, not. The system is supposed to find out it is talking to a human. There is no safe way to do so in Windows though (AFAIK), so if the system diagnostic fail you can help it a bit. So, if you use swipl.exe only in this config you may use this as a work-around. Better is to either provide the feedback to msys to fix the console compatibility or figure out how we can detect the msys console.
No. The identifier is first of all used to find compatible DLLs to use as plugins. MinGW should not be special in this respect. This tells the CPU is x64 and the API is win64. That is enough (mostly).