浏览代码

As recommended by Microsoft's desktop applications guideline, the Compiler IDE's New Script Wizard now sets DisableWelcomePage to yes and, if applicable, sets DisableDirPage and DisableProgramGroupPage to auto. #168.

See https://msdn.microsoft.com/en-us/library/windows/desktop/dn742461.aspx

About the dir page it actually says "Don't ask questions about unimportant details. For example, for typical Windows programs it is safe to assume that you should copy program files to the Program Files folder." but this seems to go a bit to far.
Martijn Laan 10 年之前
父节点
当前提交
32fd92de36
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 5 4
      Projects/CompWizard.pas
  2. 1 0
      whatsnew.htm

+ 5 - 4
Projects/CompWizard.pas

@@ -823,6 +823,8 @@ end;
 { --- }
 
 procedure TWizardForm.GenerateScript;
+const
+  DisablePage: array [Boolean] of String = ('auto', 'yes');
 var
   Script, ISPP, Setup, Languages, Tasks, Files, INI, Icons, Run, UninstallDelete: String;
   WizardFile: PWizardFile;
@@ -898,8 +900,7 @@ begin
         Setup := Setup + 'DefaultDirName=' + AddBackslash(AppRootDirEdit.Text) + AppDirNameEdit.Text + SNewLine
       else
         Setup := Setup + 'DefaultDirName=' + AddBackslash(AppRootDirs[AppRootDirComboBox.ItemIndex].Constant) + AppDirNameEdit.Text + SNewLine;
-      if not NotDisableDirPageCheck.Checked then
-        Setup := Setup + 'DisableDirPage=yes' + SNewLine;
+      Setup := Setup + 'DisableDirPage=' + DisablePage[not NotDisableDirPageCheck.Checked] + SNewLine;
     end else begin
       Setup := Setup + 'CreateAppDir=no' + SNewLine;
     end;
@@ -930,8 +931,7 @@ begin
       Setup := Setup + 'DefaultGroupName=' + AppGroupNameEdit.Text + SNewLine;
       if not NoAppExeCheck.Checked then
         Icons := Icons + 'Name: "{group}\' + AppNameEdit.Text + '"; Filename: "{app}\' + AppExeName + '"' + SNewLine;
-      if not NotDisableProgramGroupPageCheck.Checked then
-        Setup := Setup + 'DisableProgramGroupPage=yes' + SNewLine;
+      Setup := Setup + 'DisableProgramGroupPage=' + DisablePage[not NotDisableProgramGroupPageCheck.Checked] + SNewLine;
       if AllowNoIconsCheck.Checked and NotDisableProgramGroupPageCheck.Checked then
         Setup := Setup + 'AllowNoIcons=yes' + SNewLine;
       if CreateURLIconCheck.Enabled and CreateURLIconCheck.Checked then
@@ -987,6 +987,7 @@ begin
     end;
 
     { Other }
+    Setup := Setup + 'DisableWelcomePage=yes' + SNewLine;
     Setup := Setup + 'Compression=lzma' + SNewLine;
     Setup := Setup + 'SolidCompression=yes' + SNewLine;
 

+ 1 - 0
whatsnew.htm

@@ -28,6 +28,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
 
 <p><a name="5.5.7"></a><span class="ver">5.5.7-dev </span><span class="date">(?)</span></p>
 <ul>
+<li>As recommended by Microsoft's desktop applications guideline, the Compiler IDE's New Script Wizard now sets <tt>DisableWelcomePage</tt> to <tt>yes</tt> and, if applicable, sets <tt>DisableDirPage</tt> and <tt>DisableProgramGroupPage</tt> to <tt>auto</tt>.</li>
 <li>The <tt>Attribs</tt> parameter of a [Files] or [Dir] entry may now also include <tt>notcontentindexed</tt> to specify that the file or directory is not to be indexed by the content indexing service.</li>
 <li>Pascal Scripting change: function <tt>RegQueryBinaryValue</tt> can now be used to query any type of registry value and not just <tt>REG_BINARY</tt>-type values.</li>
 <li>The Setup and Uninstall programs are now marked as DEP and ASLR compatible.</li>