Compiling the executable into the .app bundle? lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- Michael Collier · 2012-01-17 05:54 Hi, Is it possible output the project executable into the project.app bundle/folder directly? At the moment I get: a. Project1.app/Contents/MacOS/*shortcut to Project1* b. Project1 and would prefer just a. ProjectFolder/Project1.app/Contents/MacOS/Project1 ..at the moment I drag and drop it there after compiling I'm aware that the project options has an output directory option but don't think that would be right for this though? Ideally I would be able to compile the project on my Mac into the .app bundle, but the same project would compile with Windows into the "regular" project directory. TIA ---------------------------------------------------------------------- Shebuka · 2012-01-17 09:53 AFAIK it's not Debug friendly to Output the executable into you Bundle. I'v adopted the solution to have a separate 'Release' bundle in another folder and with a bash script i copy the executable inside it when i need to go in release. ---------------------------------------------------------------------- kamischi · 2012-01-18 08:13 I agree with the original poster that the setup with a link and an external binary looks surprising or even akward. My solution is Makefile, which builds the release .app bundle with the binary inside it. In many cases I need this anyway, because other files in the bundle (language and other files with resources, icons, a modified info.plist, libraries and so on) need to be updated as well. Finally, I also add an entry in the Makefile to build a diskimage. In addition, the Makefile is used to deal with platform specific details. Doing all of this through a GUI would be nice, but it is specific for Mac OS X and i understand that it hasn't been implemented in Lazarus, yet. Maybe someone shows up to do it (I don't have neither means nor enough time), but until then, i'll edit my Makefile. MiSchi ---------------------------------------------------------------------- BigChimp · 2012-01-18 08:22 Mischi, might be a good to post a sample Makefile (here or on the OSX platform part of the wiki) if somebody wants to step up and try to implement this in Lazarus, or even for other people to use as-is... Packaging it up as a disk image sounds like a nice way to distribute your software on OSX... Thanks. ---------------------------------------------------------------------- kamischi · 2012-01-18 11:00 Quote from: BigChimp on January 18, 2012, 09:22:45 amMischi, might be a good to post a sample Makefile (here or on the OSX platform part of the wiki) if somebody wants to step up and try to implement this in Lazarus, or even for other people to use as-is... Packaging it up as a disk image sounds like a nice way to distribute your software on OSX... Two examples for Makefiles. The first one (heatwizard) is simpler, then second one (ultrastardx) is more complex and is the source for generating a Makefile with configure. The second one also uses a number of C-libraries from fink. I am sure there are ways, to make these Makefiles nicer, more elegant :-) http://heatwizard.svn.sourceforge.net/viewvc/heatwizard/trunk/Makefile http://ultrastardx.svn.sourceforge.net/viewvc/ultrastardx/trunk/Makefi le.in (The Makefile.in alone is not enough for building the program. You also need autogen.sh, the configure scripts and Makefiles down in the source file tree.) The relevant, most important entries are: macosx-app:   Creates the bundle. macosx-standalone-app: (2nd example only)   Creates the bundle and adds the libraries from fink to the .app bundle. macosx-dmg:   Creates the diskimage for distribution Remark: Besides Makefiles, there are also other tools, like cmake. Maybe, fpmake can also do this. MiSchi