瀏覽代碼

Updated the New Script Wizard to use {autopf} instead of {pf}, etc.
Todo: add privileges option to it.

Martijn Laan 7 年之前
父節點
當前提交
a22b48a292
共有 3 個文件被更改,包括 12 次插入12 次删除
  1. 7 5
      Projects/CompWizard.pas
  2. 4 6
      Projects/CompWizardFile.pas
  3. 1 1
      whatsnew.htm

+ 7 - 5
Projects/CompWizard.pas

@@ -188,7 +188,7 @@ const
 
   AppRootDirs: array[0..0] of TConstant =
   (
-    ( Constant: '{pf}'; Description: 'Program Files folder')
+    ( Constant: '{autopf}'; Description: 'Program Files folder')
   );
 
   LanguagesDefaultIsl = 'Default.isl';
@@ -325,7 +325,7 @@ begin
   end;
 
   { Compiler }
-  OutputBaseFileNameEdit.Text := 'setup';
+  OutputBaseFileNameEdit.Text := 'mysetup';
   EncryptionCheck.Visible := ISCryptInstalled;
   EncryptionCheck.Checked := True;
   EncryptionCheck.Enabled := False;
@@ -957,7 +957,7 @@ begin
     if not NotCreateAppDirCheck.Checked then begin
       if UseCommonProgramsCheck.Enabled and UseCommonProgramsCheck.Checked then begin
         Setup := Setup + 'DisableProgramGroupPage=yes' + SNewLine;
-        Icons := Icons + 'Name: "{commonprograms}\' + AppNameEdit.Text + '"; Filename: "{app}\' + AppExeName + '"' + SNewLine;
+        Icons := Icons + 'Name: "{autoprograms}\' + AppNameEdit.Text + '"; Filename: "{app}\' + AppExeName + '"' + SNewLine;
       end else begin
         Setup := Setup + 'DefaultGroupName=' + AppGroupNameEdit.Text + SNewLine;
         if not NoAppExeCheck.Checked then
@@ -973,10 +973,12 @@ begin
       end;
       if DesktopIconCheck.Enabled and DesktopIconCheck.Checked then begin
         Tasks := Tasks + 'Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked' + SNewLine;
-        Icons := Icons + 'Name: "{commondesktop}\' + AppNameEdit.Text + '"; Filename: "{app}\' + AppExeName + '"; Tasks: desktopicon' + SNewLine;
+        Icons := Icons + 'Name: "{autodesktop}\' + AppNameEdit.Text + '"; Filename: "{app}\' + AppExeName + '"; Tasks: desktopicon' + SNewLine;
       end;
       if QuickLaunchIconCheck.Enabled and QuickLaunchIconCheck.Checked then begin
-        Tasks := Tasks + 'Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1' + SNewLine;
+        Setup := Setup + '; The [Icons] "quicklaunchicon" entry uses {userappdata} but its [Tasks] entry has a proper IsAdminInstallMode Check' + SNewLine + 
+                         'UsedUserAreasWarning=no';  
+        Tasks := Tasks + 'Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1; Check: not IsAdminInstallMode' + SNewLine;
         Icons := Icons + 'Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\' + AppNameEdit.Text + '"; Filename: "{app}\' + AppExeName + '"; Tasks: quicklaunchicon' + SNewLine;
       end;
     end;

+ 4 - 6
Projects/CompWizardFile.pas

@@ -72,17 +72,15 @@ type
   end;
 
 const
-  DestRootDirs: array[0..8] of TConstant =
+  DestRootDirs: array[0..6] of TConstant =
   (
     ( Constant: '{app}'; Description: 'Application directory'),
-    ( Constant: '{pf}'; Description: 'Program Files directory'),
-    ( Constant: '{cf}'; Description: 'Common Files directory'),
+    ( Constant: '{autopf}'; Description: 'Program Files directory'),
+    ( Constant: '{autocf}'; Description: 'Common Files directory'),
     ( Constant: '{win}'; Description: 'Windows directory'),
     ( Constant: '{sys}'; Description: 'Windows system directory'),
     ( Constant: '{src}'; Description: 'Setup source directory'),
-    ( Constant: '{sd}'; Description: 'System drive root directory'),
-    ( Constant: '{commonstartup}'; Description: 'Common Startup folder'),
-    ( Constant: '{userstartup}'; Description: 'User Startup folder')
+    ( Constant: '{sd}'; Description: 'System drive root directory')
   );
 
 procedure TWizardFileForm.SetWizardFile(WizardFile: PWizardFile);

+ 1 - 1
whatsnew.htm

@@ -39,7 +39,7 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
   <li>The <tt>{commonfavorites}</tt> constant has been removed: this directory doesn't exist anymore in Windows.</li>
   <li>The <tt>{pf}</tt> and <tt>{cf}</tt> constants have been renamed to <tt>{commonpf}</tt> and <tt>{commoncf}</tt>. This includes <tt>{pf32}</tt> to <tt>{commonpf32}</tt>, etc. The old names are still supported, but it is recommended to update your scripts to the new names.</tt>
   <li>The <tt>{userpf}</tt> and <tt>{usercf}</tt> constants and the <tt>AlwaysUsePersonalGroup</tt> [Setup] section directive can now correctly trigger a <a href="http://www.jrsoftware.org/files/is5-whatsnew.htm#useduserareaswarnings">used user areas warning</a>.</li>
-  <li>Updated all examples to use <tt>{autopf}</tt> instead of <tt>{pf}</tt>, etc.</li>
+  <li>Updated all examples and the New Script Wizard to use <tt>{autopf}</tt> instead of <tt>{pf}</tt>, etc.</li>
   <li>Pascal Scripting change: Removed the <tt>GetShellFolder</tt> support function. As the help file already recommended, use <tt>ExpandConstant</tt> instead.</li>
 </ul>
 <ul>