1. Installation agreement dialog box code (in which license.txt is the content of the installation protocol)
Dlg_start:
// Beginning of dialogs label
Dlg_sdwelcome:
Sztitle = "XX system ";
Szmsg = "the installer is about to install the XX system on the local machine. Are you sure you want to continue the installation? Continue to press [next )]";
Nresult = sdwelcome (sztitle, szmsg );
If (nresult = back) goto dlg_start;
Dlg_sdlicense:
Szlicensefile = supportdir ^ "license.txt ";
Sztitle = "XX system ";
Szmsg = "";
Szquestion = "Do you accept this agreement? For acceptance, click "yes )]. This protocol must be accepted for continued installation. ";
Nresult = sdlicense (sztitle, szmsg, szquestion, szlicensefile );
If (nresult = back) goto dlg_sdwelcome;
2. User Information dialog box (where the serial number checkstring is the string generated by the installer Based on the disk sequence and the encoding rules we set)
Dlg_sdshowinfolist:
Sztitle = "Local System ID ";
Szmsg = "Send the following local number to the Authority. After receiving the corresponding registration code, you will continue to register! ";
Szfield1 = "no ";
Svedit1 = localnum;
Nresult = sdshowdlgedit1 (sztitle, szmsg, szfield1, svedit1 );
If (nresult = back) goto dlg_sdwelcome;
Dlg_sdregisteruserex:
Szmsg = "";
Sztitle = "";
Nresult = sdregisteruserex (sztitle, szmsg, szname, szcompany, szserial );
If (nresult = back) goto dlg_sdshowinfolist;
If (szserial! = Checkstring) then
MessageBox ("error! ", Severe );
Goto dlg_sdregisteruserex;
Endif;
Listdestroy (list );
If (nresult = back) goto dlg_sdlicense;
3. Select the installation path (including determining the disk capacity)
Dlg_sdaskdestpath: sztitle = "";
Szmsg = "";
Svtemp = szdir;
Nresult = sdaskdestpath (sztitle, szmsg, szdir, 0 );
If (svtemp! = Szdir) then
Szdir = szdir ^ @ company_name ^ @ product_name;
Endif;
Targetdir = szdir;
Getdisk (szdir, svdrive );
Lfreespace = getdiskspace (svdrive );
If (lfreespace <209715200) then
MessageBox ("Warning: the disk space of the installation path is less than 200 MB! Please select again! ", Severe );
Goto dlg_sdaskdestpath;
Endif;
If (nresult = back) goto dlg_sdregisteruserex;
4. Installation Type dialog box
Dlg_setuptype:
Sztitle = "XX system ";
Szmsg = "";
Nresult = setuptype (sztitle, szmsg, "", nsetuptype, 0 );
If (nresult = back) then
// Goto dlg_sdaskdestpath;
Goto dlg_sdregisteruserex
Else
Nsetuptype = nresult;
If (nsetuptype! = Custom) then
Sztargetpath = targetdir;
Nvsize = 0;
Componentcomparesizerequired (Media, sztargetpath, nvsize );
If (nvsize! = 0) then
MessageBox (szsdstr_notenoughspace, warning );
Goto dlg_setuptype;
Endif;
Endif;
Endif;