about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/shortcuts-binary-path.patch
blob: f173a64f141a0fc64356125fe00a68b848b7bae5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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(