Recent

Author Topic: [SOLVED] Compiling with wincrt, windos, etc. From: "Borland Pascal"  (Read 302 times)

OldCode123

  • Newbie
  • Posts: 2
Hello all,

Sorry if this is a stupid question, I'm new to this.

I'm trying to compile a 64 bit version of an old program which uses the following files:

wincrt, windos, strings, wintypes, winprocs, owindows, odialogs, commdlg, mmsystem, bwcc

I think they're part of an old library called OWL.  All of this compiles on a program called "Borland Pascal" but only as a 32 bit version.  I've searched online but can't find this library for download anywhere, or find them in the "Borland Pascal" program.  Is it possible to find these and compile this program in Lazarus for 64 bit Windows 10?

Thank you
« Last Edit: July 12, 2019, 08:18:40 pm by OldCode123 »

lucamar

  • Hero Member
  • *****
  • Posts: 2130
Re: Compiling with wincrt, windos, etc. From: "Borland Pascal"
« Reply #1 on: July 12, 2019, 07:18:01 pm »
Those are all (except strings) Windows 3 units. Which is quite logical since Borland Pascal produces 16bit binaries.
  • wincrt and windos were Borland Pascal units to easy porting DOS programs to Windows;
  • wintypes, winprocs, commdlg,  and mmsystem are part of the Windows 3.x API. Wintypes & winprocs can both be replaced by just "Windows" normally; commdlg and mmsystem can, usually be left as-is.
  • owindows, odialogs, bwcc are indeed part of OWL, the Object Windows Library, and you'll find that even if you had them: 1) they can't be easily converted to modern Pascal; because 2) they are very specifically "Windows 16 bit" and would need quite a big overhaul to make them work on 32/64 bit; and 3) BWCC depends on a DLL which I don't even know if it exists for 32, much less 64, bits--if it exists it would be 32 bits, from an old Borland C++ 5 or C Builder.

All in all I think your best bet is to try to identify and separate the "program logic" from the UI parts and build a new application with a modern UI, which can easily look as alike to the old as you care to do.

For your own estimate, we (a 3-member team) did it (long, long ago for Delphi 3) with a POS  program and it took us a little more than a month from decision to "there, now we can start improving" :)

Most of it, actually, was replacing/deleting the old code dealing with window/control creation, message loops, etc. and taking good care that the "new way" of doing things didn't mess up too much with the old "UI to process" glue logic.

Oh! And looking carefully for places where the transition from 16 to 32 bit might mess up things, which were quite a few.
« Last Edit: July 12, 2019, 07:22:24 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

OldCode123

  • Newbie
  • Posts: 2
Re: Compiling with wincrt, windos, etc. From: "Borland Pascal"
« Reply #2 on: July 12, 2019, 08:18:02 pm »
Lucamar,

Thanks so much for all the info, crazy.  Fortunately it's a pretty simple program so I think we'll just take the logic and rewrite it.

lucamar

  • Hero Member
  • *****
  • Posts: 2130
Re: [SOLVED] Compiling with wincrt, windos, etc. From: "Borland Pascal"
« Reply #3 on: July 12, 2019, 11:00:22 pm »
A number of people around here have some experience in moving apps from (8 to) 16 to 32 to 64 bits. Don't hesitate to ask if you paint yourself in a corner (hey, it happens: I should know! :D)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.