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

📄 setup.rul

📁 vc环境下的pgp源码
💻 RUL
📖 第 1 页 / 共 2 页
字号:

begin


    // TO DO : Add all your folders (or program groups) along with shortcuts (or
    // program items). Call CreateProgramFolder and AddFolderIcon, and/or create
    // shortcuts etc. from the InstallShield IDE's Resources pane.
    //
    // Note : for 16-bit setups you should add an uninstaller icon pointing to
    //        your log file.  Under 32-bit this is automatically done by Windows.

    nResult = CreateShellObjects( "" );

    // Create uninstall icon in program group
    szTemp = TARGETDIR ^ UNINST_LOGFILE_NAME;
    LongPathToQuote (szTemp, TRUE);
    szProgramFolder = FOLDER_PROGRAMS ^ "PGP Command Line";
    szItemName      = "Uninstall PGP Command Line";
    szCommandLine   = WINDIR ^ "IsUninst.exe -f" + szTemp;
    szWorkingDir    = TARGETDIR;
    szIconPath      = WINDIR ^ "IsUninst.exe";
    nIcon           = 0;
    szShortCutKey   = "";
    nFlag           = NULL;
    AddFolderIcon (szProgramFolder, szItemName, szCommandLine, szWorkingDir, szIconPath, nIcon, szShortCutKey, nFlag);

    return nResult;
 end;

///////////////////////////////////////////////////////////////////////////////
//
// Function: CleanUpInstall
//
//  Purpose: This cleans up the setup.  Anything that should
//           be released or deleted at the end of the setup should
//           be done here.
//
///////////////////////////////////////////////////////////////////////////////
function CleanUpInstall()

begin

    ListDestroy( listStartCopy );

    if (bInstallAborted) then
        return 0;
    endif;

    DialogShowSdFinishReboot();

    if (BATCH_INSTALL) then // ensure locked files are properly transferred
        CommitSharedFiles(0);
    endif;

    return 0;
end;

///////////////////////////////////////////////////////////////////////////////
//
// Function: SetupInstall
//
//  Purpose: This will initialize the setup.  Any general initialization
//           needed for the installation should be performed here.
//
///////////////////////////////////////////////////////////////////////////////
function SetupInstall()

begin

    Enable( CORECOMPONENTHANDLING );

    bInstallAborted = FALSE;

    //  Create list of end user selections to be displayed by DialogShowSdStartCopy()  //

    listStartCopy = ListCreate(STRINGLIST);

    ListAddString( listStartCopy, "Place the summary here.", AFTER );

    if (bIs32BitSetup) then
        svDir = PROGRAMFILES ^ @COMPANY_NAME ^ @PRODUCT_NAME;
    else
        svDir = PROGRAMFILES ^ @COMPANY_NAME16 ^ @PRODUCT_NAME16; // use short names
    endif;

    TARGETDIR  = svDir;

    SdProductName( @PRODUCT_NAME );

    Enable( DIALOGCACHE );

    return 0;
end;

///////////////////////////////////////////////////////////////////////////////
//
// Function:  SetupScreen
//
//  Purpose:  This function establishes the screen look.  This includes
//            colors, fonts, and text to be displayed.
//
///////////////////////////////////////////////////////////////////////////////

/*function SetupScreen()

begin

    Enable( FULLWINDOWMODE );
    Enable( INDVFILESTATUS );
    SetTitle( @TITLE_MAIN, 24, WHITE );

    SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Caption bar text.

    Enable( BACKGROUND );

    Delay( 1 );
end; */

function SetupScreen()
	NUMBER  nvResult, nDisplay;
    STRING  svResult, szFormat, szBmpPath, szDisplay;

