@@ -2209,9 +2209,9 @@ void psExecTelegram() {
22092209 if (cDebug ()) targs += qsl (" -debug" );
22102210 if (cDataFile () != (cTestMode () ? qsl (" data_test" ) : qsl (" data" ))) targs += qsl (" -key \" " ) + cDataFile () + ' "' ;
22112211
2212- QString telegram (QDir::toNativeSeparators (cExeDir () + " Telegram .exe" )), wdir (QDir::toNativeSeparators (cWorkingDir ()));
2212+ QString telegram (QDir::toNativeSeparators (cExeDir () + QString::fromWCharArray (AppFile) + qsl ( " .exe" ) )), wdir (QDir::toNativeSeparators (cWorkingDir ()));
22132213
2214- DEBUG_LOG ((" Application Info: executing %1 %2" ).arg (cExeDir () + " Telegram .exe" ).arg (targs));
2214+ DEBUG_LOG ((" Application Info: executing %1 %2" ).arg (cExeDir () + QString::fromWCharArray (AppFile) + qsl ( " .exe" ) ).arg (targs));
22152215 HINSTANCE r = ShellExecute (0 , 0 , telegram.toStdWString ().c_str (), targs.toStdWString ().c_str (), wdir.isEmpty () ? 0 : wdir.toStdWString ().c_str (), SW_SHOWNORMAL);
22162216 if (long (r) < 32 ) {
22172217 DEBUG_LOG ((" Application Error: failed to execute %1, working directory: '%2', result: %3" ).arg (telegram).arg (wdir).arg (long (r)));
@@ -2222,14 +2222,14 @@ void _manageAppLnk(bool create, bool silent, int path_csidl, const wchar_t *args
22222222 WCHAR startupFolder[MAX_PATH];
22232223 HRESULT hres = SHGetFolderPath (0 , path_csidl, 0 , SHGFP_TYPE_CURRENT, startupFolder);
22242224 if (SUCCEEDED (hres)) {
2225- QString lnk = QString::fromWCharArray (startupFolder) + " \\ Telegram .lnk" ;
2225+ QString lnk = QString::fromWCharArray (startupFolder) + ' \\ ' + QString::fromWCharArray (AppFile) + qsl ( " .lnk" ) ;
22262226 if (create) {
22272227 IShellLink* psl;
22282228 hres = CoCreateInstance (CLSID_ShellLink, NULL , CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&psl);
22292229 if (SUCCEEDED (hres)) {
22302230 IPersistFile* ppf;
22312231
2232- QString exe = QDir::toNativeSeparators (QDir (cExeDir ()).absolutePath () + " //Telegram .exe" ), dir = QDir::toNativeSeparators (QDir (cWorkingDir ()).absolutePath ());
2232+ QString exe = QDir::toNativeSeparators (QDir (cExeDir ()).absolutePath () + ' / ' + QString::fromWCharArray (AppFile) + qsl ( " .exe" ) ), dir = QDir::toNativeSeparators (QDir (cWorkingDir ()).absolutePath ());
22332233 psl->SetArguments (args);
22342234 psl->SetPath (exe.toStdWString ().c_str ());
22352235 psl->SetWorkingDirectory (dir.toStdWString ().c_str ());
@@ -2264,7 +2264,7 @@ void psSendToMenu(bool send, bool silent) {
22642264}
22652265
22662266#ifdef _NEED_WIN_GENERATE_DUMP
2267- static const WCHAR *_programName = L" Telegram Win (Unofficial) " ; // folder in APPDATA, if current path is unavailable for writing
2267+ static const WCHAR *_programName = AppName ; // folder in APPDATA, if current path is unavailable for writing
22682268static const WCHAR *_exeName = L" Telegram.exe" ;
22692269
22702270LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter = 0 ;
0 commit comments