📄 setup.rul
字号:
///////////////////////////////////////////////////////////////////////////////
//
// Function: SetupInstall
//
// Purpose: This will initialize the setup. Any general initialization
// needed for the installation should be performed here.
//
///////////////////////////////////////////////////////////////////////////////
function SetupInstall()
STRING szKey;
begin
szKey = "SOFTWARE\\Network Associates\\PGP" ;
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
RegDBCreateKeyEx ( szKey , "" );
RegDBSetKeyValueEx ( szKey, "Reboot" , REGDB_NUMBER , "0" , -1 );
Enable( CORECOMPONENTHANDLING );
bInstallAborted = FALSE;
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()
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 + " - Setup", 10, WHITE);
elseif (nDisplay = IS_VGA) then
SetTitle(TITLE + " - Setup", 12, WHITE);
elseif (nDisplay = IS_SVGA) then
SetTitle(TITLE + " - Setup", 16, WHITE);
elseif (nDisplay = IS_XVGA) then
SetTitle(TITLE + " - Setup", 18, WHITE);
elseif (nDisplay = IS_UVGA) then
SetTitle(TITLE + " - Setup", 24, WHITE);
else
SetTitle(TITLE + " - Setup", 20, WHITE);
endif;
SetTitle(TITLE2 + " Setup",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 <= 16) then
//Set proper background color
SetColor( BACKGROUND, RGB(0,51,102) );
//Logo in upper_right hand corner of screen
PlaceBitmap (SUPPORTDIR ^ "netax.bmp", 0, 0, 0, LOWER_RIGHT);
szBmpPath = "@" + SUPPORTDIR ^ "sidebar.bmp" + szFormat;
elseif ((nvResult <= 256)&&(nvResult > 16)) then
//Set proper background color
SetColor( BACKGROUND, RGB(0,51,102) );
//Logo in upper_right hand corner of screen
PlaceBitmap (SUPPORTDIR ^ "netax.bmp", 0, 0, 0, LOWER_RIGHT);
szBmpPath = "@" + SUPPORTDIR ^ "sidebarx.bmp" + szFormat;
elseif (nvResult > 256) then
//Set proper background color
SetColor( BACKGROUND, RGB(0,51,102) );
//Logo in upper_right hand corner of screen
PlaceBitmap (SUPPORTDIR ^ "netax.bmp", 0, 0, 0, LOWER_RIGHT);
szBmpPath = "@" + SUPPORTDIR ^ "sidebarxx.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 );
//check if user has admin privs.
if !(Is (USER_ADMINISTRATOR, "")) then
MessageBox("To run this install you need to be logged in with\n" +
"Administrator privileges. Setup will now exit.", SEVERE);
abort;
endif;
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 );
//Check if OS is Windows 2000
if (nvResult = IS_WINDOWSNT) then
if (GetSystemInfo( WINMAJOR, nvResult, svResult ) = 0) then
if (nvResult > 4) then
MessageBox("This product is for Windows NT 4.0 and Windows 95/98 only.", SEVERE);
abort;
endif;
endif;
endif;
GetSystemInfo( OS, nvResult, svResult );
bDisablePGPnet = FALSE;
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
MessageBox( "This product runs only on Windows NT 4.0 or Windows 95/98.", SEVERE );
abort;
endif;
endif;
//Look for config changed key !! If it exists user MUST reboot
RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );
if (RegDBKeyExist ("SOFTWARE\\Microsoft\\Ncpa\\CurrentVersion\\ConfigChanged") = 1) then
//user has changed ncpa config recently without rebooting
if (AskYesNo
("Your network control panel settings have changed recently. Without\n" +
"rebooting your system, setup will not be able to install the PGPnet\n" +
"portion of this install. If you are intending on installing PGPnet\n" +
"you must reboot your system before installing this product.\n\n" +
"Are you planning on installing PGPnet?",YES) = YES) then
MessageBox( "Setup will now exit, so you can reboot your machine.", INFORMATION );
abort;
else
MessageBox( "PGPnet will not be able to be installed", INFORMATION );
bDisablePGPnet = TRUE;
endif;
endif;
elseif (nvResult = IS_WINDOWS9X) then
if (WINNTONLY = "TRUE") then
MessageBox( "This product runs only on Windows NT 4.0.", SEVERE );
abort;
endif;
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: DialogShowSdShowReadMe
//
// Purpose: This function displays the general information list dialog.
//
//
///////////////////////////////////////////////////////////////////////////////
function DialogShowSdShowReadMe()
NUMBER nResult;
LIST listID;
STRING szTitle, szMsg, szFile;
begin
szFile = SUPPORTDIR ^ "WhatsNew.txt";
listID = ListCreate( STRINGLIST );
if (listID = LIST_NULL) then
MessageBox ("Unable to create list.", SEVERE);
abort;
endif;
ListReadFromFile( listID, szFile );
szTitle = "Important Product Information.";
szMsg = "Whats New.";
nResult = SdShowInfoList( szTitle, szMsg, listID );
ListDestroy( listID );
return nResult;
end;
///////////////////////////////////////////////////////////////////////////////
//
// Function: DialogShowSdRegisterUserEx
//
// Purpose: This function displays the user registration dialog.
//
//
///////////////////////////////////////////////////////////////////////////////
function DialogShowSdRegisterUserEx()
NUMBER nResult;
STRING szTitle, szMsg;
begin
svName = "";
svCompany = "";
GetProfString (SRCDIR + "\\setup.ini", "STARTUP", "CompanyName", svCompany);
if (bImClientInstall = FALSE) then
nResult = SdRegisterUser( szTitle, szMsg, svName, svCompany);
endif;
szTitle = "";
szMsg = "";
return nResult;
end;
///////////////////////////////////////////////////////////////////////////////
//
// Function: DialogShowSdAskDestPath
//
// Purpose: This function asks the user for the destination folder.
//
///////////////////////////////////////////////////////////////////////////////
function DialogShowSdAskDestPath()
NUMBER nResult, nValue;
STRING szTitle, szMsg, szString, svString, szBuffer;
begin
szTitle = "";
szMsg = "";
if (bEasyInstall = FALSE) then
nResult = SdAskDestPath( szTitle, szMsg, svDir, 0 );
else
svDir = svInstallDirectory;
endif;
//Make sure that the user cannot install in the Root.
if(svDir % @PRODUCT_NAME) then
TARGETDIR = svDir;
else
if (bIsWindowsNT4) then
TARGETDIR =svDir ^ @PRODUCT_NAME + "NT";
svDir = TARGETDIR;
else
TARGETDIR =svDir ^ @PRODUCT_NAME;
svDir = TARGETDIR;
endif;
endif;
return nResult;
end;
///////////////////////////////////////////////////////////////////////////////
//
// Function: DialogShowSdComponentDialog2
//
// Purpose: This function displays the custom component dialog.
// and writes selections to list.
//
///////////////////////////////////////////////////////////////////////////////
function DialogShowSdComponentDialog2()
NUMBER nResult;
STRING szTitle, szMsg;
begin
Top:
//default these to off
ComponentSelectItem(MEDIA,"PGPnet Driver 95",FALSE);
ComponentSelectItem(MEDIA,"PGPnet Driver NT",FALSE);
ComponentSelectItem(MEDIA,"PGPdisk Driver 95",FALSE);
ComponentSelectItem(MEDIA,"PGPdisk Driver NT",FALSE);
if ((svSetupType != "Custom") && (svSetupType != "")) then
return 0;
endif;
//if !(bIsWindowsNT4) then
// ComponentSelectItem(MEDIA,"NTCmdlinedocs",FALSE);
// ComponentSelectItem(MEDIA,"NTCmdline",FALSE);
// ComponentSetData (MEDIA, "NTCmdline", COMPONENT_FIELD_VISIBLE, FALSE, "");
//endif;
if (bDisablePGPnet) then
ComponentSelectItem(MEDIA,"PGPnet",FALSE);
if (bEasyInstall = TRUE) then
nvPGPnet = 0;
endif;
endif;
if (INCLUDE_PGPDISK = "FALSE") then
ComponentSelectItem(MEDIA,"PGPdisk",FALSE);
ComponentSetData (MEDIA, "PGPdisk", COMPONENT_FIELD_VISIBLE, FALSE, "");
endif;
//BEGIN FIX FOR INSTALLSHIELD BUG
//This shuts off OS dependant items when not in that OS.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -