Fix var declaration inside begin..end block (Pascal syntax error)

Move StepCount to procedure var section.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-03-03 17:13:30 -05:00
parent 5a3955b413
commit d68cd6fe02

View File

@@ -913,7 +913,7 @@ var
LogDir, LogPath, SummaryMsg: String;
InstalledNames: TArrayOfString;
DefaultPrinter: String;
AllCount, CleanedCount: Integer;
AllCount, CleanedCount, StepCount: Integer;
begin
if CurStep <> ssPostInstall then Exit;
@@ -938,14 +938,11 @@ begin
LogPath := LogDir + '\printer_install.log';
// Initialise progress bar: fixed steps + one per printer being changed
begin
var StepCount: Integer;
StepCount := 4; // cleanup + staging + 2x spooler restart
for I := 0 to GetArrayLength(PrinterDataArray) - 1 do
if PrinterSelectionPage.Values[I] <> PrinterDataArray[I].IsInstalled then
StepCount := StepCount + 1;
SetStatusInit(StepCount);
end;
StepCount := 4; // cleanup + staging + 2x spooler restart
for I := 0 to GetArrayLength(PrinterDataArray) - 1 do
if PrinterSelectionPage.Values[I] <> PrinterDataArray[I].IsInstalled then
StepCount := StepCount + 1;
SetStatusInit(StepCount);
// ── Step 0: Remove legacy printers from old print servers ────────────────
SetStatus('Removing legacy printers...');