spambayes/windows spambayes.iss,1.20,1.21

"Tony Meyer" <[email protected]>
Newsgroups gmane.mail.spam.spambayes.cvs
Message-ID <[email protected]>
Update of /cvsroot/spambayes/spambayes/windows
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21528/windows

Modified Files:
	spambayes.iss 
Log Message:
Optionally install imapfilter.

Optionally install the plug-in for all users.

Use a custom tasks page to handle the more complicated tasks we have now.

Index: spambayes.iss
===================================================================
RCS file: /cvsroot/spambayes/spambayes/windows/spambayes.iss,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** spambayes.iss	31 Jan 2005 22:21:34 -0000	1.20
--- spambayes.iss	29 Mar 2005 06:57:29 -0000	1.21
***************
*** 22,25 ****
--- 22,27 ----
  Source: "py2exe\dist\lib\*.*"; DestDir: "{app}\lib"; Flags: ignoreversion
  Source: "py2exe\dist\bin\python24.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
+ ; Needed when built with Python 2.4.  This must be manually copied to this directory
+ ; from wherever it is being sourced from.
  ; Source: "py2exe\dist\bin\msvcr71.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
  
***************
*** 41,44 ****
--- 43,48 ----
  Source: "py2exe\dist\docs\sb_server\*.*"; DestDir: "{app}\docs\sb_server"; Check: InstallingProxy; Flags: recursesubdirs
  
+ Source: "py2exe\dist\bin\sb_imapfilter.exe"; DestDir: "{app}\bin"; Check: InstallingIMAP; Flags: ignoreversion
+ 
  ; There is a problem attempting to get Inno to unregister our DLL.  If we mark our DLL
  ; as 'regserver', it installs and registers OK, but at uninstall time, it unregisters
***************
*** 53,63 ****
  ; a special case for that). We do both a single-user registration and then the all-user, because
  ; that keeps the script much simpler, and it doesn't do any harm.
! ;Filename: "{app}\bin\outlook_addin_register.exe"; Parameters: "HKEY_LOCAL_MACHINE"; StatusMsg: "Registering Outlook Addin for all users"; Check: OutlookAllUsers;
  [UninstallRun]
! Filename: "{app}\bin\outlook_addin_register.exe"; Parameters: "--unregister"; StatusMsg: "Unregistering Outlook Addin";Check: InstallingOutlook;
! 
! [Tasks]
! Name: startup; Description: "Execute SpamBayes each time Windows starts";
! Name: desktop; Description: "Add an icon to the desktop"; Flags: unchecked;
  
  [Run]
--- 57,63 ----
  ; a special case for that). We do both a single-user registration and then the all-user, because
  ; that keeps the script much simpler, and it doesn't do any harm.
! Filename: "{app}\bin\outlook_addin_register.exe"; Parameters: "HKEY_LOCAL_MACHINE"; StatusMsg: "Registering Outlook Addin for all users"; Check: InstallOutlookAllUsers;
  [UninstallRun]
! Filename: "{app}\bin\outlook_addin_register.exe"; Parameters: "--unregister"; StatusMsg: "Unregistering Outlook Addin"; Check: InstallingOutlook;
  
  [Run]
***************
*** 65,76 ****
  
  [Icons]
! Name: "{group}\SpamBayes Tray Icon"; Filename: "{app}\bin\sb_tray.exe"; Check: InstallingProxy
! Name: "{userdesktop}\SpamBayes Tray Icon"; Filename: "{app}\bin\sb_tray.exe"; Check: InstallingProxy; Tasks: desktop
! Name: "{userstartup}\SpamBayes Tray Icon"; Filename: "{app}\bin\sb_tray.exe"; Check: InstallingProxy; Tasks: startup
  Name: "{group}\About SpamBayes"; Filename: "{app}\docs\sb_server\readme_proxy.html"; Check: InstallingProxy;
  Name: "{group}\Troubleshooting Guide"; Filename: "{app}\docs\sb_server\troubleshooting.html"; Check: InstallingProxy;
  
! Name: "{group}\SpamBayes Outlook Addin\About SpamBayes"; Filename: "{app}\docs\outlook\about.html"; Check: InstallingOutlook
! Name: "{group}\SpamBayes Outlook Addin\Troubleshooting Guide"; Filename: "{app}\docs\outlook\docs\troubleshooting.html"; Check: InstallingOutlook
  
  [UninstallDelete]
--- 65,79 ----
  
  [Icons]
! Name: "{group}\SpamBayes Tray Icon"; Filename: "{app}\bin\sb_tray.exe"; Check: InstallingProxy;
! Name: "{userdesktop}\SpamBayes Tray Icon"; Filename: "{app}\bin\sb_tray.exe"; Check: DesktopIcon;
! Name: "{userstartup}\SpamBayes Tray Icon"; Filename: "{app}\bin\sb_tray.exe"; Check: StartupProxy;
  Name: "{group}\About SpamBayes"; Filename: "{app}\docs\sb_server\readme_proxy.html"; Check: InstallingProxy;
  Name: "{group}\Troubleshooting Guide"; Filename: "{app}\docs\sb_server\troubleshooting.html"; Check: InstallingProxy;
  
