|
@@ -2,13 +2,11 @@ unit CompWizard;
|
|
|
|
|
|
{
|
|
{
|
|
Inno Setup
|
|
Inno Setup
|
|
- Copyright (C) 1997-2010 Jordan Russell
|
|
|
|
|
|
+ Copyright (C) 1997-2015 Jordan Russell
|
|
Portions by Martijn Laan
|
|
Portions by Martijn Laan
|
|
For conditions of distribution and use, see LICENSE.TXT.
|
|
For conditions of distribution and use, see LICENSE.TXT.
|
|
|
|
|
|
Compiler Script Wizard form
|
|
Compiler Script Wizard form
|
|
-
|
|
|
|
- $jrsoftware: issrc/Projects/CompWizard.pas,v 1.68 2011/04/16 05:51:19 jr Exp $
|
|
|
|
}
|
|
}
|
|
|
|
|
|
interface
|
|
interface
|
|
@@ -108,6 +106,7 @@ type
|
|
AllLanguagesButton: TButton;
|
|
AllLanguagesButton: TButton;
|
|
NoLanguagesButton: TButton;
|
|
NoLanguagesButton: TButton;
|
|
NoAppExeCheck: TCheckBox;
|
|
NoAppExeCheck: TCheckBox;
|
|
|
|
+ UseCommonProgramsCheck: TCheckBox;
|
|
procedure FormCreate(Sender: TObject);
|
|
procedure FormCreate(Sender: TObject);
|
|
procedure FormShow(Sender: TObject);
|
|
procedure FormShow(Sender: TObject);
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
@@ -132,6 +131,7 @@ type
|
|
procedure AllLanguagesButtonClick(Sender: TObject);
|
|
procedure AllLanguagesButtonClick(Sender: TObject);
|
|
procedure NoLanguagesButtonClick(Sender: TObject);
|
|
procedure NoLanguagesButtonClick(Sender: TObject);
|
|
procedure NoAppExeCheckClick(Sender: TObject);
|
|
procedure NoAppExeCheckClick(Sender: TObject);
|
|
|
|
+ procedure UseCommonProgramsCheckClick(Sender: TObject);
|
|
private
|
|
private
|
|
CurPage: TWizardPage;
|
|
CurPage: TWizardPage;
|
|
FWizardName: String;
|
|
FWizardName: String;
|
|
@@ -149,6 +149,7 @@ type
|
|
procedure UpdateWizardFiles;
|
|
procedure UpdateWizardFiles;
|
|
procedure UpdateWizardFilesButtons;
|
|
procedure UpdateWizardFilesButtons;
|
|
procedure UpdateAppExeControls;
|
|
procedure UpdateAppExeControls;
|
|
|
|
+ procedure UpdateAppIconsControls;
|
|
procedure GenerateScript;
|
|
procedure GenerateScript;
|
|
public
|
|
public
|
|
property WizardName: String write SetWizardName;
|
|
property WizardName: String write SetWizardName;
|
|
@@ -315,6 +316,7 @@ begin
|
|
UpdateWizardFilesButtons;
|
|
UpdateWizardFilesButtons;
|
|
|
|
|
|
{ AppIcons }
|
|
{ AppIcons }
|
|
|
|
+ UseCommonProgramsCheck.Checked := True;
|
|
NotDisableProgramGroupPageCheck.Checked := True;
|
|
NotDisableProgramGroupPageCheck.Checked := True;
|
|
DesktopIconCheck.Checked := True;
|
|
DesktopIconCheck.Checked := True;
|
|
|
|
|
|
@@ -409,7 +411,13 @@ begin
|
|
else
|
|
else
|
|
ActiveControl := AppFilesListBox;
|
|
ActiveControl := AppFilesListBox;
|
|
end;
|
|
end;
|
|
- wpAppIcons: ActiveControl := AppGroupNameEdit;
|
|
|
|
|
|
+ wpAppIcons:
|
|
|
|
+ begin
|
|
|
|
+ if UseCommonProgramsCheck.Enabled then
|
|
|
|
+ ActiveControl := UseCommonProgramsCheck
|
|
|
|
+ else
|
|
|
|
+ ActiveControl := AppGroupNameEdit;
|
|
|
|
+ end;
|
|
wpAppDocs: ActiveControl := AppLicenseFileEdit;
|
|
wpAppDocs: ActiveControl := AppLicenseFileEdit;
|
|
wpLanguages: ActiveControl := LanguagesList;
|
|
wpLanguages: ActiveControl := LanguagesList;
|
|
wpCompiler: ActiveControl := OutputDirEdit;
|
|
wpCompiler: ActiveControl := OutputDirEdit;
|
|
@@ -519,11 +527,7 @@ begin
|
|
{ Even if we're skipping a page, we should still update it }
|
|
{ Even if we're skipping a page, we should still update it }
|
|
case CurPage of
|
|
case CurPage of
|
|
wpAppDir: if AppDirNameEdit.Text = '' then AppDirNameEdit.Text := AppNameEdit.Text;
|
|
wpAppDir: if AppDirNameEdit.Text = '' then AppDirNameEdit.Text := AppNameEdit.Text;
|
|
- wpAppIcons:
|
|
|
|
- begin
|
|
|
|
- if AppGroupNameEdit.Text = '' then AppGroupNameEdit.Text := AppNameEdit.Text;
|
|
|
|
- CreateURLIconCheck.Enabled := AppURLEdit.Text <> '';
|
|
|
|
- end;
|
|
|
|
|
|
+ wpAppIcons: if AppGroupNameEdit.Text = '' then AppGroupNameEdit.Text := AppNameEdit.Text;
|
|
end;
|
|
end;
|
|
until not SkipCurPage;
|
|
until not SkipCurPage;
|
|
|
|
|
|
@@ -608,6 +612,28 @@ begin
|
|
AppExeLabel.Font.Style := AppExeLabel.Font.Style - [fsBold];
|
|
AppExeLabel.Font.Style := AppExeLabel.Font.Style - [fsBold];
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TWizardForm.UpdateAppIconsControls;
|
|
|
|
+var
|
|
|
|
+ Enabled: Boolean;
|
|
|
|
+begin
|
|
|
|
+ UseCommonProgramsCheck.Enabled := NoAppExeCheck.Enabled and not NoAppExeCheck.Checked;
|
|
|
|
+
|
|
|
|
+ Enabled := not (UseCommonProgramsCheck.Enabled and UseCommonProgramsCheck.Checked);
|
|
|
|
+
|
|
|
|
+ AppGroupNameLabel.Enabled := Enabled;
|
|
|
|
+ AppGroupNameEdit.Enabled := Enabled;
|
|
|
|
+ AppGroupNameEdit.Color := EnabledColors[Enabled];
|
|
|
|
+ NotDisableProgramGroupPageCheck.Enabled := Enabled;
|
|
|
|
+ AllowNoIconsCheck.Enabled := Enabled and NotDisableProgramGroupPageCheck.Checked;
|
|
|
|
+ CreateURLIconCheck.Enabled := Enabled and (AppURLEdit.Text <> '');
|
|
|
|
+ CreateUninstallIconCheck.Enabled := Enabled;
|
|
|
|
+
|
|
|
|
+ if Enabled then
|
|
|
|
+ AppGroupNameLabel.Font.Style := AppGroupNameLabel.Font.Style + [fsBold]
|
|
|
|
+ else
|
|
|
|
+ AppGroupNameLabel.Font.Style := AppGroupNameLabel.Font.Style - [fsBold];
|
|
|
|
+end;
|
|
|
|
+
|
|
{---}
|
|
{---}
|
|
|
|
|
|
procedure TWizardForm.AppRootDirComboBoxChange(Sender: TObject);
|
|
procedure TWizardForm.AppRootDirComboBoxChange(Sender: TObject);
|
|
@@ -663,6 +689,7 @@ end;
|
|
procedure TWizardForm.NoAppExeCheckClick(Sender: TObject);
|
|
procedure TWizardForm.NoAppExeCheckClick(Sender: TObject);
|
|
begin
|
|
begin
|
|
UpdateAppExeControls;
|
|
UpdateAppExeControls;
|
|
|
|
+ UpdateAppIconsControls;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TWizardForm.AppFilesListBoxClick(Sender: TObject);
|
|
procedure TWizardForm.AppFilesListBoxClick(Sender: TObject);
|
|
@@ -755,10 +782,15 @@ begin
|
|
UpdateWizardFilesButtons;
|
|
UpdateWizardFilesButtons;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TWizardForm.UseCommonProgramsCheckClick(Sender: TObject);
|
|
|
|
+begin
|
|
|
|
+ UpdateAppIconsControls;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TWizardForm.NotDisableProgramGroupPageCheckClick(
|
|
procedure TWizardForm.NotDisableProgramGroupPageCheckClick(
|
|
Sender: TObject);
|
|
Sender: TObject);
|
|
begin
|
|
begin
|
|
- AllowNoIconsCheck.Enabled := NotDisableProgramGroupPageCheck.Checked;
|
|
|
|
|
|
+ UpdateAppIconsControls;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TWizardForm.FileButtonClick(Sender: TObject);
|
|
procedure TWizardForm.FileButtonClick(Sender: TObject);
|
|
@@ -927,17 +959,22 @@ begin
|
|
|
|
|
|
{ AppGroup }
|
|
{ AppGroup }
|
|
if not NotCreateAppDirCheck.Checked then begin
|
|
if not NotCreateAppDirCheck.Checked then 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
|
|
|
|
|
|
+ if UseCommonProgramsCheck.Enabled and UseCommonProgramsCheck.Checked then begin
|
|
Setup := Setup + 'DisableProgramGroupPage=yes' + SNewLine;
|
|
Setup := Setup + 'DisableProgramGroupPage=yes' + SNewLine;
|
|
- if AllowNoIconsCheck.Checked and NotDisableProgramGroupPageCheck.Checked then
|
|
|
|
- Setup := Setup + 'AllowNoIcons=yes' + SNewLine;
|
|
|
|
- if CreateURLIconCheck.Enabled and CreateURLIconCheck.Checked then
|
|
|
|
- Icons := Icons + 'Name: "{group}\{cm:ProgramOnTheWeb,' + AppNameEdit.Text + '}"; Filename: "' + AppURLEdit.Text + '"' + SNewLine;
|
|
|
|
- if CreateUninstallIconCheck.Checked then
|
|
|
|
- Icons := Icons + 'Name: "{group}\{cm:UninstallProgram,' + AppNameEdit.Text + '}"; Filename: "{uninstallexe}"' + SNewLine;
|
|
|
|
|
|
+ Icons := Icons + 'Name: "{commonprograms}\' + AppNameEdit.Text + '"; Filename: "{app}\' + AppExeName + '"' + SNewLine;
|
|
|
|
+ end else 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;
|
|
|
|
+ if AllowNoIconsCheck.Checked and NotDisableProgramGroupPageCheck.Checked then
|
|
|
|
+ Setup := Setup + 'AllowNoIcons=yes' + SNewLine;
|
|
|
|
+ if CreateURLIconCheck.Enabled and CreateURLIconCheck.Checked then
|
|
|
|
+ Icons := Icons + 'Name: "{group}\{cm:ProgramOnTheWeb,' + AppNameEdit.Text + '}"; Filename: "' + AppURLEdit.Text + '"' + SNewLine;
|
|
|
|
+ if CreateUninstallIconCheck.Checked then
|
|
|
|
+ Icons := Icons + 'Name: "{group}\{cm:UninstallProgram,' + AppNameEdit.Text + '}"; Filename: "{uninstallexe}"' + SNewLine;
|
|
|
|
+ end;
|
|
if DesktopIconCheck.Enabled and DesktopIconCheck.Checked then begin
|
|
if DesktopIconCheck.Enabled and DesktopIconCheck.Checked then begin
|
|
Tasks := Tasks + 'Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked' + SNewLine;
|
|
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: "{commondesktop}\' + AppNameEdit.Text + '"; Filename: "{app}\' + AppExeName + '"; Tasks: desktopicon' + SNewLine;
|