From c3a51d6346e027181d29487d81be6522838edbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 1 Aug 2013 13:42:32 -0300 Subject: Use the system qt on Ubuntu --- src/main.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 -- cgit v1.2.3