⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup.rul

📁 企业端数据申报系统:单位管理模块 单位查询. 业务申报模块 在线数据下载 在线数据上传 在线业务申核 申报业务查询 磁盘数据导出 磁盘数据导入 在线业务模块 在线业务
💻 RUL
📖 第 1 页 / 共 2 页
字号:

////////////////////////////////////////////////////////////////////////////////
//                                                                            
//  File Name:	Setup.rul                                                   
//                                                                            
//  Description:	InstallShield script                                        
//                                                                            
//  Comments:	This script was generated based on the selections you made in
//           	the Project Wizard.  Refer to the help topic entitled "Modify      
//           	the script that the Project Wizard generates" for information
//				on possible next steps.
//
////////////////////////////////////////////////////////////////////////////////


// Include header files
    
#include "ifx.h"
    
////////////////////// string defines ////////////////////////////

//////////////////// installation declarations ///////////////////

// ----- DLL function prototypes -----


    // your DLL function prototypes


// ---- script function prototypes -----


    // your script function prototypes
prototype SelectInstallType();
prototype DialogEditRegistry();
prototype SetupFolders();
    // your global variables
NUMBER      InstallType;
#define UNINST_LOGFILE_NAME      "Uninst.isu"

//////////////////////////////////////////////////////////////////////////////
//                                                                           
//  FUNCTION:   OnFirstUIBefore                                            
//                                                                           
//  EVENT:      FirstUIBefore event is sent when installation is run for the first
//              time on given machine. In the handler installation usually displays
//              UI allowing end user to specify installation parameters. After this
//              function returns, ComponentTransferData is called to perform file
//              transfer.
//                                                                           
///////////////////////////////////////////////////////////////////////////////
function OnFirstUIBefore()
    number  nResult,nSetupType;
    string  szTitle, szMsg;
    string  szLicenseFile, szQuestion;
    string  szTargetPath;
    string  szDir;
    string  szfolder;    
    char	chstr;       
    string	szenter;
    string  szComponents, szTargetdir;
    number  nLevel;
    LIST    listStartCopy;
    number  nvSize;
begin	
    // TO DO: if you want to enable background, window title, and caption bar title                                                                     
    // SetTitle( @TITLE_MAIN, 24, WHITE );                                        
    // SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); 	                   
    // Enable( FULLWINDOWMODE );						   
    // Enable( BACKGROUND );							  
    // SetColor(BACKGROUND,RGB (0, 128, 128));					   
   
    nSetupType = TYPICAL;	
    TARGETDIR = PROGRAMFILES ^@COMPANY_NAME ^@PRODUCT_NAME;	
    szDir = TARGETDIR;
    SHELL_OBJECT_FOLDER = @FOLDER_NAME;

Dlg_Start:
    // beginning of dialogs label

Dlg_SdWelcome:
    szTitle = "欢迎使用社保直通车3.0版安装程序";
    szMsg   = "安装向导将帮助您在计算机中安装社保直通车。\n运行环境:Windows9X,ME,NT 4.0和2000。\n\n若要继续,请单击“下一步”。";
    nResult = SdWelcome( szTitle, szMsg );
    if (nResult = BACK) goto Dlg_Start;

Dlg_SdLicense:
    szLicenseFile = SUPPORTDIR ^ "license.txt";
    szTitle    = "";
    szMsg      = "";
    szQuestion = "";
    nResult    = SdLicense( szTitle, szMsg, szQuestion, szLicenseFile );
    if (nResult = BACK) goto Dlg_SdWelcome;

Dlg_SdAskDestPath:
    szTitle = "";
    szMsg   = "";
    nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 );
    TARGETDIR = szDir;
    if (nResult = BACK) goto Dlg_SdLicense;

Dlg_SdIntallType:
    szTitle = "";
    szMsg   = "";
    nResult = SelectInstallType();      
    if (nResult = BACK) goto Dlg_SdAskDestPath;

Dlg_SetupType:   
    szTitle    = "";
    szMsg      = "";
    nResult = SetupType ( szTitle , szMsg , "" , nSetupType , 0 );
    if (nResult = BACK) then
        goto Dlg_SdIntallType;
    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;

Dlg_SdComponentTree: 
    if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SetupType;
    szTitle    = "";
    szMsg      = "";
    szTargetdir = TARGETDIR;
    szComponents = "";
    nLevel = 2;
    if (nSetupType = CUSTOM) then
		    nResult = SdComponentTree(szTitle, szMsg, szTargetdir, szComponents, nLevel);
		    if (nResult = BACK) goto Dlg_SetupType;  
    endif;

Dlg_ObjDialogs:
    nResult = ShowObjWizardPages(nResult);
    if (nResult = BACK) goto Dlg_SdComponentTree;
    
Dlg_SdSelectFolder:
    szfolder = SHELL_OBJECT_FOLDER;
    //szfolder="恩普软件"; 
    szTitle    = "";
    szMsg      = "";
    nResult    = SdSelectFolder( szTitle, szMsg, szfolder );
    SHELL_OBJECT_FOLDER = szfolder;
    if (nResult = BACK) goto Dlg_ObjDialogs;
  
