Recent

Author Topic: dev-cpp ported to Free Pascal  (Read 22337 times)

tbreina

  • Guest
dev-cpp ported to Free Pascal
« on: February 10, 2006, 08:49:38 pm »
I know it's a long shot, but I was wondering if anyone had ever tried porting dev-cpp from Delphi to Free Pascal? It would really be quite a coup to port the project.

Thanks.
-Tony

reina_ga at hotmail dot com

glober

  • Full Member
  • ***
  • Posts: 130
dev-cpp ported to Free Pascal
« Reply #1 on: February 11, 2006, 02:43:20 am »
What would you gain from doing that ?

tbreina

  • Guest
dev-cpp ported to Free Pascal
« Reply #2 on: February 11, 2006, 12:47:32 pm »
Well, for one thing, we'd be moving away from Delphi to this project. (Isn't that the purpose of this forum and this project??)

For a more concrete reason, we'd be able to port dev-cpp to Linux and other platforms. Plus, we use Delphi 6 PE, which hasn't been updated in several years; so it would be nice to move to a project that's actually being developed.

-Tony

reina_ga at hotmail dot com

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
dev-cpp ported to Free Pascal
« Reply #3 on: February 11, 2006, 03:44:57 pm »
Does dev-cpp use visually designed forms? If so, I suggest you try to compile it with Lazarus.

I wrote a small guide for TurboCASH software which is being ported to Lazarus:

http://www.box.co.za/wiki/index.php/Roadmap_Linux#Lazarus

It's simple to form from Delphi to Lazarus. Here is what's needed (more details on the link above):

1 - Add before the interface keyword on each unit the following code:

{$ifdef fpc}
  {$mode delphi}
{$endif}

2 - Convert all .dfm files to .lfm files.

3 - Make a list of all third-party components utilized by it and convert them or substitute them.

4 - Identify all direct Windows API utilized by the software and try to substitute those with VCL calls or calls

glober

  • Full Member
  • ***
  • Posts: 130
dev-cpp ported to Free Pascal
« Reply #4 on: February 11, 2006, 06:12:34 pm »
It just sounds to me like a question that should be raised with dev-cpp developers. Unless you are suggesting a duplication of effort.

Eclipse

  • Guest
dev-cpp ported to Free Pascal
« Reply #5 on: February 14, 2006, 01:17:27 am »
Don't get me wrong but unless the Eclipse project supports C++ the DevC++ IDE isn't needed anymore.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
dev-cpp ported to Free Pascal
« Reply #6 on: February 14, 2006, 05:09:10 pm »
Quote
Don't get me wrong but unless the Eclipse project supports C++ the DevC++ IDE isn't needed anymore.


You are just trolling.

Dev C++ is a very popular IDE. It is irrelevant if you think Eclipse is better.

SergKam

  • New Member
  • *
  • Posts: 29
dev-cpp ported to Free Pascal
« Reply #7 on: February 15, 2006, 09:25:00 pm »
eclipse eat more then 300Mb of ram. And run slow on my 1G Celeron with 256Mb.
DevC++ is less then 10 MB and.
Excuse for my English

tbreina

  • Guest
dev-cpp ported to Free Pascal
« Reply #8 on: February 17, 2006, 08:29:16 am »
Quote from: "sekel"
D
I wrote a small guide for TurboCASH software which is being ported to Lazarus:

http://www.box.co.za/wiki/index.php/Roadmap_Linux#Lazarus



Thanks sekel. This will certainly help me.

From what I can tell, the dev-cpp developers ran into some walls with porting to Kylix and so porting it to other flavors (e.g. FP/Lazarus) was abandoned. I'm currently working with the developers of wx-devcpp, a dev-cpp fork, and thought that it might be an interesting exercise to see how far I could get.

FP/Lazarus seems to be coming mature enough (i.e. supportting enough features) that a port could be possible. Of course, it's going to be a huge undertaking, but it could potentially be a good success story for the FP/Lazarus community too.

-Tony

tbreina

  • Guest
Re: dev-cpp ported to Free Pascal
« Reply #9 on: February 17, 2006, 09:14:22 pm »
Quote from: "sekel"
D
I wrote a small guide for TurboCASH software which is being ported to Lazarus:

http://www.box.co.za/wiki/index.php/Roadmap_Linux#Lazarus



I've been going through sekel's helpful instructions. Converting the Delphi form files (dfm) to Lazarus form files was easy since there's a tool in Lazarus to do so. I've also modified the implementation section of the .pas files like sekel suggests.

I'm trying now to convert the dpr to an lpi. It looks like there's a tool in Lazarus to do this, but when I point the tool to the devcpp.dpr file, nothing seems to happen. I had assumed it would create a devcpp.lpi file from the devcpp.dpr file. Is this tool currently implemented? Will I need to do this conversion manually?

Thanks.
-Tony

glober

  • Full Member
  • ***
  • Posts: 130
Re: dev-cpp ported to Free Pascal
« Reply #10 on: February 18, 2006, 03:01:10 am »
Quote from: "tbreina"

I'm trying now to convert the dpr to an lpi. It looks like there's a tool in Lazarus to do this, but when I point the tool to the devcpp.dpr file, nothing seems to happen. I had assumed it would create a devcpp.lpi file from the devcpp.dpr file. Is this tool currently implemented? Will I need to do this conversion manually?

Regarding the .lpi file, the way I convert A delphi app to Lazarus is as follows:

1)  rename .dfm files to .lfm
2)  rename .dpr file to .lpr
3)  make nessesary documented changes to .lpr and .pas files
4)  Select Project->New Project form file
5)  Select the .lpr file
6)  At 'Create a new project' window, choose 'Application'
7)  Build project and make nessesary corrections, at this point the .lpi file is generated automaticaly

8)  Save all, and you have a Lazarus project

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: dev-cpp ported to Free Pascal
« Reply #11 on: February 18, 2006, 04:32:59 am »
Quote
2)  rename .dpr file to .lpr


Don't do that. Lazarus works without problems with a main file .dpr and .dpr is required if you want to keep Delphi compatibility.

glober

  • Full Member
  • ***
  • Posts: 130
Re: dev-cpp ported to Free Pascal
« Reply #12 on: February 18, 2006, 05:06:19 am »
Quote from: "sekel"
Don't do that. Lazarus works without problems with a main file .dpr and .dpr is required if you want to keep Delphi compatibility.

Well, you can also copy .dpr to a .lpr, if you you want to keep .dpr for Delphi.   If you examine the .dpr and .lpr you will see they are the same in layout. Converting to Lazarus or undoing your changes and going back to Delphi is trivial with the .lpr file. I personally don't have a need to switch a project back and forth between Lazarus and Delphi on regular basis.

tbreina

  • Guest
Re: dev-cpp ported to Free Pascal
« Reply #13 on: February 18, 2006, 09:24:10 am »
Quote from: "sekel"
Quote
2)  rename .dpr file to .lpr


Don't do that. Lazarus works without problems with a main file .dpr and .dpr is required if you want to keep Delphi compatibility.


Yes, I tried renaming .dpr to .lpr and followed the other steps. Looks like Lazarus doesn't understand the .lpr file. On a "Build all", it wants the file to start with the line "BEGIN". My .dpr file appears to be an XML format (created with Delphi 6 PE).

I suppose I could follow the steps glober outlined, but keep the .dpr file extension the same (??) I've been trying to find some docs or a wiki to outline the steps for conversion, but haven't found any (other than sekel's). Can anyone point out some more docs?

Thanks.
-Tony

glober

  • Full Member
  • ***
  • Posts: 130
Re: dev-cpp ported to Free Pascal
« Reply #14 on: February 18, 2006, 09:51:43 am »
Quote from: "tbreina"
My .dpr file appears to be an XML format (created with Delphi 6 PE).

Can you post the .dpr here ? As far as I know the .dpr file is not XML (going by Delphi 7 PE and Kylix 3 OE).

BTW, I added the mentioned conversion method, with a few extra details, to wiki at: http://wiki.lazarus.freepascal.org/index.php/Code_Conversion_Guide#Another_method_to_convert_a_Delphi_or_Kylix_project_to_Lazarus

 

TinyPortal © 2005-2018