Page 1 of 1

Path to 'non-stack files' in the standalone application

Posted: Sun Sep 02, 2007 10:11 am
by andyh1234
Hi,

I have a SQlite database file I would like to include the the application distribution.

I can get Revolution to include the file OK using the 'Copy Files' section of the application builder, but does anyone know how I can find out the path to the file on a mac once its in the application package?

On windows it seems pretty simple as it is based on the the default folder, but on the mac its in the package file and there doesnt seem to be a simple command like defaultfolder to get the path.

Im probably missing something very obvious!

Thanks

Andy

Posted: Sun Sep 02, 2007 10:44 am
by andyh1234
Sorry, just typically I managed to find a solution shortly after posting this!

This code seems to work in windows, mac and in the ide to get the path to the data folder created in the same folder as the stack file, and then including the diary db file in the standalone.

Code: Select all

set the itemDelimiter to "/"
put (item 1 to -2 of the effective fileName of this stack) & "/data/diary.db" into gDiaryDBPath
get revOpenDatabase ("sqlite",gDiarydbPath,,,,,)