Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Setup]
- #define MyAppName "XXX_XXX"
- #define MyAppVerName "XXXX Setup 9.2.0"
- [Code]
- var
- PageSQLSetupFile: TInputFileWizardPage;
- function MSSQLSETUPDIR_CreatePage(PreviousPageId: Integer): Integer;
- var
- Page: TWizardPage;
- BMPFile: String;
- begin
- SelectedSQLServerVersion := GetSQLServerVersion('');
- Page := CreateCustomPage(
- PreviousPageId,
- ExpandConstant('Database Settings'),
- ExpandConstant('Special note for the Microsoft ' + SelectedSQLServerVersion + ' Setup')
- );
- BMPFile:= ExpandConstant('{tmp}\caution.bmp');
- if not FileExists(BMPFile) then ExtractTemporaryFile(ExtractFileName(BMPFile));
- { BitmapImage1 }
- BitmapImage1 := TBitmapImage.Create(Page);
- with BitmapImage1 do
- begin
- Bitmap.LoadFromFile(BMPFile);
- Parent := Page.Surface;
- Left := ScaleX(8);
- Top := ScaleY(8);
- Width := ScaleX(97);
- Height := ScaleY(209);
- end;
- { NewStaticText1 }
- NewStaticText1 := TNewStaticText.Create(Page);
- with NewStaticText1 do
- begin
- Parent := Page.Surface;
- //Caption := 'To install Microsoft SQL Server 2008 you have to insert the Microsoft SQL Server 2008 Setup CD, when EcoEMOS setup requests it. The installation path of your Microsoft SQL Server 2008 setup and the additional Service Packs can be defined on the next pages.';
- Caption := 'To install Microsoft ' + SelectedSQLServerVersion + ' you have to insert the Microsoft SQL Server 2008 Setup CD, when EcoEMOS setup requests it. The installation path of your Microsoft SQL Server 2008 setup and the additional Service Packs can be defined on the next pages.';
- Log('Server is... ' + SelectedSQLServerVersion);
- Log('Caption is... ' + Caption);
- Left := ScaleX(112);
- Top := ScaleY(8);
- Width := ScaleX(292);
- Height := ScaleY(77);
- AutoSize := False;
- TabOrder := 0;
- WordWrap := True;
- end;
- { NewStaticText2 }
- NewStaticText2 := TNewStaticText.Create(Page);
- with NewStaticText2 do
- begin
- Parent := Page.Surface;
- Caption :=
- 'CAUTION: When autorun is activated, dont click in the autorun menu of Microsoft SQL Server 2008.' + #13 +
- 'Otherwise you must reboot your machine and restart the setup !';
- Left := ScaleX(112);
- Top := ScaleY(88);
- Width := ScaleX(293);
- Height := ScaleY(62);
- AutoSize := False;
- Font.Color := -16777208;
- Font.Height := ScaleY(-11);
- Font.Name := 'Tahoma';
- Font.Style := [fsBold];
- ParentFont := False;
- TabOrder := 1;
- WordWrap := True;
- end;
- with Page do
- begin
- OnActivate := @MSSQLSETUPDIR_Activate;
- OnShouldSkipPage := @MSSQLSETUPDIR_ShouldSkipPage;
- OnBackButtonClick := @MSSQLSETUPDIR_BackButtonClick;
- OnNextButtonClick := @MSSQLSETUPDIR_NextButtonClick;
- OnCancelButtonClick := @MSSQLSETUPDIR_CancelButtonClick;
- end;
- Result := Page.ID;
- end;
- procedure InitializeWizard();
- begin
- MyModeTypical := false;
- // Product Name
- PageProductName := CreateInputQueryPage(wpSelectComponents,
- 'Settings',
- 'Product Name',
- 'Please specify the product name, then click Next.');
- // Add items (False means it's not a password edit)
- PageProductName.Add('Product Name:', False);
- PageProductName.Values[0] := ProductName;
- // Dialog with special Caution Message for SQl Server Setup
- // see NewStaticText1 und NewStaticText2
- PageSQLSetupFile2 := MSSQLSETUPDIR_CreatePage(PageProductName.ID);
- // SQL Server Setup - Enter path to Setup CD
- PageSQLSetupFile := CreateInputFilePage(PageSQLSetupFile2,
- 'Database Settings',
- 'Caption',
- 'Description');
- // Add item
- if IsWin64 then begin
- PageSQLSetupFile.Add('Location of the Microsoft SQL Server 2008 (64-bit) Setup:',
- 'Microsoft SQL Server 2008 Setup file (SETUP.EXE)|SETUP.EXE|All files|*.*',
- 'SETUP.EXE');
- end else begin
- PageSQLSetupFile.Add('Location of the Microsoft SQL Server 2008 (x86) Setup:',
- 'Microsoft SQL Server 2008 Setup file (SETUP.EXE)|SETUP.EXE|All files|*.*',
- 'SETUP.EXE');
- end;
- PageSQLSetupFile.Values[0] := SQLServerSetupFile;
- end;
- procedure CurPageChanged(CurPageID: Integer);
- begin
- if CurPageID = PageDBServer.ID then begin
- // Check if Component DAS is selected and if yes, set local computer name as DB Server name
- if IsComponentSelected('DBS') then begin
- PageDBServer.Values[0] := MyComputerName;
- end else begin
- PageDBServer.Values[0] := MyDBServer;
- end;
- end else if CurPageID = PageNameservice.ID then begin
- // Check if Component WAS is selected and if yes, set local computer name as nameserver name
- if IsComponentSelected('WAS') then begin
- PageNameservice.Values[0] := MyComputerName;
- end else begin
- PageNameservice.Values[0] := Nameservice;
- end;
- end else if CurPageID = PageSQLSetupFile.ID then begin
- //Check if Component WAS is selected and if yes, set local computer name as nameserver name
- if SelectedSQLServerVersion <> '' then begin
- PageSQLSetupFile.Caption := 'Location of the Microsoft ' + SelectedSQLServerVersion + ' Setup ?';
- end else begin
- PageSQLSetupFile.Description := 'Enter the Microsoft ' + SelectedSQLServerVersion + ' setup path, then click Next.';
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement