diff --git a/.hgignore b/.hgignore index e27298d..e1d0ab6 100644 --- a/.hgignore +++ b/.hgignore @@ -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 diff --git a/client/icons/logo.icns b/client/icons/logo.icns new file mode 100644 index 0000000..259376a Binary files /dev/null and b/client/icons/logo.icns differ diff --git a/client/mainwindow.cpp b/client/mainwindow.cpp index dde1fd7..6ecc7cd 100644 --- a/client/mainwindow.cpp +++ b/client/mainwindow.cpp @@ -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 diff --git a/client/ostinato.pro b/client/ostinato.pro index 7ab270d..0b352c0 100644 --- a/client/ostinato.pro +++ b/client/ostinato.pro @@ -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 diff --git a/install.pri b/install.pri index 649c98e..fdb16e0 100644 --- a/install.pri +++ b/install.pri @@ -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