浏览代码

Merge remote-tracking branch 'origin/is-6' into compiler-update

Martijn Laan 6 年之前
父节点
当前提交
58c8ea7e32
共有 2 个文件被更改,包括 14 次插入16 次删除
  1. 1 1
      ISHelp/isetup.xml
  2. 13 15
      Projects/Compile.pas

+ 1 - 1
ISHelp/isetup.xml

@@ -4231,7 +4231,7 @@ end;</pre></example>
 <setupvalid><link topic="yesnonotes"><tt>yes</tt> or <tt>no</tt></link></setupvalid>
 <setupvalid><link topic="yesnonotes"><tt>yes</tt> or <tt>no</tt></link></setupvalid>
 <setupdefault><tt>yes</tt></setupdefault>
 <setupdefault><tt>yes</tt></setupdefault>
 <body>
 <body>
-<p>If set to <tt>no</tt> the Setup Compiler will only check the script for errors and skip creating setup files.</p>
+<p>If set to <tt>no</tt> the Setup Compiler will only check the script for errors and skip creating setup files. Note: it will still clean the output directory and delete the manifest file, unless <tt>OutputDir</tt> and <tt>OutputManifestFile</tt> are set to an empty string.</p>
 </body>
 </body>
 </setuptopic>
 </setuptopic>
 
 

+ 13 - 15
Projects/Compile.pas

@@ -8756,21 +8756,19 @@ begin
     CheckCheckOrInstall('ChangesEnvironment', SetupHeader.ChangesEnvironment, cikDirectiveCheck);
     CheckCheckOrInstall('ChangesEnvironment', SetupHeader.ChangesEnvironment, cikDirectiveCheck);
     LineNumber := SetupDirectiveLines[ssChangesAssociations];
     LineNumber := SetupDirectiveLines[ssChangesAssociations];
     CheckCheckOrInstall('ChangesAssociations', SetupHeader.ChangesAssociations, cikDirectiveCheck);
     CheckCheckOrInstall('ChangesAssociations', SetupHeader.ChangesAssociations, cikDirectiveCheck);
-    if Output then begin
-      if OutputDir = '' then begin
-        LineNumber := SetupDirectiveLines[ssOutput];
-        AbortCompileOnLineFmt(SCompilerEntryInvalid2, ['Setup', 'OutputDir']);
-      end;
-      if (OutputBaseFileName = '') or (PathLastDelimiter(BadFileNameChars + '\', OutputBaseFileName) <> 0) then begin
-        LineNumber := SetupDirectiveLines[ssOutputBaseFileName];
-        AbortCompileOnLineFmt(SCompilerEntryInvalid2, ['Setup', 'OutputBaseFileName']);
-      end else if OutputBaseFileName = 'setup' then
-        WarningsList.Add(SCompilerOutputBaseFileNameSetup);
-      if (SetupDirectiveLines[ssOutputManifestFile] <> 0) and
-         ((OutputManifestFile = '') or (PathLastDelimiter(BadFilePathChars, OutputManifestFile) <> 0)) then begin
-        LineNumber := SetupDirectiveLines[ssOutputManifestFile];
-        AbortCompileOnLineFmt(SCompilerEntryInvalid2, ['Setup', 'OutputManifestFile']);
-      end;
+    if Output and (OutputDir = '') then begin
+      LineNumber := SetupDirectiveLines[ssOutput];
+      AbortCompileOnLineFmt(SCompilerEntryInvalid2, ['Setup', 'OutputDir']);
+    end;
+    if (Output and (OutputBaseFileName = '')) or (PathLastDelimiter(BadFileNameChars + '\', OutputBaseFileName) <> 0) then begin
+      LineNumber := SetupDirectiveLines[ssOutputBaseFileName];
+      AbortCompileOnLineFmt(SCompilerEntryInvalid2, ['Setup', 'OutputBaseFileName']);
+    end else if OutputBaseFileName = 'setup' then { Warn even if Output is False }
+      WarningsList.Add(SCompilerOutputBaseFileNameSetup);
+    if (SetupDirectiveLines[ssOutputManifestFile] <> 0) and
+       ((Output and (OutputManifestFile = '')) or (PathLastDelimiter(BadFilePathChars, OutputManifestFile) <> 0)) then begin
+      LineNumber := SetupDirectiveLines[ssOutputManifestFile];
+      AbortCompileOnLineFmt(SCompilerEntryInvalid2, ['Setup', 'OutputManifestFile']);
     end;
     end;
     if shAlwaysUsePersonalGroup in SetupHeader.Options then
     if shAlwaysUsePersonalGroup in SetupHeader.Options then
       UsedUserAreas.Add('AlwaysUsePersonalGroup');
       UsedUserAreas.Add('AlwaysUsePersonalGroup');