comment -*- mode: text; tab-width:2; indent-tabs-mode:nil -*-

Memo about WIN32 native GUI.

* Tested environments.
  MS Windows 10 + MSYS2 3.5.7 or Cygwin 3.5.7

* Build
  (PKG_CONFIG=i686-w64-mingw32-pkg-config CC=i686-pc-mingw32-gcc) ./configure \
      --with-gui=win32 --prefix= (--prefix=/mingw64) (--disable-ssh2) \
      (--with-mosh=[mosh source directory]) \
      (--with-libintl-prefix=[GTK+(win32) installed directory]) \
      (--with-libiconv-prefix=[GTK+(win32) installed directory])
  make
  (DESTDIR=/foo/bar) make install

  (See .github/workflows/ci.yml)

* Configuration
  (Built with MSYS-DTK or MSYS2 or Cygwin)
  Place configuration files in SYSCONFDIR/mlterm and each user's $HOME/.mlterm/
  directory.
  
  (Built with MinGW)
  Place configuration files in [Mlterm installed directory]\mlterm\ and
  each user's %HOMEPATH%\mlterm\ or %HOME%\.mlterm\ directory.

  (Font Configuration)
  Format of font,vfont,tfont is as follows.
  [font family]( Bold Italic [font size]:[percentage])

  Unlike aafont for cairo and xft, it is not necessary to escape '-' character
  by '\' in [font family] string.

  aafont, vaafont, taafont files are not used.

  (Encoding)
  If -E/--km/encoding option is "AUTO" or not specified, mlterm uses UTF-8
  encoding by default.

  (ConPTY)
  mlterm starts cmd.exe via ConPTY if it doesn't use ssh or mosh.
  If you want to make mlterm use pipe instead of ConPTY to communicate
  with a child process, add "use_conpty=false" to main configuration file.

* Start
  (Built with MSYS-DTK or MSYS2 or Cygwin)
  set HOME=c:\msys\...\home\...
  set CYGWIN=tty
  mlterm.exe (options...) -e /bin/sh --login -i

  (Built with MinGW)
  set HOMEPATH=...
  mlterm.exe (options...) (-e plink.exe [-telnet/-ssh/-rlogin/-raw] [host])

  If -e option is not specified, a dialog window which decides server to connect
  is shown. (Note that if you don't input password to the dialog, mlterm tries
  agent authentication.)
  You can specify following options which customize a dialog in ~/.mlterm/main file.
  o default_server(--serv) = (<protocol>://)(<user>@)<server>(:<port>)(:<encoding>)
  o If you start mlterm with --serv=? option on Cygwin or MSYS, servman which
    manages the list of servers opens.
    On MinGW, servman opens if you start mlterm without --serv option.
  o always_show_dialog(--dialog) = true/false

* Caution
  o -I/--icon, --iconpath, -Y/--decsp, -&/--borderless, -d/--display and
    -t/--transbg options are not available.
  o 'genuine' of daemon mode is not supported in MSYS-DTK or MSYS2 or Cygwin
    version. Daemon mode itself is not supported in MinGW version. Instead,
    "\x1b]5379;mlclient <prefix opitions> <options>\x07" sequence (which
    mlclient or mlclientx command supports) is avaiable. (see doc/en/PROTOCOL).
  o Supported scrollbars are "simple" and "sample" alone.
  o In order to show DEC SPECIAL characters, it is necessary to install
    "Tera Special" font (TSPECIAL1.TTF) which is a part of Tera Term
    (https://ja.osdn.net/projects/ttssh2/).
  o Cygwin/X 1.17 or later doesn't listen tcp connection (127.0.0.1:6000) by default.
    Start X server as follows to enable mlterm (built with MinGW) to connect to
    X server.
    $ startxwin -- :0 -listen tcp &