How to disable console on App execution (macOS)

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Biggy
In need of some credit
In need of some credit
Posts: 3
Joined: Tue Sep 11, 2018 6:23 pm

How to disable console on App execution (macOS)

Post by Biggy » Thu Jun 11, 2020 12:05 pm

Hi all and sorry if I posted on wrong section !!

I'm on macOS (Catalina) and wxWidgets version 3.0.5 - I've installed wxWidgets with brew also wxFormBuilder. I created an example app and compiled with this command:

Code: Select all

g++ noname.cpp `wx-config --cxxflags --libs` -o myTestApp
it build fine and run but my "problem" is when I run the app it execute the console too.
How do I disable the console ?

Thank you in advance !

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4438
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to disable console on App execution (macOS)

Post by ONEEYEMAN » Thu Jun 11, 2020 3:15 pm

Hi,
Can you build and run the minimal sample provided with the wxWidgets?
Also, since you are on OSX - you should create an App Bundle. When you build the minimal sample - last couple of commands will show you how to do that.

Thank you.

Biggy
In need of some credit
In need of some credit
Posts: 3
Joined: Tue Sep 11, 2018 6:23 pm

Re: How to disable console on App execution (macOS)

Post by Biggy » Thu Jun 11, 2020 3:36 pm

Hi, and thank you for reply. I'm not using Xcode to build my testapp. I followed these steps to create the testapp.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4438
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to disable console on App execution (macOS)

Post by ONEEYEMAN » Thu Jun 11, 2020 3:40 pm

Hi,
You shouldn't rely on any 3rd party resources.
Try to build the minimal sample and check the last couple of commands to create the minimal sample.

I don't know if C::B is capable to create a App Bundle on OSX - you might try to install it and give it a shot.

Thank you.

BobsTheDude
Earned a small fee
Earned a small fee
Posts: 23
Joined: Wed Mar 06, 2019 10:33 pm

Re: How to disable console on App execution (macOS)

Post by BobsTheDude » Fri Jun 12, 2020 7:08 pm

Biggy wrote:
Thu Jun 11, 2020 3:36 pm
Hi, and thank you for reply. I'm not using Xcode to build my testapp. I followed these steps to create the testapp.
It's ok to use 3rd party libs static or dynamic.

The problem you are having is that the app is a Unix file not a Mac Pkg format. There are many suggestions on building Mac pkg formats but the easiest way is to download Xcode create a project and build from there.

I am familiar with that tutorial, so what I did was build the app, rename it to wxformbuilder and copied to the MacOS folder of the wxFormbuilder App, just to show all you need to make a pkg.


link to an example:
https://www.dropbox.com/s/3cw9itcm1bpig ... r.zip?dl=0

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4438
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to disable console on App execution (macOS)

Post by ONEEYEMAN » Fri Jun 12, 2020 7:25 pm

Hi,
BobsTheDude wrote:
Fri Jun 12, 2020 7:08 pm
Biggy wrote:
Thu Jun 11, 2020 3:36 pm
Hi, and thank you for reply. I'm not using Xcode to build my testapp. I followed these steps to create the testapp.
It's ok to use 3rd party libs static or dynamic.
No, it is not.
When you start with something you ALWAYS should start with the official way of doing things by checking the official documentation.
And when the official way fails - try the sample. Most OS (open source) projects have samples along with makefiles for the beginners to start with.

And only then - when everything else fails - you can go and check the 3rd party resources (not the 3rd party libs).
BobsTheDude wrote:
Fri Jun 12, 2020 7:08 pm
The problem you are having is that the app is a Unix file not a Mac Pkg format. There are many suggestions on building Mac pkg formats but the easiest way is to download Xcode create a project and build from there.

I am familiar with that tutorial, so what I did was build the app, rename it to wxformbuilder and copied to the MacOS folder of the wxFormbuilder App, just to show all you need to make a pkg.


link to an example:
https://www.dropbox.com/s/3cw9itcm1bpig ... r.zip?dl=0
Also, I'd rather let the OP do the research himself, so that (s)he becomes familiar with how to do a research in the future.

Thank you.

BobsTheDude
Earned a small fee
Earned a small fee
Posts: 23
Joined: Wed Mar 06, 2019 10:33 pm

Re: How to disable console on App execution (macOS)

Post by BobsTheDude » Fri Jun 12, 2020 7:29 pm

Biggy wrote:
Thu Jun 11, 2020 3:36 pm
Hi, and thank you for reply. I'm not using Xcode to build my testapp. I followed these steps to create the testapp.
Here are a couple more resources that may help you.

Nice one.
https://github.com/iMokhles/wxWidgets-Xcode-Template

This one from this site
viewtopic.php?f=19&t=46804

I personally build static libs from the command line and add to Xcode.

Good luck with you project.

Post Reply