Author Topic: Compiling GUI EXE  (Read 511 times)


  • New member
  • *
  • Posts: 9
Compiling GUI EXE
« on: July 06, 2023, 04:30:29 am »
I'm an extreme beginner at programming on the Mac. I have started building an app and I want to run it outside the Lazarus IDE. I found the Create Application Bundle button in Project Options, and when I clicked on it I got a dialog telling me that I had successfully created the bundle, but I have been unable to find it with a Spotlight search. Where is it put?


  • Newbie
  • Posts: 4
Re: Compiling GUI EXE
« Reply #1 on: July 06, 2023, 05:12:45 am »
you save the projet in a folder, the executable file will be in it


  • New member
  • *
  • Posts: 9
Re: Compiling GUI EXE
« Reply #2 on: July 06, 2023, 05:25:41 am »
The Exe file is in the folder certainly, but where is the application bundle? The exe file just tries to run in a terminal window.


  • Hero Member
  • *****
  • Posts: 1227
    • formatio reticularis
Re: Compiling GUI EXE
« Reply #3 on: July 06, 2023, 08:22:09 am »
The bundle is a program file with the name of the app. This file is what is going to be your app. You can view its contents by right-clicking (or CTRL-clicking) and opening the package content. In the subfolder "Contents/MacOS" you find an alias to your executable. Before shipping the final version of your app you should replace this alias with the executable itself.

You should start the app by double-clicking the bundle rather than the executable (which lacks the resources of the bundle and therefore needs a shell environment).
function GetRandomNumber: integer; //
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux


TinyPortal © 2005-2018