begin

    Enable( FULLWINDOWMODE );
    Enable( INDVFILESTATUS );

    SetFont(FONT_TITLE, STYLE_BOLD | STYLE_ITALIC, "Times New Roman");
	GetSystemInfo (VIDEO, nDisplay, szDisplay);
	if (nDisplay = IS_EGA) then
		SetTitle(@TITLE_MAIN , 10, WHITE);
	elseif (nDisplay = IS_VGA) then
		SetTitle(@TITLE_MAIN , 12, WHITE);
	elseif (nDisplay = IS_SVGA) then
		SetTitle(@TITLE_MAIN , 16, WHITE);
	elseif (nDisplay = IS_XVGA) then
		SetTitle(@TITLE_MAIN, 18, WHITE);
	elseif (nDisplay = IS_UVGA) then
		SetTitle(@TITLE_MAIN, 24, WHITE);
	else
		SetTitle(@TITLE_MAIN, 20, WHITE);
	endif;
 	SetTitle(@TITLE_MAIN,0,BACKGROUNDCAPTION); // Caption bar text( no new line ).

    Enable( BACKGROUND );

    GetSystemInfo(COLORS,nvResult,svResult);
//	szFormat  = ";1;1;0,128,128;0,128,128";
	if (nvResult < 257) then
		//Set proper background color
		SetColor( BACKGROUND, RGB(000,000,128) );
		//Logo in upper_right hand corner of screen
		PlaceBitmap (SUPPORTDIR ^ "neta.bmp", 0, 0, 0, UPPER_RIGHT);
	//	szBmpPath = "@" + SUPPORTDIR ^ "sidebar.bmp" + szFormat;
	else
		//Set proper background color
		SetColor( BACKGROUND, RGB(42,000,170) );
		//Logo in upper_right hand corner of screen
		PlaceBitmap (SUPPORTDIR ^ "netax.bmp", 0, 0, 0, UPPER_RIGHT);
	//	szBmpPath = "@" + SUPPORTDIR ^ "sidebarx.bmp" + szFormat;
	endif;
	SetDisplayEffect (EFF_NONE);
	//Set the alternate bitmap for the AskText dialog box.
  	//DialogSetInfo (DLG_INFO_ALTIMAGE,szBmpPath,TRUE);

    Delay( 1 );
end;

///////////////////////////////////////////////////////////////////////////////
//
// Function:  CheckRequirements
//
//  Purpose:  This function checks all minimum requirements for the
//            application being installed.  If any fail, then the user
//            is informed and the setup is terminated.
//
///////////////////////////////////////////////////////////////////////////////
function CheckRequirements()
    NUMBER  nvDx, nvDy, nvResult;
    STRING  svResult;

begin

    bIsShellExplorer = FALSE;
    bIsWindowsNT4    = FALSE;
    bIsWindowsNT351  = FALSE;
    bIsWindows95     = FALSE;
    bIsWindows98     = FALSE;

    // Check screen resolution.
    GetExtents( nvDx, nvDy );

    if (nvDy < 480) then
        MessageBox( @ERROR_VGARESOLUTION, WARNING );
        abort;
    endif;

    // Set 'setup' operation mode
    bIs32BitSetup = TRUE;
    GetSystemInfo( ISTYPE, nvResult, svResult );
    if (nvResult = 16) then
        bIs32BitSetup = FALSE; // running 16-bit setup
        return 0; // no additional information required
    endif;

    // --- 32-bit testing after this point ---

    // Determine the target system's operating system.
    GetSystemInfo( OS, nvResult, svResult );

    if (nvResult = IS_WINDOWSNT) then
        // Check to see if OS is Windows NT 4.0 or Windows NT 3.51,
        // and if the shell being used is the Explorer shell.
        if (GetSystemInfo( WINMAJOR, nvResult, svResult ) = 0) then
            if (nvResult >= 4) then
                bIsShellExplorer = TRUE;
                bIsWindowsNT4 = TRUE;
            else
            	bIsWindowsNT351 = TRUE;
            endif;
        endif;

    elseif (nvResult = IS_WINDOWS9X) then
        bIsShellExplorer = TRUE;
        // Check to see if OS is Windows 95 or Windows 98
        GetSystemInfo (WINMINOR, nvResult, svResult);
        if (nvResult < 10) then
           bIsWindows95 = TRUE;
        else
           bIsWindows98 = TRUE;
        endif;
    endif;

