|
@@ -202,7 +202,6 @@ type
|
|
|
function FindSignToolIndexByName(const AName: String): Integer;
|
|
|
function GetLZMAExeFilename(const Allow64Bit: Boolean): String;
|
|
|
procedure InitBzipDLL;
|
|
|
- procedure InitCryptDLL;
|
|
|
procedure InitPreLangData(const APreLangData: TPreLangData);
|
|
|
procedure InitLanguageEntry(var ALanguageEntry: TSetupLanguageEntry);
|
|
|
procedure InitLZMADLL;
|
|
@@ -291,7 +290,7 @@ implementation
|
|
|
uses
|
|
|
Commctrl, TypInfo, AnsiStrings, Math, WideStrUtils,
|
|
|
PathFunc, Shared.CommonFunc, Compiler.Messages, Shared.SetupEntFunc,
|
|
|
- Shared.FileClass, Compression.Base, Compression.Zlib, Compression.bzlib, Shared.ArcFour, SHA1,
|
|
|
+ Shared.FileClass, Compression.Base, Compression.Zlib, Compression.bzlib, SHA1,
|
|
|
Shared.LangOptionsSectionDirectives, Shared.ResUpdateFunc, Compiler.ExeUpdateFunc,
|
|
|
{$IFDEF STATICPREPROC}
|
|
|
ISPP.Preprocess,
|
|
@@ -310,7 +309,7 @@ type
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
- ZipInitialized, BzipInitialized, LZMAInitialized, CryptInitialized: Boolean;
|
|
|
+ ZipInitialized, BzipInitialized, LZMAInitialized: Boolean;
|
|
|
PreprocessorInitialized: Boolean;
|
|
|
PreprocessScriptProc: TPreprocessScriptProc;
|
|
|
|
|
@@ -659,20 +658,6 @@ begin
|
|
|
Result := SlicesPerDisk;
|
|
|
end;
|
|
|
|
|
|
-procedure TSetupCompiler.InitCryptDLL;
|
|
|
-var
|
|
|
- M: HMODULE;
|
|
|
-begin
|
|
|
- if CryptInitialized then
|
|
|
- Exit;
|
|
|
- M := SafeLoadLibrary(CompilerDir + 'iscrypt.dll', SEM_NOOPENFILEERRORBOX);
|
|
|
- if M = 0 then
|
|
|
- AbortCompileFmt('Failed to load iscrypt.dll (%d)', [GetLastError]);
|
|
|
- if not ArcFourInitFunctions(M) then
|
|
|
- AbortCompile('Failed to get address of functions in iscrypt.dll');
|
|
|
- CryptInitialized := True;
|
|
|
-end;
|
|
|
-
|
|
|
function TSetupCompiler.FilenameToFileIndex(const AFilename: String): Integer;
|
|
|
begin
|
|
|
if not GotPrevFilename or (PathCompare(AFilename, PrevFilename) <> 0) then begin
|
|
@@ -6633,7 +6618,7 @@ var
|
|
|
ExeFile: TFile;
|
|
|
LicenseText, InfoBeforeText, InfoAfterText: AnsiString;
|
|
|
WizardImages, WizardSmallImages: TObjectList<TCustomMemoryStream>;
|
|
|
- DecompressorDLL, DecryptionDLL: TMemoryStream;
|
|
|
+ DecompressorDLL: TMemoryStream;
|
|
|
|
|
|
SetupLdrOffsetTable: TSetupLdrOffsetTable;
|
|
|
SizeOfExe, SizeOfHeaders: Longint;
|
|
@@ -6739,8 +6724,6 @@ var
|
|
|
WriteStream(WizardSmallImages[J], W);
|
|
|
if SetupHeader.CompressMethod in [cmZip, cmBzip] then
|
|
|
WriteStream(DecompressorDLL, W);
|
|
|
- if shEncryptionUsed in SetupHeader.Options then
|
|
|
- WriteStream(DecryptionDLL, W);
|
|
|
|
|
|
W.Finish;
|
|
|
finally
|
|
@@ -6908,12 +6891,6 @@ var
|
|
|
ChunkCompressed := False; { avoid warning }
|
|
|
CH := TCompressionHandler.Create(Self, FirstDestFile);
|
|
|
try
|
|
|
- { If encryption is used, load the encryption DLL }
|
|
|
- if shEncryptionUsed in SetupHeader.Options then begin
|
|
|
- AddStatus(SCompilerStatusFilesInitEncryption);
|
|
|
- InitCryptDLL;
|
|
|
- end;
|
|
|
-
|
|
|
if DiskSpanning then begin
|
|
|
if not CH.ReserveBytesOnSlice(BytesToReserveOnFirstDisk) then
|
|
|
AbortCompile(SCompilerNotEnoughSpaceOnFirstDisk);
|
|
@@ -7356,7 +7333,6 @@ begin
|
|
|
WizardSmallImages := nil;
|
|
|
SetupE32 := nil;
|
|
|
DecompressorDLL := nil;
|
|
|
- DecryptionDLL := nil;
|
|
|
|
|
|
try
|
|
|
Finalize(SetupHeader);
|
|
@@ -7870,14 +7846,6 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
- { Read decryption DLL }
|
|
|
- if shEncryptionUsed in SetupHeader.Options then begin
|
|
|
- AddStatus(Format(SCompilerStatusReadingFile, ['iscrypt.dll']));
|
|
|
- if not NewFileExists(CompilerDir + 'iscrypt.dll') then
|
|
|
- AbortCompile(SCompilerISCryptMissing);
|
|
|
- DecryptionDLL := CreateMemoryStreamFromFile(CompilerDir + 'iscrypt.dll');
|
|
|
- end;
|
|
|
-
|
|
|
{ Add default types if necessary }
|
|
|
if (ComponentEntries.Count > 0) and (TypeEntries.Count = 0) then begin
|
|
|
AddDefaultSetupType(DefaultTypeEntryNames[0], [], ttDefaultFull);
|
|
@@ -8057,7 +8025,6 @@ begin
|
|
|
UsedUserAreas.Clear;
|
|
|
WarningsList.Clear;
|
|
|
{ Free all the data }
|
|
|
- DecryptionDLL.Free;
|
|
|
DecompressorDLL.Free;
|
|
|
SetupE32.Free;
|
|
|
WizardSmallImages.Free;
|