Select your language

Let us analyze your application - now have a free initial consultation.

Are you looking for a company to support or support your Delphi project?
Click here!

Jetzt Anfrage einreichenTelefon ERPwerk Button.fw

Set up RAD Studio to create and deploy Linux programs

Set up RAD Studio to create and deploy Linux programs

Today we continue our journey with Delphi on a Linux box. We’re using QEMU as the virtual machine manager. We also need to use PA Server, which is a Platform Assistant Server. Make sure you have enabled Linux support via the setup inside RAD Server / RAD Studio.

Hello everyone—this is the first video of the new year, and today we’re continuing our Delphi journey on a Linux box. We’re using QEMU as the virtual machine manager, and what we’re going to do is create a Hello World program. That’s the simplest starting point to make sure everything is configured correctly, and so on.

So how did we get to this point? Well, we need to go back a little, and I’ll tell you about this journey. Now, let’s get started. The first thing we did—what I had to do—was install Samba, and after installing it, create a public share to act as a bridge between my Linux box and Windows.

And where is that? It’s going to be this folder here. You’ll see there are some other files in here, and we’ll come back to those in a moment. But with Samba installed, that’s only part of the picture. The next point we’ll address is that we also need to be able to, say, copy files—and the reason I had to do that (at least as I understand it) is that we also need to use PA Server, which is a Platform Assistant Server provided by Embarcadero.

So there’s also a web page. Bear in mind, I didn’t actually read that page. Also, as I said, I worked from first principles when I did all of this, which mostly worked—but if you want to do it a bit more efficiently than I did, you should take a look at that specific page. I’ll put it in the links below, because it will tell you how to set up or configure your environment to build for Linux as a target.

But as I said, we need to install PA Server—or get PA Server onto our Linux machine and run it, as far as I’m concerned. And to do that, we had to copy it from here. As part of your Embarcadero installation under Program Files (x86), there’s a “Linux PA Server 3700”—it’s a tar file and it’s gzip-compressed. So we copied that over here, and that’s this little guy right here.

And then you can unpack it and you get this. Then we run the PA Server program, and you can see it running down here. It listens on port 64211. I think you can change that, but it doesn’t matter right now. But once you’ve got that set up, you’re halfway there.

The other point you should note is to check or make sure you’ve set up Linux support in RAD Server / RAD Studio. Sorry—that was something I forgot in my first Delphi installation. I had only set it up for Windows support.

So it was a bit of a surprise when it didn’t work. I don’t want to say “back to the drawing board,” because all you need to do is go into “Manage Features,” and once we do that, we just enable this Linux option here. Basically, that feature then gets added to our environment, and depending on your connection and how it wants to install, and so on. Because I used the web installer the whole time, it’s a good opportunity to get up, grab a cup of coffee, and come back to see if it’s finished.

So I think at this point I need to restart RAD Studio. That’s fine. And then I think we’re ready, because at that point we can actually add Linux as a target. And that was the part I was a little—I don’t want to say unprepared—because I knew you can’t just compile straight out of the box, and what exactly gets installed as part of this Linux support?

I don’t know. But one of the things you have to do the first time you go to the Linux target is that it wants to create a profile—and that’s also on the web page—and you basically enter the IP address of the host, the port number (where PA Server lives), and there’s also an optional password field you can enter.

Once that’s done, the following will happen: it will start what I’ll call “processing files.” What it’s actually doing is copying files from my Linux environment into my Windows environment so a program can be built. Now, the dialog—I don’t want to say it was badly worded—but I think it just told me it was processing items, 1 of 13, 10 of 13, and so on.

It was copying, as I said, header files and other libraries from my Linux machine into the Windows environment. And again, this is another opportunity to get up, grab a cup of coffee, and come back—depending on how old your machine is and how much memory it has. I checked with, I think, Gemini, and it said it could take up to 20 minutes—but how long is a piece of string, really?

And again for me—yes, I’m on vacation—so I can get up, do something else, come back, and it’s done. So honestly, I didn’t care. It’s a one-time setup and then you ignore it. So I think the next time—or you can actually run an update—it will look for new files and copy them over.

But that’s the one thing we have to watch out for. After that, we can build our programs. So—oh yes, and I’ve got a question mark here as to whether it remembers how far it got. I’ll just put a question mark there.

Also remember that my programs, you know, go to sleep if they’re not used. But that’s a whole other topic. What happened was that the first time it did this synchronization process, it was about 80% done and it tried to build the program, and it said the active SDK was missing something, whatever. And I looked into it a bit and it talked about how maybe the Windows SDK wasn’t installed properly.

Long story short—none of that. It was actually that it hadn’t finished copying the files. How do I know that? Because the second time I went into that function, it said that one file or another was a duplicate. Do you want to copy it again?

I said “no to all,” and then it kind of jumped straight to where it was—around 10 of 13. I went away, came back, and guess what? We were able to build a program, which I think is a brilliant start compared to where we were a few days ago. So now we’re able to build our program.

So we basically add our target, like I said. And now we’re just going to do a clean here. As I said, this is just a simple Hello World program. So that’s all gone. And now, if we want to build this program here, we’ll do a Release build—just because.

And it compiles, links, and it’s done. Honestly, it happened faster here—sometimes it’s slower. I think it depends on what’s going on. I’d like to get rid of some of this other stuff in Windows that shows my temperature. But it is what it is.

Now if you look over here, I hope that’s visible for you. Let’s see if we can make that a bit larger, right? Okay—now when we run the program, it will deploy, and you can actually see what happens. Okay—wow.

It basically copies it into a—what they call—hopefully it will tell me soon. And… maybe not. Question mark for help.

Okay, here we go. So basically it copies files into a scratch directory in order to run your program, and you can see the results there. Of course, there’s another way you can do it. For example, we can go in here and show it in Explorer.

And here is basically—no, let’s not go there. Let’s go back there. Maybe we should go to the Release folder, show that in Explorer. And here you have the Hello World program and your object file there.

Let’s just copy it to my public share here. This public share is a drive we mapped in Windows to that public share on my Linux machine. We’ll overwrite it, replace the file in the destination, and what we’ll do next is open a second console window, drag it over here, make it a bit bigger, and…

So you can see the Hello World program—and Hello World from Delphi. So there we have it. We can now build a program for a Linux target from within Windows, and we can also run it on Linux. So, a happy 2026 to everyone.

So look—maybe with a program like this you’d question my motives for using Delphi for it. But if you can get something like a Hello World program running, then let’s just say the world is your oyster. Because whatever you want to build with Delphi, you now have the ability to target Linux as your platform for the resulting executable. Whether that’s a service or a console program or something else, I don’t know.

But yes, that’s it for this particular video. If you have questions about the setup—something you want more detail on—let me know in the comments. I look forward to hearing from you. Here’s to a happy 2026. And let’s see what we can do this year in both Free Pascal and Delphi.

source: 

Office

Delphi Entwickler Professional development, slim solutions for your project

ERPwerk GmbH & Co. KG
Im Technologiepark 4
26129 Oldenburg

Phone: +49 441 777 729
E-Mail: 

Sozial Media

facebook Logo

Safety

Haftplicht exali

Select your language