Skip to content

Commit

Permalink
Mac OS X 0.9.0 ready to public
Browse files Browse the repository at this point in the history
  • Loading branch information
Allexin committed Jan 18, 2016
1 parent 0234dc6 commit fa79161
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
4 changes: 3 additions & 1 deletion BUILD_README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ Place TrackYourTime.exe in build folder, copy data folder, copy platforms plugin
Pack int TrackYourTime_Windows.zip

#Mac OS X
copy data into TrackYourTime.app/Contents/
copy data into TrackYourTime.app/Contents/MacOS
copy platforms/libqcocoa.dylib into TrackYourTime.app/Contents/PlugIns/platforms
add key LSUIElement with value 1 into TrackYourTime.app/Contents/Info.plist
process macdeployqt with -dmg flag
Rename package to TrackYourTime_MacOSX.dmg


#Linux
Expand Down
10 changes: 9 additions & 1 deletion TrackYourTime/ctrayicon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,20 @@ cTrayIcon::cTrayIcon(cDataManager *DataManager):QSystemTrayIcon()

void cTrayIcon::setActive()
{
setIcon(QIcon("data/icons/main.ico"));
#ifdef Q_OS_MAC
setIcon(QIcon("data/icons/main.png"));
#else
setIcon(QIcon("data/icons/main.ico"));
#endif
}

void cTrayIcon::setInactive()
{
#ifdef Q_OS_MAC
setIcon(QIcon("data/icons/main_gray.png"));
#else
setIcon(QIcon("data/icons/main_gray.ico"));
#endif
}

void cTrayIcon::showHint(QString text)
Expand Down
15 changes: 15 additions & 0 deletions TrackYourTime/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,24 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationDomain("sol-online.org"),
QCoreApplication::setApplicationName("TrackYourTime");

#ifdef Q_OS_MAC
QDir dir(argv[0]);
dir.cdUp();
QString currentDir = dir.absolutePath();
dir.cdUp();
dir.cd("PlugIns");
QCoreApplication::setLibraryPaths(QStringList(dir.absolutePath()));
#endif

QApplication a(argc, argv);
QApplication::setQuitOnLastWindowClosed(false);

#ifdef Q_OS_MAC
QDir::setCurrent(currentDir);
#endif



QSettings settings;
QString Language = QLocale::system().name();
Language.truncate(Language.lastIndexOf('_'));
Expand Down
Binary file added data/icons/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/main_gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fa79161

Please sign in to comment.