Преглед на файлове

Don't allow Excludes and extractarchive. Does not mean all other parameters and flags will be okay, need to check later.

Martijn Laan преди 3 месеца
родител
ревизия
db0d0fbfaa
променени са 2 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 1 0
      Projects/Src/Compiler.Messages.pas
  2. 3 1
      Projects/Src/Compiler.SetupCompiler.pas

+ 1 - 0
Projects/Src/Compiler.Messages.pas

@@ -224,6 +224,7 @@ const
   SCompilerParamFlagMissing = 'Flag "%s" must be used if flag "%s" is used';
   SCompilerParamFlagMissing2 = 'Flag "%s" must be used if parameter "%s" is used';
   SCompilerParamFlagMissing3 = 'Flag "%s" must be used if flags "%s" and "%s" are both used';
+  SCompilerParamFlagNotAllowed = 'Flag "%s" must not be used if parameter "%s" is used';
 
   { Types, components, tasks, check, beforeinstall, afterinstall }
   SCompilerParamUnknownType = 'Parameter "%s" includes an unknown type';

+ 3 - 1
Projects/Src/Compiler.SetupCompiler.pas

@@ -5433,7 +5433,9 @@ begin
           if not ExternalFile then
             AbortCompileFmt(SCompilerParamFlagMissing, ['external', 'extractarchive'])
           else if SetupHeader.SevenZipLibraryName = '' then
-            AbortCompileFmt(SCompilerEntryValueUnsupported, ['Setup', 'ArchiveExtraction', 'basic', 'extractarchive']);
+            AbortCompileFmt(SCompilerEntryValueUnsupported, ['Setup', 'ArchiveExtraction', 'basic', 'extractarchive'])
+          else if AExcludes.Count > 0 then
+            AbortCompileFmt(SCompilerParamFlagNotAllowed, [ParamFilesExcludes, 'extractarchive']);
         end;
 
         if (ISSigKeyEntries.Count = 0) and (foISSigVerify in Options) then