Recent

Author Topic: Has anyone attempted to convert Trichview to a Lazarus package?  (Read 8181 times)

snorkel

  • Hero Member
  • *****
  • Posts: 817
Has anyone attempted to convert Trichview to a Lazarus package?
« on: December 09, 2015, 10:22:43 pm »
I took a stab at it yesterday but the FPC windows unit is missing a ton of stuff vs Delphi.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

rvk

  • Hero Member
  • *****
  • Posts: 6944
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #1 on: December 09, 2015, 10:53:12 pm »
I took a stab at it yesterday but the FPC windows unit is missing a ton of stuff vs Delphi.
I take it you have the source for TRichView...

Lots of declaration which are in the Delphi Windows-unit are still available for FPC in the jwa-units.
Look in fpc\packages\winunits-jedi\src

If you have a good string-finder (I like Saleen ScanFs myself) you can search all *.pp; *.pas; *.inc files for the declarations your missing and include the unit it finds in your uses clause.

Otherwise post the things your missing here.
(Maybe there are alternatives)

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #2 on: December 09, 2015, 11:35:07 pm »
There is TRichView implementation in Lazarus Component Collection Repository : http://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/richmemo/

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #3 on: December 10, 2015, 12:03:54 am »
yep, I know about that old version that exists for Lazarus.
Problem is it's just the viewer not a editor.  The newer versions of Trichview have a trichview and trichviewedit.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #4 on: December 10, 2015, 12:05:59 am »
I took a stab at it yesterday but the FPC windows unit is missing a ton of stuff vs Delphi.
I take it you have the source for TRichView...

Lots of declaration which are in the Delphi Windows-unit are still available for FPC in the jwa-units.
Look in fpc\packages\winunits-jedi\src

If you have a good string-finder (I like Saleen ScanFs myself) you can search all *.pp; *.pas; *.inc files for the declarations your missing and include the unit it finds in your uses clause.

Otherwise post the things your missing here.
(Maybe there are alternatives)

Yes, I have a copy of the source, been a registered user for years.  I am hoping Sergey will make it work with Lazarus in the future.  just getting impatient as I have one remaining delphi project.   Also been looking at TKMemo or LzRichEdit as alternatives.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

balazsszekely

  • Guest
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #5 on: December 10, 2015, 07:28:49 am »
@snorkel
If you really want to use TRichView in a lazarus application you can. Create a dll with form in delphi and load the dll as plugin from lazarus.

rvk

  • Hero Member
  • *****
  • Posts: 6944
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #6 on: December 10, 2015, 09:36:07 am »
I still think that posting here what is actually missing in de windows unit is more beneficiary for all Delphi convert efforts of all future Lazarus users :)

balazsszekely

  • Guest
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #7 on: December 10, 2015, 09:56:11 am »
@rvk
I agree, but is this legal? @snorkel is a registered user, has the source, so he can port TRichView to lazarus(I guess?).
Ok, stating what's missing from the windows unit it's definitely not illegal  :D, but helping convert a component without the author's agreement it might be. I don't know, I'm just asking.

rvk

  • Hero Member
  • *****
  • Posts: 6944
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #8 on: December 10, 2015, 10:12:45 am »
I agree, but is this legal? @snorkel is a registered user, has the source, so he can port TRichView to lazarus(I guess?).
Ok, stating what's missing from the windows unit it's definitely not illegal  :D, but helping convert a component without the author's agreement it might be. I don't know, I'm just asking.
Yes, I was talking about just sharing the findings about missing declarations in the windows-unit (to help future converters of whatever piece of software, too). So the actual porting itself would still be up to snorkel. If it's legal to convert to Lazarus without the author's approval... That I don't know. I'm not sure what license it really is and if you can change it as long as it's not shared.

http://www.trichview.com/order/license-trichview.html
Quote
You may make any changes in the Main Components' source code. The same rights and restrictions apply to the modified version of the Main Components.
I don't see anywhere that you may only compile the changed version with Delphi, so my guess is, compiling with FPC/Lazarus is allowed unless I'm missing something.

