From 3dd31ac8bb3a720dba070c7a52d9cd8d46028de5 Mon Sep 17 00:00:00 2001 From: Bernd Steinhauser Date: Sun, 7 Feb 2016 16:38:22 +0100 Subject: [PATCH] Fix data installation paths. --- BUILDING | 6 ++++++ src/defines.pri | 11 +++++++++++ src/install.pri | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/BUILDING b/BUILDING index 10b9d060f..ae9dd29a6 100644 --- a/BUILDING +++ b/BUILDING @@ -197,6 +197,12 @@ Available Defines example: $ export QUPZILLA_PREFIX="/usr" + SHARE_FOLDER You can define the path of the share folder, i.e. /usr/share + QupZilla will then use SHARE_FOLDER/qupzilla as datadir, + SHARE_FOLDER/applications for desktop launcher and + SHARE_FOLDER/pixmaps for the icon. By default it is not defined and + files will be installed as described above. + DISABLE_DBUS Build without QtDBus module. Native desktop notifications will be disabled. diff --git a/src/defines.pri b/src/defines.pri index 6f2553b4f..fb7c7954b 100644 --- a/src/defines.pri +++ b/src/defines.pri @@ -23,6 +23,7 @@ d_disable_dbus = $$(DISABLE_DBUS) d_disable_updates_check = $$(DISABLE_UPDATES_CHECK) d_debug_build = $$(DEBUG_BUILD) d_prefix = $$(QUPZILLA_PREFIX) +d_share = $$(SHARE_FOLDER) equals(d_no_system_datapath, "true") { DEFINES *= NO_SYSTEM_DATAPATH } equals(d_kde_integration, "true") { DEFINES *= KDE_INTEGRATION } @@ -63,6 +64,7 @@ haiku-* { launcher_folder = /usr/share/applications icon_folder = /usr/share/pixmaps hicolor_folder = /usr/share/icons/hicolor + share_folder = /usr/share !equals(d_prefix, "") { binary_folder = "$$d_prefix"/bin @@ -71,6 +73,15 @@ haiku-* { launcher_folder = "$$d_prefix"/share/applications icon_folder = "$$d_prefix"/share/pixmaps hicolor_folder = "$$d_prefix"/share/icons/hicolor + share_folder = "$$d_prefix"/share + } + + !equals(d_share, "") { + data_folder = "$$d_share"/qupzilla + launcher_folder = "$$d_share"/applications + icon_folder = "$$d_share"/pixmaps + hicolor_folder = "$$d_share"/icons/hicolor + share_folder = "$$d_share" } !equals(d_use_lib_path, ""):library_folder = $$d_use_lib_path diff --git a/src/install.pri b/src/install.pri index 709d8bf99..34ee5676c 100644 --- a/src/install.pri +++ b/src/install.pri @@ -44,10 +44,10 @@ mac { ico256.path = $$hicolor_folder/256x256/apps bashcompletion.files = $$PWD/../linux/completion/qupzilla - bashcompletion.path = /usr/share/bash-completion/completions + bashcompletion.path = $$share_folder/usr/share/bash-completion/completions appdata.files = $$PWD/../linux/appdata/qupzilla.appdata.xml - appdata.path = /usr/share/appdata + appdata.path = $$share_folder/appdata INSTALLS += target target1 target2 target3