Recent

Author Topic: Modern UI in Lazarus  (Read 224210 times)

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Modern UI in Lazarus
« Reply #285 on: October 30, 2023, 02:09:40 pm »
I have uploaded the package to GitHub:
https://github.com/hedgehog344/FluentControls

Don't take it too seriously :)
This is just a demonstration, and it was done quickly, dirty, and ineptly.

Is this compatible with LCL, or is OpenGL only?

hedgehog

  • Jr. Member
  • **
  • Posts: 94
Re: Modern UI in Lazarus
« Reply #286 on: October 30, 2023, 03:17:42 pm »
Is this compatible with LCL, or is OpenGL only?
If I understood your question correctly...
Yes, it is compatible with LCL.
On Windows, Direct2D (if available) or GDI+ is used for rendering.

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Modern UI in Lazarus
« Reply #287 on: October 30, 2023, 04:17:45 pm »
Is this compatible with LCL, or is OpenGL only?
If I understood your question correctly...
Yes, it is compatible with LCL.
On Windows, Direct2D (if available) or GDI+ is used for rendering.
Cool.

And what's used in Linux and macOS?

hedgehog

  • Jr. Member
  • **
  • Posts: 94
Re: Modern UI in Lazarus
« Reply #288 on: October 30, 2023, 05:30:49 pm »
In the description of the Codebot.Cross library you can read that it works on Linux (but I haven’t tried it). As for MacOS, I think you need to ask the author (Sysrpl)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Modern UI in Lazarus
« Reply #289 on: October 31, 2023, 10:01:58 am »
And what's used in Linux and macOS?
Reading the rendering package, seems like only Windows and Linux are supported. The only macOS related string I can find is "darwin", and it's only in the networking package. So, assume this doesn't compile on macOS.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Modern UI in Lazarus
« Reply #290 on: November 08, 2023, 01:39:41 am »
I have uploaded the package to GitHub:
https://github.com/hedgehog344/FluentControls

Don't take it too seriously :)
This is just a demonstration, and it was done quickly, dirty, and ineptly.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

peterc

  • Newbie
  • Posts: 1
Re: Modern UI in Lazarus
« Reply #291 on: January 07, 2024, 08:35:26 pm »
This does sound intriguing, so many thanks for posting. However, on compiling codebot it gails with the message:
Error: No matching implementation for interface method "SelectList(const AnsiString;out INodeList):Boolean;" found

I found the function in codebot.text.xml.pas  but on adding that to the uses clause the compiler responds with
Error: Duplicate identifier "CODEBOT.TEXT.XML"

Any ideas how to solve this?

Thanks!

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Modern UI in Lazarus
« Reply #292 on: January 14, 2024, 03:51:43 am »
Hi. Someone is using the default browser plug-in for Windows Linux and Mac OS?

To code with html css and js in the front and pascal in the backend.

If yes how's called the package?

Thanks.

Edit; like edge in Linux and windows and safari on Mac  :)
« Last Edit: January 14, 2024, 03:59:46 am by lainz »

paweld

  • Hero Member
  • *****
  • Posts: 1572
Re: Modern UI in Lazarus
« Reply #293 on: January 14, 2024, 08:07:11 am »
Best regards / Pozdrawiam
paweld

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/

BSaidus

  • Hero Member
  • *****
  • Posts: 651
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Modern UI in Lazarus
« Reply #295 on: January 14, 2024, 02:12:44 pm »
@Lainz: https://github.com/PierceNg/fpwebview
I tried to compile demo https://github.com/PierceNg/fpwebview/tree/master/demo/browser_cli,
It gives error importing external symbols.


note:
 the dll's & lib are for x64

« Last Edit: January 14, 2024, 03:13:19 pm by BSaidus »
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: Modern UI in Lazarus
« Reply #296 on: January 14, 2024, 04:01:09 pm »
@Lainz: https://github.com/PierceNg/fpwebview
I tried to compile demo https://github.com/PierceNg/fpwebview/tree/master/demo/browser_cli,
It gives error importing external symbols.


note:
 the dll's & lib are for x64

I've compiled the demo from the first folder, the one that opens freepascal website, you need to use the compile.bat in Windows.

BSaidus

  • Hero Member
  • *****
  • Posts: 651
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Modern UI in Lazarus
« Reply #297 on: January 14, 2024, 06:30:10 pm »
@Lainz: https://github.com/PierceNg/fpwebview
I tried to compile demo https://github.com/PierceNg/fpwebview/tree/master/demo/browser_cli,
It gives error importing external symbols.
note:
 the dll's & lib are for x64
I've compiled the demo from the first folder, the one that opens freepascal website, you need to use the compile.bat in Windows.

I think the error is due to the fact that I have not x64 units on my installation.
here is the output while using a command line 'winbuild.bat'
Code: Pascal  [Select][+][-]
  1. C:\tmp\fpwebview\demo\browser_cli>winbuild.bat
  2. Set up FPC executable path.
  3. "C:\GNU\fpc323\App\fpc\bin\i386-win32\fpc.exe"
  4. Building...
  5.         1 file(s) copied.
  6.         1 file(s) copied.
  7.         1 file(s) copied.
  8. Free Pascal Compiler version 3.2.3-1334-ga6764eccd9 [2024/01/09] for i386
  9. Copyright (c) 1993-2021 by Florian Klaempfl and others
  10. Target OS: Win32 for i386
  11. Compiling browser_cli.lpr
  12. Linking browser_cli.exe
  13. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s2.o)
  14. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s9.o)
  15. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s8.o)
  16. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s10.o)
  17. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s4.o)
  18. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s3.o)
  19. browser_cli.lpr(25,1) Fatal: There were 6 errors compiling module, stopping
  20. Fatal: Compilation aborted
  21. Error: C:\GNU\fpc323\App\fpc\bin\i386-win32\ppc386.exe returned an error exitcode
  22.  
  23.  
« Last Edit: January 14, 2024, 06:32:00 pm by BSaidus »
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

jamie

  • Hero Member
  • *****
  • Posts: 7599
Re: Modern UI in Lazarus
« Reply #298 on: January 14, 2024, 08:40:50 pm »
Nice, looks like you are targeting Windows and you attempting to link in Linux Libs.?

Let me know if you succeed or did, I miss something?
 :(
The only true wisdom is knowing you know nothing

BSaidus

  • Hero Member
  • *****
  • Posts: 651
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Modern UI in Lazarus
« Reply #299 on: January 14, 2024, 08:54:46 pm »
Not succed, the dll's are x64 bit.
I think the import libraries are not.

The same compilation error.

Code: Pascal  [Select][+][-]
  1. C:\tmp\fpwebview\demo\browser_cli>winbuild.bat
  2. Set up FPC executable path.
  3. "C:\GNU\fpc323\App\fpc\bin\i386-win32\fpc.exe"
  4. Building...
  5.         1 file(s) copied.
  6.         1 file(s) copied.
  7.         1 file(s) copied.
  8. Free Pascal Compiler version 3.2.3-1334-ga6764eccd9 [2024/01/09] for i386
  9. Copyright (c) 1993-2021 by Florian Klaempfl and others
  10. Target OS: Win32 for i386
  11. Compiling browser_cli.lpr
  12. Compiling C:\tmp\fpwebview\src\webview.pas
  13. Linking browser_cli.exe
  14. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s2.o)
  15. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s9.o)
  16. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s8.o)
  17. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s10.o)
  18. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s4.o)
  19. browser_cli.lpr(25,1) Error: Illegal COFF Magic while reading libwebview.a(impwebview1s3.o)
  20. browser_cli.lpr(25,1) Fatal: There were 6 errors compiling module, stopping
  21. Fatal: Compilation aborted
  22. Error: C:\GNU\fpc323\App\fpc\bin\i386-win32\ppc386.exe returned an error exitcode
  23.  
Winbuild.bat
Code: Pascal  [Select][+][-]
  1. @echo off
  2.  
  3. echo Set up FPC executable path.
  4. set pfpc=C:\GNU\fpc323\App\fpc\bin\i386-win32
  5. set path=%path%
  6.  
  7. set fpcexe=%pfpc%\fpc.exe
  8.  
  9. if not exist "%fpcexe%" (
  10.         echo ERROR: Edit this batch file to set up location of fpc.exe
  11.         exit /b 1
  12. )
  13. echo "%fpcexe%"
  14.  
  15. echo Building...
  16. copy "..\..\dll\x86_64\libwebview.a" .
  17. copy "..\..\dll\x86_64\webview.dll" .
  18. copy "..\..\dll\x86_64\WebView2Loader.dll" .
  19. "%fpcexe%" -Fu..\..\src -Fl. browser_cli.lpr
  20.  

lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

 

TinyPortal © 2005-2018