Distribute application with database lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- acolburn · 2016-01-14 06:10 Forgive my ignorance; I am totally new to all of this ... I wrote a small app on Windows 10, copied all the files to a Mac, opened and ran the app in OS X (Yosemite). Everything is working pretty much OK from within the IDE. The app uses a simple SQLite3 database which lives in the same folder as the executable. My question is how do I turn this into a distributable Mac app? Info I found leads me to think it's just Project->Project Options->Application->Create App Bundle, but double clicking the resulting Application folder gives me an error about how the SQLite3Connection component can't connect to the database file. I tried moving the db file to various places within the Application folder, but that doesn't make a difference. So what am I supposed to be doing? Thanks! p.s. FPC version 3.1.1. ---------------------------------------------------------------------- balazsszekely · 2016-01-14 06:33 After you finish developing the application: 1. Backup your project folder 2. Copy the executable(YourApp) and the database(YourDB) inside the bundle: "YourApp.app/Contents/MacOS/" and replace YourApp(link) wich is actually a symlink and points to the project folder's executable. Use the following path for database: DbPath := ParamStr(0) + 'YourDB'. It will give you the correct result no matter if your project is under development(executable and db in project folder) or it's released version(executable and db inside the bundle). ---------------------------------------------------------------------- acolburn · 2016-01-14 17:40 Thanks, GetMem. I really appreciate you taking the time to respond. ... I think I'm still missing something. I opened my application file (right click, Show Package Contents) and navigated to the /Contents/MacOS folder. Into this I copied  the executable (file whose icon is black square with 'exec' in green text) and my db file. Regardless of whether I'd changed the DatabasePath string or not, I'm still getting the same error message if I double click on the resulting application file (which, in my case, looks like it's just the application name ... no .app suffix, etc.). It's humbling to be such a newbie! thanks again, al ---------------------------------------------------------------------- zeljko · 2016-01-14 21:13 you should dbl click on your YourBundle.app icon, not onto application inside YourBundle.app/Contents/MacOS