Hi,
I'm using a mac and have written an app that calls a shell script - well I think thats what it is called. This shell script is a small file that displays a unix file icon.
I have put this shell script in the Copy Files section of the standalone settings. Next I added a button with the following code :
on mouseUp pMouseButton
answer folder specialfolderpath("resources")
end mouseUp
I build and run my app and press the button. I expected to see a folder and shell script but instead I see my desktop folder. obviously I have misunderstood so please advise me on where to store my unix code for use in my standalone.
Simon Knight wrote: Thu Oct 31, 2019 5:07 pm
Ah! & doh!
The answer folder can not display or open the resources folder. It displays a path and then shows the last real folder that was viewed.
Not really, but here -> specialfolderpath("resources") is cosidered the (missing) PROMPT, check the top of the dialog.
And then it just shows the last used folder.
I'm still wearing the pointy hat and standing in the corner : the file in question is an executable so I now know that this means that the file is not in the resources folder but it gets stored in the engine folder. (now I can't get the image of a large black steam engine out of my mind....)
It would be nice if the standalone settings pane listed the path to the files - I mean it must know.
specialFolderPath("resources") is still relevant to standalones. It is most likely what you need.
"engine" is much less relevant to how it used to be - it is specific to the relative path of the actual LC engine according to whether a standalone or the IDE. Essentially they historically point to the same place but "resources" will find your resource files wherever they may be according to what you have included in the copy files pane of the standalone builder settings.
No I'm afraid that is not what happens at this end. The script was not found when the standalone was built and looked for the resources folder. However, it does work when the engine folder is used.
"engine": The folder containing the LiveCode engine and the executable files copied in the standalone application
"resources": In development mode, the current stack's folder. In a standalone, the resources folder where files or folders specified in the Standalone Builder are located.
I suspect that engine is the location because the file in question is an executable.