[fpc-pascal] Browser and exe
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Wed May 24 21:23:30 CEST 2017
On 2017-05-24 18:36, Marcos Douglas B. Santos wrote:
> I've searched the code and don't know whether that I found is the
> official or the more updated repository.
> So, I found this http://www.indyproject.org/Sockets/Download/svn.EN.aspx
> If I understood right, the good version to use with FPC is 10. Am I correct?
Yes, use the latest code from SVN trunk v10. There is no more difference
between Delphi and FPC versions for Indy - they are now common code.
SubVersion repo:
https://svn.atozed.com:444/svn/Indy10/trunk
> 1. Did you have problems with Windows firewall?
No problems, and neither on Linux or FreeBSD. Simply make sure you use a
port number greater than 1024 (otherwise *nix systems will require root
access).
> 2. How did you garantee that others applications aren't being using
> the same port as your application to avoind conflicts?
I looked at the official IANA list of registered port numbers and chose
a port number that hasn't been taken yet.
http://www.iana.org/assignments/port-numbers
Under FreeBSD you can review the /etc/services file. I believe Linux has
something similar. Or simply use the URL above.
> 3. How was the best way to start the application as a server and
> keeping it alive?
In our case, the user double clicked our application icon on the
desktop. This started a desktop GUI application, which at the same time
started the embedded HTTP server (which was built into that desktop
application). They then searched and scheduled their assigned tasks for
the day/lesson. They then clicked "view module", which then launched the
installed web browser with the correct URL as parameter - thus
connecting to the embedded HTTP server. In the mean time the desktop
application stayed open - otherwise the embedded HTTP server will
obvious shut down. We also had a user configurable option that when they
clicked "view module", it could also minimise the desktop application
before launching the web browser.
We thought of implementing a Windows Service & *nix Daemon, but that
would require more effort to install etc. The desktop application was
the simplest solution and worked perfectly.
Regards,
Graeme
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
My public PGP key: http://tinyurl.com/graeme-pgp
More information about the fpc-pascal
mailing list