From d3367563ef18942b88bbe057e4cd557d2319e01b Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 5 Dec 2021 09:40:13 +0400 Subject: kotatogram-desktop: 1.4.1 -> 1.4.9 --- .../kotatogram-desktop/shortcuts-binary-path.patch | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/shortcuts-binary-path.patch (limited to 'pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/shortcuts-binary-path.patch') diff --git a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/shortcuts-binary-path.patch b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/shortcuts-binary-path.patch new file mode 100644 index 0000000000000..f173a64f141a0 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/shortcuts-binary-path.patch @@ -0,0 +1,38 @@ +diff --git a/Telegram/SourceFiles/core/application.cpp b/Telegram/SourceFiles/core/application.cpp +index 2a092c6ea..de46dd269 100644 +--- a/Telegram/SourceFiles/core/application.cpp ++++ b/Telegram/SourceFiles/core/application.cpp +@@ -1173,7 +1173,7 @@ void Application::startShortcuts() { + + void Application::RegisterUrlScheme() { + base::Platform::RegisterUrlScheme(base::Platform::UrlSchemeDescriptor{ +- .executable = cExeDir() + cExeName(), ++ .executable = qsl("kotatogram-desktop"), + .arguments = qsl("-workdir \"%1\"").arg(cWorkingDir()), + .protocol = qsl("tg"), + .protocolName = qsl("Telegram Link"), +diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp +index 26168baa7..00d2525a0 100644 +--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp ++++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp +@@ -303,19 +303,11 @@ bool GenerateDesktopFile( + + QFile target(targetFile); + if (target.open(QIODevice::WriteOnly)) { +- fileText = fileText.replace( +- QRegularExpression( +- qsl("^TryExec=.*$"), +- QRegularExpression::MultilineOption), +- qsl("TryExec=%1").arg( +- QString(cExeDir() + cExeName()).replace('\\', "\\\\"))); +- + fileText = fileText.replace( + QRegularExpression( + qsl("^Exec=kotatogram-desktop(.*)$"), + QRegularExpression::MultilineOption), +- qsl("Exec=%1 -workdir %2\\1").arg( +- EscapeShellInLauncher(cExeDir() + cExeName()), ++ qsl("Exec=kotatogram-desktop -workdir %1\\1").arg( + EscapeShellInLauncher(cWorkingDir()))); + + fileText = fileText.replace( -- cgit 1.4.1