Path to a Copied File in Mac Standalone
Posted: Tue May 13, 2014 7:38 am
I am developing a stack that is a GUI for a command-line tool, for MacOS X. I want to include the command-line tool itself with my standalone build.
I have added the command-line tool file in the "Copy Files" pane of the Standalone Application Settings dialog. When I build the standalone, it is indeed being copied into the bundle - it puts it right the same sub-directory as the main executable for the app. The questions that I have are:
1) How can I find the complete file path to the included file? I need to reference is on several shell() calls in my scripts![/1]
2) When I'm writing my scripts in the LiveCode IDE, I will have to use a certain path in shell() for the command-line tool. Once that tool is bundled in the standalone, the path will change. How will shell() know whether it's running from the IDE, or from a standalone - and adjust its path accordingly?
Or, is there an easier way to do this that I'm missing?...
Any guidance would be much appreciated.
I have added the command-line tool file in the "Copy Files" pane of the Standalone Application Settings dialog. When I build the standalone, it is indeed being copied into the bundle - it puts it right the same sub-directory as the main executable for the app. The questions that I have are:
1) How can I find the complete file path to the included file? I need to reference is on several shell() calls in my scripts![/1]
2) When I'm writing my scripts in the LiveCode IDE, I will have to use a certain path in shell() for the command-line tool. Once that tool is bundled in the standalone, the path will change. How will shell() know whether it's running from the IDE, or from a standalone - and adjust its path accordingly?
Or, is there an easier way to do this that I'm missing?...
Any guidance would be much appreciated.