Book Image

Expert Delphi

By : Paweł Głowacki
Book Image

Expert Delphi

By: Paweł Głowacki

Overview of this book

Delphi is the most powerful Object Pascal IDE and component library for cross-platform native app development. It enables building natively compiled, blazingly fast apps for all major platforms including Android, iOS, Windows, Mac, and Linux. If you want to build server-side applications, create web services, and have clear GUIs for your project, then this book is for you. The book begins with a basic primer on Delphi helping you get accustomed to the IDE and the Object Pascal language and will then quickly move on to advanced-level concepts. Through this book, we’ll help you understand the architecture of applications and will teach you the important concepts of the FireMonkey library, show you how to build server-side services, and enable you to interact with the Internet of Things. Towards the end, you will learn to integrate your app with various web services and deploy them. By the end of the book, you will be able to build powerful, cross-platform, native apps for iOS and Android with a single code base.
Table of Contents (14 chapters)

Delphi compilers and toolchains

Delphi IDE contains different compilers for generating apps for different platforms. The IDE manages all necessary source code files needed for building an app. It also takes care of passing correct parameters to right compilers and manages their output. In the IDE, it is possible to build, deploy, and run an app directly on the mobile device connected with a USB cable by just pressing the Run button. Obviously, it is also possible to generate an executable application without running it. Sometimes it is very handy to be able to step into an application as it is executed in the host operating system. This process is called debugging. In the Delphi IDE, you can run your program with or without debugging.

There are in total eight different Delphi compilers installed with the Delphi 10.2 version:

Delphi compiler

Executable format

dcccaarm.exe

Android

dcciosarm.exe

32-bit iOS

dcciosarm64.exe

64-bit iOS

dcc32.exe

32-bit Windows

dcc64.exe

64-bit Windows

dccosx.exe

32-bit Mac OS X

dccios32.exe

iOS Simulator

dcclinux64.exe

64-bit Linux

These compilers are typically installed into the C:\Program Files (x86)\Embarcadero\Studio\19.0\bin folder. The bin folder of Delphi has been added to the Windows path by the installer, so you can try and execute them directly.When executed with no parameters, Delphi compilers will just display their version numbers and possible command-line switches, as shown in the following screenshot:

Delphi Android compiler invoked from Command Prompt

Take a look at the following screenshot:

Delphi iOS compiler invoked from Command Prompt

In the IDE, we do not need to invoke command-line compilers directly. The IDE is doing this for us when we choose to either run, build, or compile our project. It will also take care of outputting the resulting binary files into a separate folder per every supported platform and build configuration. When we build, deploy, and run our apps, we can see in the bottom part a log of all commands being executed, parameters passed to them, and their output.