PDA

View Full Version : inserting license screen



phess420
07-01-2004, 10:20 AM
I have created all my installers and now I need to insert the license agreement screen. When I went through the initial project wizard I did not include the license agreement screen.
So I created a test project and included the screen and then went to the install script and copied the following:
Dlg_SdLicense:
szLicenseFile = SUPPORTDIR ^ "license.txt";
szTitle = "";
szMsg = "";
szQuestion = "";
nResult = SdLicense( szTitle, szMsg, szQuestion, szLicenseFile );
if (nResult = BACK) goto Dlg_SdWelcome;

I then put this into my existing project's install script between the welcome screen and the install directory screen. However when I go to build it I get errors:

C:\DocFinity Project\Intraviewer Libraries\setup.rul(81) : error C8025: 'szLicenseFile' : undefined identifier
C:\DocFinity Project\Intraviewer Libraries\setup.rul(84) : error C8025: 'szQuestion' : undefined identifier
C:\DocFinity Project\Intraviewer Libraries\setup.rul(85) : error C8025: 'szQuestion' : undefined identifier
C:\DocFinity Project\Intraviewer Libraries\setup.rul(85) : error C8039: 'szQuestion' : string value required
C:\DocFinity Project\Intraviewer Libraries\setup.rul(85) : error C8025: 'szLicenseFile' : undefined identifier
C:\DocFinity Project\Intraviewer Libraries\setup.rul(85) : error C8039: 'szLicenseFile' : string value required
Setup.INX - 6 error(s), 0 warning(s)

Im assuming I cannot just add this screen to my installscript, so how can I add this license agreement screen without completely re-creating all my install programs? I appreciate any replies, thanks.

RobertDickau
07-05-2004, 06:00 PM
In InstallScript, you need to declare variables in order for the compiler to know what the symbol stands for; before the begin keyword in OnFirstUIBefore, perhaps try adding the following lines:
STRING szLicenseFile;
STRING szQuestion;

Another option is to create a new throwaway project, specify to include that dialog box in the Project Wizard, copy the script from the new project to your existing project, and then delete the throwaway project...

phess420
07-06-2004, 02:18 PM
Thanks very much, that did the trick. It had to be in this format

string szLicenseFile, szQuestion;

I just wasnt where to look.

Thanks again!