how to get the working dir of the program-bin? lazarus / 1-Linux ---------------------------------------------------------------------- Amnon82 · 2007-05-09 16:27 I coded an installer for a linux-distro. I'm using external sh-scripts to do additional stuff. Atm the paths to the sh-scripts are hardcoded. Now I've a situation where in two branches the path differ from eachother. Now I need a variable to do it proper: execute sh-script from /scripts/script.sh Code: [Select]Processandwait('sudo '+ProgramDIR+'/installer/14_reboot.sh '+TargetPart); ProgramDIR should be the working dir of the running program-bin. How can I do that? In delphi it is: Code: [Select]ProgramDIR:=ExtractFilePath(Application.Exename); ---------------------------------------------------------------------- theo · 2007-05-09 17:07 What's the Problem with ProgramDIR:=ExtractFilePath(Application.Exename); in Lazarus ? ---------------------------------------------------------------------- felipemdc · 2007-05-09 19:55 On unixes there is no application directory: http://wiki.lazarus.freepascal.org/Multiplatform_Programming_Guide#On_ Unix_there_is_no_.22application_directory.22 Even if sometimes it works it's not at all guaranteed or a correct way to do this. The best way to deploy applications on Linux is using the default package managers. Tutorials here: http://wiki.lazarus.freepascal.org/Deploying_Your_Application ---------------------------------------------------------------------- eric · 2007-05-10 09:23 Good heavens! I didn't know that. I've been using Application.ExeName on Linux for years and never had a problem with it. Eric