home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vpvcl1.zip / readme.txt < prev    next >
Text File  |  1997-05-21  |  14KB  |  319 lines

  1.  
  2.    Virtual Pascal for OS/2 v1.99.A1
  3.    VCL-compatibility using Open32
  4.    (C) 1997 fPrint (UK) Ltd
  5.  
  6.  
  7. The background of this version of VP/2
  8. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  9.   We at fPrint (UK) Ltd have enhanced our Pascal compiler for OS/2 to
  10.   include most of the language features found in Borland Delphi v2, and
  11.   made changes to the Visual Component Library source code to allow
  12.   programs written using Delphi under Windows to be recompiled as
  13.   native 32-bit OS/2 applications.
  14.  
  15.   For doing this, we have relied on IBM's Open32/Dapie/DAX library,
  16.   which emulates a subset of the Win32 API and - according to IBM -
  17.   allows developers to quickly port their Windows applications to OS/2.
  18.   However, the Open32 library as it currently stands (Warp 3 w/FP28) is
  19.   unstable, limited in functionality, and very slow.  Timing tests
  20.   suggest that applications using Open32 are about 5-15 times slower
  21.   than their native Windows counterparts.
  22.  
  23.   For this reason, fPrint has suspended further development of the
  24.   Delphi compatible version of Virtual Pascal for OS/2, and instead
  25.   release this archive as a downloadable upgrade to all existing users
  26.   of VP/2. If you can find a use for it, fine!  The updated compiler,
  27.   linker and RTL allows you to recompile your Delphi programs to OS/2,
  28.   where they will run as native applications.  Or walk, rather.
  29.  
  30.  
  31. Installation
  32. ~~~~~~~~~~~~
  33.   To install this version of VP/2, you need to have the CD-ROMs with
  34.   VP/2 and Borland Delphi (Either 2.00 or 2.01) available.
  35.  
  36.   Create a new directory, and unzip the files in this archive in that
  37.   directory.  Do not use your existing VP directory for this purpose as
  38.   files will be overwritten.  The two versions of VP (v1.10 and
  39.   v1.99.A1) can coexist on one computer.
  40.  
  41.   Run the supplied REXX script, Install.cmd.  This script will ask you
  42.   to insert the VP/2 CD-ROM in the drive and indicate the drive letter.
  43.   It will then copy relevant files from the CD, update them to the new
  44.   version, and create a desktop object for the IDE associated with this
  45.   version of the compiler.
  46.  
  47.   Update your CONFIG.SYS to include the BIN.OS2 directory in your
  48.   LIBPATH, and optionally in your PATH.
  49.  
  50.   Finally, run either vcl200.cmd or vcl201.cmd to update the VCL source
  51.   code from Borland Delphi to be compatible with VP and OS/2. Running
  52.   this script requires that you have the Delphi 2 CD-ROM available; run
  53.   vcl200.cmd if you have Delphi v2.00 and vcl201.cmd if you have the
  54.   updated Delphi v2.01. If you do not know which version you have, you
  55.   can check the timestamp of the files; for v2.00 the time is 2:00 and
  56.   for v2.01 it is 2:01.
  57.  
  58.   When you have completed the above steps, you can delete all .CMD and
  59.   .UPD files in the directory; they are no longer needed.
  60.  
  61.   To compile and run your Delphi programs under OS/2, please review the
  62.   Important Notes section of this document.
  63.  
  64.  
  65. New features in Virtual Pascal 1.99
  66. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  67.   - Full support for the AnsiString (long string) type with automatic
  68.     garbage collection.  Strings are defined as AnsiString in the new
  69.     {$H+} state, and as ShortString in $H-.  For full information about
  70.     the capabilities of long strings, please refer to the Delphi 2
  71.     documentation.
  72.  
  73.   - All constant string expressions are evaluated using long strings.
  74.     For example, this means that if you initialise a PChar typed
  75.     constant with a string expression, it will not be truncated to 255
  76.     characters as it was in previous versions of VP/2 and is in Borland
  77.     Pascal and Delphi 1.0.
  78.  
  79.   - New compiler directives:
  80.       $H        - Huge strings
  81.       $J        - Writable typed constants
  82.       $Win32    - Win32 compatibility for Open32.
  83.     Please refer to the IDE online help for details.
  84.  
  85.   - Unit aliases provide Delphi 1.0 and Delphi 2.0 compatibility.  A new
  86.     entry field on the compiler options page is used for this purpose.
  87.     In this entry field, enter
  88.       Wintypes=Windows;WinProcs=Windows
  89.     to allow Delphi v1 programs (which have WinTypes and WinProcs in
  90.     the Uses clause) to be compiled using VP/2, where the Windows unit
  91.     contains all references to the Windows system.
  92.  
  93.   - Support for the IN part of a program or library uses clause, such as
  94.     "Uses
  95.       myform in 'c:\delphi\myform.pas'"
  96.  
  97.   - Initialized variables, such as
  98.     var
  99.       xyz : Integer = 0;
  100.  
  101.   - The 'PACKED' reserved word can be used with records, classes or
  102.     object types to override the $AlignRec+ state.
  103.  
  104.   - New memory manager interface:
  105.     - A new TMemoryManager type, defining the entry points for GetMem,
  106.       FreeMem and ReallocMem is introduced.  Two new functions,
  107.       SetMemoryManager and GetMemoryManager are available for
  108.       retrieving and setting the current memory manager.
  109.     Three new functions:
  110.     - AllocMemCount, which returns the number of times memory has been
  111.       dynamically allocated, and
  112.     - AllocMemSize, which returns the number of bytes of memory
  113.       currently allocated on the heap.  The Memused function of the
  114.       VPUtils unit should no longer be used.
  115.     - ReAllocMem, which resizes a dynamic memory block.
  116.     Changed interface:
  117.     - The FreeMem procedure no longer requires an optional second
  118.       argument specifying the size of the memory block allocated.
  119.     - If the HeapError function returns 1 (return nil), this is treated
  120.       as if it returned 0, which causes an EOutOfMemory exception to be
  121.       raised or run-time error to occur.
  122.  
  123.   - New functions in the System unit:
  124.     Finalize, Initialize, StringOfChar, UniqueString.
  125.  
  126.   - In addition to Val, Rename, Assign, AssignFile, Read, ReadLn,
  127.     Write, WriteLn that were supported in previous versions of VP & BP,
  128.     the following standard functions can now accept PChar parameters in
  129.     place of string arguments:
  130.       ChDir, MkDir, RmDir.
  131.  
  132.     Also all mentioned routines can accept nil PChar values, which are
  133.     treated as empty strings.
  134.  
  135.   - Delphi style units are changed to use long strings instead of short
  136.     ones:
  137.       - SysUtils, Classes, TypeInfo.
  138.  
  139.   - In the {$Win32+} state the compiler automatically converts resource
  140.     files from Windows 3.x or Windows 95/NT format to OS/2 format. This
  141.     process includes all Delphi form (.DFM) files as well. The following
  142.     types of resources are converted:
  143.       - Bitmap
  144.       - Icon
  145.       - Cursor
  146.       - Icon group
  147.       - Cursor group
  148.       - String table
  149.       - RCDATA.
  150.  
  151.     In the {$Win32+} state the compiler treats the StdCall standard
  152.     procedural directive to be equivalent to cdecl. This is because
  153.     Open32 uses the C calling convention for all API and callback
  154.     functions, whereas everywhere in Delphi 2 VCL source all system
  155.     and callback function are declared as stdcall. The {$StdCall+}
  156.     directive can still be used to declare procedures or functions that
  157.     have got the StdCall calling convention.
  158.  
  159.   - New VCL compatible units that use IBM Open32 library are available:
  160.       Forms, Controls, Graphics, Menus, StdCtrls, ExtCtrls, Dialogs,
  161.       FileCtrl, Grids, Tabs, Mask, Clipbrd, Printers, Outline, Buttons.
  162.  
  163.   - Changes:
  164.     - The $P compiler directive is made local.
  165.     - New version conditional symbol VER20 is defined.  VER11 is not
  166.       defined.
  167.  
  168. System requirements
  169. ~~~~~~~~~~~~~~~~~~~
  170.   OS/2 v3.0 with Open32 installed, or OS/2 v4.0.
  171.  
  172.   Unfortunately, the Open32 library is very raw (to put it mildly) and
  173.   dead slow.  A large number of problems have been reported to IBM by
  174.   the fPrint development team, with the first bug reports sent to IBM 9
  175.   month ago. Most of the problems are either not fixed or returned as
  176.   permanent restrictions, and we have stopped hoping for the problems to
  177.   resolved in a timely fashion.
  178.  
  179.   IBM are solving a few problems in every fixpack however, and it may be
  180.   that they eventually solve some of the critical ones as well, such as
  181.   the speed issues and the problems with font translation, font clipping
  182.   and bitmap drawing.  As of FixPack 29, this has not yet happened -
  183.   when we first started working with IBM, we hoped that FixPack 17 would
  184.   solve most of our problems <vbg>
  185.  
  186.  
  187. Important notes
  188. ~~~~~~~~~~~~~~~
  189.   - All VCL programs should be compiled in the {&Delphi+, H+, Win32+}
  190.     state.  The VCL units are not supplied in precompiled form, and you
  191.     must compile them before you can compile your Delphi programs.
  192.  
  193.   - To get started, set up the Directories dialog as follows (only
  194.     relative paths are specified; you can use full paths once you know
  195.     where you have installed the software):
  196.       Add OUT.OS2 to the Output box
  197.       Add SOURCE\RTL;SOURCE\VCL to the Include box
  198.       Add SOURCE\VCL;SOURCE\OPEN32;SOURCE\RTL to the Units box
  199.       Add LIB.OS2 to the Library box
  200.       Add your Delphi LIB directory to the Resource box
  201.  
  202.   - The OPEN32 conditional symbol should be defined when compiling the
  203.     VCL source code.
  204.  
  205.   - You can use ExePack 2 (Options|Linker page) when linking Open32
  206.     programs.  Open32 is only available in Warp 3 and 4, which both
  207.     support this superior kind of packing.  The IDE and compiler DLLs
  208.     have been compressed using this method.
  209.  
  210.   - Hard PM debugging mode should be used for debugging.
  211.     (Options->Debugger->Use Hard PM Mode)
  212.  
  213.   - The Options|Directories|Units directories should include the path
  214.     to the SOURCE\SAMPLES directory of Delphi 1 or Delphi 2.
  215.  
  216.   - The Options|Directories|Resource directories should include the path
  217.     to the LIB directory of Delphi 1 or Delphi 2, or the resources used
  218.     by the units will not be found.
  219.  
  220.   - Various precompiled units (System, VpSysLow, Windows, etc) are
  221.     placed in the OUT.OS2 directory.  This directory must be included in
  222.     the UNITS directory list, or be the output directory.
  223.  
  224.   - In some cases while compiling Delphi 2 code, indirect unit
  225.     references to the Menus unit may be encountered. Just add the Menus
  226.     unit to the interface uses clause of the unit where the error
  227.     occurs.
  228.  
  229.   - The File Open dialog does not support multiple wildcards; this makes
  230.     it slightly painful to find the .DPR files that are the main files
  231.     for Delphi projects.  We're considering our options :)
  232.  
  233.   - The registry server (RSRV) on OS/2 v 4.0 and OS/2 v 3.0 has a bug:
  234.     Each time an Open32 program is loaded into a debugger (or just
  235.     loaded on some machines!), RSRV crashes with an access violation. To
  236.     work around this problem insert the following statement into
  237.     CONFIG.SYS:
  238.  
  239.     RUN=D:\OS2\SYSTEM\RSRV.EXE, where D: is OS/2 boot drive.
  240.  
  241.     This bug, which has not been acknowledged by IBM and thus will
  242.     probably not be fixed, also means that your users may have to add
  243.     this line to run your programs.  To avoid a reboot, you can start
  244.     RSRV by typing
  245.  
  246.     START RSRV
  247.  
  248.     on the command line as well.
  249.  
  250.   - The ComCtrls unit supplied by Delphi 2 is not supported.  It
  251.     implements all the Win32 specific controls such as TTabbedNotebook,
  252.     TRichEdit, etc, and these are not supported by Open32, nor does IBM
  253.     plan any support for these controls.  An alternative name for
  254.     Open32, Close16, was suggested by one of our customers as more
  255.     appropriate.
  256.     To raise the chances of your program working in OS/2, try to use
  257.     only the controls that are available in the 16-bit version of
  258.     Delphi.
  259.  
  260.  
  261. Examples
  262. ~~~~~~~~
  263.   In the EXAMPLES subdirectory, a few examples may be found.
  264.  
  265.   The TESTVCL example, located in the EXAMPLES\TESTVCL directory, has
  266.   TESTVCL.DPR as its main file.  The DPR extension means Delphi Project
  267.   and is the default extension for the main file in Delphi programs.
  268.   This example demonstrates a large number of different Delphi controls,
  269.   and compiles and runs both with Delphi 1, Delphi 2 and VP/2.
  270.  
  271.   The final executable, which is about 250kB in size, also demonstrates
  272.   quite well some of the problems in Open32.  Compared to how the program
  273.   looks and works in Windows, the Open32 version has severe problems
  274.   with speed, with the way colours are handled, and with various control
  275.   problems.  For example, the drop-down combo boxes do not drop back up
  276.   again once they have been dropped down.  We have used this program as
  277.   an example with IBM, demonstrating how various bits of Open32 are
  278.   broken, with limited success.
  279.  
  280.  
  281.   The TIMETEST example, located in the EXAMPLES\TIMETEST directory,
  282.   draws a simple form with three labels on it, and updates these on every
  283.   IDLE message.  As with VCLTEST, this example compiles and runs, but
  284.   does not quite live up to its Windows counterpart.  On my PPro200, the
  285.   Win32 executable updates the labels about 450 times per second; the
  286.   OS/2 version manages 48 updates per second.
  287.  
  288.   Also, in the OS/2 version the text in the various labels is clipped in
  289.   various degrees.  According to the IBM labs, this is because "the code
  290.   written to perform this operation does not conform to standard Windows
  291.   coding practice".  Anyway, it can be worked around by making the
  292.   labels a bit bigger in Delphi, and turning off AutoSize.
  293.  
  294.  
  295. Support and contact
  296. ~~~~~~~~~~~~~~~~~~~
  297.   No support is offered for this product, although we are interested if
  298.   you find bugs in the compiler or linker.  Please report any problems
  299.   by e-mail to vpascal@ibm.net.
  300.  
  301.   We are also interested to hear about it if you find a use for this
  302.   product, and actually manage to build a program you publish.
  303.  
  304.  
  305. Licence
  306. ~~~~~~~
  307.   This product comes under the licence of Virtual Pascal for OS/2, which
  308.   you already must own in order to install it.  This means that you are
  309.   entitled to selling and publishing any programs you build with it.
  310.  
  311.  
  312.  
  313.  
  314.   We wish you all the best of luck!
  315.  
  316.   The Virtual Pascal Development Team
  317.  
  318.  
  319.