end;


///////////////////////////////////////////////////////////////////////////////
//
// Function: DialogShowSdWelcome
//
//  Purpose: This function handles the standard welcome dialog.
//
//
///////////////////////////////////////////////////////////////////////////////
function DialogShowSdWelcome()
    NUMBER nResult;
    STRING szTitle, szMsg;

begin

    szTitle = "";
    szMsg   = "";
    nResult = SdWelcome( szTitle, szMsg );

    return nResult;
end;


///////////////////////////////////////////////////////////////////////////////
//
// Function: DialogShowSdLicense
//
//  Purpose: This function displays the license agreement dialog.
//
//
///////////////////////////////////////////////////////////////////////////////
function DialogShowSdLicense()
    NUMBER nResult;
    STRING szTitle, szMsg, szQuestion, szLicenseFile;

begin

    szLicenseFile = SUPPORTDIR ^ "license.txt";
    szTitle    = "";
    szMsg      = "";
    szQuestion = "";
    nResult    = SdLicense( szTitle, szMsg, szQuestion, szLicenseFile );

    return nResult;
end;


///////////////////////////////////////////////////////////////////////////////
//
// Function: DialogShowSdAskDestPath
//
//  Purpose: This function asks the user for the destination folder.
//
///////////////////////////////////////////////////////////////////////////////
function DialogShowSdAskDestPath()
    NUMBER nResult;
    STRING szTitle, szMsg;

begin

    szTitle = "";
    szMsg   = "";
    nResult = SdAskDestPath( szTitle, szMsg, svDir, 0 );

    TARGETDIR = svDir;

    return nResult;
end;


///////////////////////////////////////////////////////////////////////////////
//
//  Function: DialogShowSdFinishReboot
//
//  Purpose: This function will show the last dialog of the product.
//           It will allow the user to reboot and/or show some readme text.
//
///////////////////////////////////////////////////////////////////////////////
function DialogShowSdFinishReboot()

#define NOTEPAD WINDIR ^ "\Notepad.exe"
#define READMEFILE TARGETDIR ^ "\Documentation\\WhatsNew.txt"
//#define EXECUTABLEFILE TARGETDIR ^ "pgp.bat"

	NUMBER nResult, nDefOptions;
    STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
    NUMBER bOpt1, bOpt2;
    STRING szEXE, szReadMe;

begin

    if (!BATCH_INSTALL) then
        bOpt1 = TRUE;
        bOpt2 = FALSE;
        szTitle= "PGP Command Line for NT Setup is Complete";
        szMsg1 = "Setup has finished installing %p on your computer. \n\n" +
                 "Setup can launch the WhatsNew file if you would like. Please make your " +
                 "selection from the options below";
        szMsg2 = "";
        szOption1 = "Yes, I would like to view the WhatsNew file.";
        szOption2 = ""; //"Yes, I would like to launch %p.";
        nResult = SdFinish( szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2 );

		
    	
        if (bOpt1) then
         // Display the read me file.
         LaunchAppAndWait (NOTEPAD, READMEFILE, WAIT);
   		
   		endif;
		
/*		if (bOpt2) then
     		//Launch the Batch file to keep the window open
        	LaunchAppAndWait (EXECUTABLEFILE, "//k", NOWAIT);
       	
       	endif;  */

        return 0;
    endif;

    nDefOptions = SYS_BOOTMACHINE;
    szTitle     = "";
    szMsg1      = "";
    szMsg2      = "";
    nResult     = SdFinishReboot( szTitle, szMsg1, nDefOptions, szMsg2, 0 );

    return nResult;
end;

// --- include script file section ---

#include "sddialog.rul"









⌨️ 快捷键说明

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