Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarafei Praliaskouski <komzpa@mapswith.me>2013-05-27 17:25:22 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:55:22 +0300
commit411017864aa999666a21df528d7ef581c9cfeb17 (patch)
tree0f8887daeb4d45d00a40a0a6f65612cb5c609c13 /platform/platform_linux.cpp
parent87b3992d4d1a73f755f4b942cbee2f31249accda (diff)
[linux] support for launching in non-system-wide installs
Diffstat (limited to 'platform/platform_linux.cpp')
-rw-r--r--platform/platform_linux.cpp13
1 files changed, 6 insertions, 7 deletions
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)