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

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
andyh1234
Posts: 442
Joined: Mon Aug 13, 2007 4:44 pm
Location: Eccles UK
Contact:

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

Post by andyh1234 » Sun Sep 02, 2007 10:11 am

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

andyh1234
Posts: 442
Joined: Mon Aug 13, 2007 4:44 pm
Location: Eccles UK
Contact:

Post by andyh1234 » Sun Sep 02, 2007 10:44 am

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,,,,,)

Post Reply

Return to “Databases”