Merge pull request #2181 from AndydeCleyre/bugfix/306

strip out .desktop file generation (and xdg uri association)
This commit is contained in:
John Preston 2016-06-24 14:51:15 +03:00 committed by GitHub
commit 52ca82c959
3 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,7 @@ env:
- BUILD_VERSION="disable_register_custom_scheme"
- BUILD_VERSION="disable_crash_reports"
- BUILD_VERSION="disable_network_proxy"
- BUILD_VERSION="disable_desktop_file_generation"
arch:
packages:

View File

@ -79,6 +79,10 @@ prepare() {
options+="\nDEFINES += TDESKTOP_DISABLE_NETWORK_PROXY"
fi
if [[ $BUILD_VERSION == *"disable_desktop_file_generation"* ]]; then
options+="\nDEFINES += TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION"
fi
options+='\nINCLUDEPATH += "/usr/lib/glib-2.0/include"'
options+='\nINCLUDEPATH += "/usr/lib/gtk-2.0/include"'
options+='\nINCLUDEPATH += "/usr/include/opus"'

View File

@ -434,6 +434,7 @@ void psRegisterCustomScheme() {
QString home(_psHomeDir());
if (home.isEmpty() || cBetaVersion()) return; // don't update desktop file for beta version
#ifndef TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION
DEBUG_LOG(("App Info: placing .desktop file"));
if (QDir(home + qsl(".local/")).exists()) {
QString apps = home + qsl(".local/share/applications/");
@ -480,6 +481,7 @@ void psRegisterCustomScheme() {
LOG(("App Error: Could not open '%1' for write").arg(file));
}
}
#endif // TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION
DEBUG_LOG(("App Info: registerting for Gnome"));
if (_psRunCommand("gconftool-2 -t string -s /desktop/gnome/url-handlers/tg/command " + escapeShell(escapeShell(QFile::encodeName(cExeDir() + cExeName())) + " -- %s"))) {