Skip to main content
Table of Contents

Installation

TMS FNC WebSocket installs into RAD Studio as a set of design-time and runtime packages for VCL and FMX, plus a package for the TMS WEB Core form designer. It depends on TMS FNC Core, which must be installed first, and on the Indy libraries that ship with RAD Studio. Most developers install the product with its setup program or TMS Smart Setup, which install the packages and configure the library paths; the manual procedure below is for source installations, build servers, or when the setup cannot complete. This guide covers the supported IDEs, the automatic and manual installation paths, the extra steps for Linux targets and browser applications, and the runtime files an application needs when it uses secure connections.

Supported IDEs and frameworks

IDE Frameworks
Delphi 10.1 Berlin and newer VCL (Win32, Win64) and FMX (Windows, macOS, iOS, Android, Linux)
C++Builder 10.1 Berlin and newer VCL and FMX
TMS WEB Core TTMSFNCWhatsAppReceiver only

The WebSocket client, WebSocket server, and WhatsApp server are available for VCL and FMX. The WhatsApp receiver is available for VCL, FMX, and TMS WEB Core.

Automatic installation

Unzip the distribution file into a separate folder and run the setup executable, or install the product through TMS Smart Setup. Select the IDEs to install into; the setup builds and installs the packages and adds the source and library paths to the IDE. If the setup reports a failure, use the manual installation below.

Manual installation

Install TMS FNC Core first, then install the three TMS FNC WebSocket packages for your IDE version in this order:

  1. In the IDE, select File > Open and open FMXTMSFNCWebSocketPkgDXE*.dproj. In the Project Manager, right-click the project and select Install.
  2. Open VCLTMSFNCWebSocketPkgDXE*.dproj and install it the same way.
  3. Open TMSFNCWebSocketPkgDEDXE*.dproj, the shared design-time package, and install it the same way.

The * is the package suffix of your IDE version:

IDE version Package suffix
Delphi / C++Builder 10.1 Berlin XE10
Delphi / C++Builder 10.2 Tokyo XE11
Delphi / C++Builder 10.3 Rio XE12
Delphi / C++Builder 10.4 Sydney XE13
Delphi / C++Builder 11 Alexandria XE14
Delphi / C++Builder 12 XE15
Delphi / C++Builder 13 XE16

Then add the product folder to the IDE library path (Tools > Options > Language > Delphi > Library) for every platform you target, so applications find the source units.

After installation, the four components appear on the TMS FNC WebSocket page of the Tool Palette. The quick test below creates a server and a client from code, which confirms the packages and library paths:

Verify the installation from codePascal
uses
  // FMX application; a VCL application uses the VCL.TMSFNC* units instead:
  // VCL.TMSFNCWebSocketCommon, VCL.TMSFNCWebSocketServer, VCL.TMSFNCWebSocketClient
  FMX.TMSFNCWebSocketCommon, FMX.TMSFNCWebSocketServer, FMX.TMSFNCWebSocketClient;

procedure TForm1.SmokeTestBtnClick(Sender: TObject);
var
  Server: TTMSFNCWebSocketServer;
  Client: TTMSFNCWebsocketClient;
begin
  Server := TTMSFNCWebSocketServer.Create(nil);
  Client := TTMSFNCWebsocketClient.Create(nil);
  try
    Server.Port := 8888;
    Server.Active := True;

    Client.HostName := 'localhost';
    Client.Port := 8888;
    Client.Connect;
    if Client.Active then
      ShowMessage('TMS FNC WebSocket is installed and working.');
    Client.Disconnect(False);
  finally
    Client.Free;
    Server.Free;
  end;
end;

Installing for TMS WEB Core

For browser applications, the WhatsApp receiver comes with the TMSFNCWebSocketWEB package, which registers TTMSFNCWhatsAppReceiver for the TMS WEB Core form designer. Install it like the packages above and add the product folder to the TMS WEB Core library path, so the WEBLib.TMSFNCWhatsAppReceiver unit is found when the web application is compiled.

Preparing Linux targets

FMX applications for Linux require FMXLinux, which is not installed with RAD Studio by default; install it through the GetIt Package Manager and set up the Linux SDK as described in the RAD Studio documentation. On the Linux machine, install the development and runtime packages that FMX applications need. On Ubuntu the following commands install them; package names can differ on other distributions and newer releases:

sudo apt install joe wget p7zip-full curl openssh-server build-essential zlib1g-dev libcurl4-gnutls-dev libncurses5
sudo apt install libgl1-mesa-glx libglu1-mesa libgtk-3-common libgstreamer1.0-0 libgstreamer-plugins-base1.0-0

Runtime files for secure connections

The components use Indy for networking, which is part of RAD Studio, so plain ws:// connections need no extra files. Secure wss:// connections — and the WhatsApp server and receiver, which are always secure — use OpenSSL by default. VCL and FMX applications then need the OpenSSL libraries at runtime: on Windows, libeay32.dll and ssleay32.dll in the bitness of the application, next to the executable. To use OpenSSL 3.x instead, see Secure connections for the client and Secure connections for the server. Browser applications need no OpenSSL; the browser handles TLS.

Combining the installation checks

A new development machine is ready when the packages are installed, the library path is set, and — for secure connections — the OpenSSL libraries are next to the executable. Extending the quick test above with UseSSL := True on both components and a certificate on the server exercises all three at once; the demo projects in the product's Demo folder (a chat server with native and web clients, a live feed, a grid editor, and a WhatsApp server with native and web receivers) cover the same ground with complete applications.

Pitfalls

  • Install TMS FNC Core first. The WebSocket packages require the TMS FNC Core packages for the same IDE version.
  • Install all three packages. The design-time package requires both runtime packages; installing only one framework package leaves the components missing from the palette.
  • Set the library path per platform. A path set only for Win32 makes Win64, macOS, mobile, or Linux builds fail with unit-not-found errors.
  • Ship OpenSSL with secure applications. A missing library only shows up at runtime, on the first secure connection.

See also