|
@@ -141,13 +141,7 @@ type
|
|
|
procedure AppRootDirComboBoxChange(Sender: TObject);
|
|
|
procedure NotCreateAppDirCheckClick(Sender: TObject);
|
|
|
procedure AppExeButtonClick(Sender: TObject);
|
|
|
- procedure AppFilesListBoxClick(Sender: TObject);
|
|
|
- procedure AppFilesListBoxDblClick(Sender: TObject);
|
|
|
procedure NotDisableProgramGroupPageCheckClick(Sender: TObject);
|
|
|
- procedure AppFilesEditButtonClick(Sender: TObject);
|
|
|
- procedure AppFilesRemoveButtonClick(Sender: TObject);
|
|
|
- procedure AppFilesListBoxDropFile(Sender: TDropListBox;
|
|
|
- const FileName: String);
|
|
|
procedure PasswordEditChange(Sender: TObject);
|
|
|
procedure OutputDirButtonClick(Sender: TObject);
|
|
|
procedure AllLanguagesButtonClick(Sender: TObject);
|
|
@@ -159,7 +153,6 @@ type
|
|
|
private
|
|
|
CurPage: TWizardPage;
|
|
|
FWizardName: String;
|
|
|
- FWizardFiles: TList; //todo: remove?
|
|
|
FLanguages: TStringList;
|
|
|
FFilesHelper: TWizardFormFilesHelper;
|
|
|
FResult: TWizardFormResult;
|
|
@@ -168,10 +161,6 @@ type
|
|
|
procedure SetWizardName(const WizardName: String);
|
|
|
procedure CurPageChanged;
|
|
|
function SkipCurPage: Boolean;
|
|
|
- //todo remove!!!
|
|
|
- procedure AddWizardFile(const Source: String; const RecurseSubDirs, CreateAllSubDirs: Boolean);
|
|
|
- procedure UpdateWizardFiles;
|
|
|
- procedure UpdateWizardFilesButtons;
|
|
|
procedure UpdateAppExeControls;
|
|
|
procedure UpdateAppAssocControls;
|
|
|
procedure UpdateAppIconsControls;
|
|
@@ -294,10 +283,9 @@ begin
|
|
|
FLanguages.Sorted := False;
|
|
|
FLanguages.Insert(0, LanguagesDefaultIsl);
|
|
|
|
|
|
- FFilesHelper := TWizardFormFilesHelper.Create(Handle, FWizardFiles,
|
|
|
- NotCreateAppDirCheck, AppFilesAddButton, AppFilesAddDirButton, AppFilesListBox);
|
|
|
-
|
|
|
- FWizardFiles := FFilesHelper.WizardFiles;
|
|
|
+ FFilesHelper := TWizardFormFilesHelper.Create(Handle,
|
|
|
+ NotCreateAppDirCheck, AppFilesListBox, AppFilesAddButton, AppFilesAddDirButton,
|
|
|
+ AppFilesEditButton, AppFilesRemoveButton);
|
|
|
|
|
|
InitFormFont(Self);
|
|
|
if Font.Name = 'Segoe UI' then begin
|
|
@@ -349,7 +337,6 @@ begin
|
|
|
{ AppFiles }
|
|
|
AppExeEdit.Text := PathExtractPath(NewParamStr(0)) + 'Examples\MyProg.exe';
|
|
|
AppExeRunCheck.Checked := True;
|
|
|
- UpdateWizardFilesButtons;
|
|
|
|
|
|
{ AppAssoc }
|
|
|
CreateAssocCheck.Checked := True;
|
|
@@ -595,47 +582,6 @@ end;
|
|
|
|
|
|
{---}
|
|
|
|
|
|
-procedure TWizardForm.AddWizardFile(const Source: String; const RecurseSubDirs, CreateAllSubDirs: Boolean);
|
|
|
-var
|
|
|
- WizardFile: PWizardFile;
|
|
|
-begin
|
|
|
- New(WizardFile);
|
|
|
- WizardFile.Source := Source;
|
|
|
- WizardFile.RecurseSubDirs := RecurseSubDirs;
|
|
|
- WizardFile.CreateAllSubDirs := CreateAllSubDirs;
|
|
|
- WizardFile.DestRootDirIsConstant := True;
|
|
|
- if not NotCreateAppDirCheck.Checked then
|
|
|
- WizardFile.DestRootDir := '{app}'
|
|
|
- else
|
|
|
- WizardFile.DestRootDir := '{win}';
|
|
|
- WizardFile.DestSubDir := '';
|
|
|
- FWizardFiles.Add(WizardFile);
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TWizardForm.UpdateWizardFiles;
|
|
|
-var
|
|
|
- WizardFile: PWizardFile;
|
|
|
- I: Integer;
|
|
|
-begin
|
|
|
- AppFilesListBox.Items.BeginUpdate;
|
|
|
- AppFilesListBox.Items.Clear;
|
|
|
- for I := 0 to FWizardFiles.Count-1 do begin
|
|
|
- WizardFile := FWizardFiles[i];
|
|
|
- AppFilesListBox.Items.Add(WizardFile.Source);
|
|
|
- end;
|
|
|
- AppFilesListBox.Items.EndUpdate;
|
|
|
- UpdateHorizontalExtent(AppFilesListBox);
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TWizardForm.UpdateWizardFilesButtons;
|
|
|
-var
|
|
|
- Enabled: Boolean;
|
|
|
-begin
|
|
|
- Enabled := AppFilesListBox.ItemIndex >= 0;
|
|
|
- AppFilesEditButton.Enabled := Enabled;
|
|
|
- AppFilesRemoveButton.Enabled := Enabled;
|
|
|
-end;
|
|
|
-
|
|
|
procedure TWizardForm.UpdateAppExeControls;
|
|
|
var
|
|
|
Enabled: Boolean;
|
|
@@ -762,60 +708,6 @@ begin
|
|
|
UpdateAppIconsControls;
|
|
|
end;
|
|
|
|
|
|
-procedure TWizardForm.AppFilesListBoxClick(Sender: TObject);
|
|
|
-begin
|
|
|
- UpdateWizardFilesButtons;
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TWizardForm.AppFilesListBoxDblClick(Sender: TObject);
|
|
|
-begin
|
|
|
- if AppFilesEditButton.Enabled then
|
|
|
- AppFilesEditButton.Click;
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TWizardForm.AppFilesListBoxDropFile(Sender: TDropListBox;
|
|
|
- const FileName: String);
|
|
|
-begin
|
|
|
- if DirExists(FileName) then
|
|
|
- AddWizardFile(AddBackslash(FileName) + '*', True, True)
|
|
|
- else
|
|
|
- AddWizardFile(FileName, False, False);
|
|
|
- UpdateWizardFiles;
|
|
|
- UpdateWizardFilesButtons;
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TWizardForm.AppFilesEditButtonClick(Sender: TObject);
|
|
|
-var
|
|
|
- WizardFileForm: TWizardFileForm;
|
|
|
- Index: Integer;
|
|
|
-begin
|
|
|
- WizardFileForm := TWizardFileForm.Create(Application);
|
|
|
- try
|
|
|
- Index := AppFilesListBox.ItemIndex;
|
|
|
- WizardFileForm.AllowAppDestRootDir := not NotCreateAppDirCheck.Checked;
|
|
|
- WizardFileForm.WizardFile := FWizardFiles[Index];
|
|
|
- if WizardFileForm.ShowModal = mrOK then begin
|
|
|
- UpdateWizardFiles;
|
|
|
- AppFilesListBox.ItemIndex := Index;
|
|
|
- AppFilesListBox.TopIndex := Index;
|
|
|
- UpdateWizardFilesButtons;
|
|
|
- end;
|
|
|
- finally
|
|
|
- WizardFileForm.Free;
|
|
|
- end;
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TWizardForm.AppFilesRemoveButtonClick(Sender: TObject);
|
|
|
-var
|
|
|
- I: Integer;
|
|
|
-begin
|
|
|
- I := AppFilesListBox.ItemIndex;
|
|
|
- Dispose(FWizardFiles[I]);
|
|
|
- FWizardFiles.Delete(I);
|
|
|
- UpdateWizardFiles;
|
|
|
- UpdateWizardFilesButtons;
|
|
|
-end;
|
|
|
-
|
|
|
procedure TWizardForm.CreateAssocCheckClick(Sender: TObject);
|
|
|
begin
|
|
|
UpdateAppAssocControls;
|
|
@@ -904,7 +796,6 @@ end;
|
|
|
procedure TWizardForm.GenerateScript;
|
|
|
var
|
|
|
Script, ISPP, Setup, Languages, Tasks, Files, Registry, INI, Icons, Run, UninstallDelete: String;
|
|
|
- WizardFile: PWizardFile;
|
|
|
I: Integer;
|
|
|
AppExeName, AppName, AppAmpEscapedName, AppAssocKey, LanguageName, LanguageMessagesFile: String;
|
|
|
begin
|
|
@@ -1019,15 +910,7 @@ begin
|
|
|
Registry := Registry + 'Root: HKA; Subkey: "Software\Classes\Applications\' + AppExeName + '\SupportedTypes"; ValueType: string; ValueName: ".myp"; ValueData: ""' + SNewLine;
|
|
|
end;
|
|
|
|
|
|
- for I := 0 to FWizardFiles.Count-1 do begin
|
|
|
- WizardFile := FWizardFiles[I];
|
|
|
- Files := Files + 'Source: "' + WizardFile.Source + '"; DestDir: "' + RemoveBackslashUnlessRoot(AddBackslash(WizardFile.DestRootDir) + WizardFile.DestSubDir) + '"; Flags: ignoreversion';
|
|
|
- if WizardFile.RecurseSubDirs then
|
|
|
- Files := Files + ' recursesubdirs';
|
|
|
- if WizardFile.CreateAllSubDirs then
|
|
|
- Files := Files + ' createallsubdirs';
|
|
|
- Files := Files + SNewLine;
|
|
|
- end;
|
|
|
+ FFilesHelper.AddScript(Files);
|
|
|
|
|
|
{ AppGroup }
|
|
|
if not NotCreateAppDirCheck.Checked then begin
|