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

📄 setup.rul

📁 连接oracle
💻 RUL
📖 第 1 页 / 共 2 页
字号:
CreateFolderIcons:
        SetStatusWindow( 99, "Installing program icon to the Start Menu...." );

        if ( bWinNT ) then
           CreateProgramFolder( svGrp );
           ShowProgramFolder( svGrp, SW_SHOW );
           LongPathToShortPath( svMainDirectory );
           Delay(1);
        endif;

        TARGETDIR = svMainDirectory;

        if (bIncludeProgram) then
           szProgram = TARGETDIR ^ "PROGRAM\\DRAWCLI.EXE";
           if ( bWinNT ) then
              AddFolderIcon( svGrp, APP_NAME, szProgram,
                             TARGETDIR ^ "PROGRAM",
                             "", 0, "", REPLACE );
           else
              LongPathToQuote( szProgram, TRUE );
              AddFolderIcon( "", APP_NAME, szProgram,
                             TARGETDIR ^ "PROGRAM",
                             "", 0, "", REPLACE );
           endif;
           Delay( 1 );
        endif;

        if ( bWinNT ) then
           if (bIncludeSamples) then
              szProgram = TARGETDIR ^ "PROGRAM\\DRAWCLI.EXE ";
              AddFolderIcon( svGrp, "Example1",
                             szProgram + TARGETDIR ^ "SAMPLES\\DRAWCLI1.DRW",
                             TARGETDIR ^ "SAMPLES",
                             szProgram, 1, "", REPLACE );
              Delay( 1 );
           endif;

           if (bIncludeSamples) then
              AddFolderIcon( svGrp, "Example2",
                             szProgram + TARGETDIR ^ "SAMPLES\\HMM.DRW",
                             TARGETDIR ^ "SAMPLES",
                             szProgram, 1, "", REPLACE );
              Delay( 1 );
           endif;

           AddFolderIcon( svGrp, "ReadmeFile",
                          "NOTEPAD.EXE " + TARGETDIR ^ "README.TXT",
                          TARGETDIR,
                          "", 0, "", REPLACE );
           Delay( 1 );

           szProgram = WINDIR ^ "UNINST.EXE";
           LongPathToShortPath( szProgram );
           LongPathToShortPath( svUninstLogFile );
           AddFolderIcon( svGrp, "Uninstaller",
                          szProgram + " -f" + svUninstLogFile,
                          WINDIR,
                          "", 0, "", REPLACE );
           Delay( 1 );
        endif;

        // Announce setup complete.

        SetStatusWindow( 100, "Installation complete." );

        // If shared files could not be installed, then users must restart system.
        if (BATCH_INSTALL = TRUE) then
           szMsg = "Some files could not be installed because they are "+
                   "currently in use by other programs in the system.  "+
                   "To allow for proper operation of the new program you should restart"+
                   "your system at this time.";
          if (RebootDialog( "Restart Windows", szMsg, SYS_BOOTMACHINE ) = 0) then
              // Set up shared files to be installed after system is next rebooted.
              CommitSharedFiles(0);
          endif;
        else

           szMsg = "Setup is complete.  You may run the installed program ";
           if ( bWinNT ) then
              szMsg = szMsg + STR_COMPLETENT;
           else
              szMsg = szMsg + STR_COMPLETE95;
           endif;

           MessageBeep( 0 );
           MessageBox( szMsg, INFORMATION );
        endif;

        exit;


/*---------------------------------------------------------------------------*\
 *
 * Function:  SetupScreen
 *
 *  Purpose:  This function will set up the screen look.  This includes
 *            colors, fonts, text to be displayed, etc.
 *
 *
 *    Input:
 *
 *  Returns:
 *
 * Comments:
\*---------------------------------------------------------------------------*/

function SetupScreen()
        begin

          Enable( DEFWINDOWMODE );
          Enable( INDVFILESTATUS );

          SetTitle( APP_NAME + " Setup", 36, WHITE );

          SetTitle( "Setup", 0, BACKGROUNDCAPTION ); // Caption bar text.

          Enable( BACKGROUND );

        end;


