Martijn Laan před 1 rokem
rodič
revize
8af1e33489

+ 11 - 41
Components/PathFunc.pas

@@ -2,17 +2,11 @@ unit PathFunc;
 
 
 {
 {
   Inno Setup
   Inno Setup
-  Copyright (C) 1997-2010 Jordan Russell
+  Copyright (C) 1997-2024 Jordan Russell
   Portions by Martijn Laan
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
   For conditions of distribution and use, see LICENSE.TXT.
 
 
-  This unit provides some path-related, MBCS-aware functions.
-
-  These functions should always be used in lieu of their SysUtils counterparts
-  since they aren't MBCS-aware on Delphi 2, and sometimes not MBCS-aware on
-  Delphi 6 and 7 either (see QC#5096).
-
-  $jrsoftware: issrc/Components/PathFunc.pas,v 1.43 2010/04/19 21:43:01 jr Exp $
+  This unit provides some path-related functions.
 }
 }
 
 
 interface
 interface
@@ -66,20 +60,9 @@ begin
 end;
 end;
 
 
 function PathCharLength(const S: String; const Index: Integer): Integer;
 function PathCharLength(const S: String; const Index: Integer): Integer;
-{ Returns the length in bytes of the character at Index in S.
-  Notes:
-  1. If Index specifies the last character in S, 1 will always be returned,
-     even if the last character is a lead byte.
-  2. If a lead byte is followed by a null character (e.g. #131#0), 2 will be
-     returned. This mimics the behavior of MultiByteToWideChar and CharPrev,
-     but not CharNext(P)-P, which would stop on the null. }
+{ Returns the length in characters of the character at Index in S. }
 begin
 begin
-  {$IFNDEF UNICODE}
-  if IsDBCSLeadByte(Ord(S[Index])) and (Index < Length(S)) then
-    Result := 2
-  else
-  {$ENDIF}
-    Result := 1;
+  Result := 1;
 end;
 end;
 
 
 function PathCharIsSlash(const C: Char): Boolean;
 function PathCharIsSlash(const C: Char): Boolean;
@@ -188,8 +171,7 @@ function PathDrivePartLengthEx(const Filename: String;
     'x:\file'             -> 3  ('x:\')
     'x:\file'             -> 3  ('x:\')
     '\\server\share\file' -> 14 ('\\server\share')
     '\\server\share\file' -> 14 ('\\server\share')
     '\file'               -> 1  ('\')
     '\file'               -> 1  ('\')
-  Note: This is MBCS-safe, unlike the Delphi's ExtractFileDrive function.
-  (Computer and share names can include multi-byte characters!) }
+}
 var
 var
   Len, I, C: Integer;
   Len, I, C: Integer;
 begin
 begin
@@ -392,8 +374,8 @@ begin
 end;
 end;
 
 
 function PathLastChar(const S: String): PChar;
 function PathLastChar(const S: String): PChar;
-{ Returns pointer to last character in the string. Is MBCS-aware. Returns nil
-  if the string is empty. }
+{ Returns pointer to last character in the string. Returns nil if the string is
+  empty. }
 begin
 begin
   if S = '' then
   if S = '' then
     Result := nil
     Result := nil
@@ -431,7 +413,6 @@ begin
 end;
 end;
 
 
 function PathPos(Ch: Char; const S: String): Integer;
 function PathPos(Ch: Char; const S: String): Integer;
-{ This is an MBCS-aware Pos function. }
 var
 var
   Len, I: Integer;
   Len, I: Integer;
 begin
 begin
@@ -474,7 +455,7 @@ end;
 
 
 function PathStartsWith(const S, AStartsWith: String): Boolean;
 function PathStartsWith(const S, AStartsWith: String): Boolean;
 { Returns True if S starts with (or is equal to) AStartsWith. Uses path casing
 { Returns True if S starts with (or is equal to) AStartsWith. Uses path casing
-  rules, and is MBCS-aware. }
+  rules. }
 var
 var
   AStartsWithLen: Integer;
   AStartsWithLen: Integer;
 begin
 begin
@@ -488,35 +469,24 @@ begin
 end;
 end;
 
 
 function PathStrNextChar(const S: PChar): PChar;
 function PathStrNextChar(const S: PChar): PChar;
-{ Returns pointer to the character after S, unless S points to a null (#0).
-  Is MBCS-aware. }
+{ Returns pointer to the character after S, unless S points to a null (#0). }
 begin
 begin
-  {$IFNDEF UNICODE}
-  Result := CharNext(S);
-  {$ELSE}
   Result := S;
   Result := S;
   if Result^ <> #0 then
   if Result^ <> #0 then
     Inc(Result);
     Inc(Result);
-  {$ENDIF}
 end;
 end;
 
 
 function PathStrPrevChar(const Start, Current: PChar): PChar;
 function PathStrPrevChar(const Start, Current: PChar): PChar;
-{ Returns pointer to the character before Current, unless Current = Start.
-  Is MBCS-aware. }
+{ Returns pointer to the character before Current, unless Current = Start. }
 begin
 begin
-  {$IFNDEF UNICODE}
-  Result := CharPrev(Start, Current);
-  {$ELSE}
   Result := Current;
   Result := Current;
   if Result > Start then
   if Result > Start then
     Dec(Result);
     Dec(Result);
-  {$ENDIF}
 end;
 end;
 
 
 function PathStrScan(const S: PChar; const C: Char): PChar;
 function PathStrScan(const S: PChar; const C: Char): PChar;
 { Returns pointer to first occurrence of C in S, or nil if there are no
 { Returns pointer to first occurrence of C in S, or nil if there are no
-  occurrences. Like StrScan, but MBCS-aware.
-  Note: As with StrScan, specifying #0 for the search character is legal. }
+  occurrences. As with StrScan, specifying #0 for the search character is legal. }
 begin
 begin
   Result := S;
   Result := S;
   while Result^ <> C do begin
   while Result^ <> C do begin

+ 1 - 1
Projects/CompExeUpdate.pas

@@ -29,7 +29,7 @@ procedure PreventCOMCTL32Sideloading(const F: TCustomFile);
 implementation
 implementation
 
 
 uses
 uses
-  ResUpdate{$IFDEF UNICODE}, Math{$ENDIF}, Int64Em;
+  ResUpdate, Math, Int64Em;
 
 
 procedure UpdateSetupPEHeaderFields(const F: TCustomFile;
 procedure UpdateSetupPEHeaderFields(const F: TCustomFile;
   const IsTSAware, IsDEPCompatible, IsASLRCompatible: Boolean);
   const IsTSAware, IsDEPCompatible, IsASLRCompatible: Boolean);

+ 5 - 35
Projects/FileClass.pas

@@ -96,18 +96,14 @@ type
     FBufferOffset, FBufferSize: Cardinal;
     FBufferOffset, FBufferSize: Cardinal;
     FEof: Boolean;
     FEof: Boolean;
     FBuffer: array[0..4095] of AnsiChar;
     FBuffer: array[0..4095] of AnsiChar;
-{$IFDEF UNICODE}
     FSawFirstLine: Boolean;
     FSawFirstLine: Boolean;
     FCodePage: Cardinal;
     FCodePage: Cardinal;
-{$ENDIF}
-    function DoReadLine{$IFDEF UNICODE}(const UTF8: Boolean){$ENDIF}: AnsiString;
+    function DoReadLine(const UTF8: Boolean): AnsiString;
     function GetEof: Boolean;
     function GetEof: Boolean;
     procedure FillBuffer;
     procedure FillBuffer;
   public
   public
     function ReadLine: String;
     function ReadLine: String;
-{$IFDEF UNICODE}
     function ReadAnsiLine: AnsiString;
     function ReadAnsiLine: AnsiString;
-{$ENDIF}
     property CodePage: Cardinal write FCodePage;
     property CodePage: Cardinal write FCodePage;
     property Eof: Boolean read GetEof;
     property Eof: Boolean read GetEof;
   end;
   end;
@@ -116,7 +112,7 @@ type
   private
   private
     FSeekedToEnd: Boolean;
     FSeekedToEnd: Boolean;
     FUTF8NoPreamble: Boolean;
     FUTF8NoPreamble: Boolean;
-    procedure DoWrite(const S: AnsiString{$IFDEF UNICODE}; const UTF8: Boolean{$ENDIF});
+    procedure DoWrite(const S: AnsiString; const UTF8: Boolean);
   protected
   protected
     function CreateHandle(const AFilename: String;
     function CreateHandle(const AFilename: String;
       ACreateDisposition: TFileCreateDisposition; AAccess: TFileAccess;
       ACreateDisposition: TFileCreateDisposition; AAccess: TFileAccess;
@@ -125,10 +121,8 @@ type
     property UTF8NoPreamble: Boolean read FUTF8NoPreamble write FUTF8NoPreamble;
     property UTF8NoPreamble: Boolean read FUTF8NoPreamble write FUTF8NoPreamble;
     procedure Write(const S: String);
     procedure Write(const S: String);
     procedure WriteLine(const S: String);
     procedure WriteLine(const S: String);
-{$IFDEF UNICODE}
     procedure WriteAnsi(const S: AnsiString);
     procedure WriteAnsi(const S: AnsiString);
     procedure WriteAnsiLine(const S: AnsiString);
     procedure WriteAnsiLine(const S: AnsiString);
-{$ENDIF}
   end;
   end;
 
 
   TFileMapping = class
   TFileMapping = class
@@ -438,29 +432,21 @@ begin
 end;
 end;
 
 
 function TTextFileReader.ReadLine: String;
 function TTextFileReader.ReadLine: String;
-{$IFDEF UNICODE}
 var
 var
  S: RawByteString;
  S: RawByteString;
-{$ENDIF}
 begin
 begin
-{$IFDEF UNICODE}
  S := DoReadLine(True);
  S := DoReadLine(True);
  if FCodePage <> 0 then
  if FCodePage <> 0 then
    SetCodePage(S, FCodePage, False);
    SetCodePage(S, FCodePage, False);
  Result := String(S);
  Result := String(S);
-{$ELSE}
- Result := DoReadLine;
-{$ENDIF}
 end; 
 end; 
 
 
-{$IFDEF UNICODE}
 function TTextFileReader.ReadAnsiLine: AnsiString;
 function TTextFileReader.ReadAnsiLine: AnsiString;
 begin
 begin
   Result := DoReadLine(False);
   Result := DoReadLine(False);
 end;
 end;
-{$ENDIF}
 
 
-function TTextFileReader.DoReadLine{$IFDEF UNICODE}(const UTF8: Boolean){$ENDIF}: AnsiString;
+function TTextFileReader.DoReadLine(const UTF8: Boolean): AnsiString;
 var
 var
   I, L: Cardinal;
   I, L: Cardinal;
   S: AnsiString;
   S: AnsiString;
@@ -502,7 +488,7 @@ begin
       Break;
       Break;
     end;
     end;
   end;
   end;
-  {$IFDEF UNICODE}
+
   if not FSawFirstLine then begin
   if not FSawFirstLine then begin
     if UTF8 then begin
     if UTF8 then begin
       { Handle UTF8 as requested: check for a BOM at the start and if not found then check entire file }
       { Handle UTF8 as requested: check for a BOM at the start and if not found then check entire file }
@@ -526,7 +512,7 @@ begin
     end;
     end;
     FSawFirstLine := True;
     FSawFirstLine := True;
   end;
   end;
-  {$ENDIF}
+
   Result := S;
   Result := S;
 end;
 end;
 
 
@@ -545,17 +531,11 @@ begin
     ASharing);
     ASharing);
 end;
 end;
 
 
-{$IFDEF UNICODE}
 procedure TTextFileWriter.DoWrite(const S: AnsiString; const UTF8: Boolean);
 procedure TTextFileWriter.DoWrite(const S: AnsiString; const UTF8: Boolean);
-{$ELSE}
-procedure TTextFileWriter.DoWrite(const S: String);
-{$ENDIF}
 { Writes a string to the file, seeking to the end first if necessary }
 { Writes a string to the file, seeking to the end first if necessary }
 const
 const
   CRLF: array[0..1] of AnsiChar = (#13, #10);
   CRLF: array[0..1] of AnsiChar = (#13, #10);
-{$IFDEF UNICODE}
   UTF8Preamble: array[0..2] of AnsiChar = (#$EF, #$BB, #$BF);
   UTF8Preamble: array[0..2] of AnsiChar = (#$EF, #$BB, #$BF);
-{$ENDIF}
 var
 var
   I: Integer64;
   I: Integer64;
   C: AnsiChar;
   C: AnsiChar;
@@ -578,12 +558,8 @@ begin
         { Otherwise, append CRLF }
         { Otherwise, append CRLF }
         WriteBuffer(CRLF, SizeOf(CRLF));
         WriteBuffer(CRLF, SizeOf(CRLF));
       end;
       end;
-{$IFDEF UNICODE}
     end else if UTF8 and not FUTF8NoPreamble then
     end else if UTF8 and not FUTF8NoPreamble then
       WriteBuffer(UTF8Preamble, SizeOf(UTF8Preamble));
       WriteBuffer(UTF8Preamble, SizeOf(UTF8Preamble));
-{$ELSE}
-    end;
-{$ENDIF}
     FSeekedToEnd := True;
     FSeekedToEnd := True;
   end;
   end;
   WriteBuffer(Pointer(S)^, Length(S));
   WriteBuffer(Pointer(S)^, Length(S));
@@ -591,11 +567,7 @@ end;
 
 
 procedure TTextFileWriter.Write(const S: String);
 procedure TTextFileWriter.Write(const S: String);
 begin
 begin
-{$IFDEF UNICODE}
   DoWrite(UTF8Encode(S), True);
   DoWrite(UTF8Encode(S), True);
-{$ELSE}
-  DoWrite(S);
-{$ENDIF}
 end;
 end;
 
 
 procedure TTextFileWriter.WriteLine(const S: String);
 procedure TTextFileWriter.WriteLine(const S: String);
@@ -603,7 +575,6 @@ begin
   Write(S + #13#10);
   Write(S + #13#10);
 end;
 end;
 
 
-{$IFDEF UNICODE}
 procedure TTextFileWriter.WriteAnsi(const S: AnsiString);
 procedure TTextFileWriter.WriteAnsi(const S: AnsiString);
 begin
 begin
   DoWrite(S, False);
   DoWrite(S, False);
@@ -613,7 +584,6 @@ procedure TTextFileWriter.WriteAnsiLine(const S: AnsiString);
 begin
 begin
   WriteAnsi(S + #13#10);
   WriteAnsi(S + #13#10);
 end;
 end;
-{$ENDIF}
 
 
 { TFileMapping }
 { TFileMapping }
 
 

+ 0 - 14
Projects/ISPP/IsppFuncs.pas

@@ -1620,7 +1620,6 @@ end;
 
 
 function GetMD5OfUnicodeString(Ext: Longint; const Params: IIsppFuncParams;
 function GetMD5OfUnicodeString(Ext: Longint; const Params: IIsppFuncParams;
   const FuncResult: IIsppFuncResult): TIsppFuncResult; stdcall;
   const FuncResult: IIsppFuncResult): TIsppFuncResult; stdcall;
-{$IFDEF UNICODE}
 var
 var
   S: UnicodeString;
   S: UnicodeString;
 begin
 begin
@@ -1639,12 +1638,6 @@ begin
     end;
     end;
   end;
   end;
 end;
 end;
-{$ELSE}
-begin
-  FuncResult.Error('Cannot call "GetMD5OfUnicodeString" function during non Unicode compilation');
-  Result.Error := ISPPFUNC_FAIL
-end;
-{$ENDIF}
 
 
 function GetSHA1OfFile(Ext: Longint; const Params: IIsppFuncParams;
 function GetSHA1OfFile(Ext: Longint; const Params: IIsppFuncParams;
   const FuncResult: IIsppFuncResult): TIsppFuncResult; stdcall;
   const FuncResult: IIsppFuncResult): TIsppFuncResult; stdcall;
@@ -1703,7 +1696,6 @@ end;
 
 
 function GetSHA1OfUnicodeString(Ext: Longint; const Params: IIsppFuncParams;
 function GetSHA1OfUnicodeString(Ext: Longint; const Params: IIsppFuncParams;
   const FuncResult: IIsppFuncResult): TIsppFuncResult; stdcall;
   const FuncResult: IIsppFuncResult): TIsppFuncResult; stdcall;
-{$IFDEF UNICODE}
 var
 var
   S: UnicodeString;
   S: UnicodeString;
 begin
 begin
@@ -1722,12 +1714,6 @@ begin
     end;
     end;
   end;
   end;
 end;
 end;
-{$ELSE}
-begin
-  FuncResult.Error('Cannot call "GetSHA1OfUnicodeString" function during non Unicode compilation');
-  Result.Error := ISPPFUNC_FAIL
-end;
-{$ENDIF}
 
 
 function TrimFunc(Ext: Longint; const Params: IIsppFuncParams;
 function TrimFunc(Ext: Longint; const Params: IIsppFuncParams;
   const FuncResult: IIsppFuncResult): TIsppFuncResult; stdcall;
   const FuncResult: IIsppFuncResult): TIsppFuncResult; stdcall;

+ 0 - 11
Projects/ISPP/IsppPreprocessor.pas

@@ -1075,20 +1075,14 @@ begin
 end;
 end;
 
 
 procedure TPreprocessor.SaveToFile(const FileName: string);
 procedure TPreprocessor.SaveToFile(const FileName: string);
-{$IFDEF UNICODE}
 var
 var
   S: String;
   S: String;
-{$ENDIF}
 begin
 begin
-{$IFDEF UNICODE}
   S := FOutput.Text;
   S := FOutput.Text;
   if SameText(S, String(AnsiString(S))) then
   if SameText(S, String(AnsiString(S))) then
     FOutput.SaveToFile(FileName)
     FOutput.SaveToFile(FileName)
   else
   else
     FOutput.SaveToFile(FileName, TEncoding.UTF8);
     FOutput.SaveToFile(FileName, TEncoding.UTF8);
-{$ELSE}
-  FOutput.SaveToFile(FileName)
-{$ENDIF}
 end;
 end;
 
 
 function TPreprocessor.CheckFile(const FileName: string): Boolean;
 function TPreprocessor.CheckFile(const FileName: string): Boolean;
@@ -1404,13 +1398,8 @@ end;
 
 
 function LookupAlwaysDefined(const Name: string): Boolean;
 function LookupAlwaysDefined(const Name: string): Boolean;
 const
 const
-{$IFDEF UNICODE}
   AlwaysDefined: array[0..3] of string =
   AlwaysDefined: array[0..3] of string =
     ('ISPP_INVOKED', 'WINDOWS', '__WIN32__', 'UNICODE');
     ('ISPP_INVOKED', 'WINDOWS', '__WIN32__', 'UNICODE');
-{$ELSE}
-  AlwaysDefined: array[0..2] of string =
-    ('ISPP_INVOKED', 'WINDOWS', '__WIN32__');
-{$ENDIF}
 var
 var
   I: Integer;
   I: Integer;
 begin
 begin

+ 1 - 9
Projects/ScriptCompiler.pas

@@ -2,7 +2,7 @@ unit ScriptCompiler;
 
 
 {
 {
   Inno Setup
   Inno Setup
-  Copyright (C) 1997-2018 Jordan Russell
+  Copyright (C) 1997-2024 Jordan Russell
   Portions by Martijn Laan
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
   For conditions of distribution and use, see LICENSE.TXT.
 
 
@@ -363,10 +363,8 @@ begin
     LineLength := FindNewLine(FScriptText, LineStartPosition);
     LineLength := FindNewLine(FScriptText, LineStartPosition);
   end;
   end;
 
 
-{$IFDEF UNICODE}
   { Convert Position from the UTF8 encoded ANSI string index to a UTF-16 string index }
   { Convert Position from the UTF8 encoded ANSI string index to a UTF-16 string index }
   Position := Length(UTF8ToString(Copy(FScriptText, LineStartPosition, Position - 1))) + 1;
   Position := Length(UTF8ToString(Copy(FScriptText, LineStartPosition, Position - 1))) + 1;
-{$ENDIF}
   Col := Position;
   Col := Position;
 end;
 end;
 
 
@@ -465,11 +463,7 @@ var
 begin
 begin
   Result := False;
   Result := False;
 
 
-{$IFDEF UNICODE}
   FScriptText := UTF8Encode(ScriptText);
   FScriptText := UTF8Encode(ScriptText);
-{$ELSE}
-  FScriptText := ScriptText;
-{$ENDIF}
 
 
   for I := 0 to FExports.Count-1 do
   for I := 0 to FExports.Count-1 do
     TScriptExport(FExports[I]).Exported := False;
     TScriptExport(FExports[I]).Exported := False;
@@ -482,10 +476,8 @@ begin
     PSPascalCompiler.AllowNoBegin := True;
     PSPascalCompiler.AllowNoBegin := True;
     PSPascalCompiler.AllowNoEnd := True;
     PSPascalCompiler.AllowNoEnd := True;
     PSPascalCompiler.BooleanShortCircuit := True;
     PSPascalCompiler.BooleanShortCircuit := True;
-{$IFDEF UNICODE}
     PSPascalCompiler.AllowDuplicateRegister := False;
     PSPascalCompiler.AllowDuplicateRegister := False;
     PSPascalCompiler.UTF8Decode := True;
     PSPascalCompiler.UTF8Decode := True;
-{$ENDIF}
     PSPascalCompiler.AttributesOpenTokenID := CSTI_Less;
     PSPascalCompiler.AttributesOpenTokenID := CSTI_Less;
     PSPascalCompiler.AttributesCloseTokenID := CSTI_Greater;
     PSPascalCompiler.AttributesCloseTokenID := CSTI_Greater;
 
 

+ 5 - 12
Projects/Struct.pas

@@ -2,7 +2,7 @@ unit Struct;
 
 
 {
 {
   Inno Setup
   Inno Setup
-  Copyright (C) 1997-2020 Jordan Russell
+  Copyright (C) 1997-2024 Jordan Russell
   Portions by Martijn Laan
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
   For conditions of distribution and use, see LICENSE.TXT.
 
 
@@ -33,10 +33,10 @@ const
     this file it's recommended you change SetupID. Any change will do (like
     this file it's recommended you change SetupID. Any change will do (like
     changing the letters or numbers), as long as your format is
     changing the letters or numbers), as long as your format is
     unrecognizable by the standard Inno Setup. }
     unrecognizable by the standard Inno Setup. }
-  SetupID: TSetupID = 'Inno Setup Setup Data (6.3.0)'{$IFDEF UNICODE}+' (u)'{$ENDIF};
+  SetupID: TSetupID = 'Inno Setup Setup Data (6.3.0)';
   UninstallLogID: array[Boolean] of TUninstallLogID =
   UninstallLogID: array[Boolean] of TUninstallLogID =
     ('Inno Setup Uninstall Log (b)', 'Inno Setup Uninstall Log (b) 64-bit');
     ('Inno Setup Uninstall Log (b)', 'Inno Setup Uninstall Log (b) 64-bit');
-  MessagesHdrID: TMessagesHdrID = 'Inno Setup Messages (6.0.0)'{$IFDEF UNICODE}+' (u)'{$ENDIF};
+  MessagesHdrID: TMessagesHdrID = 'Inno Setup Messages (6.0.0) (u)';
   MessagesLangOptionsID: TMessagesLangOptionsID = '!mlo!001';
   MessagesLangOptionsID: TMessagesLangOptionsID = '!mlo!001';
   ZLIBID: TCompID = 'zlb'#26;
   ZLIBID: TCompID = 'zlb'#26;
   DiskSliceID: TDiskSliceID = 'idska32'#26;
   DiskSliceID: TDiskSliceID = 'idska32'#26;
@@ -61,8 +61,7 @@ type
     shAllowUNCPath, shUserInfoPage, shUsePreviousUserInfo,
     shAllowUNCPath, shUserInfoPage, shUsePreviousUserInfo,
     shUninstallRestartComputer, shRestartIfNeededByRun, shShowTasksTreeLines,
     shUninstallRestartComputer, shRestartIfNeededByRun, shShowTasksTreeLines,
     shAllowCancelDuringInstall, shWizardImageStretch, shAppendDefaultDirName,
     shAllowCancelDuringInstall, shWizardImageStretch, shAppendDefaultDirName,
-    shAppendDefaultGroupName, shEncryptionUsed,
-    {$IFNDEF UNICODE}shShowUndisplayableLanguages, {$ENDIF}shSetupLogging,
+    shAppendDefaultGroupName, shEncryptionUsed, shSetupLogging,
     shSignedUninstaller, shUsePreviousLanguage, shDisableWelcomePage,
     shSignedUninstaller, shUsePreviousLanguage, shDisableWelcomePage,
     shCloseApplications, shRestartApplications, shAllowNetworkDrive,
     shCloseApplications, shRestartApplications, shAllowNetworkDrive,
     shForceCloseApplications, shAppNameHasConsts, shUsePreviousPrivileges,
     shForceCloseApplications, shAppNameHasConsts, shUsePreviousPrivileges,
@@ -94,9 +93,6 @@ type
       AppModifyPath, CreateUninstallRegKey, Uninstallable, CloseApplicationsFilter,
       AppModifyPath, CreateUninstallRegKey, Uninstallable, CloseApplicationsFilter,
       SetupMutex, ChangesEnvironment, ChangesAssociations: String;
       SetupMutex, ChangesEnvironment, ChangesAssociations: String;
     LicenseText, InfoBeforeText, InfoAfterText, CompiledCodeText: AnsiString;
     LicenseText, InfoBeforeText, InfoAfterText, CompiledCodeText: AnsiString;
-{$IFNDEF UNICODE}
-    LeadBytes: set of AnsiChar;
-{$ENDIF}
     NumLanguageEntries, NumCustomMessageEntries, NumPermissionEntries,
     NumLanguageEntries, NumCustomMessageEntries, NumPermissionEntries,
       NumTypeEntries, NumComponentEntries, NumTaskEntries, NumDirEntries,
       NumTypeEntries, NumComponentEntries, NumTaskEntries, NumDirEntries,
       NumFileEntries, NumFileLocationEntries, NumIconEntries, NumIniEntries,
       NumFileEntries, NumFileLocationEntries, NumIconEntries, NumIniEntries,
@@ -137,13 +133,10 @@ const
 type
 type
   PSetupLanguageEntry = ^TSetupLanguageEntry;
   PSetupLanguageEntry = ^TSetupLanguageEntry;
   TSetupLanguageEntry = packed record
   TSetupLanguageEntry = packed record
-{$IFNDEF UNICODE}
-    { Note: LanguageName is Unicode }
-{$ENDIF}
     Name, LanguageName, DialogFontName, TitleFontName, WelcomeFontName,
     Name, LanguageName, DialogFontName, TitleFontName, WelcomeFontName,
       CopyrightFontName: String;
       CopyrightFontName: String;
     Data, LicenseText, InfoBeforeText, InfoAfterText: AnsiString;
     Data, LicenseText, InfoBeforeText, InfoAfterText: AnsiString;
-    LanguageID{$IFNDEF UNICODE}, LanguageCodePage{$ENDIF}: Cardinal;
+    LanguageID: Cardinal;
     DialogFontSize: Integer;
     DialogFontSize: Integer;
     TitleFontSize: Integer;
     TitleFontSize: Integer;
     WelcomeFontSize: Integer;
     WelcomeFontSize: Integer;