Improve Windows installer. [skip ci]

Make removing settings on uninstall optional.
This commit is contained in:
Roman Telezhynskyi 2020-11-18 10:19:15 +02:00
parent 1b5705388c
commit 274de54746

View File

@ -235,10 +235,6 @@ Source: ".\valentina\*.ini"; DestDir: "{app}"; Flags: ignoreversion
Type: filesandordirs; Name: "{app}\translations"
Type: files; Name: "{userappdata}\ValentinaTeam\*.ini"; Tasks: deletesettings
[UninstallDelete]
Type: files; Name: "{userappdata}\ValentinaTeam\*.ini"
Type: filesandordirs; Name: "{userappdata}\ValentinaTeam"
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
@ -358,6 +354,12 @@ russian.ManageSettings = Управление настройками
ukrainian.ManageSettings = Керування налаштуваннями
german.ManageSettings = Einstellungen verwalten
QuestionRemoveAnyExistingSettings = Do you want to remove any existing settings?
english.QuestionRemoveAnyExistingSettings = Do you want to remove any existing settings?
russian.QuestionRemoveAnyExistingSettings = Вы хотите удалить существующие настройки?
ukrainian.QuestionRemoveAnyExistingSettings = Видалити будь-які існуючі налаштування?
german.QuestionRemoveAnyExistingSettings = Möchten Sie vorhandene Einstellungen entfernen?
[Code]
const
@ -565,3 +567,15 @@ var
end;
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usPostUninstall then
begin
if MsgBox(ExpandConstant('{cm:QuestionRemoveAnyExistingSettings}'), mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES then
//this is the msg that will display after uninstall
begin
DelTree(ExpandConstant('{userappdata}\ValentinaTeam'), True, True, True);
end;
end;
end;