Referencing standard directories and applicationFolder
Posted: Wed Sep 23, 2020 12:03 am
Hi,
Coming from developing applications using Xcode on MacOSX.
On the Mac, there are a number of folders where stuff is supposed to go. Some of it is relative to the current user's home folder and some of it is relative to the application itself.
I seem to remember something similar with Windows, but it has been a decade or more since I was involved with a Windows app.
I thought defaultFolder might be a start, but its contents at application launch are dependent upon how the user launched the application - so useless for use as a constant known value.
I need to package a number of files with my application that on a Mac would be installed in the application package. Some are referenced read-only, others are the template for files that end up in the user's data folders.
Is there something in LiveCode that provides a cross platform access to the application folder - that is initialized when the application launches and is constant during that run of the application?
Is there a cross platform equivalent to the MacOSX "Documents" folder - the default for where a user's data goes - so where an application should start when suggesting to the user for where to save a data file?
Is there a cross platform equivalent to the MacOSX "Home" folder - which is the base folder for the user's files?
What is LiveCode's suggested practice for getting at such stuff?
Semi-related question: I am still trying to find where OS specific functionality is documented. For example: if I find that I am running on a Mac, then getting the "Application Folder" filepath. Or doing the equivalent on Windows or Linux.
Thanks,
Andrew
Coming from developing applications using Xcode on MacOSX.
On the Mac, there are a number of folders where stuff is supposed to go. Some of it is relative to the current user's home folder and some of it is relative to the application itself.
I seem to remember something similar with Windows, but it has been a decade or more since I was involved with a Windows app.
I thought defaultFolder might be a start, but its contents at application launch are dependent upon how the user launched the application - so useless for use as a constant known value.
I need to package a number of files with my application that on a Mac would be installed in the application package. Some are referenced read-only, others are the template for files that end up in the user's data folders.
Is there something in LiveCode that provides a cross platform access to the application folder - that is initialized when the application launches and is constant during that run of the application?
Is there a cross platform equivalent to the MacOSX "Documents" folder - the default for where a user's data goes - so where an application should start when suggesting to the user for where to save a data file?
Is there a cross platform equivalent to the MacOSX "Home" folder - which is the base folder for the user's files?
What is LiveCode's suggested practice for getting at such stuff?
Semi-related question: I am still trying to find where OS specific functionality is documented. For example: if I find that I am running on a Mac, then getting the "Application Folder" filepath. Or doing the equivalent on Windows or Linux.
Thanks,
Andrew