Published 31 October 2018

Creating cross-platform clients. Delphi. Lazarus. Linux, Windows, Mac. Creating a client

Creating cross-platform clients

The purpose of this article is to demonstrate the creation of a native application that uses the functionality of the CREDITS platform using Thrift. The demo application will be created for three OS:

  • Windows 64
  • Linux
  • MacOS

Developing an application for mobile platforms is discussed in the next article.

Application development is made on Windows OS.

Thirft (v.0.11.0)

Thrift is an interface definition language and binary communication protocol used for defining and creating services for numerous languages. Link http://www.apache.org/dyn/closer.cgi?path=/thrift/0.11.0/thrift-0.11.0.exe.

Description of Delphi

Delphi - Community Edition (v.10.2.3)

Full-Featured Free Delphi IDE for Creating Native Cross-Platform Apps

Description of Lazarus (v.1.8.4)

Lazarus is a Delphi compatible cross-platform IDE for Rapid Application Development. It has variety of components ready for use and a graphical form designer to easily create complex graphical user interfaces.

Thrift files

api.thrift file with description of CREDITS API

Source code generation (pascal)

thrift --gen delphi api.thrift

the result will be a generated api.pas file

Required files to include in the project

the files are in the CS-Node project (https://github.com/CREDITSCOM/CS-Node) at the path below

..\CS-Node\thrift\lib\delphi\src\

these files and the api.pas file must be added to your project.

The following is an example connection and check in a form of a message that the connection succeeded.

The look of the test application:

0 Useful article

Contents