Delphi add linux platform

Activating and Configuring the Target Platform

Before you can start writing the application code for a multi-device application, you need to create and configure your application in the Projects Window. You should have already performed the previous required steps in creating a multi-device application.

Before configuring your multi-device application in the Project Manager:

  • If your application targets macOS or iOS, start by installing and running the Platform Assistant server on the Mac, and creating a connection profile that describes how to connect to that instance of the Platform Assistant server.

Then perform the following steps to configure a multi-device application (the steps are described in more detail in this topic):

Contents

Create a Multi-Device Application

Create one of the following project types, which are either potentially multi-device or multi-device by definition:

  • Console application — for any supported platform
    • File > New > Other > C++Builder Projects >Console Application
    • File > New > Other > Delphi Projects >Console Application

    Nevertheless, to do remote debugging between the host PC (either Win32 or Win64) and a remote Win32 PC, you can use the new debugging scheme, based on the Platform Assistant (required for multi-device application development). If you use the Platform Assistant and a connection profile for any application, including a Win32 application, you can also deploy your application using the Deployment Manager, which requires the Platform Assistant. For more information, see Debugging Multi-Device Applications.

    Add a Target Platform

    The Target Platforms node in the Projects Window displays the available platforms. However, when you create a project, some supported platforms might not be initially displayed. To create an application that targets a platform that is not currently displayed in the Target Platforms node, add the specific target platform you want, as follows:

    1. Right-click the Target Platforms node in the Project Manager:

    Add Platform 1.png

    2. Click Add Platform on the context menu. The Select Platform dialog box appears:

    Select-Platform1.1.png

    3. Click the down-arrow and select a target platform from the list of supported platforms:

    Select-Platform2.1.png

    Note: If you leave the Make the selected platform active checkbox enabled, the platform is automatically activated as it is added to your project, making the new platform the current target platform for your project. The name of the active platform appears in boldface in the Target Platforms node of the Project Manager. If you have previously associated a default connection profile or SDK with the platform you are adding, the name of the profile and the SDK is appended to the platform name in the Project Manager.

    4. Click OK. If you want to add another target platform, repeat the previous steps and add another platform.

    Activate a Target Platform

    To specify that your application is to be multi-device, you must activate the desired target platform in the Projects Window. The activated target platform is shown in boldface in the Project Manager. The platform you activate determines the compiler and the tooling that your application uses (that is, macOS applications use the BCCOSX.exe and DCCOSX.exe compilers, and use FireMonkey-RTL).

    To activate a target platform for your project

    Do either of the following:

    TargetPlatformActivate.png

    • Click the platform and the device in the Platform Device Selection Toolbar
    • In the Target Platforms node on the Projects Window, double-click the target platform for your application.
    • Right-click the Target Platforms node, and select Activate on the context menu:

    The table below shows the Target Platforms node populated with the available desktop and mobile platforms (Linux requires Enterprise edition). In the Delphi and C++ projects, the Windows 64-bit target platform is activated.

    Delphi Desktop Project

    Target Platforms Node - Delphi

    Target Platforms Node - C++

    Configure a Target Platform

    The final step in setting up your multi-device application in the Project Manager is to assign to the target platform a connection profile and an SDK as needed.

    • A connection profile is a set of properties that describe the connection to an instance of the Platform Assistant running on the target machine. This is a requirement for macOS and iOS platforms, as well as for a 64-bit Windows target platform if your development system is 32-bit Windows. Connection profiles are not used in Android applications. For more information, see Connection Profile Manager.
    • An SDK (software development kit) is a set of files to build your application. You need an SDK to build C++ and Delphi applications for macOS, iOS or Android.
      For macOS and iOS, you can use the SDK Manager to copy the files from a Mac.
      For Android, you use the Android SDK that the installer for RAD Studio installs onto your development system.

    Tip: You can tell whether your target platform requires a connection profile or an SDK by looking at the Platform Properties; if the connection profile or SDK field is not enabled, you do not need to configure the property.

    To configure a target platform for your project

    1. In the Project Manager, right-click the target platform that you activated and click Properties in the context menu:

    Android (the activated platform)

    iOS Device 32-bit (not activated)

    Add Platform Context Menu for Android

    Add Platform Context Menu for macOS

    2. The Platform Properties dialog box opens:

    Target-Platforms 3.png

    3. In the SDK (Software Development Kit) drop-down list, do either of the following:

    • To use an existing SDK, select the SDK from the list.
    • To add a new SDK, click Add New from the list, and follow either the steps for macOS and iOS or the steps for Android.

    Note: The SDK combo box is enabled only for projects that require an SDK. If your project requires an SDK but the SDK combo box list is empty or is missing a specific SDK, see Platform Properties for troubleshooting.

    4. In the Profile drop-down list, do either of the following:

    • To use an existing connection profile, select the profile from the list.
    • To create a connection profile, click Add New from the list and follow the steps in Creating and Testing a Connection Profile on the Development PC.

    5. Click OK to save the changes.

    Next Steps

    See Also

    Источник

    Linux Application Development

    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

    Contents

    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:

    Installing Development Packages

    To install the development packages on Ubuntu:

    1. Right-click your desktop and select Open Terminal.
    2. To upgrade the packages you have already installed , type sudo apt update && sudo apt upgrade && sudo apt dist-upgrade in the terminal.
    3. Type your user password and press Enter
    4. Wait until prompted to agree to the package upgrade operation. Type Y and press Enter
    5. Wait until the package upgrade operation is complete. It may take a few minutes to complete.
    6. 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.
    7. Type your user password and press Enter
    8. Wait until prompted to agree to the package installation operation. Type Y and press Enter
    9. Wait until the pacjage installation operation is complete. It may take a few minutes to complete.

    To install the development packages 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 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 LinuxPAServer21.0.tar.gz file in the following location: C:\Program Files (x86)\Embarcadero\Studio\21.0\PAServer\LinuxPAServer21.0.tar.gz 2. Unpack the LinuxPAServer21.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 LinuxPAServer21.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:

    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

    Источник

    Читайте также:  Alt linux openvpn client
Оцените статью
Adblock
detector