OK, so I've worked on it some and here's what I've got:
[Code]
// global vars
var
DataDirPage: TInputDirWizardPage;
SampleDataPage: TInputOptionWizardPage;
// custom wizard page setup, for data dir.
procedure InitializeWizard;
begin
{ Taken from CodeDlg.iss example script }
{ Create custom pages to show during install }
DataDirPage := CreateInputDirPage(SampleDataPage.ID,
'Descent Data Directory', '',
'Please select the location where the original Descent files are installed.',
False, '');
DataDirPage.Add('Descent location.');
DataDirPage.Add('Decent 2 location.');
DataDirPage.Values[0] := 'C:\Program Files\GOG.com\Descent and Descent 2\Decent';
DataDirPage.Values[1] := 'C:\Program Files\GOG.com\Descent and Descent 2\Decent 2';
SampleDataPage := CreateInputOptionPage(wpSelectDir,
'Install Descent Data', '',
'Would you like to copy the Descent game files to your DXX-Rebirth installation?',
True, False);
SampleDataPage.Add('Yes copy the game files, missions, players, and savegames.');
SampleDataPage.Add('Yes, but just copy the game files.');
SampleDataPage.Add('No, I'+chr(39)+'ll copy the game files myself later.');
SampleDataPage.Values[0] := True;
end;
function Descent(Param: String): String;
begin
Result := DataDirPage.Values[0];
end;
function DescentTwo(Param: String): String;
begin
{ Return the selected DataDir }
//MsgBox('GetDataDir.', mbError, MB_OK);
Result := DataDirPage.Values[1];
end;
function InstallAll(): Boolean;
begin
{ Return the value of the 'install' radiobutton }
//MsgBox('InstallSampleData.', mbError, MB_OK);
Result := SampleDataPage.Values[0];
end;
function Install(): Boolean;
begin
{ Return the value of the 'install' radiobutton }
//MsgBox('InstallSampleData.', mbError, MB_OK);
Result := SampleDataPage.Values[1];
end;
function DontInstall(): Boolean;
begin
if SampleDataPage.Values[2]=true then
begin
Result := False;
end
else
begin
Result := True;
end
end;
Now the problem is I get an error saying "Could not call proc" on the "Result := DataDirPage.Values[0]" line of the "Descent" function. Any idea why this is?