]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - README.MinGW
ncurses 6.2 - patch 20200229
[ncurses.git] / README.MinGW
index 8bc5dad8c0e82d948216cbb12afbd66a268466a4..56a2bca21e34bb565224f813b6cbec82cb3fa8a7 100644 (file)
@@ -1,5 +1,6 @@
 -------------------------------------------------------------------------------
 -------------------------------------------------------------------------------
--- Copyright (c) 2008,2010 Free Software Foundation, Inc.                    --
+-- Copyright 2020 Thomas E. Dickey                                           --
+-- Copyright 2008-2011,2012 Free Software Foundation, Inc.                   --
 --                                                                           --
 -- Permission is hereby granted, free of charge, to any person obtaining a   --
 -- copy of this software and associated documentation files (the             --
 --                                                                           --
 -- Permission is hereby granted, free of charge, to any person obtaining a   --
 -- copy of this software and associated documentation files (the             --
@@ -25,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: README.MinGW,v 1.4 2010/12/18 21:07:03 tom Exp $
+-- $Id: README.MinGW,v 1.10 2020/02/02 23:34:34 tom Exp $
 -- Author: Juergen Pfeifer
 -------------------------------------------------------------------------------
 
 -- Author: Juergen Pfeifer
 -------------------------------------------------------------------------------
 
@@ -39,7 +40,7 @@ from http://www.mingw.org
 To build ncurses for native Windows, you need the MinGW toolchain.  The
 original MinGW toolchain from the above site is only for 32-Bit Windows.  As
 Windows Server - and also regular workstations - are moving to 64-Bit, it
 To build ncurses for native Windows, you need the MinGW toolchain.  The
 original MinGW toolchain from the above site is only for 32-Bit Windows.  As
 Windows Server - and also regular workstations - are moving to 64-Bit, it
-seems to be reasonable to have a toolchain that supports both architectures. 
+seems to be reasonable to have a toolchain that supports both architectures.
 I recommend to use the TDM gcc toolchain which you can find at
 http://tdm-gcc.tdragon.net/download.  Go to the download section and select
 the bundle installer for tdm64 (MinGW-w64).  This installs a multilib version
 I recommend to use the TDM gcc toolchain which you can find at
 http://tdm-gcc.tdragon.net/download.  Go to the download section and select
 the bundle installer for tdm64 (MinGW-w64).  This installs a multilib version
@@ -47,7 +48,7 @@ of the gcc toolchain that can compile for native 32- and 64-Bit Windows
 versions.  It also comes with a working pthread implementation.
 
 The latest config and build scripts we use for MinGW have only been tested
 versions.  It also comes with a working pthread implementation.
 
 The latest config and build scripts we use for MinGW have only been tested
-for the gcc-4.4 compiler toolchain (or better).
+for the gcc-4.6.1 compiler toolchain (or better).
 
 Using MinGW is a pragmatic decision, it's the easiest way to port this
 heavily UNIX based sourcebase to native Windows. The goal is of course
 
 Using MinGW is a pragmatic decision, it's the easiest way to port this
 heavily UNIX based sourcebase to native Windows. The goal is of course
@@ -55,22 +56,13 @@ to provide the includes, libraries and DLLs to be used with the more
 common traditional development environments on Windows, mainly with
 Microsoft Visual Studio.
 
 common traditional development environments on Windows, mainly with
 Microsoft Visual Studio.
 
-If you start a bash from the MSYS environment, please make sure that the
-Microsoft Development tools are in your PATH right after the MinGW
-tools. The LIB.EXE tool is the only one needed. You need this only if 
-you want to build DLLs that work with native Windows programs. If you 
-don't have any Microsoft  Development tools on your machine, consider 
-at least to get the free "Visual C++ 2010 Express Edition". 
-It contains the LIB.EXE tool. You may also use this compiler to test 
-writing native Windows programs using the ncurses DLLs without using 
-MinGW then for writing apps.
-
-It is necessary to unset the TERM environment variable, to activate the
-Windows console-driver.
+The TERM environment variable must be set specially to active the Windows
+console-driver.  The driver checks if TERM is set to "#win32con" (explicit
+use) or if TERM is unset or empty (implicit).
 
 Please also make sure that MSYS links to the correct directory containing
 your MinGW toolchain. For TDM this is usually C:\MinGW64. In your Windows
 
 Please also make sure that MSYS links to the correct directory containing
 your MinGW toolchain. For TDM this is usually C:\MinGW64. In your Windows
-CMD.EXE command shell go to the MSYS root directory (most probably 
+CMD.EXE command shell go to the MSYS root directory (most probably
 C:\MSYS or C:\MSYS\1.0) and verify, that there is a junction point mingw
 that points to the MinGW toolchain directory. If not, delete the mingw
 directory and use the mklink command (or the linkd.exe utility on older
 C:\MSYS or C:\MSYS\1.0) and verify, that there is a junction point mingw
 that points to the MinGW toolchain directory. If not, delete the mingw
 directory and use the mklink command (or the linkd.exe utility on older
@@ -79,62 +71,60 @@ Windows) to create the junction point.
 This code requires WindowsNT 5.1 or better, which means on the client
 Windows XP or better, on the server Windows Server 2003 or better.
 
 This code requires WindowsNT 5.1 or better, which means on the client
 Windows XP or better, on the server Windows Server 2003 or better.
 
-In order to build ncurses for the planned interop layer with .NET, we
-recommend to use these options with configure
+I recommend using libtool to build ncurses on MinGW, because libtool
+knows exactly how to build dll's on Windows for use with MinGW.
+
+To build a modern but still small footprint ncurses that provides
+hooks for interop, I recommend using these options:
 
 
+         --with-libtool
          --disable-home-terminfo
          --disable-home-terminfo
-         --enable-reentrant
+         --enable-database
+         --disable-termcap
          --enable-sp-funcs
          --enable-term-driver
          --enable-interop
          --enable-sp-funcs
          --enable-term-driver
          --enable-interop
-         --with-pthread         (if using TDM toolchain as recommended)
 
 
-This is the configuration commandline as I'm using it at the moment:
+This is the configuration commandline as I'm using it at the moment (assuming
+environment variable MINGW_ROOT to hold the root directory name of your MinGW
+build):
 
 ./configure \
 
 ./configure \
-       --prefix=/mingw \
-       --without-cxx-binding \
+       --prefix=$MINGW_ROOT \
+       --with-cxx \
        --without-ada \
        --enable-warnings \
        --enable-assertions \
        --without-ada \
        --enable-warnings \
        --enable-assertions \
-       --enable-reentrant \
-       --with-debug \
-       --with-normal \
        --disable-home-terminfo \
        --disable-home-terminfo \
+       --enable-database \
        --enable-sp-funcs \
        --enable-term-driver \
        --enable-interop \
        --enable-sp-funcs \
        --enable-term-driver \
        --enable-interop \
-       --with-pthread
+       --disable-termcap \
+       --with-progs \
+       --with-libtool \
+       --enable-pc-files \
+       --mandir=$MINGW_ROOT/share/man
 
 
-If you are on a 64-Bit Windows system and want to build a 32-Bit version
-of ncurses, you may use this commandline for configuration (when using
-the TDM toolchain):
+Please note that it is also necessary to set this environment variable:
 
 
-CC="gcc -m32" LD="ld -m32" ./configure \
-       --prefix=/mingw \
-       --without-cxx-binding \
-       --without-ada \
-       --enable-warnings \
-       --enable-assertions \
-       --enable-reentrant \
-       --with-debug \
-       --with-normal \
-       --disable-home-terminfo \
-       --enable-sp-funcs \
-       --enable-term-driver \
-       --enable-interop \
-       --with-pthread
+export PATH_SEPARATOR=";"
 
 
-All the options above are - like the whole Windows support -
-experimental.
+in order to parse the terminfo paths correctly. Terminfo paths should
+always be separated by a seeeemicolon,even when running under MSYS.
 
 
-In order to build the DLLs, after your regular make you must call
+To support regular expressions properly, ncurses under MinGW should be
+linked against the gnurx regex library, which must be built separately
+under MinGW.  See
 
 
-   make dlls
+    ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/libgnurx-src-2.5.zip
+
+All the options above are - like the whole Windows support -
+experimental.
 
 A lot is still TODO, e.g.:
 
 
 A lot is still TODO, e.g.:
 
-  - Wide Character support
+  - Wide Character support (display is workable, but input untested)
     The Win32Con driver should actually only use Unicode in the
     future.
   - Thread support (locking). If using TDM toolchain this is done by
     The Win32Con driver should actually only use Unicode in the
     future.
   - Thread support (locking). If using TDM toolchain this is done by
@@ -142,6 +132,8 @@ A lot is still TODO, e.g.:
   - A GUI console driver
   - Support for Terminals attached via a serial port (via terminfo)
   - Support for networked Terminal connections (via terminfo)
   - A GUI console driver
   - Support for Terminals attached via a serial port (via terminfo)
   - Support for networked Terminal connections (via terminfo)
+  - Workarounds for MinGW's filesystem access are necessary to make infocmp
+    work (though tic works).
 
 
-To support terminfo, we need to have an ioctl() simulation for the
-serial and networked Terminals.
+To support terminfo, we would need to have an ioctl() simulation for the
+serial and networked terminals.