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

📄 setup.rul

📁 串口编程
💻 RUL
字号:

////////////////////////////////////////////////////////////////////////////////
//                                                                            
//  IIIIIII SSSSSS                                                            
//    II    SS                          InstallShield (R)                     
//    II    SSSSSS      (c) 1996-1999, InstallShield Software Corporation     
//    II        SS      (c) 1990-1996, InstallShield Corporation              
//  IIIIIII SSSSSS                     All Rights Reserved.                   
//                                                                            
//                                                                            
//  This code is generated as a starting setup template.  You should   
//  modify it to provide all necessary steps for your setup.
//                                                                            
//                                                                            
//    File Name:  Setup.rul                                                   
//                                                                            
//  Description:  InstallShield script                                        
//                                                                            
//     Comments:  This template script performs a basic setup. With minor           
//                modifications, this template can be adapted to create       
//                new, customized setups.
//
////////////////////////////////////////////////////////////////////////////////


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

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

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


    // your DLL function prototypes


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


    // your script function prototypes

    // your global variables



//////////////////////////////////////////////////////////////////////////////
//                                                                           
//  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  szDir;

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));					   
   

    TARGETDIR = PROGRAMFILES ^@COMPANY_NAME ^@PRODUCT_NAME;	
    szDir = TARGETDIR;

    Dlg_Start:
    // beginning of dialogs label

    Dlg_SdWelcome:
    szTitle = "";
    szMsg   = "";
    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;

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

    return 0;

end;

//////////////////////////////////////////////////////////////////////////////
//
//  FUNCTION:   OnFirstUIAfter
//
//  EVENT:      FirstUIAfter event is sent after file transfer, when installation 
//              is run for the first time on given machine. In this event handler 
//              installation usually displays UI that will inform end user that
//              installation has been completed successfully.
//
///////////////////////////////////////////////////////////////////////////////
function OnFirstUIAfter()
begin
    Disable(STATUSEX);
    return 0;
end;


//////////////////////////////////////////////////////////////////////////////
//
//  FUNCTION:   OnMaintUIBefore
//
//  EVENT:      MaintUIBefore event is sent when end user runs installation that
//              has already been installed on the machine. Usually this happens 
//              through Add/Remove Programs applet. In the handler installation 
//              usually displays UI allowing end user to modify existing installation
//              or uninstall application. After this function returns, 
//              ComponentTransferData is called to perform file transfer.
//
///////////////////////////////////////////////////////////////////////////////
function OnMaintUIBefore()
NUMBER nResult,nLevel,nType;
STRING szTitle,szMsg,svDir,szComponents,svResult,szCaption;
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 );  			
	//	SetColor(BACKGROUND,RGB (0, 128, 128));					
	//	Enable( FULLWINDOWMODE );						
	//    	Enable( BACKGROUND );							
	
	nType = MODIFY;

		Dlg_Start:
		Disable(BACKBUTTON);
		nResult = SdWelcomeMaint(szTitle, szMsg, nType);
		Enable(BACKBUTTON);

		Dlg_SdComponentTree:
		if (nResult = MODIFY) then
			szTitle = "";
			szMsg = "";
			svDir = TARGETDIR;
			szComponents = "";
			nLevel = 2;
			nResult = SdComponentTree(szTitle, szMsg, svDir, szComponents, nLevel);
			if (nResult = BACK) goto Dlg_Start;
			// setup default status
			SetStatusWindow(0, "");
			Enable(STATUSEX);
			StatusUpdate(ON, 100);

		elseif (nResult = REMOVEALL) then
			svResult = SdLoadString(IFX_MAINTUI_MSG);
			szCaption = SdLoadString(IFX_ONMAINTUI_CAPTION);
			nResult = SprintfBox(MB_OKCANCEL,szCaption,"%s",svResult);
			if (nResult = IDCANCEL) then
				goto Dlg_Start;
			elseif(nResult = IDOK) then
				// setup default status
				SetStatusWindow(0, "");
				Enable(STATUSEX);
				StatusUpdate(ON, 100);
	
				//-->Remove all components
				ComponentRemoveAll();
			endif;
		elseif (nResult = REPAIR) then
			// setup default status
			SetStatusWindow(0, "");
			Enable(STATUSEX);
			StatusUpdate(ON, 100);
	
			//-->Reinstall Logged Components
			ComponentReinstall();
		endif;
	
end;



///////////////////////////////////////////////////////////////////////////////
//
//  FUNCTION:   OnMaintUIAfter
//
//  EVENT:      MaintUIAfter event is sent after file transfer, when end user runs 
//              installation that has already been installed on the machine. Usually 
//              this happens through Add/Remove Programs applet. 
//              In the handler installation usually displays UI that will inform 
//              end user that maintenance/uninstallation has been completed successfully.
//
///////////////////////////////////////////////////////////////////////////////
function OnMaintUIAfter()
begin
    Disable(STATUSEX);
    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 ---


⌨️ 快捷键说明

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