What about porting 32-bit TC to Lazarus?

Here you can propose new features, make suggestions etc.

Moderators: Stefan2, white, sheep, Hacker

User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW » 2013-10-07, 13:36 UTC

Sob wrote:Too bad Delphi 2 does not have anchors and constrains (if I remember it right), that makes creating resizeable dialogs much easier.
@ghisler(Author):
I'm just curious - what about porting 32-bit TC to Lazarus? This will allow to use such nice features like dynamic arrays and interfaces, and also anchors and constrains in forms. And this would be easier to maintain. And if 32-bit Lazarus is not compatible with old Windows versions, Delphi 5 could be used instead of Delphi 2...

Regards

User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 2790
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA » 2013-10-07, 14:10 UTC

MarcinW wrote:I'm just curious - what about porting 32-bit TC to Lazarus?
I personally hope that never happens...
MarcinW wrote:This will allow to use such nice features like dynamic arrays and interfaces, and also anchors and constrains in forms. And this would be easier to maintain. And if 32-bit Lazarus is not compatible with old Windows versions, Delphi 5 could be used instead of Delphi 2...
Delphi 2 is still used because it produces way smaller executables :!:

User avatar
Lefteous
Power Member
Power Member
Posts: 9457
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous » 2013-10-07, 14:51 UTC

what about porting 32-bit TC to Lazarus?
...and the menu theme bug in the main menu would also be fixed in the 32 bit version.

User avatar
MVV
Power Member
Power Member
Posts: 8302
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2013-10-07, 16:08 UTC

Sir_SiLvA wrote:
MarcinW wrote:I'm just curious - what about porting 32-bit TC to Lazarus?
I personally hope that never happens...
Me too. :) The less size, the less wrappers, the greater speed.

User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW » 2013-10-07, 18:24 UTC

Upgrading from Delphi 2 to Delphi 5 wouldn't be so bad idea.


I just created a simple application with 3 forms and compiled it:

Delphi 2 - 217 kB
Delphi 5 - 352 kB
Delphi 2006 - 469 kB
Delphi XE2 (compiled as 32-bit) - 1384 kB
Delphi XE2 (compiled as 64-bit) - 2144 kB

Then I added some unit:

Delphi 2 - 282 kB (+65 kB)
Delphi 5 - 422 kB (+70 kB)
Delphi 2006 - 540 kB (+71 kB)
Delphi XE2 (compiled as 32-bit) - 1518 kB (+134 kB)
Delphi XE2 (compiled as 64-bit) - 2345 kB (+201 kB)

Conclusion 1: VCL library grows with each Delphi version.

Conclusion 2: Adding some code will enlarge each EXE by the same amount. Exception 1: Delphi XE2 32-bit (cause: the added unit uses some VCL classes, so this is connected with Conclusion 1). Exception 2: Delphi XE2 64-bit (cause: 64-bit code is by it's nature larger than 32-bit code).

So upgrading from Delphi 2 to Delphi 5 would added only about 150 kB to the current 3.8 MB Totalcmd.exe. It isn't a big cost and programming in Delphi 5 would be much easier. Delphi 5 applications work with Windows 95 (Delphi 2006 and up - not).


And if Lazarus is so bad - why not to change it to 64-bit Delphi? Using Delphi 5 for 32-bit TC and Delphi XE2..XE5 for 64-bit TC seems to be the most convenient approach - the same code could be compiled in both versions without any changes - no incompatibilities between VCL (Delphi) and LCL (Lazarus).


Regards

User avatar
MVV
Power Member
Power Member
Posts: 8302
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2013-10-07, 18:34 UTC

Every class (component) that is added to any form (for the first time) adds unit code to EXE. And usually code size increases in new versions.
And if Lazarus is so bad - why not to change it to 64-bit Delphi?
Because it is necessary to buy Delphi (any version).

Sob
Power Member
Power Member
Posts: 908
Joined: 2005-01-19, 17:33 UTC

Post by *Sob » 2013-10-07, 20:56 UTC

Wow, what a nice OT I started! I didn't intend to, it was just innocent remark, but while it's going... ;)

