InstallShield: Create JSP + Tomcat + JDK + MySQL (Article 2)

Source: Internet
Author: User

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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.