Improve Windows installer. [skip ci]

Make removing settings on uninstall optional.

(cherry picked from commit 274de54746)
This commit is contained in:
Roman Telezhynskyi 2020-11-18 10:19:15 +02:00
parent 4def392945
commit b3ea7d69f4

View File

@ -233,10 +233,6 @@ Source: ".\valentina\*.ini"; DestDir: "{app}"; Flags: ignoreversion
Type: filesandordirs; Name: "{app}\translations" Type: filesandordirs; Name: "{app}\translations"
Type: files; Name: "{userappdata}\ValentinaTeam\*.ini"; Tasks: deletesettings Type: files; Name: "{userappdata}\ValentinaTeam\*.ini"; Tasks: deletesettings
[UninstallDelete]
Type: files; Name: "{userappdata}\ValentinaTeam\*.ini"
Type: filesandordirs; Name: "{userappdata}\ValentinaTeam"
[Icons] [Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
@ -356,6 +352,12 @@ russian.ManageSettings = Управление настройками
ukrainian.ManageSettings = Керування налаштуваннями ukrainian.ManageSettings = Керування налаштуваннями
german.ManageSettings = Einstellungen verwalten 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] [Code]
const const
@ -563,3 +565,15 @@ var
end; end;
end; 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;