! Name: "{group}\SpamBayes IMAP Filter Web Interface"; Filename: "{app}\sb_imapfilter.exe"; Parameters: "-b"; Check: InstallingIMAP;
! Name: "{userstartup}\SpamBayes IMAP Filter"; Filename: "{app}\bin\sb_imapfilter.exe"; Parameters: "-c -t"; Check: StartupIMAP;
! 
! Name: "{group}\SpamBayes Outlook Addin\About SpamBayes"; Filename: "{app}\docs\outlook\about.html"; Check: InstallingOutlook;
! Name: "{group}\SpamBayes Outlook Addin\Troubleshooting Guide"; Filename: "{app}\docs\outlook\docs\troubleshooting.html"; Check: InstallingOutlook;
  
  [UninstallDelete]
***************
*** 78,83 ****
  [Code]
  var
!   InstallOutlook, InstallProxy: Boolean;
    WarnedNoOutlook, WarnedBoth : Boolean;
  
  function InstallingOutlook() : Boolean;
--- 81,87 ----
  [Code]
  var
!   InstallOutlook, InstallProxy, InstallIMAP: Boolean;
    WarnedNoOutlook, WarnedBoth : Boolean;
+   startup, desktop, allusers, startup_imap : Boolean; // Tasks
  
  function InstallingOutlook() : Boolean;
***************
*** 89,92 ****
--- 93,117 ----
    Result := InstallProxy;
  end;
+ function InstallingIMAP() : Boolean;
+ begin
+   Result := InstallIMAP;
+ end;
+ 
+ function StartupProxy() : Boolean;
+ begin
+   Result := startup;
+ end;
+ function DesktopIcon() : Boolean;
+ begin
+   Result := desktop;
+ end;
+ function InstallOutlookAllUsers() : Boolean;
+ begin
+   Result := allusers;
+ end;
+ function StartupIMAP() : Boolean;
+ begin
+   Result := startup_imap;
+ end;
  
  function IsOutlookInstalled() : Boolean;
***************
*** 139,159 ****
      if IsOutlookInstalled() then begin
        InstallOutlook := True;
!       InstallProxy := False
      end
      else begin
        InstallOutlook := False;
        InstallProxy := True;
      end;
  end;
  
  // Inno has a pretty primitive "Components/Tasks" concept that
! // doesn't quite fit what we want - so we create a custom wizard page.
  
  var
    ComponentsPage: TInputOptionWizardPage;
  
  procedure InitializeWizard;
  begin
