Reputation: 3
I need to create a .app from my qt project for macx. I've create a simple sample project console, with CONFIG += app_bundle in .pro file
then I used macdeployqt.
When double click on .app, the application start to blinking in the mac bottom bar for at least 1 minute, then stop it. No windows or message shown. When right click, only force quit command available.
Any ideas? Thanks
Upvotes: 0
Views: 309
Reputation:
If your application uses libraries other than Qt, you need to copy the frameworks in yourApplication.app/Contents/Frameworks/
Edit: If your program is a console application, just create a shell script like this, put it in the same directory as your executable in app bundle, and modify your Info.plist so that this is the bundle's executable:
#!/bin/bash
EXECDIR=`dirname $0`
open /Applications/utilities/Terminal.app $EXECDIR/yourApp
Make the script executable by chmod +x /path/to/the/script
. But I wouldn't make an app bundle for a terminal application. Deploy your application with an installer that installs necessary libraries to /usr/local/lib and your binary to /usr/bin or /usr/local/bin
Edit continued: You can do it with a bash script run as root.
Hope this helps.
Upvotes: 1