@@ -512,6 +512,18 @@ begin
512
512
end;
513
513
end;
514
514
515
+ function ReplayChoice(Key:String,Default:String):String;
516
+ begin
517
+ // Restore the settings chosen during a previous install.
518
+ Result:=GetPreviousData(Key,Default);
519
+
520
+ // Use settings from the user provided INF.
521
+ if ShouldLoadInf then begin
522
+ Result:=LoadInfString('Setup',StringChangeEx(Key,' ','',True),Default);
523
+ end;
524
+
525
+ end;
526
+
515
527
procedure InitializeWizard;
516
528
var
517
529
PrevPageID:Integer;
@@ -624,12 +636,7 @@ begin
624
636
end;
625
637
626
638
// Restore the setting chosen during a previous install.
627
- Data:=GetPreviousData('Path Option','BashOnly');
628
-
629
- // Use settings from the user provided INF.
630
- if ShouldLoadInf then begin
631
- Data:=LoadInfString('Setup','PathOption','BashOnly');
632
- end;
639
+ Data:=ReplayChoice('Path Option','BashOnly');
633
640
634
641
if Data='BashOnly' then begin
635
642
RdbPath[GP_BashOnly].Checked:=True;
@@ -737,12 +744,7 @@ begin
737
744
end;
738
745
739
746
// Restore the setting chosen during a previous install.
740
- Data:=GetPreviousData('SSH Option','OpenSSH');
741
-
742
- // Use settings from the user provided INF.
743
- if ShouldLoadInf then begin
744
- Data:=LoadInfString('Setup','SSHOption','OpenSSH');
745
- end;
747
+ Data:=ReplayChoice('SSH Option','OpenSSH');
746
748
747
749
if Data='OpenSSH' then begin
748
750
RdbSSH[GS_OpenSSH].Checked:=True;
@@ -843,12 +845,7 @@ begin
843
845
end;
844
846
845
847
// Restore the setting chosen during a previous install.
846
- Data:=GetPreviousData('CRLF Option','CRLFAlways');
847
-
848
- // Use settings from the user provided INF.
849
- if ShouldLoadInf then begin
850
- Data:=LoadInfString('Setup','CRLFOption','CRLFAlways');
851
- end;
848
+ Data:=ReplayChoice('CRLF Option','CRLFAlways');
852
849
853
850
if Data='LFOnly' then begin
854
851
RdbCRLF[GC_LFOnly].Checked:=True;
@@ -924,12 +921,7 @@ begin
924
921
end;
925
922
926
923
// Restore the setting chosen during a previous install.
927
- Data:=GetPreviousData('Bash Terminal Option','MinTTY');
928
-
929
- // Use settings from the user provided INF.
930
- if ShouldLoadInf then begin
931
- Data:=LoadInfString('Setup','BashTerminalOption','MinTTY');
932
- end;
924
+ Data:=ReplayChoice('Bash Terminal Option','MinTTY');
933
925
934
926
if Data='MinTTY' then begin
935
927
RdbBashTerminal[GB_MinTTY].Checked:=True;
@@ -975,12 +967,7 @@ begin
975
967
end;
976
968
977
969
// Restore the settings chosen during a previous install.
978
- Data:=GetPreviousData('Performance Tweaks FSCache','Disabled');
979
-
980
- // Use settings from the user provided INF.
981
- if ShouldLoadInf then begin
982
- Data:=LoadInfString('Setup','PerformanceTweaksFSCache','Disabled');
983
- end;
970
+ Data:=ReplayChoice('Performance Tweaks FSCache','Disabled');
984
971
985
972
if Data='Enabled' then begin
986
973
RdbPerfTweaks[GP_FSCache].Checked:=True;
0 commit comments