@@ -35,6 +35,12 @@ english.AdditionalTasks=Additional tasks
3535russian.RunDescription= Запустить YandexMusicRPC
3636russian.CreateDesktop= Создать значок на рабочем столе
3737russian.AdditionalTasks= Дополнительные задачи
38+ english.InstallationTitle= Installation of YandexMusicRPC
39+ english.UpdateTitle= Update of YandexMusicRPC
40+ english.UpdateMSG= Please ensure that the application is closed before starting the update to avoid potential errors.
41+ russian.InstallationTitle= Установка YandexMusicRPC
42+ russian.UpdateTitle= Обновление YandexMusicRPC
43+ russian.UpdateMSG= Пожалуйста, убедитесь что приложение закрыто перед началом обновления, чтобы избежать возможных ошибок.
3844
3945[Files]
4046Source : " dist\YandexMusicRPC-cli\YandexMusicRPC.exe" ; DestDir : " {pf} \YandexMusicRPC" ; Flags : ignoreversion
@@ -45,6 +51,22 @@ Name: "{group}\YandexMusicRPC"; Filename: "{pf}\YandexMusicRPC\YandexMusicRPC.ex
4551Name : " {autodesktop}\YandexMusicRPC" ; Filename : " {pf} \YandexMusicRPC\YandexMusicRPC.exe" ; Tasks: desktopicon
4652
4753[Code]
54+ function IsAppInstalled : Boolean;
55+ var
56+ InstallPath: string;
57+ begin
58+ Result := RegQueryStringValue(HKEY_LOCAL_MACHINE, ' SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\YandexMusicRPC_is1' , ' InstallLocation' , InstallPath);
59+ end ;
60+
61+ procedure InitializeWizard ;
62+ begin
63+ if IsAppInstalled then
64+ MsgBox(' The same version of YandexMusicRPC is already installed. Update is not required.' , mbInformation, MB_OK);
65+ WizardForm.Caption := CustomMessage(' UpdateTitle' )
66+ else
67+ WizardForm.Caption := CustomMessage(' InstallationTitle' );
68+ end ;
69+
4870procedure DeleteStartupShortcut ;
4971var
5072 StartupShortcut: string;
0 commit comments