reactos/rosapps/mc/doc/readme.nt
Steven Edwards e5c0c7185e Midnight Commander for Win32
svn path=/trunk/; revision=2456
2001-12-30 10:02:14 +00:00

127 lines
5.3 KiB
Plaintext

Midnight Commander for Windows NT and Windows '95
-------------------------------------------------
0. Hello
1. Compiling
2. Changes made
0. Hello
--------
Hello, this is the Midnight Commander port to Win32. It has many bugs, but is
quite stable now. Maybe you can help as an beta tester or as a programmer. In
either case you would like subscribe to mc-devel list
(see readme files in main doc on how to do this) and contact us.
1. Compiling
------------
1.1. Compiler
----------------
Microsoft Visual C++ for Windows NT (all versions, including 4.x) are supported.
In nt/makefile you can find an external makefile, and in nt/makefile.vc1.nt, vc4.nt
projects for the visual IDE. Two makefiles are add since the version 3.5.39. They
are produced from MS VC 4.x and are named as ntaxp.mak (for Windows NT AXP)
and ntint.mak (for Windows NT Intel). If you want to use them, you will have to
change the path coded in these two files.
Other compilers such as Watcom, or Borland tools should be quite
straightforward, but has not been tested.
Under Cygnus tools, apparently everything works just fine.
1.2. General issues
--------------------
Preprocessor
Define:
LIBDIR
_OS_NT - OS flag
OS2_NT - Flag for OS/2 and NT
HAVE_CONFIG_H - config.h flag
Includes:
So as to avoid chaos in include files, I decided to create some
fake includes for UNIX counterparts. The empty files you need to create are:
pwd.h grp.h
sys/param.h sys/time.h
1.3 Windowing Library
--------------------------------
Currently only support for S-lang windowing library is given. I know no curses
public library ported to Win32 consoles, and I think it is useless to port
it now. You may want to download the complete distribution it from
ftp://space.mit.edu/pub/davis.
2. Changes made
---------------
2.1. Changes to main code
-------------------------
They are enclosed in #ifdef _OS_NT or OS2_NT blocks.
Wrote something similar to statfs in UTIL.C
Wrote truncate.
Changed (almost) all references to "/" path slash with PATH_CHAR and strPATH_CHAR.
Changed name of CONTROL_FILE.
Changed name of shell and call to shell.
In some cases we supressed code. This is temporal (so that mc can compile). In
the future we will provide fake or true interfaces for these features.
- Links: creation and information on links are not supported in NT. We
should provide a fake interface for the local filesystem and
a true one for networked.
- GID/UID queries (get_user, owner, preserve UID/GID on copy, ...).
- TERMinals: all the code directly done with terminals must be supressed.
- Signals: deleted. Should support the native ones.
- pipes: had some trouble in ext.c and with error_pipes but soon will be fixed.
- Chown command: Not supported yet.
2.2. Files rewritten
--------------------
There are 3 files with so many changes that they have been moved to independent
archives (or OS dependent).
- Chmod.nt.c: this command will query and change attributes (hidden, system,
archive,...). Maybe we should write a real chmod (and also a
chown). It is not finished, but works almost fine. Look that
the stat st_mode member is filled with attributes, not modes.
- Cons.handler.nt.c: Supports same API as linux cons.handler.c. It allocates
a new console buffer and switches between the two when doing a
shell. The new allocated one is the used by Midnight commander.
(look that to make this we should also redirect standard handles)
- Key.nt.c: a static table maps Virtual Key codes to Curses-like Key codes.
Also mouse events are supported.
still preliminar.
- utilnt.c: Contains utilunix.c functions, with Win32 implementation
2.3. New files
--------------
- drive.nt.c: A Change Drive command has been implemented. Two lines
in main.c were included (in the left/right panel menus).
The funcs drive_cmd_a/b are implemented in this new file.
It will build a dialog with available drives as buttons.
bug: too many drives are not supported (think just 7). have
to rewrite to support more than one line.
- util.debug.c: developers-only utilities to trace Win32 API call error codes
- util.WinNT.c: Windows NT specific functions:
getuid(): Will check your priviledges and return 0 (root)
if you have Administrator priviledges.
- util.Win32.c: Windows NT & 95 utilities: (specific to Win32, no UNIX counterpart)
getEXEtype(): check if executable is CUI or GUI.
2.4. Changes made from me (Alexander Dong, ado@software-ag.de)
--------------------
I have hacked some codes for Windows NT AXP and NT Intel.
Drive.nt.c was rewritten for a beautiful Drive_Change dialog window.
All main source changed from me are marked with the comment /* .ado */.
I have also included two own Makefiles:
ntaxp.mak (for Windows NT Alpha) and
ntint.mak (for Windows 95/NT Intel).
You will have to change the path in these files before use them. They
are both for Microsoft Visual C++ 4.x.