[fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

Frank Peelo f26p at eircom.net
Fri Feb 6 17:05:55 CET 2009


Ken G. Brown wrote:
> Basically from point of sale system running on Macintosh, I needed
> to pick up a file with a known name located in the same folder as
> the application bundle, and process it for printing in a custom
> format. This way it does not need the file path hard coded in case
> it is different on the different computers.

But, does what Jonas said not apply here? Is the Mac a multi-user 
machine now? Even Windows has different users, hence c:\Documents and 
Settings\<username>

If the Mac has different users, maybe the file to be printed/processed 
should go in the user's home directory? If the machine is to be used as 
a single POS terminal, then a standard location for the file might be 
appropriate (does the Mac have an equivalent to the Filesystem Hierarchy 
Standard in Linux?)

I don't know the Mac, or your app, so this is probably all wrong, or 
inappropriate for you -- but I thought it worth mentioning because when 
I started using Linux it was not at all obvious to me that what Jonas 
described (the Unixy way of doing things) could work instead of the 
Windows way of putting files in the same directory as the .exe file. 
But, surprisingly, it does work quite well :)

Frank




More information about the fpc-pascal mailing list