Dlg_SdStartCopy:
    szTitle = "";
    szMsg   = "";   
    chstr	= 10;  
    szenter	= "chstr = %d."  ;
    listStartCopy = ListCreate( STRINGLIST );
    //The following is an example of how to add a string(szName) to a list(listStartCopy).
    //eg. ListAddString(listStartCopy,"安装路径\n"+TARGETDIR+" \n\n程序组名\n "+SHELL_OBJECT_FOLDER,AFTER);  
    ListAddString(listStartCopy,"安装路径"+"\r\n "+TARGETDIR+"\r\n\r\n程序组名\r\n "+SHELL_OBJECT_FOLDER,AFTER);
    nResult = SdStartCopy( szTitle, szMsg, listStartCopy );	
    ListDestroy(listStartCopy);
    if (nResult = BACK) goto Dlg_SdSelectFolder;

    // setup default status
    SetStatusWindow(0, "");
    Enable(STATUSEX);
    StatusUpdate(ON, 100);
    DialogEditRegistry();
    SetupFolders();
    return 0;
end;

///////////////////////////////////////////////////////////////////////////////
//
//  FUNCTION:   OnMoving
//
//  EVENT:      Moving event is sent when file transfer is started as a result of
//              ComponentTransferData call, before any file transfer operations 
//              are performed.
//
///////////////////////////////////////////////////////////////////////////////
function OnMoving()
    string szAppPath;
begin
    // Set LOGO Compliance Application Path 
    // TO DO : if your application .exe is in a subfolder of TARGETDIR then add subfolder 
    szAppPath = TARGETDIR;
    RegDBSetItem(REGDB_APPPATH, szAppPath);
    RegDBSetItem(REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY);
end;

// --- include script file section ---
function SelectInstallType()

STRING szMsg, szText1, szText2, szText3;
NUMBER nResult;
NUMBER nValue, nvCheck1, nvCheck2, nvCheck3;

begin
    szMsg   = "请选择系统安装类型";
    szText1 = "单机版";
    szText2 = "网络服务器版";
    szText3 = "网络客户端版";    
    nvCheck1 = TRUE;
    nvCheck2 = FALSE;
    nvCheck3 = FALSE;        
   // Display the Radio button (EXCLUSIVE) dialog box.
   nValue = EXCLUSIVE;
   nResult = AskOptions(nValue, szMsg,
                szText1, nvCheck1,
                szText2, nvCheck2,
                szText3, nvCheck3);
//szMsg = String.valueOf(nResult);

if nvCheck1==TRUE then
    InstallType=1;
endif;
if nvCheck2==TRUE then
    InstallType=2;
endif;
if nvCheck3==TRUE then
    InstallType=3;
endif;
  //NumToStr(szMsg,InstallType);   
  // MessageBox(szMsg, nResult );
    return nResult;
 end;
///////////////////////////////////////////////////
//                                               //
//                                               //
///////////////////////////////////////////////////
function DialogEditRegistry()
  NUMBER nbootkey;
    STRING szMsg;
    STRING szDatabasePath;
 begin

//NumToStr(szMsg,RegDBCreateKeyEx('CreateKeyExample',''));
  // TODO : Add all your registry entry keys here
    nbootkey =HKEY_LOCAL_MACHINE;
    szDatabasePath  = TARGETDIR + '\\database\\';
    if RegDBSetDefaultRoot(nbootkey) < 0 then
        abort
    endif;
    if RegDBCreateKeyEx('\\software\\odbc\\odbcinst.ini\\Epsoft SQLAnywhere','')<0 then
        abort;
    endif;      
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft SQLAnywhere','Driver',REGDB_STRING,szDatabasePath+'wod50t.dll',-1)<0 then
        abort;
    endif;
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft SQLAnywhere','Setup',REGDB_STRING,szDatabasePath+'wod50t.dll',-1)<0 then
        abort;
    endif;       
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\ODBC Drivers','Epsoft SQLAnywhere',REGDB_STRING,'Installed',-1)<0 then
        abort;
    endif;  
         
         
    /*if RegDBCreateKeyEx('\\software\\odbc\\odbcinst.ini\\Epsoft FoxPro VFP Driver (*.dbf)','')<0 then
        abort;
    endif;
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft FoxPro VFP Driver (*.dbf)','APILevel',REGDB_STRING,'0',-1)<0 then
        abort;
    endif;   
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft FoxPro VFP Driver (*.dbf)','ConnectFunctions',REGDB_STRING,'YYN',-1)<0 then
        abort;
    endif;   
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft FoxPro VFP Driver (*.dbf)','Driver',REGDB_STRING,TARGETDIR+'\\driver\\vfp\\vfpodbc.dll',-1)<0 then
        abort;
    endif;   
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft FoxPro VFP Driver (*.dbf)','DriverODBCVer',REGDB_STRING,'02.50',-1)<0 then
        abort;
    endif;  
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft FoxPro VFP Driver (*.dbf)','FileExtns',REGDB_STRING,'*.dbf,*.cdx,*.idx,*.fpt',-1)<0 then
        abort;
    endif;  
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft FoxPro VFP Driver (*.dbf)','FileUsage',REGDB_STRING,'1',-1)<0 then
        abort;
    endif;  
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft FoxPro VFP Driver (*.dbf)','Setup',REGDB_STRING,TARGETDIR+'\\driver\\vfp\\vfpodbc.dll',-1)<0 then
        abort;
    endif;  
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft FoxPro VFP Driver (*.dbf)','SQLLevel',REGDB_STRING,'0',-1)<0 then
        abort;
    endif;  
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\Epsoft FoxPro VFP Driver (*.dbf)','UsageCount',REGDB_NUMBER,'2',-1)<0 then
        abort;
    endif;
    if RegDBSetKeyValueEx('\\software\\odbc\\odbcinst.ini\\ODBC Drivers','Epsoft FoxPro VFP Driver (*.dbf)',REGDB_STRING,'Installed',-1)<0 then
        abort;
    endif; */     

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -