Recent

Author Topic: Hiding terminal window on macos lazarus app startup.  (Read 1694 times)

djarkasih

  • Newbie
  • Posts: 5
Hiding terminal window on macos lazarus app startup.
« on: January 17, 2024, 05:08:41 am »
Hi,

I'm using Lazarus 3.0 (rev ) FPC 3.2.2 x86_64-darwin-cocoa and running on MacBook Pro M2 2022 14.2.1 (23C71) Sonoma 14.2.1 (23C71).

I've already disable debugging and enable Win32 Gui Application config & target on Project option, but the shell window is still displaying at the app startup.

Is there a way to prevent the shell window from displaying ?

Kind regards,
Ahmad R. Djarkasih

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Hiding terminal window on macos lazarus app startup.
« Reply #1 on: January 17, 2024, 03:00:39 pm »
Did you click the "Create Application Bundle" button in the "Project" -> "Project Options" window?
(not sure if that is still needed)


Sounds like you're starting the executable and not the .app bundle?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9986
  • Debugger - SynEdit - and more
    • wiki
Re: Hiding terminal window on macos lazarus app startup.
« Reply #2 on: January 17, 2024, 04:01:25 pm »
I don't know about "run without debugger" ...

But, if your app does not itself open a console, and does not have anything that makes the OS do so...

In menu: Tools > Options >> Debugger Backend
There is property grid, where you can check/uncheck if the debugger should open a console for your app.
At least that used to work... Not sure, if Apple changed something (again).

djarkasih

  • Newbie
  • Posts: 5
Re: Hiding terminal window on macos lazarus app startup.
« Reply #3 on: January 18, 2024, 06:51:57 am »
Thx for the reply guys.

Hansaplast : I click the button, but nothing happen.
Martin_fr: In my IDE there is no Options menu under Tools menu. In project option in Backend Converter or in other part of Debugger leaf, there is no checkbox to control wheter or not debugger should open the console for the app.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Hiding terminal window on macos lazarus app startup.
« Reply #4 on: January 18, 2024, 10:16:18 am »
Clicking the button should create a .app bundle with the name of your project, in your project folder.
Something like "project1.app" (if your project is called project1). By default this ".app" extension is not shown in Finder unless you've set Finder to show all extensions (in Finder -> Settings -> Advanced -? check "Show all filename extensions").
You can right click it in Finder and the menu should show "Show Package Contents" which reveals the directory structure of the .app bundle.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9986
  • Debugger - SynEdit - and more
    • wiki
Re: Hiding terminal window on macos lazarus app startup.
« Reply #5 on: January 18, 2024, 11:50:23 am »
Quote
In my IDE there is no Options menu under Tools menu.

Ouch, of course. You are on Mac. Apple decided that it should be "Preferences".

So somewhere in the preferences is a menu that opens all the "Options". And in the options is that setting.
Mind, you can change the debugger for each project, in the project options. If you have done so, then you need to change the setting there.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Hiding terminal window on macos lazarus app startup.
« Reply #6 on: January 18, 2024, 02:29:31 pm »
Quote
In my IDE there is no Options menu under Tools menu.

Ouch, of course. You are on Mac. Apple decided that it should be "Preferences".

So somewhere in the preferences is a menu that opens all the "Options". And in the options is that setting.
Mind, you can change the debugger for each project, in the project options. If you have done so, then you need to change the setting there.


Considering these kind of situations (and possibly documentation in the Wiki and such), maybe we should bring back the "Options" menu item under the tools menu for macOS (and keep "Settings" under the application menu as well). The menu has changed quite a while ago, but working on Mac/Linux/Windows I get quite often confused trying to find this menu item as well.
Not sure what others think of this idea?

djarkasih

  • Newbie
  • Posts: 5
Re: Hiding terminal window on macos lazarus app startup.
« Reply #7 on: January 18, 2024, 05:05:58 pm »

Clicking the button should create a .app bundle with the name of your project, in your project folder.
Something like "project1.app" (if your project is called project1). By default this ".app" extension is not shown in Finder unless you've set Finder to show all extensions (in Finder -> Settings -> Advanced -? check "Show all filename extensions").
You can right click it in Finder and the menu should show "Show Package Contents" which reveals the directory structure of the .app bundle.

Yes, double clicking the .app lauch the app without displaying the shell window. Thanks Hansaplast.


djarkasih

  • Newbie
  • Posts: 5
Re: Hiding terminal window on macos lazarus app startup.
« Reply #8 on: January 18, 2024, 05:19:15 pm »
Quote
In my IDE there is no Options menu under Tools menu.

Ouch, of course. You are on Mac. Apple decided that it should be "Preferences".

So somewhere in the preferences is a menu that opens all the "Options". And in the options is that setting.
Mind, you can change the debugger for each project, in the project options. If you have done so, then you need to change the setting there.

I just found it under Lazarus -> Settings. Thanks Martin.


 

TinyPortal © 2005-2018