Mac OS X improvements - Application icon; 'make install' installs to /Applications; Ostinato is able to find drone at startup (as long as both bundles are present together)

This commit is contained in:
Srivats P. 2010-07-16 03:14:36 +05:30
parent 716f5fb8f3
commit 9b1dbfb1e6
5 changed files with 16 additions and 2 deletions

View File

@ -4,6 +4,8 @@ syntax: glob
*.o
*.a
*.exe
drone.app
ostinato.app
# Qt generated files
ui_*.h
@ -23,6 +25,7 @@ version.cpp
# vim swap files
*.swp
.DS_Store
# ctags
tags

BIN
client/icons/logo.icns Normal file

Binary file not shown.

View File

@ -42,6 +42,11 @@ MainWindow::MainWindow(QWidget *parent)
{
QString serverApp = QCoreApplication::applicationDirPath();
#ifdef Q_OS_MAC
// applicationDirPath() does not return bundle, but executable inside bundle
serverApp.replace("ostinato.app", "drone.app");
#endif
#ifdef Q_OS_WIN32
serverApp.append("/drone.exe");
#else

View File

@ -1,6 +1,7 @@
TEMPLATE = app
CONFIG += qt
RC_FILE = ostinato.rc
win32:RC_FILE = ostinato.rc
macx:ICON = icons/logo.icns
QT += network script
INCLUDEPATH += "../rpc/" "../common/"
LIBS += -lprotobuf

View File

@ -2,8 +2,13 @@
# to qmake; if one is not provided, we use the below defaults -
isEmpty(PREFIX) {
unix:PREFIX = "/usr/local/"
macx:PREFIX = "/Applications/"
win32:PREFIX = "../"
}
target.path = $$PREFIX/bin
macx {
target.path = $$PREFIX/Ostinato
} else {
target.path = $$PREFIX/bin
}
INSTALLS += target