How does Firemonkey(Delphi) compile for Android?

Asked

Viewed 1,916 times

7

I did some research but did not get good results, the project folder looks like a common Delphi or C project++!

  • VCL - Delphi
  • FMX - Firemonkey

Observe:

inserir a descrição da imagem aqui

With the exception of the folder Android, where it contains some sub-folders, it is possible to find the already compiled APK, files .XLM, and several files with the extension .SO (I have no idea what it is).

Program for Android or Iphone in this IDE is the same thing as programming for Delphi!

So I ask, how does this IDE compile for Android? It would be pure Java Class Abstraction?

EDIT

The possibility to develop for Android, was implemented in XE5 version! To develop Android with Radstudio we need the following tools:

Java Development Kit (JDK)

Android Software Development Kit (SDK)

Android Native Development Kit (NDK)

  • Using a compiler for each platform? I think it’s unclear exactly what you asked...

  • He uses NDK, but as I do not know, but make sure there is an intermediate step in C or Java, because Embarcadero promised native code for all platforms.

  • @Darkhyudra Yes, we can already develop truly native! I’m going to explore by ae on the NDK and see what happens!

  • @Darkhyudra has no intermediate step... It’s a different compiler. That’s all.

  • @Embarbosa Fonte? Are you saying that they have an altered NDK? Because NDK is very clear saying with which languages it can work. And if Embarcadero had made a miraculous code that goes straight from Iphi to dpk, why is NDK necessary in the compilation? I’m no Deplhi master, but I can’t see how dpk generation can happen without an intermediate step. It is the same thing with Haxe, hashish is compiled for C that then the C code is compiled by NDK to generate dpk.

  • @Darkhyudra Source? Where does NDK say which languages it can work with and which cannot be a compiled language other than C or Java?

Show 1 more comment

1 answer

2


As far as you can understand, basically this is it, it abstracts the classes and compiles the Apk (not so simple).


Translated from a note:

Delphi developers are widely protected against the complexity of NDK, as the code using the high level of abstraction provided by the Runtime Library (RTL) and the Firemonkey framework. If that’s all you need I should think everything will be fine. If you have a Java library you need to call from the Delphi Android application, you need to use JNI (Java Native Interface), which is not much fun.


Another point to note is that Firemonkey emulates visual controls such as buttons, lists etc. Users may not notice, but the components behave exactly like native controls, but this is complicated to do perfectly.

The promise of Embarcadero is that we would develop natively in relation to the code, but not in relation to the controls you use.

Here we can find the NDK documentation

VCL is incompatible with Firemonkey

Firemonkey (FMX) and Visual Component Library (VCL) are not compatible and should not be used together in the same module. This means that a module must be exclusively one or the other, either Firemonkey or VCL. Incompatibility is caused by framework differences between Firemonkey (FMX) and VCL.

However, you can:

Use a Firemonkey library with a VCL application, or use a VCL library with a Firemonkey application, as described in shared libraries for Mac OS X. Read the general guidelines for converting a VCL application to Firemonkey to Converting from VCL to Firemonkey. Read a general procedure for migrating a VCL application to Firemonkey when migrating VCL applications to multiple devices. Get a program VCL-to-Firemonkey converter in http://www.midaconverter.com/.

Three major libraries are provided by RAD Studio:

Firemonkey (FMX) is a library of visual components with sophisticated graphics, animation, and style capabilities. You can create Firemonkey applications for any supported target platform.

Visual Component Library (VCL) is a hierarchy of visual component objects that are supported on Windows only (in Win32 and Win64 applications).

Run-Time Library (RTL) is a process library shared by Delphi and C++ for any supported target platform. RTL is composed of system members, System.Sysutils, System.Ioutils and System.Class units.

You can freely use the RTL in a Firemonkey application, but you cannot directly use the VCL in a Firemonkey application module.

Source

Browser other questions tagged

You are not signed in. Login or sign up in order to post.