Chris@57: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@57: Chris@57: /* Chris@57: EasyMercurial Chris@57: Chris@57: Based on HgExplorer by Jari Korhonen Chris@57: Copyright (c) 2010 Jari Korhonen Chris@57: Copyright (c) 2010 Chris Cannam Chris@57: Copyright (c) 2010 Queen Mary, University of London Chris@57: Chris@57: This program is free software; you can redistribute it and/or Chris@57: modify it under the terms of the GNU General Public License as Chris@57: published by the Free Software Foundation; either version 2 of the Chris@57: License, or (at your option) any later version. See the file Chris@57: COPYING included with this distribution for more information. Chris@57: */ jtkorhonen@0: jtkorhonen@0: jtkorhonen@0: #include "common.h" jtkorhonen@0: jtkorhonen@0: QString getSystem() jtkorhonen@0: { jtkorhonen@0: #ifdef Q_WS_X11 jtkorhonen@0: return QString("Linux"); jtkorhonen@0: #endif jtkorhonen@0: jtkorhonen@0: #ifdef Q_WS_MAC jtkorhonen@0: return QString("Mac"); jtkorhonen@0: #endif jtkorhonen@0: jtkorhonen@0: #ifdef Q_WS_WIN jtkorhonen@0: return QString("Windows"); jtkorhonen@0: #endif jtkorhonen@0: jtkorhonen@0: return QString(""); jtkorhonen@0: } jtkorhonen@0: jtkorhonen@0: QString getHgBinaryName() jtkorhonen@0: { jtkorhonen@0: if (getSystem() == "Windows") jtkorhonen@0: return QString("hg.exe"); jtkorhonen@0: else jtkorhonen@0: return QString("hg"); jtkorhonen@0: } jtkorhonen@0: jtkorhonen@0: jtkorhonen@0: QString getHgDirName() jtkorhonen@0: { jtkorhonen@0: if (getSystem() == "Windows") jtkorhonen@0: { jtkorhonen@0: return QString(".hg\\"); jtkorhonen@0: } jtkorhonen@0: else jtkorhonen@0: { jtkorhonen@0: return QString(".hg/"); jtkorhonen@0: } jtkorhonen@0: } jtkorhonen@0: jtkorhonen@0: jtkorhonen@0: jtkorhonen@0: jtkorhonen@0: jtkorhonen@0: