TChart NoGUI

Rund um die LCL und andere Komponenten
pluto
Lazarusforum e. V.
Beiträge: 7192
Registriert: So 19. Nov 2006, 12:06
OS, Lazarus, FPC: Linux Mint 19.3
CPU-Target: AMD
Wohnort: Oldenburg(Oldenburg)

Re: TChart NoGUI

Beitrag von pluto »

Unglaublich: jetzt läuft das Demo.

Ich habe Lazarus noch einmal upgedatet und neu kompiliert und siehe da, es geht. Auf dem Banana PI probiere ich es auch noch mal.
Kompiliert habe ich es mit der IDE.
MFG
Michael Springwald

pluto
Lazarusforum e. V.
Beiträge: 7192
Registriert: So 19. Nov 2006, 12:06
OS, Lazarus, FPC: Linux Mint 19.3
CPU-Target: AMD
Wohnort: Oldenburg(Oldenburg)

Re: TChart NoGUI

Beitrag von pluto »

Auf dem Banana PI klappt es noch nicht:
1 root@bananapi ..rus_10.7/components/tachart/demo/nogui (svn)-[trunk:51266] # fpc -MObjFPC -Scghi -Cg -O1 -g -gl -l -vewnhibq -Fi/home/pluto/lazarus_10.7/components/tachart/demo/nogui/lib/arm-linux -Fl/opt/gnome/lib -Fu/home/pluto/lazarus_10.7/components/tachart/lib/arm-linux/gtk2 -Fu/home/pluto/lazarus_10.7/components/ideintf/units/arm-linux/gtk2 -Fu/home/pluto/lazarus_10.7/components/lazcontrols/lib/arm-linux/gtk2 -Fu/home/pluto/lazarus_10.7/lcl/units/arm-linux/gtk2 -Fu/home/pluto/lazarus_10.7/lcl/units/arm-linux -Fu/home/pluto/lazarus_10.7/components/lazutils/lib/arm-linux -Fu/home/pluto/lazarus_10.7/packager/units/arm-linux -Fu/home/pluto/lazarus_10.7/components/tachart/demo/nogui/ -FU/home/pluto/lazarus_10.7/components/tachart/demo/nogui/lib/arm-linux/ -dLCL -dLCLgtk2 noguidemo.lpr
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.6.4+dfsg-4 [2014/10/14] for arm
Copyright (c) 1993-2014 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMHF
(3104) Compiling noguidemo.lpr
(3104) Compiling ../../tadrawerfpcanvas.pas
/home/pluto/lazarus_10.7/components/tachart/demo/nogui/tadrawerfpcanvas.pas(62,15) Warning: (3057) An inherited method is hidden by "TFPCanvasDrawer.PutPixel(LongInt,LongInt,TChartColor);"
/home/pluto/lazarus_10.7/components/tachart/demo/nogui/tadrawerfpcanvas.pas(140,12) Fatal: Internal error 200502052
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcarm returned an error exitcode (normal if you did not specify a source file to be compiled)
fpc -MObjFPC -Scghi -Cg -O1 -g -gl -l -vewnhibq -Fl/opt/gnome/lib 4,40s user 1,81s system 98% cpu 6,314 total
MFG
Michael Springwald

pluto
Lazarusforum e. V.
Beiträge: 7192
Registriert: So 19. Nov 2006, 12:06
OS, Lazarus, FPC: Linux Mint 19.3
CPU-Target: AMD
Wohnort: Oldenburg(Oldenburg)

Re: TChart NoGUI

Beitrag von pluto »

Ich habe es:
./lazbuild components/tachart/demo/nogui/noguidemo.lpr
Im Hauptverzeichnis von Lazarus ausführen und es geht. Das Demo lässt sich jetzt Problemlos Starten.

Problem ist jetzt scheinbar gelöst.
MFG
Michael Springwald

wp_xyz
Beiträge: 5154
Registriert: Fr 8. Apr 2011, 09:01

Re: TChart NoGUI

Beitrag von wp_xyz »

Zeile 140 in tadrawerfpcanvas: Da geht wird ein TFreeTypefont erzeugt - hast du das auf dem Banana? Das ganze ist umgeben mit einem {$IFDEF USE_FTFONT}. Gehe an den Kopf der Unit tadrawerfpcanvas, deaktiviere dieses Define und kompiliere TAChart neu.