Just for fun, do you know what I would do? For TC 9.0 switch to some more current compiler *1 for both versions, make everything Unicode-only (which means dropping Win9x support altogether *2), clean up the remains and end up with optimized TC for current systems (well, sort of *3). One source, current features, easier maintenance and extensibility.

--
*1 - I'm just not sure which one it should be, because newer Delphis seem a little bit too bloaty and Lazarus is not exactly my favorite either; maybe it would be best to rewrite TC using WinAPI-only MSVC after all, it would guarantee really nice exe sizes, that's for sure... don't beat me, it was only (bad) joke! :)
*2 - lets face it, those systems are pretty much dead for almost ten years already and they could live out their days with some TC "8.58", same way as Windows 3.11 do with TC 6.58
*3 - with minimum being Windows 2000 or XP

User avatar
Lefteous
Power Member
Power Member
Posts: 9457
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous » 2013-10-08, 06:58 UTC

It's a tradeoff. Switching over completely to a newer Delphi version or Lazarus has pros and cons. I think the costs of buying Delphi or binary sizes are _not_ very big issues. I think there are mainly two main factors:

- The time and work it takes to change to a new platform for either 32 bit or 64 bit.
- The time and work saved in the future for maintaining only one source code tree.
Last edited by Lefteous on 2013-10-08, 20:39 UTC, edited 1 time in total.

User avatar
white
Power Member
Power Member
Posts: 2020
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white » 2013-10-08, 14:10 UTC

Message from moderator

Thread split from Increase inplace copy dialog width

White (moderator)

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 37555
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2013-10-09, 14:51 UTC

I had to modify the VCL of Delphi 2 quite a bit to support Unicode. Official Unicode was only added to Delphi 2009, so I would have to make a lot of changes to Delphi to support it. Furthermore, I currently own licences of Delphi 2, 3, and 2007 and XE2.
Author of Total Commander
http://www.ghisler.com

User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW » 2013-10-09, 19:06 UTC

Well, moving Unicode changes from Delphi 2 to - let's say - Delphi 5 sounds like a nightmare. And Delphi 2009 doesn't support old Windows versions (however it's possible that adapting Delphi 2009 to Windows 95 would be much easier than adapting Delphi 5 to Unicode - probably only few changes).

Side note: License for XE2 includes also free access to previous Delphi versions - the only requirement is to request them within 180 days since registering XE2. Same with XE5. More info here (XE2) and here (XE5).

Regards


UPDATE: I might be wrong with adapting Delphi 2009 to Windows 95. All types and API calls in Delphi 2009 are Unicode - changing this back to ANSI version (along with retaining support for Unicode) would be probably harder than porting Unicode code from Delphi 2 to Delphi 5.

User avatar
Lefteous
Power Member
Power Member
Posts: 9457
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous » 2013-10-10, 05:43 UTC

I think supporting Windows version older than Windows 2000 or XP isn't really necessary anymore.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 37555
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2013-10-11, 15:35 UTC

Many companies still use Windows 9x or even 3.1, mainly on standalone machines - simply because there are no drivers for newer Windows versions.
Author of Total Commander
http://www.ghisler.com

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3394
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp » 2013-10-11, 16:19 UTC

ghisler(Author) wrote:Many companies still use Windows 9x or even 3.1, mainly on standalone machines - simply because there are no drivers for newer Windows versions.
But they can stay with a old TC version
as there are no new functions needed on such environments.

User avatar
Samuel
Power Member
Power Member
Posts: 1866
Joined: 2003-08-29, 15:44 UTC
Location: Brandenburg, Germany
Contact:

Post by *Samuel » 2013-10-12, 14:47 UTC

Horst.Epp wrote:
ghisler(Author) wrote:Many companies still use Windows 9x or even 3.1, mainly on standalone machines - simply because there are no drivers for newer Windows versions.
But they can stay with a old TC version
as there are no new functions needed on such environments.
Strongly support to drop support for any OS Microsoft itself dropped the support. The old version should be more than enough in this case.
I would welcome to port TC 32 to Lazarus, as...
a) the most of the work has been done with TC 64 and
b) it should be fewer work on the long run.

Post Reply