Recent

Author Topic: How to install VirtualTreeView to lazarus on Linux?  (Read 9809 times)

Человек_Борща

  • New Member
  • *
  • Posts: 33
    • My little IT world.
How to install VirtualTreeView to lazarus on Linux?
« on: November 26, 2014, 11:05:55 pm »
Greetings!

I've installed beta Lazarus 1.3 jn Ubuntu 14.04.

1. Compile LCLExtensions from LUIPack. Done.
2. Compile VirtualTreeView package. FAIL:
Code: [Select]
VirtualTrees.pas(9305,3) Error: Identifier not found "ZeroMemory"
I'm using a new port on VirtualTreeView also from SVN.

Doing the same under nomal Lazarus DEB's from reposiory, gots the same errors...

What I'm doing wrong? In Wiki, Lunix compability is declared.
With best regards, Alexandr.
_
OS: Windows 8.1 x64 / Ubuntu 14.02 x64
IDE: CodeTyphon 5.4 (win32-win64/win64) / FPC 3.1.1

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #1 on: November 26, 2014, 11:09:38 pm »
Try to compile branch 4.8 instead of trunk.

Groffy

  • Full Member
  • ***
  • Posts: 204
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #2 on: April 11, 2015, 05:11:48 pm »
Lazarus 1.4RC3 - qt - 32bit/ Linux Mint 17.1 KDE - 32 bit

Hello,

I had the same problem - solved with VirtualTreeView 4.8 branch

Ulrich
Linux Mint / Windows 10 / Lazarus 3.0.0 / trunk -qt

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #3 on: April 11, 2015, 05:32:27 pm »
The new VTV maintainer seems to have stripped all Lazarus support from the "5" branch.

Marius2

  • Newbie
  • Posts: 5
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #4 on: April 11, 2015, 08:02:17 pm »
He also removed XE support which was kind of a shock to us.
(well the VT svn trunk wasn't compatible with fpc/laz anyway)

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #5 on: April 12, 2015, 04:50:42 pm »
There's some confusion here (not your fault, is really confusing).

Some history:
There was a VTV port by Joerg Thaler,Christian Ulrich hosted at Lazarus-ccr. It used the approach to comment code that were buggy or not implemented in LCL. This lead to a largely incomplete port.
So i started  a new VTV port long years ago at BountySource. I took another path: as soon as i hit a code that was buggy or not implemented in LCL and its widgetsets i reported in Lazarus bug tracker providing patches when doable. In parallel i created a support package implementing API that does not make sense in LCL (LCLExtensions). Sometime later i was asked by a Lazarus dev (Vincent) to move to Lazarus-ccr initially under the virtualtreeview-unstable repository, later renamed to virtualtreeview-new. The original port is still there.

Changes in VTV delphi repository were backported to the Lazarus port and were in more or less in sync by the times of 4.8 release. At this time Mike Liesche stopped working in VTV and development stalled. When work was resumed in 5.x branch, initially i did not backport. Only later i separated 4.8 from trunk in virtualtreeview-new repository and started to sync Delphi VTV 5.x/trunk with virtualtreeview-new/trunk. Since than virtualtreeview-new/trunk has became unstable because of changes in interface or windows specific code introduced while doing the backport.

Currently the virtualtreeview-new/trunk has most of the 5.x code ported but needs some work to get in a decent shape specially for non windows. With the move of VTV to github things will be easier since git has features that allows to maintain forks tracking and merging changes from the original in a structured way. Until now i was doing almost manually (with help of tools like araxis merge, smartsynchronize and meld)

Groffy

  • Full Member
  • ***
  • Posts: 204
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #6 on: April 21, 2015, 02:30:26 pm »
The new VTV maintainer seems to have stripped all Lazarus support from the "5" branch.

The trunk version is compiling under Win7 /qt without problems. Under Linux (Mint 17.1) procedure ZeroMemory() seems to be not implemented. This procedure contains only

procedure ZeroMemory(Destination:PVOID; Length:DWORD);
begin
  FillChar(Destination^,Length,#0);
end;   

where FillChar() is implemented in assembler. Is that somehow platform specific to implement on x86/x64 systems?


Best regards - Ulrich
« Last Edit: April 21, 2015, 03:29:11 pm by Groffy »
Linux Mint / Windows 10 / Lazarus 3.0.0 / trunk -qt

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #7 on: April 21, 2015, 02:37:49 pm »
The new VTV maintainer seems to have stripped all Lazarus support from the "5" branch.

The trunk version is compiling under Win7 /qt without problems. Under Linux (Mint 17.1) procedure ZeroMemory() seems to be not implemented. This procedure contains only

procedure ZeroMemory(Destination:PVOID; Length:DWORD);
begin
  FillChar(Destination^,Length,#0);
end;   

where FillChar() is implemeted in assembler. Is that somehow platform specific to implement on x86/x64 systems?


Best regards - Ulrich
fillchar fills the variable space destination^ with length count of 0s.
In short it is implemented correctly. fillchar is part of the rtl in fpc used heavily in various scenarios  so there is no way that there is a problem on this procedure.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Groffy

  • Full Member
  • ***
  • Posts: 204
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #8 on: April 21, 2015, 04:02:46 pm »
fillchar fills the variable space destination^ with length count of 0s.
In short it is implemented correctly. fillchar is part of the rtl in fpc used heavily in various scenarios  so there is no way that there is a problem on this procedure.

So for the procedure ZeroMemory() its just a missing declaration in the Linux depending rtl part? In fact, I couldn't find this procedure anywhere else in the rtl.


Ulrich
Linux Mint / Windows 10 / Lazarus 3.0.0 / trunk -qt

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #9 on: April 21, 2015, 04:06:23 pm »
So for the procedure ZeroMemory() its just a missing declaration in the Linux depending rtl part? In fact, I couldn't find this procedure anywhere else in the rtl.

No, it is a portability bug in the original source. It should simply use fillchar.   zeromemory is a windows API helper macro, and a lot of old API examples used it, which is how it came into the collective Delphi memory.

People simply translated such examples it 1:1 and because on Windows it doesn't matter, nobody thought twice about it. But it is a porting hazard, and should be cleaned up.

Just remove the unit Windows from the uses clause, and it'll probably stop working on Windows too.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #10 on: April 21, 2015, 04:16:29 pm »
I'm going to install it later tonight and see for my self what are the problems in linux. I assume you are installing the virtualtreeview-new and not the unstable trunk but a more stable release.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Groffy

  • Full Member
  • ***
  • Posts: 204
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #11 on: April 21, 2015, 04:17:25 pm »
No, it is a portability bug in the original source. It should simply use fillchar. zeromemory is a windows API helper macro, and a lot of old API examples used it, which is how it came into the collective Delphi memory.

@Marcov, thank you for your explanation. I have to confess, that when I came over from delphi, I did not dig into that platform independ abstraction layers.


Ulrich
Linux Mint / Windows 10 / Lazarus 3.0.0 / trunk -qt

Groffy

  • Full Member
  • ***
  • Posts: 204
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #12 on: April 21, 2015, 04:30:23 pm »
I'm going to install it later tonight and see for my self what are the problems in linux. I assume you are installing the virtualtreeview-new and not the unstable trunk but a more stable release.

@taazz : As long as I was on Windows / qt, I was fine with lazarus-ccr/svn/components/virtualtreeview-new/trunk. For my Lazarus 1.4RC3 installation on Linux Mint - KDE, I moved to lazarus-ccr/svn/components/virtualtreeview-new/branches/4.8 which compiles for me.

Ulrich
« Last Edit: April 21, 2015, 04:33:14 pm by Groffy »
Linux Mint / Windows 10 / Lazarus 3.0.0 / trunk -qt

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #13 on: April 22, 2015, 01:26:32 am »
I removed zeromemory

But even if it compiles probably will not work correctly, since the v5/trunk port is not done yet

Please use branch/4.8

Groffy

  • Full Member
  • ***
  • Posts: 204
Re: How to install VirtualTreeView to lazarus on Linux?
« Reply #14 on: May 15, 2015, 08:41:29 pm »
I removed zeromemory

But even if it compiles probably will not work correctly, since the v5/trunk port is not done yet

Please use branch/4.8

Trunk now compiles under Linux 32bit - thank you!

Ulrich
Linux Mint / Windows 10 / Lazarus 3.0.0 / trunk -qt

 

TinyPortal © 2005-2018