From 411017864aa999666a21df528d7ef581c9cfeb17 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Mon, 27 May 2013 16:25:22 +0300 Subject: [linux] support for launching in non-system-wide installs --- platform/platform_linux.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'platform/platform_linux.cpp') diff --git a/platform/platform_linux.cpp b/platform/platform_linux.cpp index 7866eb277b..5c7cf01b53 100644 --- a/platform/platform_linux.cpp +++ b/platform/platform_linux.cpp @@ -51,7 +51,8 @@ Platform::Platform() else { // developer builds with symlink - if (IsFileExistsByFullPath(path + "../../data/eula.html")){ + if (IsFileExistsByFullPath(path + "../../data/eula.html")) + { m_resourcesDir = path + "../../data"; m_writableDir = m_resourcesDir; } @@ -61,17 +62,15 @@ Platform::Platform() m_resourcesDir = path + "../../../omim/data"; m_writableDir = m_resourcesDir; } - // installed version - /opt/MapsWithMe - else if (IsFileExistsByFullPath("/opt/MapsWithMe/share/eula.html")) - m_resourcesDir = "/opt/MapsWithMe/share"; + // installed version - /opt/MapsWithMe and unpacked packages + else if (IsFileExistsByFullPath(path + "../share/eula.html")) + m_resourcesDir = path + "../share"; // installed version else if (IsFileExistsByFullPath("/usr/share/MapsWithMe/eula.html")) m_resourcesDir = "/usr/share/MapsWithMe"; // all-nearby installs else if (IsFileExistsByFullPath(path + "/eula.html")) - { m_resourcesDir = path; - } } m_resourcesDir += '/'; m_settingsDir += '/'; @@ -108,7 +107,7 @@ string Platform::UniqueClientId() const string content; FileReader(machineFile).ReadAsString(content); - return content.substr(0,32); + return content.substr(0, 32); } void Platform::RunOnGuiThread(TFunctor const & fn) -- cgit v1.2.3