External files in Standalones

William Prothero prothero at earthednet.org
Wed Nov 26 20:56:00 EST 2014


I think I’ve got it. I check whether the app is a standalone using the “environment” property, then adjusting file paths accordingly.
Bill

On Nov 26, 2014, at 3:03 PM, William Prothero <prothero at earthednet.org> wrote:

> Folks:
> I’m building an app that reads a number of external data files. I’ve been trying to create a standalone and have a number of problems with the external files.
> 
> In my development area, I have a folder:
> 
> App folder which contains the .livecode app and data files. It looks like this:
> 
> myApp      
>   myApp.livecode
>   files
>   images and icons
> 
> When I build the standAlone, I get a package with:
> 
> Contents
>   info.plist
>   MacOS
>      Externals
>      files
>          data
>              dataFolder1    —This is empty of files
>              dataFolder2    —This is empty of files
>              dataFolder3    —This is empty of files 
>         moreData          —empty, no data
>         etc    
>      images and icons    —nothing in this folder
>      myApp
>      PkgInfo
>   Resources
>       _MacOS    —This has all of my data files, with correct contents
>      language Folders  —I don’t need these
> 
> My question is:
> Should I build the path to these files starting with “the effective path of this stack”? It would be different, depending on whether I had a standalone. Is there a specialFolderPath function that will give me the path to the original data?
> 
> Alternatively, I could create these folders in my development environment and then there would only be a single set of paths.
> 
> What are the “Best practices” regarding this? Also, do I need to include all these superfluous, empty language folders?
> 
> Best,
> Bill
> 
> William A. Prothero
> http://es.earthednet.org/
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list