diff --git a/qtox.pro b/qtox.pro index 5f1c9aea1..0517166f3 100644 --- a/qtox.pro +++ b/qtox.pro @@ -199,21 +199,25 @@ contains(ENABLE_SYSTRAY_UNITY_BACKEND, YES) { DEFINES += ENABLE_SYSTRAY_UNITY_BACKEND INCLUDEPATH += "/usr/include/glib-2.0" - INCLUDEPATH += "/usr/lib/glib-2.0/include" - INCLUDEPATH += "/usr/lib64/glib-2.0/include" - INCLUDEPATH += "/usr/lib/i386-linux-gnu/glib-2.0/include" - INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/glib-2.0/include" INCLUDEPATH += "/usr/include/gtk-2.0" - INCLUDEPATH += "/usr/lib/gtk-2.0/include" - INCLUDEPATH += "/usr/lib64/gtk-2.0/include" - INCLUDEPATH += "/usr/lib/i386-linux-gnu/gtk-2.0/include" - INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/gtk-2.0/include" INCLUDEPATH += "/usr/include/atk-1.0" INCLUDEPATH += "/usr/include/cairo" INCLUDEPATH += "/usr/include/gdk-pixbuf-2.0" INCLUDEPATH += "/usr/include/libappindicator-0.1" INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4" INCLUDEPATH += "/usr/include/pango-1.0" + equals(QT_ARCH, x86_64) { + INCLUDEPATH += "/usr/lib64/glib-2.0/include" + INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/glib-2.0/include" + INCLUDEPATH += "/usr/lib64/gtk-2.0/include" + INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/gtk-2.0/include" + } + else { + INCLUDEPATH += "/usr/lib/glib-2.0/include" + INCLUDEPATH += "/usr/lib/i386-linux-gnu/glib-2.0/include" + INCLUDEPATH += "/usr/lib/gtk-2.0/include" + INCLUDEPATH += "/usr/lib/i386-linux-gnu/gtk-2.0/include" + } LIBS += -lgobject-2.0 -lappindicator -lgtk-x11-2.0 } @@ -226,19 +230,23 @@ contains(ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND, NO) { DEFINES += ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND INCLUDEPATH += "/usr/include/glib-2.0" - INCLUDEPATH += "/usr/lib/glib-2.0/include" - INCLUDEPATH += "/usr/lib64/glib-2.0/include" - INCLUDEPATH += "/usr/lib/i386-linux-gnu/glib-2.0/include" - INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/glib-2.0/include" INCLUDEPATH += "/usr/include/gtk-2.0" - INCLUDEPATH += "/usr/lib/gtk-2.0/include" - INCLUDEPATH += "/usr/lib64/gtk-2.0/include" - INCLUDEPATH += "/usr/lib/i386-linux-gnu/gtk-2.0/include" - INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/gtk-2.0/include" INCLUDEPATH += "/usr/include/atk-1.0" INCLUDEPATH += "/usr/include/cairo" INCLUDEPATH += "/usr/include/gdk-pixbuf-2.0" INCLUDEPATH += "/usr/include/pango-1.0" + equals(QT_ARCH, x86_64) { + INCLUDEPATH += "/usr/lib64/glib-2.0/include" + INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/glib-2.0/include" + INCLUDEPATH += "/usr/lib64/gtk-2.0/include" + INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/gtk-2.0/include" + } + else { + INCLUDEPATH += "/usr/lib/glib-2.0/include" + INCLUDEPATH += "/usr/lib/i386-linux-gnu/glib-2.0/include" + INCLUDEPATH += "/usr/lib/gtk-2.0/include" + INCLUDEPATH += "/usr/lib/i386-linux-gnu/gtk-2.0/include" + } LIBS += -lglib-2.0 -lgdk_pixbuf-2.0 -lgio-2.0 -lcairo -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 @@ -261,19 +269,23 @@ contains(ENABLE_SYSTRAY_GTK_BACKEND, NO) { DEFINES += ENABLE_SYSTRAY_GTK_BACKEND INCLUDEPATH += "/usr/include/glib-2.0" - INCLUDEPATH += "/usr/lib/glib-2.0/include" - INCLUDEPATH += "/usr/lib64/glib-2.0/include" - INCLUDEPATH += "/usr/lib/i386-linux-gnu/glib-2.0/include" - INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/glib-2.0/include" INCLUDEPATH += "/usr/include/gtk-2.0" - INCLUDEPATH += "/usr/lib/gtk-2.0/include" - INCLUDEPATH += "/usr/lib64/gtk-2.0/include" - INCLUDEPATH += "/usr/lib/i386-linux-gnu/gtk-2.0/include" - INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/gtk-2.0/include" INCLUDEPATH += "/usr/include/atk-1.0" INCLUDEPATH += "/usr/include/gdk-pixbuf-2.0" INCLUDEPATH += "/usr/include/cairo" INCLUDEPATH += "/usr/include/pango-1.0" + equals(QT_ARCH, x86_64) { + INCLUDEPATH += "/usr/lib64/glib-2.0/include" + INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/glib-2.0/include" + INCLUDEPATH += "/usr/lib64/gtk-2.0/include" + INCLUDEPATH += "/usr/lib/x86_64-linux-gnu/gtk-2.0/include" + } + else { + INCLUDEPATH += "/usr/lib/glib-2.0/include" + INCLUDEPATH += "/usr/lib/i386-linux-gnu/glib-2.0/include" + INCLUDEPATH += "/usr/lib/gtk-2.0/include" + INCLUDEPATH += "/usr/lib/i386-linux-gnu/gtk-2.0/include" + } LIBS += -lglib-2.0 -lgdk_pixbuf-2.0 -lgio-2.0 -lcairo -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 diff --git a/src/ipc.cpp b/src/ipc.cpp index d9e82c8de..d3a1d3a63 100644 --- a/src/ipc.cpp +++ b/src/ipc.cpp @@ -34,7 +34,7 @@ IPC::IPC() // This is a safety measure, in case one of the clients crashes // If the owner exits normally, it can set the timestamp to 0 first to immediately give ownership - std::default_random_engine randEngine((std::random_device()())); + std::default_random_engine randEngine((std::random_device())()); std::uniform_int_distribution distribution; globalId = distribution(randEngine); qDebug() << "Our global ID is " << globalId;