home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / jove-4.16-src.tgz / tar.out / bsd / jove / README.w32 < prev    next >
Text File  |  1996-09-28  |  13KB  |  279 lines

  1. ########################################################################
  2. # This program is Copyright (C) 1986-1996 by Jonathan Payne.  JOVE is  #
  3. # provided to you without charge, and with no warranty.  You may give  #
  4. # away copies of JOVE, including sources, provided that this notice is #
  5. # included in all the files.                                           #
  6. ########################################################################
  7.  
  8. [Last updated: February, 1996]
  9.  
  10. Jove for WIN32
  11. ==============
  12.  
  13. Jove has been ported to the WIN32 environment (which is supported by
  14. Windows/NT and Windows/95) using the Microsoft Visual C 2.0 compiler.
  15. Following are some notes on how the WIN32 product behaves and development
  16. information.
  17.  
  18. Jove for WIN32 has been tested on both the Windows/NT and the Windows/95
  19. platforms, and provides much the same advantages under Windows/95 as it does
  20. for Windows/NT.  One functional difference is that under Windows/95 there is
  21. apparently no way to dynamically resize the console window as there is under
  22. Windows/NT.  There is no code specifically to support Windows/95, though
  23. some design decisions were based on the need to support it.
  24.  
  25. Jove for WIN32 does not function under the WIN32s environment (which is a
  26. special subsystem of Windows 3.1).  The primary reason is that WIN32s
  27. doesn't support the WIN32 Console API, which Jove for WIN32 depends on in
  28. order to display text on the screen and accept and interpret keystrokes.
  29.  
  30. The original port of Jove to WIN32 was performed by Jim Patterson
  31. (Jim.Patterson@Cognos.COM) with the help and advice of D. Hugh Redelmeier
  32. (hugh@mimosa.com) as well as early testing and feedback by Gary Puckering
  33. (Gary.Puckering@Cognos.COM).
  34.  
  35. Advantages of WIN32 version
  36. ================================
  37.  
  38. Since Windows/NT and Windows/95 support native DOS applications like Jove,
  39. using the 16-bit version of JOVE is a perfectly acceptable alternative to
  40. using the WIN32 version.  However, the WIN32 version does provide several
  41. advantages, as follows:
  42.  
  43. 1.  Long filenames.  Windows/NT and Windows/95 allow filenames that go
  44. beyond DOS's 8.3 naming limitations.  Jove for WIN32 uses long filenames by
  45. default, whereas Jove for DOS can only see the 8.3 versions of filenames.
  46. Jove for WIN32 is also able to directly access files in UNC format, i.e.
  47. with an explicit network name.  Jove for DOS can only access network files
  48. via an associated drive letter.
  49.  
  50. 2.  Window sizing.  WIN32 consoles can be dynamically resized.  When running
  51. a 16-bit application like JOVE, resizing is disabled.  However, Jove for
  52. WIN32 responds to resizing events and reconfigures its display, just like it
  53. does under Unix when it receives a SIGWINCH signal.
  54.  
  55. 3.  32-bit limits.  Jove for WIN32 is a 32-bit application, and so is less
  56. prone to size constraints than its 16-bit DOS cousin (though through clever
  57. coding even 16-bit DOS Jove is able to handle files of a considerable size).
  58.  
  59. 4.  Non-Intel platforms.  Jove for WIN32 should be a simple port to other WIN32
  60. platforms e.g. Alpha and PowerPC (though I haven't actually built it on any of
  61. these).  The performance advantage of having native applications can be
  62. considerable, since these platforms must use software emulation to run 16-bit
  63. DOS applications.
  64.  
  65. 5.  32-bit Performance.  Jove for WIN32 should perform, and behave, better
  66. than Jove for DOS on a suitable platform for several reasons.
  67. - Flat address space (no segment register loading).
  68. - Poll-free operation.  Jove for DOS uses a polling loop as it waits for
  69.   input if it needs to display the time on the mode line or wait for a
  70.   delayed refresh.  Jove for WIN32 can use WIN32 Wait... functions to do
  71.   this, which permit it to cooperate with other tasks more effectively.
  72.  
  73. 6.  Its own Icon.  Since Jove for WIN32 is a Windows executable, it can have
  74. its own icon.  No more hunting around in MORICONS.DLL for something
  75. suitable.  (If you don't like my planet icon, feel free to craft another;
  76. I'm not an artist)!
  77.  
  78. ENVIRONMENT VARIABLES USED BY JOVE:
  79. ===================================
  80.  
  81. COMSPEC
  82. This variable is used to specify the default program to run as the SHELL.
  83. It can be overridden by the JOVE variable "shell" or by the SHELL environment
  84. variable.
  85.  
  86. TMPDIR (or TEMP)
  87. JOVE uses the value of TMPDIR, or if that is not set, TEMP to
  88. determine the directory where it should put its temporary file.  The
  89. default is c:\tmp (set by TMPDIR in the makefile when JOVE was
  90. compiled), and this is probably not what you want.  In general editing
  91. is faster, if TEMP points to a ramdisk, like "set temp=d:".  You have
  92. to know however that the temporary file can grow quite big when
  93. editing many big files at once.  So please make sure that you have
  94. enough space available on your ramdisk.  If JOVE runs out of space on
  95. the device which holds the temporary file, you have to leave the
  96. editor immediately.  You can save your work without any trouble, but
  97. you have to start over.  Please note also that the Large Model version
  98. of JOVE has a big cache for the temporary file in memory, which makes
  99. it quite fast even if you don't have a ramdisk.  It is an MSDOS
  100. convention to use TEMP; use TMPDIR if you intend that the directory
  101. is solely for JOVE.
  102.  
  103. JOVESHARE
  104. This variable specifies the path to the directory that will contain
  105. (1) cmds.doc (the file of command and variable descriptions used by
  106. the describe-command and describe-variable commands) and (2) the
  107. system-wide jove.rc (the first file that is sourced (executed) by JOVE
  108. when it starts up).  The default is c:/jove (set by SHAREDIR in the
  109. makefile when JOVE was compiled).
  110.  
  111. JOVELIB
  112. This variable specifies the path to the JOVE library directory.  If it
  113. isn't specified, it defaults to c:/jove (set by LIBDIR in the makefile
  114. when JOVE was compiled).  JOVE uses this to locate the recovery
  115. program (but it hasn't been ported to MSDOS yet).
  116.  
  117. HOME
  118. The directory which is to be considered the user's home (as in UNIX).
  119. The default is the current directory on the current disk when JOVE was
  120. started.  JOVE looks in this directory for the user's jove.rc startup
  121. file (this will be sourced after the system-wide jove.rc, unless HOME
  122. and JOVESHARE are the same).  In filenames, an initial ~/ denotes the
  123. home directory.
  124.  
  125. HOMEDRIVE, HOMEPATH
  126. These variables are used together, or not at all.  If HOME is not set but
  127. HOMEDRIVE and HOMEPATH are, then the home directory is taken to be the
  128. concatenation of their values.  HOMEDRIVE and HOMEPATH are part of the
  129. default Windows NT user environment.  They are not typically set on a
  130. Windows 95 system (but Jove will use them as described if they are).
  131.  
  132. SHELL
  133. This defines an alternate shell for JOVE to use when running commands with
  134. shell-command.  It overrides COMSPEC if provided.
  135.  
  136. Managing the console for Jove
  137. =============================
  138.  
  139. In many (but not all) respects, WIN32 Consoles are more flexible than DOS
  140. shell windows.  Here are a few tricks for setting up a Jove console the way
  141. you like it.
  142.  
  143. - Jove will set up its screen to match the current Window.  This is often
  144.   the same size as the current "console buffer" but the window may be
  145.   smaller in size in which case scroll bars will appear.  When the screen
  146.   buffer changes size, Jove will resize its screen buffer.  However, Jove
  147.   can't always tell if the window size changes.  Use a clear-and-redraw
  148.   (typically bound to ESC ^L) to force Jove to resize its screen.
  149.  
  150. - You can use a MODE command to interactively cause Jove to resize its
  151.   window if you want to do this, say, from a jove.rc file.  For example,
  152.   this sets up a 40 line 100 column window:
  153.  
  154.     shell-command-no-buffer mode con lines=40 cols=100
  155.  
  156. - A better way to set up the screen size under NT is to use the window
  157.   properties.  If you choose to save these settings, they will then apply
  158.   whenever you run that application.
  159.  
  160. - You can set up a "file association" for Jove under NT, and set up the
  161.   Jove as the program to handle a file.  It's not immediately obvious how
  162.   to change the default screen size.  The problem is that with an
  163.   association, the file you launch is what the settings are tied to; each
  164.   different file gets its own file settings.  To get around this, use this
  165.   as the command line instead:
  166.  
  167.     start jove %1
  168.  
  169.   This works because the window settings are associated with the window
  170.   title, not the application.  When started this way the window title is
  171.   always "Jove", so settings can be used for all files launched with that
  172.   association.
  173.  
  174.   This has an unfortunate size effect of obscuring the Jove window,
  175.   however.  If someone finds a better setup, please broadcast it!
  176.  
  177. Building Jove for WIN32
  178. =======================
  179.  
  180. In order to build JOVE for WIN32, you need a Windows/95 or Windows/NT system
  181. with Visual C++ 2.0 or later installed.  If you don't already have a DOS
  182. source archive, you'll need a Unix system to build this on as well.
  183.  
  184. If you don't have the aforementioned source archive (which will be called
  185. jovedoss.zoo or jovedoss.zip), then the first step is to create a source
  186. archive containing the JOVE sources and related documentation.  This needs
  187. to be done from a Unix system, because it depends on several unix tools
  188. (e.g. nroff and uudecode).  If you don't have a Unix system, get a friend to
  189. do this.  This step also requires either zoo or pkzip, which are available
  190. elsewhere.  To extract the source from the archive on the PC side, you'll
  191. need the corresponding DOS or WIN32 version of zoo, pkunzip or unzip.  Use the
  192. following command on the Unix system to create the archive:
  193.  
  194.     make jovedoss.zip
  195.  
  196. (Substitute zoo for zip if a zoo archive is required).
  197.  
  198. Once the archive is created, move it to the Windows/NT or Windows/95 system.
  199. Unpack the archive into its own source directory.
  200.  
  201. After unpacking, Jove can be built using the following command.  Note that
  202. the 32-bit Visual C++ compiler must be on your path and the appropriate
  203. INCLUDE and LIB environment variables must be set correctly.
  204.  
  205.     nmake /f makefile.msc WIN32=1
  206.  
  207. If you want to redistribute the WIN32 version of Jove to others, you can use
  208. the jovew32x.zip or jovew32x.zoo targets to do so e.g.
  209.  
  210.     nmake /f makefile.msc WIN32=1 jovew32x.zoo
  211.  
  212. Jove can also be built from the Visual C++ 2.x workbench.  Just open
  213. makefile.msc as a project, and set the build command to the above.  For the
  214. DEBUG version add DEBUG=1 to the command line.
  215.  
  216. Development Notes:
  217. ==================
  218.  
  219. Jove for WIN32 and Jove for DOS share some code, but also have considerable
  220. OS-specific code.  The following manifests are used to flag code for the
  221. MS-DOS and/or WIN32 versions of Jove (they are explained more fully in
  222. sysdep.doc)
  223.  
  224. IBMPCDOS - flags features specific to IBM PC hardware running DOS.
  225. MSDOS - describes code that is specific to the 16-bit DOS version of Jove.
  226. WIN32 - describes code specific to the 32-bit Windows version of Jove.
  227. MSFILESYSTEM - enables aspects of Jove to support Microsoft file systems.
  228. MSDOS_PROCS    - enables use of the spawn series of APIs that replace fork/exec.
  229. DIRECTORY_ADD_SLASH indicates that file browsing will flag directories.
  230. TEXTFILE_ADD_CR instructs Jove to strip/add CRs from lines of text files.
  231. FILENAME_CASEINSENSITIVE indicates that case is not significant for filenames.
  232.  
  233. Most of the support code for Jove for WIN32 resides in the file win32.c.
  234. The MSDOS files MSDOS.C and PCSCR.C are not used for Jove for WIN32.
  235.  
  236. TO DO
  237. =====
  238.  
  239. There are some opportunities for additional work to make Jove for WIN32 more
  240. useable and functional.
  241.  
  242. 1.  Add IPROC support.  WIN32 supports pipes, which mean that it's
  243. conceptually possible to support IPROCs using methods similar to that of the
  244. Unix PIPEPROC support.  In fact, WIN32 IPROC should be somewhat cleaner than
  245. PIPEPROCs because the API avoids the need for a third process.  However, the
  246. reality of WIN32 pipes seems to be somewhat different, and my own attempts
  247. to get them to work have so far failed (though the single direction pipes
  248. used for a simple SUBSHELL do seem to function okay).
  249.  
  250. 2.  Add MOUSE support.  The current input model for WIN32 could easily be
  251. extended to support mouse events.  It's just necessary to enable the mouse
  252. in the SetConsoleMode call, and then process the mouse events as they
  253. arrive.  The main obstacle is in coming up with a good command model.  There
  254. are two different mouse command models supported by Jove right now, one for
  255. X and one for SunView; no doubt there are reasons that neither one is
  256. totally appropriate in the Windows world.
  257.  
  258. Known Bugs:
  259. ==========
  260.  
  261. - Under Windows 95, the CAPS LOCK key also shifts non-alpha keys (e.g.
  262.   numerics and []).  This seems to be a bug in the Windows 95 Console API
  263.   implementation: the Event.KeyEvent.uChar.AsciiChar field for the keyboard
  264.   event is set incorrectly.
  265.  
  266. - The much touted icon doesn't appear under Windows 95.  Once Windows 95 sees
  267.   that it's not a "real Windows application", it assumes that a standard
  268.   console icon is good enough.
  269.  
  270. - Occasionally, when Jove is started under Windows 95, it does not display
  271.   anything until a key is pressed.  We haven't tracked down what
  272.   circumstances cause this; it seems to happen more often with certain
  273.   machine configurations.
  274.  
  275. - On one Windows 95 system we know of, running a shell-command from Jove
  276.   causes a system failure.  The exact cause of this error has not been
  277.   tracked down; true to Murphy's Law, it doesn't happen on the system Jove
  278.   for Win32 is being developed on.
  279.