mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-29 01:52:48 +00:00
Merge pull request #2181 from AndydeCleyre/bugfix/306
strip out .desktop file generation (and xdg uri association)
This commit is contained in:
commit
52ca82c959
@ -8,6 +8,7 @@ env:
|
|||||||
- BUILD_VERSION="disable_register_custom_scheme"
|
- BUILD_VERSION="disable_register_custom_scheme"
|
||||||
- BUILD_VERSION="disable_crash_reports"
|
- BUILD_VERSION="disable_crash_reports"
|
||||||
- BUILD_VERSION="disable_network_proxy"
|
- BUILD_VERSION="disable_network_proxy"
|
||||||
|
- BUILD_VERSION="disable_desktop_file_generation"
|
||||||
|
|
||||||
arch:
|
arch:
|
||||||
packages:
|
packages:
|
||||||
|
@ -79,6 +79,10 @@ prepare() {
|
|||||||
options+="\nDEFINES += TDESKTOP_DISABLE_NETWORK_PROXY"
|
options+="\nDEFINES += TDESKTOP_DISABLE_NETWORK_PROXY"
|
||||||
fi
|
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/glib-2.0/include"'
|
||||||
options+='\nINCLUDEPATH += "/usr/lib/gtk-2.0/include"'
|
options+='\nINCLUDEPATH += "/usr/lib/gtk-2.0/include"'
|
||||||
options+='\nINCLUDEPATH += "/usr/include/opus"'
|
options+='\nINCLUDEPATH += "/usr/include/opus"'
|
||||||
|
@ -434,6 +434,7 @@ void psRegisterCustomScheme() {
|
|||||||
QString home(_psHomeDir());
|
QString home(_psHomeDir());
|
||||||
if (home.isEmpty() || cBetaVersion()) return; // don't update desktop file for beta version
|
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"));
|
DEBUG_LOG(("App Info: placing .desktop file"));
|
||||||
if (QDir(home + qsl(".local/")).exists()) {
|
if (QDir(home + qsl(".local/")).exists()) {
|
||||||
QString apps = home + qsl(".local/share/applications/");
|
QString apps = home + qsl(".local/share/applications/");
|
||||||
@ -480,6 +481,7 @@ void psRegisterCustomScheme() {
|
|||||||
LOG(("App Error: Could not open '%1' for write").arg(file));
|
LOG(("App Error: Could not open '%1' for write").arg(file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION
|
||||||
|
|
||||||
DEBUG_LOG(("App Info: registerting for Gnome"));
|
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"))) {
|
if (_psRunCommand("gconftool-2 -t string -s /desktop/gnome/url-handlers/tg/command " + escapeShell(escapeShell(QFile::encodeName(cExeDir() + cExeName())) + " -- %s"))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user