19

So in VCL, one would use the following line of code to retrieve the applications path:

ExtractFilePath(Application.ExeName)

I tried the same thing Firemokey and I noticed that ExeName was no longer available. What code can I use as an alternative to this?

Sir Rufo
  • 18,395
  • 2
  • 39
  • 73
ple103
  • 2,080
  • 6
  • 35
  • 50

3 Answers3

32

Try using ParamStr(0) instead of Application.ExeName.

AvgustinTomsic
  • 1,809
  • 16
  • 22
5

I'm using

showmessage(System.SysUtils.GetCurrentDir);

and works like a charm :)

Adam T.
  • 75
  • 1
  • 4
0

Seems Android is an exception, checkout this discussion: https://titanwolf.org/Network/Articles/Article?AID=2e4a7d6e-2e78-4740-907c-a98dd8245837 and related source code: https://gist.github.com/freeonterminate/2f7b2e29e40fa30ed3c4

George Birbilis
  • 2,782
  • 2
  • 33
  • 35