Mercurial > hg > easyhg
diff common.cpp @ 0:a9098eba2ee5
Initial commit.
author | Jari Korhonen <jtkorhonen@gmail.com> |
---|---|
date | Thu, 22 Apr 2010 03:15:35 +0300 |
parents | |
children | 45bfb8dc1faf |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common.cpp Thu Apr 22 03:15:35 2010 +0300 @@ -0,0 +1,56 @@ +//** Copyright (C) Jari Korhonen, 2010 (under lgpl) + + +#include "common.h" + +QString getSystem() +{ + #ifdef Q_WS_X11 + return QString("Linux"); + #endif + + #ifdef Q_WS_MAC + return QString("Mac"); + #endif + + #ifdef Q_WS_WIN + return QString("Windows"); + #endif + + return QString(""); +} + +QString getHgBinaryName() +{ + if (getSystem() == "Windows") + return QString("hg.exe"); + else + return QString("hg"); +} + +QString getDiffMergeDefaultPath() +{ + if (getSystem() == "Windows") + return QString("c:\\program files\\sourcegear\\diffmerge\\diffmerge.exe"); + else + return QString("/usr/bin/diffmerge"); +} + + +QString getHgDirName() +{ + if (getSystem() == "Windows") + { + return QString(".hg\\"); + } + else + { + return QString(".hg/"); + } +} + + + + + +