* * *

Author Topic: ct2laz - convertor between CodeTyphon and Lazarus  (Read 6923 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2919
  • I like bugs.
Re: ct2laz - convertor between CodeTyphon and Lazarus
« Reply #15 on: January 05, 2017, 11:16:45 am »
... I guess I will try to finally make ct2laz fully work on linux too. Stay tuned...  ::)
It should be easy because all the code you use from FPC and Lazarus libraries is already cross-platform.

avra

  • Hero Member
  • *****
  • Posts: 980
    • Additional info
Re: ct2laz - convertor between CodeTyphon and Lazarus
« Reply #16 on: January 21, 2017, 07:09:03 pm »
From version 1.0 application also works on Linux. :)  ;)  :)

Tested on Linux Mint Cinnamon Debian 32-bit edition. Please report here testing results with your OS and bitness info. To download full source go to the first post. To download Linux or Windows 32-bit binary go to https://bitbucket.org/avra/ct2laz/downloads/.

If you just press "CT => Laz" button without changing default settings, application will download latest CodeTyphon components and CodeOcean examples, and convert them for direct use in Lazarus. That's what most people will use this application for, but remember that it can also convert whole projects, and that conversion works both ways.

Table "replacements.csv" is the hearth of the conversion process, as it holds all package name pairs that differ in Lazarus and CodeTyphon. If for any reason package names change or latest IDE versions bring some new packages, this is the place where you fix things. Then you can send me fixed CSV file, or let me know and I will fix changed/added package name pairs. If the same package exists for both IDEs (like "bgrabitmappack" in Lazarus and "pl_bgrabitmap" in CodeTyphon), but for some reason in Lazarus you want to use CodeTyphon version instead, just replace "T" with "F" (without quotes) in the first CSV table column. This means there will be no conversion for that package so all CodeOcean examples will keep working with CodeTyphon version of that package (which you installed instead of original Lazarus package).

Enjoy and thank you all!  :D

EDIT: link was missing a slash character, now it works as it should
« Last Edit: February 22, 2017, 01:48:07 pm by avra »
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

avra

  • Hero Member
  • *****
  • Posts: 980
    • Additional info
Re: ct2laz - convertor between CodeTyphon and Lazarus
« Reply #17 on: February 06, 2017, 12:14:44 pm »
News:
  • PilotLogic has changed download URL with CodeTyphon 6.0, so for a few days download was broken. I have updated download URL so it works again. You should delete old INI file if you have it, in order for this fix to work.
  • Updated descriptions in replacements CSV file
  • Executable suffix now depends on architecture and target (thanks to hint from DonAlfredo).
  • Linux 32 bit binary was successfully tested on Debian 8 Cinammon 32 bit, Makulu 11 64 bit, Ubuntu Mate 15.10 32 bit, and Manjaro 16.06.1 32 bit. Don't forget that you need to install p7zip package.

https://bitbucket.org/avra/ct2laz/downloads/

EDIT: link was missing a slash character, now it works as it should
« Last Edit: February 22, 2017, 01:48:51 pm by avra »
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

Akira1364

  • Full Member
  • ***
  • Posts: 212
Re: ct2laz - convertor between CodeTyphon and Lazarus
« Reply #18 on: February 16, 2017, 09:39:07 pm »
Don't know if you've seen this post already, but I thought I'd point it out in case you haven't:

http://www.pilotlogic.com/sitejoom/index.php/forum/ct-lab-news/3758-ct-lab-ver-6-10

Apparently two of the things PilotLogic has planned for the next version are
Quote
Lab task 0010 : Change Typhon Project Info file extension from "lpi" to "ctpr"
Lab task 0040 : Change Typhon Package file extension from "lpk" to "ctpkg"

So you might want to start factoring that into your development of ct2laz, I guess?
« Last Edit: February 18, 2017, 11:27:07 pm by Akira1364 »

avra

  • Hero Member
  • *****
  • Posts: 980
    • Additional info
Re: ct2laz - convertor between CodeTyphon and Lazarus
« Reply #19 on: February 17, 2017, 08:48:01 am »
Apparently two of the things of PilotLogic has planned for the next version are
Quote
Lab task 0010 : Change Typhon Project Info file extension from "lpi" to "ctpr"
Lab task 0040 : Change Typhon Package file extension from "lpk" to "ctpkg"

So you might want to start factoring that into your development of ct2laz, I guess?

Thanks for pointing that out. That case is already partly covered, since file extensions used for search and replace are configurable as can be seen on the attached screenshot. You just need to replace *.lpi and *.lpk extensions with new ones. I will probably wait for a while before making these new extensions default ones, and add a button for old ones. However file renaming is not covered yet. It will be covered soon (ideally before CT 6.1 officially comes out), but for now manual file renaming should do the work after ct2laz has finished conversion.
« Last Edit: February 17, 2017, 08:51:04 am by avra »
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

avra

  • Hero Member
  • *****
  • Posts: 980
    • Additional info
Re: ct2laz - convertor between CodeTyphon and Lazarus
« Reply #20 on: May 15, 2017, 12:55:56 am »
ct2laz has been updated. Renaming files feature was added, because CodeTyphon 6.10 changed several Lazarus file extensions. It is a must to first delete your old INI file before any conversion.

Sources and overview:
https://bitbucket.org/avra/ct2laz/

Binaries for Windows and Linux and needed CSV file:
https://bitbucket.org/avra/ct2laz/downloads/
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

tigerA15

  • New member
  • *
  • Posts: 17
Re: ct2laz - convertor between CodeTyphon and Lazarus
« Reply #21 on: May 19, 2017, 04:10:21 am »
thanks a lot.
   this tool has a little bug:
    it should change '{$R *.lfm}' to '{$R *.frm}'    :D

avra

  • Hero Member
  • *****
  • Posts: 980
    • Additional info
Re: ct2laz - convertor between CodeTyphon and Lazarus
« Reply #22 on: May 20, 2017, 01:19:23 am »
thanks a lot.
   this tool has a little bug:
    it should change '{$R *.lfm}' to '{$R *.frm}'    :D
Thanks for reporting. Only CSV file with replacement pairs needs to be updated for your find. It's too late now for this so I will leave it for tomorrow.
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

avra

  • Hero Member
  • *****
  • Posts: 980
    • Additional info
Re: ct2laz - convertor between CodeTyphon and Lazarus
« Reply #23 on: May 20, 2017, 10:18:30 pm »
    it should change '{$R *.lfm}' to '{$R *.frm}'    :D
Fixed. You only need to replace your CSV with new one. Executable is not affected.
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

avra

  • Hero Member
  • *****
  • Posts: 980
    • Additional info
Re: ct2laz - convertor between CodeTyphon and Lazarus
« Reply #24 on: June 15, 2017, 08:34:39 pm »
Well, here is one unintended feature: reverting CT 6.10+ project back to 6.00- version.  :-[

Some people have converted their projects to new version, found a spoiler bug, and now can't get back to old CT because they made no backup. Well, ct2laz comes to the rescue. First convert your CT 6.10+ project to Lazarus, and then back to CT but do not check the last 6.10 related checkbox and replace T with F in table column with .lfm} and .frm} in the above screenshot.

Enjoy!  ;)
« Last Edit: June 15, 2017, 08:37:26 pm by avra »
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus