Show: Delphi C++
Display Preferences

Linux Application Development

From RAD Studio
Jump to: navigation, search

RAD Studio allows you to develop applications for the target Linux platform. Using RAD Studio installed on Windows machine, you can create a 64-bit Linux application and deploy it to the Linux machine. Developing Linux applications is similar to creating Android apps in RAD Studio. However, for Linux, you cannot create the visual VCL and FireMonkey applications. Here is the list of apps that are available for the Linux platform:

  • Console Application
  • EMS Package (RAD Server)
  • DataSnap
  • DataSnap WebBroker
  • WebBroker
  • Dynamic-link Libraries
  • DUnitX Project

Prerequisites

To develop Linux applications, you need to have the RAD Studio installed on the Windows PC as well as a machine with the Linux platform (can be a virtual machine).

Preparing Your Linux Development Environment

To prepare your development system (PC) and Linux machine for application development with RAD Studio:

  1. Install RAD Studio on your Windows PC
  2. Install Linux SDK
  3. Prepare your Linux machine
  4. Create a Connection profile
  5. Add the installed SDK to the RAD Studio
  6. Run PAServer on Linux machine

Installing Linux SDK

To install Linux SDK on Ubuntu, first you have to add the Repository.

  1. Right-click your desktop and select Open Terminal.
  2. To add a repository, type sudo add-apt-repository ppa:ubuntu-sdk-team/ppa in the terminal.
  3. Press Enter. Now, your repository is added.
  4. To install Linux SDK, type sudo apt install ubuntu-sdk in the terminal.
  5. Press Enter and wait until the SKD is installed. It may take a few minutes to complete.

To install Linux SDK on Red Hat:

  1. Right-click your desktop and select Open Terminal.
  2. Type yum groupinstall 'Development Tools' in the terminal.
  3. Press Enter and wait until the SKD is installed. It may take a few minutes to complete.

Preparing Your Linux Machine

To create Linux applications, you need to add a virtual machine PAServer:

1. Find the LinuxPAServer19.0.tar.gz file in the following location:
C:\Program Files (x86)\Embarcadero\Studio\19.0\PAServer
2. Unpack the LinuxPAServer19.0.tar.gz file.

To use the System.zLib unit on Red Hat:

1. Install the zLib-devel library to your RHEL machine with the following command:
sudo yum install zlib-devel
2. Update the local SDK cache.

To use the System.zLib unit on Ubuntu:

1. Install the zLib-devel library to your Ubuntu machine with the following command:
sudo apt-get install zlib1g-dev
2. Update the local SDK cache.

Creating a Connection Profile

  1. Right-click the folder where you have unpacked the LinuxPAServer19.0.tar.gz file, and then click Open in Terminal.
  2. Enter ./paserver in terminal. Then, press Enter.
  3. On the Tools > Options > Environment Options > Connection Profile Manager page, click the Add button. The Create a Connection Profile wizard opens.
  4. On the Profile information page, enter the following:
    • In the Profile name field, enter the needed name.
    • In the Platform field, click the 64-bit Linux platform.
    • Click Next.
  5. On the Remote machine information page, enter the following:
    • In the Remote machine field, enter the IP address or Machine name.
    • Click Test Connection to check if the values are valid.
  6. Click Finish.

Adding the Installed SDK to RAD Studio

  1. On the Tools > Options > Environment Options > SDK Manager page, click the Add button.
  2. In the Add a New SDK dialog, enter the following:
    • In the Select a platform field, click 64-bit Linux.
    • In the Select a profile to connect, select a created profile from the drop-down list.
    • In the Select an SDK version field, the name of the SDK that you just installed will automatically appear. If you have not installed SDK previously, you can do it on this step. If you have already installed SDK, move on to the next step.

Running PAServer on Linux machine

To run the PAServer on your Linux machine:

  • Open the terminal, and then run PAServer in the terminal.

Developing Your Application

  1. Select the project type for your Delphi application.
    • File > New > Other > Delphi Projects:
      • Console Application
      • DUnitX Project
      • Dynamic-link Library
      • Package
    • File > New > Other > Delphi Projects > DataSnap Server:
      • DataSnap Server
      • DataSnap WebBroker
    • File > New > Other > Delphi Projects > WebBroker > WebBroker Application

See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance