Board index » delphi » Delphi 2.0 -> Delphi 1.0

Delphi 2.0 -> Delphi 1.0

Is there an easy way to convert Delphi 2.0 programs to Delphi 1.0? The
code I'm working on needs to run under windows 3.11 as well as w95/NT.
Currently I've problems with DCU files. I just tried to load the .DPR
file using Delphi 1.0, and about one million bugs appeared, most of them
refering to .DCU files. Either it couldn't find 'em or they were of
wrong format.
If there is no easy way to convert it i will have to use Win32s instead.
I've had different opinions from those I've asked about using it. Some
says it's a big troublemaker, while some says it works quite ok. Will it
do? I have not used any win95 specific components.. And does Win32s run
well on PS/2 computers? I've encountered quite some compatibility
problems with those computers...

(btw, i'm in a hurry too!)

 

Re:Delphi 2.0 -> Delphi 1.0


Quote
Jonatan Magnusson wrote:

> Is there an easy way to convert Delphi 2.0 programs to Delphi 1.0? The
> code I'm working on needs to run under windows 3.11 as well as w95/NT.
> Currently I've problems with DCU files. I just tried to load the .DPR
> file using Delphi 1.0, and about one million bugs appeared, most of them
> refering to .DCU files. Either it couldn't find 'em or they were of
> wrong format.
> If there is no easy way to convert it i will have to use Win32s instead.
> I've had different opinions from those I've asked about using it. Some
> says it's a big troublemaker, while some says it works quite ok. Will it
> do? I have not used any win95 specific components.. And does Win32s run
> well on PS/2 computers? I've encountered quite some compatibility
> problems with those computers...

The most recent issue of Delphi Informant provided an excellent article
on the very subject, recommending that cross-platform development be
initiated from Delphi 1 and ported to version 2.  If you already have
.DFM files created in Delphi 2, this may be a problem, although you can
go through the manual process of converting from .DFM to .TXT (open the
.DFM file in the editor or paste the form to the clipboard) and
importing into version 1.  Also be sure to avoid editing the .DFM files
from Delphi 2 after this process has occurred.

Other suggestions include using only compatible components (ignore those
Win95-specific components), avoiding the generic STRING type (specify
string size during declaration), using conditional compilation (Delphi 2
defines the WIN32 symbol), and avoiding API calls.  Also, under any
circumstances, avoid using multi-threading in the portable application.
If you must violate any of these, "wrap" them in portability units,
which may be recompiled for the target platform.

Low-level file handling is especially gruesome for a portable
application.  If you need to do this, create a small unit to define new
types for the data sizes that you need and to handle the
platform-specific type handling.  This will save a great deal of porting
headaches, and may actually buffer your application from any future
version changes, as well.

Win32s is a poor choice for supporting most Win32 features.  I would
recommend that you do not depend on it for compatibility purposes.
Instead, develop a full-featured Delphi 1.0 application with the
necessary Win32 enhancements.

Michael Gaskill
mgask...@qni.com

Re:Delphi 2.0 -> Delphi 1.0


Quote
On Mon, 21 Oct 1996 22:38:56 -0700, mgaskill <mgask...@qni.com> wrote:
>Jonatan Magnusson wrote:
>> [D2 to D1 ]

>The most recent issue of Delphi Informant provided an excellent article
>on the very subject, recommending that cross-platform development be
>initiated from Delphi 1 and ported to version 2.  If you already have
>.DFM files created in Delphi 2, this may be a problem, although you can
>go through the manual process of converting from .DFM to .TXT (open the
>.DFM file in the editor or paste the form to the clipboard) and
>importing into version 1.  Also be sure to avoid editing the .DFM files
>from Delphi 2 after this process has occurred.

If you avoid any D2-specific features (inheritance and long strings),
then DFM files are perfectly compatible between D2 and D1. If you can
open the DFM file in D1, then it is portable. Opening the same file in
D2 does not change the file (unlike resource files and Image Editor).

--
Ray Lischner, Tempest Software, Inc., Corvallis, Oregon, USA
Author of Secrets of Delphi 2 (http://www.tempest-sw.com/secrets/)

Other Threads