Buenas estoy utilizando el innosetup e intentando crearme unas ventanas para pedir una serie de datos sobre la instalación y me da error: unknow identifier 'ScriptDlgPageOpen' y lo mismo para 'ScriptDlgPageSetCaption'.
El codigo es el siguiente:
[Code]
var
UserPrompts1, UserValues1: TArrayOfString;
UserPrompts2, UserValues2: TArrayOfString;
// Evento onclick del boton acerca de...
procedure AcercaDeOnClick(Sender: TObject);
begin
MsgBox('Instalador de AYUFILE de Aplicacion, S.L.', mbInformation, mb_Ok);
end;
// Creamos el boton acerca de... a la misma altura que el boton de cancelar
procedure InitializeWizard();
var
AboutButton, CancelButton: TButton;
begin
CancelButton := WizardForm.CancelButton;
AboutButton := TButton.Create(WizardForm);
AboutButton.Left := WizardForm.ClientWidth - CancelButton.Left - CancelButton.Width;
AboutButton.Top := CancelButton.Top;
AboutButton.Width := CancelButton.Width;
AboutButton.Height := CancelButton.Height;
AboutButton.Caption := '&Acerca de...';
AboutButton.OnClick := @AcercaDeOnClick;
AboutButton.Parent := WizardForm;
end;
// Cuando empezamos le setup, preguntamos datos del ini
function InitializeSetup(): Boolean;
begin
// Creamos cajas que piden datos
SetArrayLength(UserPrompts1, 2);
UserPrompts1[0] := 'Servidor:';
UserPrompts1[1] := 'Catalogo:';
SetArrayLength(UserPrompts2, 2);
UserPrompts2[0] := 'Usuario:';
UserPrompts2[1] := 'pwd';
// Valores por defecto en el caso que no exista en el registro
SetArrayLength(UserValues1, 2);
RegQueryStringValue(HKLM, 'SOFTWARE\Aplicacion\ficheros', 'Servidor', UserValues1[0]);
RegQueryStringValue(HKLM, 'SOFTWARE\Aplicacion\ficheros', 'Catalogo', UserValues1[1]);
SetArrayLength(UserValues2, 2);
RegQueryStringValue(HKLM, 'SOFTWARE\Aplicacion\ficheros', 'Usuario', UserValues2[0]);
RegQueryStringValue(HKLM, 'SOFTWARE\Aplicacion\ficheros', 'pwd', UserValues2[1]);
if UserValues1[0] = '' then
UserValues1[0] := 'Servidor sql';
if UserValues1[1] = '' then
UserValues1[1] := 'Catalogo';
if UserValues2[0] = '' then
UserValues2[0] := 'User';
// El SetUp continua
Result := True;
end;
// Guardamos los datos que almacenan, para cualdo volvemos para atras
procedure RegisterPreviousData(PreviousDataKey: Integer);
begin
SetPreviousData(PreviousDataKey, 'Servidor', UserValues1[0]);
SetPreviousData(PreviousDataKey, 'Catalogo', UserValues1[1]);
SetPreviousData(PreviousDataKey, 'Usuario', UserValues2[0]);
SetPreviousData(PreviousDataKey, 'pwd', UserValues2[1]);
end;
// Paginas de instalacion personalizadas
function ScriptDlgPages(CurPage: Integer; BackClicked: Boolean): Boolean;
var
CurSubPage: Integer;
Next, NextOk: Boolean;
begin
if (not BackClicked and (CurPage = wpSelectDir)) or (BackClicked and (CurPage = wpReady)) then
begin
Result := not Next
end else if (not BackClicked and (CurPage = wpWelcome)) or (BackClicked and (CurPage = wpSelectDir)) then
begin
//abro la pagina principal
ScriptDlgPageOpen();
// Titulo principal de la pagina
ScriptDlgPageSetCaption('Información Adicional');
// Bucle para manejar las paginas creadas, en este caso 2
while (CurSubPage = 0) and not Terminated do begin
ScriptDlgPageSetSubCaption1('Configuración del programa');
ScriptDlgPageSetSubCaption2('Compruebe que los valores de configuracion son correctos');
Next := InputQueryArray(UserPrompts1, UserValues1);
Next := InputQueryArray(UserPrompts2, UserValues2);
// Validamos que los datos sean correctos
if Next then
begin
NextOk := UserValues1[1] <> '';
if not NextOk then
MsgBox('Debe especificar cual será el catalogo', mbError, MB_OK)
else
begin
NextOk := UserValues1[0] <> '';
if not NextOk then
MsgBox('Debe indicar el servidor de Base de Datos', mbError, MB_OK);
end;
end;
// Nos movemos a la siguiente pagina si los datos introducidos fueron correctos
if Next then
begin
if NextOk then
CurSubPage := CurSubPage + 1;
end
else
CurSubPage := CurSubPage - 1;
end;
// Que funcione el NextButtonClick y el BackButtonClick si esta autorizado
if not BackClicked then
Result := Next
else
Result := not Next;
// Cerramos la pagina de configuracion
ScriptDlgPageClose(not Result);
end
else
begin
Result := true;
end;
end;
// Boton Siguiente
function NextButtonClick(CurPage: Integer): Boolean;
begin
Result := ScriptDlgPages(CurPage, False);
end;
// Boton Atras
function BackButtonClick(CurPage: Integer): Boolean;
begin
Result := ScriptDlgPages(CurPage, True);
end;
Espero que me puedan ayudar.
Gracias