pluto
Lazarusforum e. V.
Beiträge: 7192
Registriert: So 19. Nov 2006, 12:06
OS, Lazarus, FPC: Linux Mint 19.3
CPU-Target: AMD
Wohnort: Oldenburg(Oldenburg)

Re: TChart NoGUI

Beitrag von pluto »

Es läuft jetzt auch auf dem Banana PI:
fpc -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Fu/home/pluto/myApps/synaptic -Fi/home/pluto/lazarus_10.7/components/tachart/demo/nogui/lib/arm-linux -Fu/home/pluto/lazarus_10.7/components/tachart/lib/arm-linux/nogui -Fu/home/pluto/lazarus_10.7/components/ideintf/units/arm-linux/nogui -Fu/home/pluto/lazarus_10.7/components/lazcontrols/lib/arm-linux/nogui -Fu/home/pluto/lazarus_10.7/lcl/units/arm-linux/nogui -Fu/home/pluto/lazarus_10.7/lcl/units/arm-linux -Fu/home/pluto/lazarus_10.7/components/lazutils/lib/arm-linux -Fu/home/pluto/lazarus_10.7/packager/units/arm-linux -Fu/home/pluto/lazarus_10.7/components/tachart/demo/nogui/ -FU/home/pluto/lazarus_10.7/components/tachart/demo/nogui/lib/arm-linux/ -dLCL -dLCLnogui WetterApp.pas
Mit dieser Zeile habe ich es hinbekommen.

Problem ist jetzt gelöst.
Vielen Dank für eure/deine Hilfe. Dein Tipp werde ich noch nach schauen.
MFG
Michael Springwald

pluto
Lazarusforum e. V.
Beiträge: 7192
Registriert: So 19. Nov 2006, 12:06
OS, Lazarus, FPC: Linux Mint 19.3
CPU-Target: AMD
Wohnort: Oldenburg(Oldenburg)

Re: TChart NoGUI

Beitrag von pluto »

Code: Alles auswählen

procedure TFPCanvasDrawer.EnsureFont;
begin
  {$IFDEF USE_FTFONT}
  if FFont <> nil then exit;
  FFont := TFreeTypeFont.Create;
  FFont.Resolution := 72;
  FFont.AntiAliased := false;
  FCanvas.Font := FFont;
  {$ENDIF}
end;
So sieht es auf dem Banana PI aus.
MFG
Michael Springwald

wp_xyz
Beiträge: 5154
Registriert: Fr 8. Apr 2011, 09:01

Re: TChart NoGUI

Beitrag von wp_xyz »

Genau, so wie bei mir auch. Ich dachte mir, wenn du am Anfang der Unit die Anweisung [$DEFINE USE_FTFONT} zu {.$DEFINE USE_FTFONT} änderst, wird in der Methode "EnsureFont" der TFreeTypeFont nicht mehr benötigt; alternativ kannst du natürlich alles in "EnsureFont" auskommentieren. Es hätte mich interessiert, ob dann, nach einer Neukompilierung von TAChart, der anfängliche Fehler weiterhin auftritt. Aber das war nur so eine Idee, an dem TFreeTypeFont kann es ja eigentlich nicht mehr liegen, weil das Programm ja jetzt auf dem BananaPi läuft.

mschnell
Beiträge: 3444
Registriert: Mo 11. Sep 2006, 10:24
OS, Lazarus, FPC: svn (Window32, Linux x64, Linux ARM (QNAP) (cross+nativ)
CPU-Target: X32 / X64 / ARMv5
Wohnort: Krefeld

Re: TChart NoGUI

Beitrag von mschnell »

pluto hat geschrieben:Genau. Um ein bestimmtes Interface zu nutzen, muss ich es ja erst einmal kompilieren oder nicht?
Nö. Das "Interface" wird durch Define-Macros ausgewählt. Der Code für alle unterstützten Interfaces ist im LCL Sourceode vorhanden. Das Übersetzen geht automatisch beim Übersetzen des Projektes. (Die LCL ist ein normales Paket und wird - falls nötig - (erneut) übersetzt.)

-Michael

Antworten