summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-08-01 13:42:32 -0300
committerTomás Touceda <chiiph@leap.se>2013-08-01 13:42:32 -0300
commitc3a51d6346e027181d29487d81be6522838edbd1 (patch)
treed2347fee5c87f98ba196c54f17f6162109f1d185
parent1a4c3d0eaaede33f54cdbd7f88a0cad13daac05a (diff)
Use the system qt on Ubuntu
-rw-r--r--src/main.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 95ad2b6..c1c4b67 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -120,6 +120,24 @@ main(int argc, char** argv)
updateIfNeeded();
auto pypath = full_path.string() + ":" + full_path.string() + "/lib/";
#if not defined _WIN32 && not defined _WIN64
+ fs::path fromCore("./lib/libQtCore.so.4");
+ fs::path toCore("./lib/libQtCore.NOTUSED");
+ fs::path fromGui("./lib/libQtGui.so.4");
+ fs::path toGui("./lib/libQtGui.NOTUSED");
+ try {
+ auto desk = std::string(getenv("DESKTOP_SESSION"));
+ if(boost::starts_with(desk, "ubuntu"))
+ {
+ fs::rename(fromCore, toCore);
+ fs::rename(fromGui, toGui);
+ } else {
+ fs::rename(toCore, fromCore);
+ fs::rename(toGui, fromGui);
+ }
+ } catch(...) {
+
+ }
+
setenv("PYTHONPATH", pypath.c_str(), 1);
#endif