Some questions on howto distribute on OSX lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- MISV · 2015-07-24 23:33 When I compile in debug mode with lazarus on OSX I get - myexecutable - myexecutable.app inside "myexecutable.app/Contents/MacOS/" is a "shortcut" to the generated executable Question #1: Is it correctly understood hat in release mode builds, the actual execuable will be here: "myexecutable.app/Contents/MacOS/" Question #2: If I am correct about question *1*: Can I simply distribute an .app file for download on my website? if I am incorrect about question *1*: Should i create a .dmg file with file layout like this: - myexecutable - myexecutable.app Question #3: Do I have read/write or only read access to files in .app directory? Or does I depend on signing? Right now I have code that moves all files ino user-directory library "application support" Question #4: To ease disribution for me (as I have maybe 100+ files) would it make sense / is it possible: a) .zip my files and unpackage them inside the .app/conponents folder somehow runtime? b) Or can I get Lazarus to include them when I make release builds? I am sorry for these noob questions. I am no even looking into plist files yet, I am just trying to understand the basic structure/disribution model ---------------------------------------------------------------------- MISV · 2015-07-25 00:21 http://wiki.freepascal.org/Application_Bundle It would appear the solution is to use a script... so when you are ready to release, you roll it all into the .app file. I will try that and report back. I can also see hat if I want to avoid DMG files, I can distribute thee .app folder as a compress .zip file http://forum.lazarus.freepascal.org/index.php?topic=16516.0 (Although in the long run, one should probably use .dmg) ---------------------------------------------------------------------- kamischi · 2015-07-25 08:01 Quote from: MISV on July 25, 2015, 01:33:57 amQuestion #1: Is it correctly understood hat in release mode builds, the actual execuable will be here: "myexecutable.app/Contents/MacOS/" yes. Correct. Quote from: MISV on July 25, 2015, 01:33:57 amQuestion #2: If I am correct about question *1*: Can I simply distribute an .app file for download on my website? Better not. Quote from: MISV on July 25, 2015, 01:33:57 amif I am incorrect about question *1*: Should i create a .dmg file with file layout like this: - myexecutable - myexecutable.app Nearly. Only myexecutable.app. An additional bonus is an alias to the folder /Applications. Then the user can simply drag the applications to this symbol and it will be installed in the usual place. Quote from: MISV on July 25, 2015, 01:33:57 amQuestion #3: Do I have read/write or only read access to files in .app directory? Or does I depend on signing?do you mean during building or execution? Quote from: MISV on July 25, 2015, 01:33:57 amRight now I have code that moves all files ino user-directory library "application support" Readonly "resource" files would be best in the application folder. Files for writing can go into Library/Application Support/myexecutable or more specific ones, like Library/Preferences, Library/Logs, Library/Caches, .... Also note, that there are 2 different kinds of Library folders. The general one for all users in the top level folder /Library and the user specific ones in ~/Library. I assume, that writing to the first one requires admin rights. Quote from: MISV on July 25, 2015, 01:33:57 amQuestion #4: To ease disribution for me (as I have maybe 100+ files) would it make sense / is it possible: a) .zip my files and unpackage them inside the .app/conponents folder somehow runtime?maybe possibly, but you have to code it by yourself. Isn't a disk image with compression doing the thing? Quote from: MISV on July 25, 2015, 01:33:57 amb) Or can I get Lazarus to include them when I make release builds? I do not think so, but i might be wrong. I do such things for my little demo program Heatwizard with a Makefile script Link: https://sourceforge.net/p/heatwizard/code-0/?source=navbar), but unfortunately Sourceforge svn repositories are still off-line.