!   { Create the pages }
  
    ComponentsPage := CreateInputOptionPage(wpWelcome,
--- 164,191 ----
      if IsOutlookInstalled() then begin
        InstallOutlook := True;
!       InstallProxy := False;
!       InstallIMAP := False;
      end
      else begin
        InstallOutlook := False;
        InstallProxy := True;
+       InstallIMAP := False;
      end;
+     startup := False;
+     desktop := False;
+     allusers := False;
+     startup_imap := False;
  end;
  
  // Inno has a pretty primitive "Components/Tasks" concept that
! // doesn't quite fit what we want - so we create custom wizard pages.
  
  var
    ComponentsPage: TInputOptionWizardPage;
+   TasksPage: TInputOptionWizardPage;
  
  procedure InitializeWizard;
  begin
!   { Create the Components page }
  
    ComponentsPage := CreateInputOptionPage(wpWelcome,
***************
*** 167,170 ****
--- 199,203 ----
      ComponentsPage.Add('Microsoft Outlook Addin (Outlook does not appear to be installed)');
    ComponentsPage.Add('Server/Proxy Application, for all other POP based mail clients, including Outlook Express');
+   ComponentsPage.Add('IMAP Filter Application, for all other IMAP based mail clients');
  
    { Set default values based on whether or not Outlook is installed. }
***************
*** 172,181 ****
    if InstallOutlook then ComponentsPage.Values[0] := True else ComponentsPage.Values[0] := False;
    if InstallProxy then ComponentsPage.Values[1] := True else ComponentsPage.Values[1] := False;
! end;
  
! function ShouldSkipPage(PageID: Integer): Boolean;
! begin
!   { Skip pages that shouldn't be shown }
!   Result := (PageID = wpSelectTasks) and (not InstallProxy);
  end;
  
--- 205,216 ----
    if InstallOutlook then ComponentsPage.Values[0] := True else ComponentsPage.Values[0] := False;
    if InstallProxy then ComponentsPage.Values[1] := True else ComponentsPage.Values[1] := False;
!   if InstallIMAP then ComponentsPage.Values[2] := True else ComponentsPage.Values[2] := False;
  
!   { Create the Tasks page.  Note that this is empty and gets replaced later. }
!   TasksPage := CreateInputOptionPage(ComponentsPage.ID,
!     'Select additional tasks',
!     'Which additional tasks should be performed?',
!     'Select the components you would like Setup to perform while installing SpamBayes, then click Next.',
!     False, False);
  end;
  
***************
*** 185,191 ****
--- 220,243 ----
  begin
    { Validate certain pages before allowing the user to proceed }
+   if CurPageID = TasksPage.ID then begin
+     I := 0;
+     if InstallOutlook then begin
+       allusers := TasksPage.Values[I];
+       I := I + 1;
+     end;
+     if InstallProxy then begin
+       startup := TasksPage.Values[I];
+       desktop := TasksPage.Values[I+1];
+       I := I + 2;
+     end;
+     if InstallIMAP then begin
+       startup_imap := TasksPage.Values[I];
+       I := I + 1;
+     end;
+   end;
    if CurPageID = ComponentsPage.ID then begin
      InstallOutlook := ComponentsPage.Values[0];
      InstallProxy := ComponentsPage.Values[1];
+     InstallIMAP := ComponentsPage.Values[2];
  
      if InstallOutlook and not IsOutlookInstalled and not WarnedNoOutlook then begin
***************
*** 201,207 ****
        end else
          Result := False;
!     end else if InstallOutlook and InstallProxy and not WarnedBoth then begin
        if MsgBox(
!             'You have selected to install both the Outlook Addin and the Server/Proxy Applications.' + #13 + #13 +
              'Unless you regularly use both Outlook and another mailer on the same system,' + #13 +
              'you do not need both applications.' + #13 + #13 +
--- 253,259 ----
        end else
          Result := False;
!     end else if InstallOutlook and (InstallProxy or InstallIMAP) and not WarnedBoth then begin
        if MsgBox(
!             'You have selected to install both the Outlook Addin and the Server/Proxy/IMAP Applications.' + #13 + #13 +
              'Unless you regularly use both Outlook and another mailer on the same system,' + #13 +
              'you do not need both applications.' + #13 + #13 +
***************
*** 212,216 ****
        end else
          Result := False;
!     end else if not InstallOutlook and not InstallProxy then begin
        MsgBox('You must select one of the applications.', mbError, MB_OK);
        Result := False;
--- 264,268 ----
        end else
          Result := False;
!     end else if not InstallOutlook and not InstallProxy and not InstallIMAP then begin
        MsgBox('You must select one of the applications.', mbError, MB_OK);
        Result := False;
***************
*** 218,223 ****
        // we got to here, we are OK.
        Result := True;
!   end else
!     Result := True;
  end;
  
--- 270,291 ----
        // we got to here, we are OK.
        Result := True;
! 
!     // Generate the Tasks page based on the component selections.
!     TasksPage.Free();
!     TasksPage := CreateInputOptionPage(ComponentsPage.ID,
!       'Select additional tasks',
!       'Which additional tasks should be performed?',
!       'Select the components you would like Setup to perform while installing SpamBayes, then click Next.',
!       False, False);
!     if InstallOutlook then
!       TasksPage.Add('Register add-in for all users');
!     if InstallProxy then begin
!       TasksPage.Add('Execute SpamBayes each time Windows starts');
!       TasksPage.Add('Add an icon to the desktop');
!     end;
!     if InstallIMAP then
!       TasksPage.Add('Automatically execute IMAP filter periodically');
!     end else
!       Result := True;
  end;
  
***************
*** 231,239 ****
    if InstallOutlook then S := S + Space + 'Outlook Addin' + NewLine
    if InstallProxy then S := S + Space + 'Server/Proxy Application' + NewLine
    S := S + NewLine;
    
    S := S + MemoDirInfo + NewLine + NewLine;
    S := S + MemoGroupInfo + NewLine + NewLine;
!   S := S + MemoTasksInfo;
  
    Result := S;
--- 299,313 ----
    if InstallOutlook then S := S + Space + 'Outlook Addin' + NewLine
    if InstallProxy then S := S + Space + 'Server/Proxy Application' + NewLine
+   if InstallIMAP then S := S + Space + 'IMAP Filter Application' + NewLine
    S := S + NewLine;
    
    S := S + MemoDirInfo + NewLine + NewLine;
    S := S + MemoGroupInfo + NewLine + NewLine;
! 
!   S := S + 'Additional Tasks:' + NewLine;
!   if startup then S := S + Space + 'Run Proxy on Startup' + NewLine
!   if desktop then S := S + Space + 'Install Proxy Desktop Icon' + NewLine
!   if allusers then S := S + Space + 'Install Addin for all users' + NewLine
!   if startup_imap then S := S + Space + 'Automatically run Filter' + NewLine
  
    Result := S;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.