Forum > Networking and Web Programming

Lazarus and web application

(1/1)

xinyiman:
Good morning everyone, I created a small Git Hub project to demonstrate how to create an application based on http application that acts as a web server to manage the frontend part (kept external to the executable itself), so as to be able to intervene on the graphic part quickly , and integrates the backend so that it cannot be modified by those who do not have the source.

Currently only tested on Win 10. I hope it helps someone.
The frontend of the example is based on AdmiLte a bootstrap template. You can find more information on the blog of the Italian community (the article is in Italian, but you can easily translate it with Google Translator).

https://blog.lazaruspascal.it/2023/12/21/creare-una-web-application-con-lazarus/

I then tried to cross compile it for arm/android but the compilation fails because somewhere there is a reference to gtk3. If anyone could help me cross compile it for Android I would be grateful.

tkay:
This is a great example thank you.

ginoo:
Thank you

TRon:
Thank you very much for the example xiniman.


--- Quote ---I then tried to cross compile it for arm/android but the compilation fails because somewhere there is a reference to gtk3. If anyone could help me cross compile it for Android I would be grateful.

--- End quote ---
I just compiled your example (Linux) using the commandline compiler and there is no sign whatsoever of such dependencies.


--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---cd LazWebServer-mainfpc -FEbin -Fusrc -Fusrc/jwt_unit -dUseCThreads -dSmartDebugLogWriteActive -B prj/lazwebserver.lpr 
I suspect it might be related to the android part of things. Are you able to paste some log that is able to show what exactly the compiler is looking for ?

I do not have a cross setup for android for this machine (sorry as I have no intention to do so either (*)) so you might perhaps have more luck with someone that is more versed in/with android.

(*) just discovered multipass  :) .

A perhaps possible solution for you:
- use FPCUpDeluxe to install (only) FPC 3.2.2 somewhere temporary (e.g. do not mix with your current setup unless you really want to)
- Use FPCUpDeluxe to to add an arm android cross-compiler
- download and extract (or clone) your project source-files
- cd LazWebServer-main
- /full/path/to/your/temporary/installed/FPCUpDeluxe/directory/fpc/bin/[x86_64-linux]/fpc.sh -FEbin -Fusrc -Fusrc/jwt_unit -dUseCThreads -dSmartDebugLogWriteActive -Parm -Tandroid -B prj/lazwebserver.lpr

The [x86_64-linux] part is specific to my host so might be different for you in case using another host OS.

Though I am not 100% sure about (your) ARM (target) options. Might be that there is need to specify some additional details (depending on your requirements).

Navigation

[0] Message Index

Go to full version