Try using ParamStr(0) instead of Application.ExeName.
Getting application path in Firemonkey
-
18-03-2022 - |
Question
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?
Solution
OTHER TIPS
I'm using
showmessage(System.SysUtils.GetCurrentDir);
and works like a charm :)
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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow