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:
- Install RAD Studio on your Windows PC
- Install Development Packages
- Prepare your Linux machine
- Create a Connection profile
- Add the installed SDK to the RAD Studio
- Run PAServer on Linux machine
Installing Development Packages
To install the development packages on Ubuntu:
- Right-click your desktop and select Open Terminal.
- To upgrade the packages you have already installed , type
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade
in the terminal. - Type your user password and press Enter
- Wait until prompted to agree to the package upgrade operation. Type Y and press Enter
- Wait until the package upgrade operation is complete. It may take a few minutes to complete.
- To add the development packages, type
sudo apt install joe wget p7zip-full curl openssh-server build-essential zlib1g-dev libcurl4-gnutls-dev libncurses5
in the terminal. - Type your user password and press Enter
- Wait until prompted to agree to the package installation operation. Type Y and press Enter
- Wait until the pacjage installation operation is complete. It may take a few minutes to complete.
To install the development packages on Red Hat:
- Right-click your desktop and select Open Terminal.
- Type
yum groupinstall 'Development Tools'
in the terminal. - Press Enter and wait until the package installation operation is complete. 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 LinuxPAServer22.0.tar.gz
file in the following location:
C:\Program Files (x86)\Embarcadero\Studio\23.0\PAServer\LinuxPAServer22.0.tar.gz
2. Unpack the LinuxPAServer22.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
- Right-click the folder where you have unpacked the
LinuxPAServer22.0.tar.gz
file, and then click Open in Terminal. - Enter
./paserver
in terminal. Then, press Enter. - On the Tools > Options > Environment Options > Connection Profile Manager page, click the Add button. The Create a Connection Profile wizard opens.
- 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.
- 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.
- Click Finish.
Adding the Installed SDK to RAD Studio
- On the Tools > Options > Environment Options > SDK Manager page, click the Add button.
- 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
- 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
- File > New > Other > Delphi Projects: