unit XData.Wizard.Registration;

interface

procedure Register;

implementation

uses
  ToolsAPI, XData.Wizard;

var
  SparkleServerWizardIndex : Integer;

function InitialiseWizard : IOTAWizard;
begin
  // The trick to getting a repository wizard to work - register a normal wizard
  // here (returned through RegisterProc) and add the repository wizard via
  // AddWizard
  SparkleServerWizardIndex := (BorlandIDEServices as IOTAWizardServices).AddWizard(
    TXDataServerWizard.Create);
  Result := nil;
end;

procedure Register;
begin
  InitialiseWizard;
end;

initialization
  SparkleServerWizardIndex := -1;

finalization
  if SparkleServerWizardIndex >= 0 then begin
    (BorlandIDEServices As IOTAWizardServices).RemoveWizard(SparkleServerWizardIndex);
    SparkleServerWizardIndex := -1;
  end;

end.
