README.MinGW (262629) | README.MinGW (262685) |
---|---|
1------------------------------------------------------------------------------- | 1------------------------------------------------------------------------------- |
2-- Copyright (c) 2008-2010,2011 Free Software Foundation, Inc. -- | 2-- Copyright (c) 2008-2011,2012 Free Software Foundation, Inc. -- |
3-- -- 4-- Permission is hereby granted, free of charge, to any person obtaining a -- 5-- copy of this software and associated documentation files (the -- 6-- "Software"), to deal in the Software without restriction, including -- 7-- without limitation the rights to use, copy, modify, merge, publish, -- 8-- distribute, distribute with modifications, sublicense, and/or sell copies -- 9-- of the Software, and to permit persons to whom the Software is furnished -- 10-- to do so, subject to the following conditions: -- --- 9 unchanged lines hidden (view full) --- 20-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -- 21-- USE OR OTHER DEALINGS IN THE SOFTWARE. -- 22-- -- 23-- Except as contained in this notice, the name(s) of the above copyright -- 24-- holders shall not be used in advertising or otherwise to promote the -- 25-- sale, use or other dealings in this Software without prior written -- 26-- authorization. -- 27------------------------------------------------------------------------------- | 3-- -- 4-- Permission is hereby granted, free of charge, to any person obtaining a -- 5-- copy of this software and associated documentation files (the -- 6-- "Software"), to deal in the Software without restriction, including -- 7-- without limitation the rights to use, copy, modify, merge, publish, -- 8-- distribute, distribute with modifications, sublicense, and/or sell copies -- 9-- of the Software, and to permit persons to whom the Software is furnished -- 10-- to do so, subject to the following conditions: -- --- 9 unchanged lines hidden (view full) --- 20-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -- 21-- USE OR OTHER DEALINGS IN THE SOFTWARE. -- 22-- -- 23-- Except as contained in this notice, the name(s) of the above copyright -- 24-- holders shall not be used in advertising or otherwise to promote the -- 25-- sale, use or other dealings in this Software without prior written -- 26-- authorization. -- 27------------------------------------------------------------------------------- |
28-- $Id: README.MinGW,v 1.5 2011/02/26 16:57:17 tom Exp $ | 28-- $Id: README.MinGW,v 1.9 2012/09/22 17:46:04 tom Exp $ |
29-- Author: Juergen Pfeifer 30------------------------------------------------------------------------------- 31 32This is work in progress, but it's in an state where one can see it 33works at least on the Windows Console. 34 35You should install the MSYS package, so that you've a shell environment that 36allows you to run the scripts, especially configure etc. You can get that 37from http://www.mingw.org 38 39To build ncurses for native Windows, you need the MinGW toolchain. The 40original MinGW toolchain from the above site is only for 32-Bit Windows. As 41Windows Server - and also regular workstations - are moving to 64-Bit, it | 29-- Author: Juergen Pfeifer 30------------------------------------------------------------------------------- 31 32This is work in progress, but it's in an state where one can see it 33works at least on the Windows Console. 34 35You should install the MSYS package, so that you've a shell environment that 36allows you to run the scripts, especially configure etc. You can get that 37from http://www.mingw.org 38 39To build ncurses for native Windows, you need the MinGW toolchain. The 40original MinGW toolchain from the above site is only for 32-Bit Windows. As 41Windows Server - and also regular workstations - are moving to 64-Bit, it |
42seems to be reasonable to have a toolchain that supports both architectures. | 42seems to be reasonable to have a toolchain that supports both architectures. |
43I recommend to use the TDM gcc toolchain which you can find at 44http://tdm-gcc.tdragon.net/download. Go to the download section and select 45the bundle installer for tdm64 (MinGW-w64). This installs a multilib version 46of the gcc toolchain that can compile for native 32- and 64-Bit Windows 47versions. It also comes with a working pthread implementation. 48 49The latest config and build scripts we use for MinGW have only been tested | 43I recommend to use the TDM gcc toolchain which you can find at 44http://tdm-gcc.tdragon.net/download. Go to the download section and select 45the bundle installer for tdm64 (MinGW-w64). This installs a multilib version 46of the gcc toolchain that can compile for native 32- and 64-Bit Windows 47versions. It also comes with a working pthread implementation. 48 49The latest config and build scripts we use for MinGW have only been tested |
50for the gcc-4.4 compiler toolchain (or better). | 50for the gcc-4.6.1 compiler toolchain (or better). |
51 52Using MinGW is a pragmatic decision, it's the easiest way to port this 53heavily UNIX based sourcebase to native Windows. The goal is of course 54to provide the includes, libraries and DLLs to be used with the more 55common traditional development environments on Windows, mainly with 56Microsoft Visual Studio. 57 | 51 52Using MinGW is a pragmatic decision, it's the easiest way to port this 53heavily UNIX based sourcebase to native Windows. The goal is of course 54to provide the includes, libraries and DLLs to be used with the more 55common traditional development environments on Windows, mainly with 56Microsoft Visual Studio. 57 |
58If you start a bash from the MSYS environment, please make sure that the 59Microsoft Development tools are in your PATH right after the MinGW 60tools. The LIB.EXE tool is the only one needed. You need this only if 61you want to build DLLs that work with native Windows programs. If you 62don't have any Microsoft Development tools on your machine, consider 63at least to get the free "Visual C++ 2010 Express Edition". 64It contains the LIB.EXE tool. You may also use this compiler to test 65writing native Windows programs using the ncurses DLLs without using 66MinGW then for writing apps. | 58The TERM environment variable must be set specially to active the Windows 59console-driver. The driver checks if TERM is set to "#win32con" (explicit 60use) or if TERM is unset or empty (implicit). |
67 | 61 |
68It is necessary to unset the TERM environment variable, to activate the 69Windows console-driver. 70 | |
71Please also make sure that MSYS links to the correct directory containing 72your MinGW toolchain. For TDM this is usually C:\MinGW64. In your Windows | 62Please also make sure that MSYS links to the correct directory containing 63your MinGW toolchain. For TDM this is usually C:\MinGW64. In your Windows |
73CMD.EXE command shell go to the MSYS root directory (most probably | 64CMD.EXE command shell go to the MSYS root directory (most probably |
74C:\MSYS or C:\MSYS\1.0) and verify, that there is a junction point mingw 75that points to the MinGW toolchain directory. If not, delete the mingw 76directory and use the mklink command (or the linkd.exe utility on older 77Windows) to create the junction point. 78 79This code requires WindowsNT 5.1 or better, which means on the client 80Windows XP or better, on the server Windows Server 2003 or better. 81 | 65C:\MSYS or C:\MSYS\1.0) and verify, that there is a junction point mingw 66that points to the MinGW toolchain directory. If not, delete the mingw 67directory and use the mklink command (or the linkd.exe utility on older 68Windows) to create the junction point. 69 70This code requires WindowsNT 5.1 or better, which means on the client 71Windows XP or better, on the server Windows Server 2003 or better. 72 |
82In order to build ncurses for the planned interop layer with .NET, we 83recommend to use these options with configure | 73I recommend using libtool to build ncurses on MinGW, because libtool 74knows exactly how to build dll's on Windows for use with MinGW. |
84 | 75 |
76To build a modern but still small footprint ncurses that provides 77hooks for interop, I recommend using these options: 78 79 --with-libtool |
|
85 --disable-home-terminfo | 80 --disable-home-terminfo |
86 --enable-reentrant | 81 --enable-database 82 --disable-termcap |
87 --enable-sp-funcs 88 --enable-term-driver 89 --enable-interop | 83 --enable-sp-funcs 84 --enable-term-driver 85 --enable-interop |
90 --with-pthread (if using TDM toolchain as recommended) | |
91 | 86 |
92This is the configuration commandline as I'm using it at the moment: | 87This is the configuration commandline as I'm using it at the moment (assuming 88environment variable MINGW_ROOT to hold the root directory name of your MinGW 89build): |
93 94./configure \ | 90 91./configure \ |
95 --prefix=/mingw \ 96 --without-cxx-binding \ | 92 --prefix=$MINGW_ROOT \ 93 --with-cxx \ |
97 --without-ada \ 98 --enable-warnings \ 99 --enable-assertions \ | 94 --without-ada \ 95 --enable-warnings \ 96 --enable-assertions \ |
100 --enable-reentrant \ 101 --with-debug \ 102 --with-normal \ | |
103 --disable-home-terminfo \ | 97 --disable-home-terminfo \ |
98 --enable-database \ |
|
104 --enable-sp-funcs \ 105 --enable-term-driver \ 106 --enable-interop \ | 99 --enable-sp-funcs \ 100 --enable-term-driver \ 101 --enable-interop \ |
107 --with-pthread | 102 --disable-termcap \ 103 --with-progs \ 104 --with-libtool \ 105 --enable-pc-files \ 106 --mandir=$MINGW_ROOT/share/man |
108 | 107 |
109If you are on a 64-Bit Windows system and want to build a 32-Bit version 110of ncurses, you may use this commandline for configuration (when using 111the TDM toolchain): | 108Please note that it is also necessary to set this environment variable: |
112 | 109 |
113CC="gcc -m32" LD="ld -m32" ./configure \ 114 --prefix=/mingw \ 115 --without-cxx-binding \ 116 --without-ada \ 117 --enable-warnings \ 118 --enable-assertions \ 119 --enable-reentrant \ 120 --with-debug \ 121 --with-normal \ 122 --disable-home-terminfo \ 123 --enable-sp-funcs \ 124 --enable-term-driver \ 125 --enable-interop \ 126 --with-pthread | 110export PATH_SEPARATOR=";" |
127 | 111 |
128All the options above are - like the whole Windows support - 129experimental. | 112in order to parse the terminfo paths correctly. Terminfo paths should 113always be separated by a seeeemicolon,even when running under MSYS. |
130 | 114 |
131In order to build the DLLs, after your regular make you must call | 115To support regular expressions properly, ncurses under MinGW should be 116linked against the gnurx regex library, which must be built separately 117under MinGW. See |
132 | 118 |
133 make dlls | 119 ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/libgnurx-src-2.5.zip |
134 | 120 |
121All the options above are - like the whole Windows support - 122experimental. 123 |
|
135A lot is still TODO, e.g.: 136 | 124A lot is still TODO, e.g.: 125 |
137 - Wide Character support | 126 - Wide Character support (display is workable, but input untested) |
138 The Win32Con driver should actually only use Unicode in the 139 future. 140 - Thread support (locking). If using TDM toolchain this is done by 141 configuring pthreads. 142 - A GUI console driver 143 - Support for Terminals attached via a serial port (via terminfo) 144 - Support for networked Terminal connections (via terminfo) 145 - Workarounds for MinGW's filesystem access are necessary to make infocmp 146 work (though tic works). 147 | 127 The Win32Con driver should actually only use Unicode in the 128 future. 129 - Thread support (locking). If using TDM toolchain this is done by 130 configuring pthreads. 131 - A GUI console driver 132 - Support for Terminals attached via a serial port (via terminfo) 133 - Support for networked Terminal connections (via terminfo) 134 - Workarounds for MinGW's filesystem access are necessary to make infocmp 135 work (though tic works). 136 |
148To support terminfo, we need to have an ioctl() simulation for the 149serial and networked Terminals. | 137To support terminfo, we would need to have an ioctl() simulation for the 138serial and networked terminals. |