本站首页    管理页面    写新日志    退出


«November 2025»
1
2345678
9101112131415
16171819202122
23242526272829
30


公告

 


我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:
日志总数:22
评论数量:55
留言数量:0
访问次数:130181
建立时间:2006年3月13日




[java程序设计]Setup.rul
软件技术

jjs_love 发表于 2007/5/8 14:34:46

 //===========================================================================////  File Name:    Setup.rul////  Description:  Blank setup main script file////  Comments:     Blank setup is an empty setup project. If you want to//      create a new project via. step-by step instructions use the//      Project Assistant.////=========================================================================== // Included header files ----------------------------------------------------#include "ifx.h"//#include "functions.rul"  //引入自定义函数string ip,user,pwd;                               //---------------------------------------------------------------------------                                                                        // OnFirstUIBefore//// First Install UI Sequence - Before Move Data//// The OnFirstUIBefore event is called by OnShowUI when the setup is// running in first install mode. By default this event displays UI allowing// the end user to specify installation parameters.//// Note: This event will not be called automatically in a// program...endprogram style setup.//---------------------------------------------------------------------------function OnFirstUIBefore()    number  nResult, nLevel, nSize, nSetupType;    string  szTitle, szMsg, szOpt1, szOpt2, szLicenseFile;    string  szName, szCompany, szTargetPath, szDir, szFeatures;    BOOL    bLicenseAccepted;     string  zzJdk,zzTomcat,pathTomcat,svvalue,xmlpath;  //自定义    NUMBER  nType, nvSize;      //自定义begin        nSetupType = COMPLETE;    // szDir = TARGETDIR;   // szName = "";    //szCompany = "";    bLicenseAccepted = FALSE;        szDir="c:\\";    szName = "rcom";    szCompany = "rcom";    zzJdk="SOFTWARE\\JavaSoft\\Java Runtime Environment\\1.5";     zzTomcat="SOFTWARE\\Apache Software Foundation\\Tomcat\\5.0";    pathTomcat="";  // Beginning of UI Sequence   Dlg_zzb:      //查找注册表看jdk,tomcat是否安装            RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);    if(RegDBKeyExist(zzJdk)!=1) then        MessageBox("先安装jdk",SEVERE);           abort;  endif;      nType = REGDB_STRING;         if(RegDBKeyExist(zzTomcat)!=1) then        MessageBox("先安装tomcat",SEVERE);         abort;  else          RegDBGetKeyValueEx(zzTomcat, "InstallPath", nType, svvalue,nvSize);       pathTomcat=svvalue;       endif;           TARGETDIR=pathTomcat+"\\webapps";    //将项目安装到指定的目录          if (Is(FILE_EXISTS, pathTomcat+"\\common\\endorsed\\xml-apis.jar")) then       DeleteFile (pathTomcat+"\\common\\endorsed\\xml-apis.jar");     //将删除Tomcat目录下的多余的jar        // DeleteFile (pathTomcat+"\\common\\endorsed\\xml-apis.jar");     //将删除Tomcat目录下的多余的jar                endif;         CopyFile(SRCDIR^"\\server.xml",pathTomcat+"\\conf\\server.xml");//拷贝server.xml文件到tomcat下面                        Dlg_Start:    nResult = 0; Dlg_SdWelcome:    szTitle = "";    szMsg = "";    //{{IS_SCRIPT_TAG(Dlg_SdWelcome)    nResult = SdWelcome( szTitle, szMsg );    //}}IS_SCRIPT_TAG(Dlg_SdWelcome)    if (nResult = BACK) goto Dlg_Start;        Dlg_SdLicense2:    szTitle = "";    szOpt1 = "";    szOpt2 = "";    //{{IS_SCRIPT_TAG(License_File_Path)    szLicenseFile = SUPPORTDIR ^ "License.rtf";    //}}IS_SCRIPT_TAG(License_File_Path)    //{{IS_SCRIPT_TAG(Dlg_SdLicense2)    nResult = SdLicense2Rtf( szTitle, szOpt1, szOpt2, szLicenseFile, bLicenseAccepted );    //}}IS_SCRIPT_TAG(Dlg_SdLicense2)    if (nResult = BACK) then          goto Dlg_SdWelcome;          else        bLicenseAccepted = TRUE;    endif;          Dlg_SdRegisterUser:    szMsg = "";    szTitle = "";    //{{IS_SCRIPT_TAG(Dlg_SdRegisterUser)     nResult = SdRegisterUser( szTitle, szMsg, szName, szCompany );    //}}IS_SCRIPT_TAG(Dlg_SdRegisterUser)      if (nResult = BACK) goto Dlg_SdLicense2;            // Dlg_SdInitDs:    // nResult=initDataSource();    //录入web连接信息       // if (nResult = -1) goto Dlg_SdInitDs;      //if (nResult = BACK) goto Dlg_SdRegisterUser;              Dlg_SetupType2:       szTitle = "";    szMsg = "";    nResult = CUSTOM;    //{{IS_SCRIPT_TAG(Dlg_SetupType2)     nResult = SetupType2( szTitle, szMsg, "", nSetupType, 0 );    //}}IS_SCRIPT_TAG(Dlg_SetupType2)    if (nResult = BACK) then        goto Dlg_SdRegisterUser;               else        nSetupType = nResult;        if (nSetupType != CUSTOM) then            szTargetPath = TARGETDIR;            nSize = 0;            FeatureCompareSizeRequired( MEDIA, szTargetPath, nSize );            if (nSize != 0) then                      MessageBox( szSdStr_NotEnoughSpace, WARNING );                goto Dlg_SetupType2;            endif;        endif;       endif; Dlg_SdAskDestPath2:    if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SetupType2; szTitle = "";    szMsg = "";    if (nSetupType = CUSTOM) then                //{{IS_SCRIPT_TAG(Dlg_SdAskDestPath2)   nResult = SdAskDestPath2( szTitle, szMsg, szDir );                //}}IS_SCRIPT_TAG(Dlg_SdAskDestPath2)        TARGETDIR = szDir;    endif;    if (nResult = BACK) goto Dlg_SetupType2; Dlg_SdFeatureTree:     if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SdAskDestPath2;    szTitle = "";    szMsg = "";    szFeatures = "";    nLevel = 2;    if (nSetupType = CUSTOM) then        //{{IS_SCRIPT_TAG(Dlg_SdFeatureTree)         nResult = SdFeatureTree( szTitle, szMsg, TARGETDIR, szFeatures, nLevel );        //}}IS_SCRIPT_TAG(Dlg_SdFeatureTree)        if (nResult = BACK) goto Dlg_SdAskDestPath2;      endif; Dlg_SQLServer:    nResult = OnSQLServerInitialize( nResult );    if( nResult = BACK ) goto Dlg_SdFeatureTree; Dlg_ObjDialogs:    nResult = ShowObjWizardPages( nResult );    if (nResult = BACK) goto Dlg_SQLServer;    Dlg_SdStartCopy2:    szTitle = "";    szMsg = "";    //{{IS_SCRIPT_TAG(Dlg_SdStartCopy2)     nResult = SdStartCopy2( szTitle, szMsg );     //}}IS_SCRIPT_TAG(Dlg_SdStartCopy2)    if (nResult = BACK) goto Dlg_ObjDialogs;     // Added in 11.0 - Set appropriate StatusEx static text.    SetStatusExStaticText( SdLoadString( IDS_IFX_STATUSEX_STATICTEXT_FIRSTUI ) );       return 0;end;  


阅读全文(2329) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.109 second(s), page refreshed 144803783 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号