/*---------------------------------------------------------------------------*\
 *
 * Function:  CheckRequirements
 *
 *  Purpose:  This function will check all minimum requirements for the
 *            application being installed.  If any fail, then the user
 *            is informed and the installation is terminated.
 *
 *
 *    Input:
 *
 *  Returns:
 *
 * Comments:
\*---------------------------------------------------------------------------*/

function CheckRequirements()
          number  nvDx, nvDy;
          number nvResult;
          STRING szResult;
        begin

          // Determine if target system uses NT or Windows 95.
          GetSystemInfo( WINMAJOR, nvResult, szResult );
          bWinNT = TRUE;
          if (nvResult = 4) then
             bWinNT = FALSE; // Running Windows 95.
          endif;

          // Check screen resolution.
          GetExtents( nvDx, nvDy );
          if (nvDy < 480) then
             MessageBox( "This program requires VGA or better resolution.", WARNING );
             exit;
          endif;

        end;

/*---------------------------------------------------------------------------*\
 *
 * Function:  CheckSpaceRequirements
 *
 *  Purpose:  This function will check space requirements based on the
 *            elements being installed.
 *
 *    Input:
 *
 *  Returns:
 *
 * Comments:
\*---------------------------------------------------------------------------*/

function CheckSpaceRequirements( bIncludeSamples,
                                 bIncludeProgram,
                                 bIncludeHelp,
                                 szDir )
          number  nSizeRequired;
        begin

          nSizeRequired = 0;

          // Determine total size.
          if (bIncludeSamples) then
            nSizeRequired = nSizeRequired + SIZE_REQ_SAMPLES;
          endif;

          if (bIncludeHelp) then
            nSizeRequired = nSizeRequired + SIZE_REQ_HELP;
          endif;

          if (bIncludeProgram) then
            nSizeRequired = nSizeRequired + SIZE_REQ_PROGRAM;
          endif;

          // Check space on target drive.
          bSpaceOk = TRUE;
          if (GetDiskSpace( szDir ) < nSizeRequired) then
             szMsg = "There is not enough space available on the disk\n" +
                     "'" + svMainDirectory + "' \n" +
                     "Please free up some space or change the target location\n" +
                     "to a different disk";
             MessageBeep(0);
             MessageBox( szMsg, WARNING );
             bSpaceOk = FALSE;
          endif;

          return bSpaceOk;
        end;


/*---------------------------------------------------------------------------*\
 *
 * Function:  CreateRegDBEntries
 *
 *  Purpose:  This function will create necessary keys and values for
 *            the sample program.
 *
 *    Input:
 *
 *  Returns:
 *
 * Comments:
\*---------------------------------------------------------------------------*/

function CreateRegDBEntries()
        string szKey[255], szValue, szDemo, szProgram;
begin

        RegDBSetDefaultRoot( HKEY_LOCAL_MACHINE );

        // Create PRODUCT_KEY key.
        szKey = "SOFTWARE\\" + COMPANY_NAME + "\\" + PRODUCT_NAME + "\\" +
                PRODUCT_VERSION + "\\" + "DRAWCLI";
        RegDBCreateKeyEx( szKey, "" );

        // The following keys are duplicates of ones that the MFC library
        // will create. They're included so that they'll be registered
        // in the log used by InstallSHIELD's uninstall program, causing
        // them to be removed upon uninstall.

        // create key used by CWinApp::SetRegisterKey
        RegDBSetDefaultRoot( HKEY_CURRENT_USER );
        RegDBCreateKeyEx( "Software\\" + COMPANY_NAME, "" );

        // create keys used by CWinApp::EnableShellFileTypes
        RegDBSetDefaultRoot( HKEY_CLASSES_ROOT );
        RegDBCreateKeyEx( ".DRW", "" );
        RegDBCreateKeyEx( "DrawCl.Document", "" );

        // register filetype icon
        RegDBCreateKeyEx( "DrawCl.Document\\DefaultIcon", "" );
        RegDBSetKeyValueEx( "DrawCl.Document\\DefaultIcon", 
                            "", REGDB_STRING, APPBASE_DIR95 + "\\" +
                            APPBASE_PATH + "\\PROGRAM\\" + PRODUCT_KEY + ",1", -1 );
end;

⌨️ 快捷键说明

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