O, B.T.W. using TRichView in a DLL-form is not allowed without approval :)
Quote
Other form of distribution of software created with use of the Main Components (including but not limited to dynamic libraries (DLL), components packages (*.BPL and *.DPL), ActiveX components) is possible only with the Software Developer's personal written permission.

So yeah, there is that :)

balazsszekely

  • Guest
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #9 on: December 10, 2015, 11:29:47 am »
Quote
O, B.T.W. using TRichView in a DLL-form is not allowed without approval :)
Apparently I shot myself in the leg.   :D
« Last Edit: December 10, 2015, 11:32:23 am by GetMem »

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #10 on: December 10, 2015, 12:43:07 pm »
@snorkel: You can also try with TKMemo from http://www.tkweb.eu/en/delphicomp/
Quote
TKMemo - native replacement for TMemo/TRichEdit - written from scratch, great features, full RTF support etc

It is still in beta but tested and works well (tested on Linux)

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #11 on: December 10, 2015, 07:48:50 pm »
I though about putting the delphi form in a DLL.
I think that's fine as long as you don't expose the Trichview component itself in the DLL, I.e.  make a DLL wrapper around the control.

The problem with the DLL route is I would have to do a major redesign as the form I use the Trichview in receives windows messages from a thread and then I would still have to keep Delphi around for that one form.

I am taking a look at TKmemo as a replacement, or possibly Lzrichedit which seems to have the ability to append RTF from a stream.

I messed around trying to compile the trichview source but the biggest areas that had issues was the drag and drop support and the Unicode compiler defs for Delphi 2009 and up.

Sergey (the author) could probably port it to Lazarus pretty easily as he knows the code and has done another project  that has Lazarus Support RVmedia, so I am just going to wait a bit more and in the meantime look at TKMemo.


***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

rvk

  • Hero Member
  • *****
  • Posts: 6944
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #12 on: December 10, 2015, 09:09:32 pm »
I though about putting the delphi form in a DLL.
I think that's fine as long as you don't expose the Trichview component itself in the DLL, I.e.  make a DLL wrapper around the control.
Not if I look at the exact text of the license:
Quote
Other form of distribution of software created with use of the Main Components (including but not limited to dynamic libraries (DLL), components packages (*.BPL and *.DPL), ActiveX components) is possible only with the Software Developer's personal written permission.

So for distribution of "software created with use of the Main Components" (i.e. meaning ANY form of software and not just a wrapper around the component) you'll need personal written permission. Although I don't think it will be a problem but you do need to ask first.

But if other components will do the job for you, you don't need to go the DLL-way or go through the trouble of converting it.

balazsszekely

  • Guest
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #13 on: December 10, 2015, 09:33:25 pm »
Since I already done this before, I attach the plugin project, maybe somebody will find it useful. I replaced TRichView with TRichEdit, so nothing illegal here.
1. Open and build  the Plugin.dpr project with delphi. It should work with just about any version of delphi from D7 to D10Seattle.
2. Copy Plugin.dll in the test directory
3. Build then run Test.lpi with lazarus



snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Has anyone attempted to convert Trichview to a Lazarus package?
« Reply #14 on: December 11, 2015, 04:25:08 am »
I though about putting the delphi form in a DLL.
I think that's fine as long as you don't expose the Trichview component itself in the DLL, I.e.  make a DLL wrapper around the control.
Not if I look at the exact text of the license:
Quote
Other form of distribution of software created with use of the Main Components (including but not limited to dynamic libraries (DLL), components packages (*.BPL and *.DPL), ActiveX components) is possible only with the Software Developer's personal written permission.

So for distribution of "software created with use of the Main Components" (i.e. meaning ANY form of software and not just a wrapper around the component) you'll need personal written permission. Although I don't think it will be a problem but you do need to ask first.

But if other components will do the job for you, you don't need to go the DLL-way or go through the trouble of converting it.

I would not be distributing it anyways, personal use and if I did I would just ask Sergey.

I think tkmemo will work, I have big parts already working in the Delphi version and when all trichview is gone I will use the converter tool.  I have everything working in Lazarus except for that one form.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

 

TinyPortal © 2005-2018