Recent

Author Topic: Compiling GUI EXE  (Read 750 times)

dajashby

  • 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?


marcos-ebm

  • New Member
  • *
  • Posts: 47
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
Lazarus 3.0 / LAMW 0.8.6.4 - Gradle 8.5 - Jdk 21 - Ndk 21e - Windows 11

dajashby

  • 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.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1229
    • 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; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

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

 

TinyPortal © 2005-2018