restored the Start Install dialog in order to add new features to the installer. Affects only windows platforms.

This commit is contained in:
ssu%netscape.com 2000-05-02 01:36:10 +00:00
Родитель 2860326858
Коммит 017c80caac
8 изменённых файлов: 66 добавлений и 67 удалений

Просмотреть файл

@ -199,15 +199,15 @@ Archive=
[Dialog Program Folder]
Show Dialog=TRUE
Title=Select Program Folder
Message0=Setup will add program icons to the Program Folder listed below. You may type a new folder name, or select one from the Existing Folder list. Click Install to begin installation.
Message0=Setup will add program icons to the Program Folder listed below. You may type a new folder name, or select one from the Existing Folder list. Click Next to continue.
[Dialog Site Selector]
[Dialog Advanced Settings]
Show Dialog=FALSE
Title=Site Selector
Title=Advanced Settings
Message0=Select the region you wish to download from, or leave it on Default for Setup to automatically determine the best place to download from relative to where you are.
[Dialog Start Install]
Show Dialog=FALSE
Show Dialog=TRUE
Title=Start Install
Message0=Setup has enough information to start copying the program files. If you want to review or change settings, click Back. If you are satisfied with the current settings, click Install to begin copying files.

Просмотреть файл

@ -1489,11 +1489,6 @@ LRESULT CALLBACK DlgProcProgramFolder(HWND hDlg, UINT msg, WPARAM wParam, LONG l
if(GetClientRect(hDlg, &rDlg))
SetWindowPos(hDlg, HWND_TOP, (dwScreenX/2)-(rDlg.right/2), (dwScreenY/2)-(rDlg.bottom/2), 0, 0, SWP_NOSIZE);
if((diSiteSelector.bShowDialog == FALSE) || (GetTotalArchivesToDownload() == 0))
ShowWindow(GetDlgItem(hDlg, IDC_BUTTON_SITE_SELECTOR), SW_HIDE);
else
ShowWindow(GetDlgItem(hDlg, IDC_BUTTON_SITE_SELECTOR), SW_SHOW);
break;
case WM_COMMAND:
@ -1510,7 +1505,7 @@ LRESULT CALLBACK DlgProcProgramFolder(HWND hDlg, UINT msg, WPARAM wParam, LONG l
break;
}
lstrcpy(sgProduct.szProgramFolderName, szBuf);
dwWizardState = DLG_SITE_SELECTOR;
dwWizardState = DLG_ADVANCED_SETTINGS;
DestroyWindow(hDlg);
PostMessage(hWndMain, WM_COMMAND, IDWIZNEXT, 0);
@ -1521,12 +1516,6 @@ LRESULT CALLBACK DlgProcProgramFolder(HWND hDlg, UINT msg, WPARAM wParam, LONG l
PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);
break;
case IDC_BUTTON_SITE_SELECTOR:
dwWizardState = DLG_PROGRAM_FOLDER;
DestroyWindow(hDlg);
PostMessage(hWndMain, WM_COMMAND, IDWIZNEXT, 0);
break;
case IDC_LIST:
if((dwIndex = SendDlgItemMessage(hDlg, IDC_LIST, LB_GETCURSEL, 0, 0)) != LB_ERR)
{
@ -1547,7 +1536,7 @@ LRESULT CALLBACK DlgProcProgramFolder(HWND hDlg, UINT msg, WPARAM wParam, LONG l
return(0);
}
LRESULT CALLBACK DlgProcSiteSelector(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
LRESULT CALLBACK DlgAdvancedSettings(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
{
RECT rDlg;
HWND hwndCBSiteSelector;
@ -1560,8 +1549,8 @@ LRESULT CALLBACK DlgProcSiteSelector(HWND hDlg, UINT msg, WPARAM wParam, LONG lP
switch(msg)
{
case WM_INITDIALOG:
SetWindowText(hDlg, diSiteSelector.szTitle);
SetDlgItemText(hDlg, IDC_MESSAGE0, diSiteSelector.szMessage0);
SetWindowText(hDlg, diAdvancedSettings.szTitle);
SetDlgItemText(hDlg, IDC_MESSAGE0, diAdvancedSettings.szMessage0);
if(GetClientRect(hDlg, &rDlg))
SetWindowPos(hDlg, HWND_TOP, (dwScreenX/2)-(rDlg.right/2), (dwScreenY/2)-(rDlg.bottom/2), 0, 0, SWP_NOSIZE);
@ -1599,7 +1588,7 @@ LRESULT CALLBACK DlgProcSiteSelector(HWND hDlg, UINT msg, WPARAM wParam, LONG lP
case IDWIZNEXT:
iIndex = SendMessage(hwndCBSiteSelector, CB_GETCURSEL, 0, 0);
SendMessage(hwndCBSiteSelector, CB_GETLBTEXT, (WPARAM)iIndex, (LPARAM)szSiteSelectorDescription);
dwWizardState = DLG_WINDOWS_INTEGRATION;
dwWizardState = DLG_ADVANCED_SETTINGS;
DestroyWindow(hDlg);
PostMessage(hWndMain, WM_COMMAND, IDWIZNEXT, 0);
@ -1637,6 +1626,11 @@ LRESULT CALLBACK DlgProcStartInstall(HWND hDlg, UINT msg, WPARAM wParam, LONG lP
if(GetClientRect(hDlg, &rDlg))
SetWindowPos(hDlg, HWND_TOP, (dwScreenX/2)-(rDlg.right/2), (dwScreenY/2)-(rDlg.bottom/2), 0, 0, SWP_NOSIZE);
if((diAdvancedSettings.bShowDialog == FALSE) || (GetTotalArchivesToDownload() == 0))
ShowWindow(GetDlgItem(hDlg, IDC_BUTTON_SITE_SELECTOR), SW_HIDE);
else
ShowWindow(GetDlgItem(hDlg, IDC_BUTTON_SITE_SELECTOR), SW_SHOW);
break;
case WM_COMMAND:
@ -1648,10 +1642,17 @@ LRESULT CALLBACK DlgProcStartInstall(HWND hDlg, UINT msg, WPARAM wParam, LONG lP
break;
case IDWIZBACK:
dwWizardState = DLG_ADVANCED_SETTINGS;
DestroyWindow(hDlg);
PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);
break;
case IDC_BUTTON_SITE_SELECTOR:
dwWizardState = DLG_PROGRAM_FOLDER;
DestroyWindow(hDlg);
PostMessage(hWndMain, WM_COMMAND, IDWIZNEXT, 0);
break;
case IDCANCEL:
AskCancelDlg(hDlg);
break;
@ -1934,24 +1935,24 @@ void DlgSequenceNext()
InstantiateDialog(dwWizardState, diProgramFolder.szTitle, DlgProcProgramFolder);
else
{
dwWizardState = DLG_SITE_SELECTOR;
dwWizardState = DLG_ADVANCED_SETTINGS;
PostMessage(hWndMain, WM_COMMAND, IDWIZNEXT, 0);
}
break;
case DLG_PROGRAM_FOLDER:
dwWizardState = DLG_SITE_SELECTOR;
dwWizardState = DLG_ADVANCED_SETTINGS;
gbProcessingXpnstallFiles = FALSE;
if(diSiteSelector.bShowDialog)
InstantiateDialog(dwWizardState, diSiteSelector.szTitle, DlgProcSiteSelector);
if(diAdvancedSettings.bShowDialog)
InstantiateDialog(dwWizardState, diAdvancedSettings.szTitle, DlgAdvancedSettings);
else
{
dwWizardState = DLG_WINDOWS_INTEGRATION;
dwWizardState = DLG_ADVANCED_SETTINGS;
PostMessage(hWndMain, WM_COMMAND, IDWIZNEXT, 0);
}
break;
case DLG_SITE_SELECTOR:
case DLG_ADVANCED_SETTINGS:
dwWizardState = DLG_START_INSTALL;
gbProcessingXpnstallFiles = FALSE;
if(diStartInstall.bShowDialog)
@ -2031,15 +2032,15 @@ void DlgSequencePrev()
switch(dwWizardState)
{
case DLG_START_INSTALL:
dwWizardState = DLG_SITE_SELECTOR;
dwWizardState = DLG_ADVANCED_SETTINGS;
gbProcessingXpnstallFiles = FALSE;
if(diSiteSelector.bShowDialog)
InstantiateDialog(dwWizardState, diSiteSelector.szTitle, DlgProcSiteSelector);
if(diAdvancedSettings.bShowDialog)
InstantiateDialog(dwWizardState, diAdvancedSettings.szTitle, DlgAdvancedSettings);
else
PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);
break;
case DLG_SITE_SELECTOR:
case DLG_ADVANCED_SETTINGS:
dwWizardState = DLG_PROGRAM_FOLDER;
gbProcessingXpnstallFiles = FALSE;
if(diProgramFolder.bShowDialog)

Просмотреть файл

@ -82,7 +82,7 @@ extern diSC diSelectComponents;
extern diSC diSelectAdditionalComponents;
extern diWI diWindowsIntegration;
extern diPF diProgramFolder;
extern diSS diSiteSelector;
extern diSS diAdvancedSettings;
extern diSI diStartInstall;
extern diR diReboot;
extern siSD siSDObject;

Просмотреть файл

@ -376,7 +376,7 @@ void OutputSetupTitle(HDC hDC)
/* Set shadow color to black and draw shadow */
SetTextColor(hDC, 0);
iShadowOffset = (int)(sgProduct.iSetupTitle0FontSize / 6);
TextOut(hDC, iLine0x + iShadowOffset, iLine0y + iShadowOffset, sgProduct.szSetupTitle0, lstrlen(sgProduct.szSetupTitle0));
TextOut(hDC, iLine0x + iShadowOffset, iLine0y + iShadowOffset, TEXT(sgProduct.szSetupTitle0), lstrlen(sgProduct.szSetupTitle0));
}
/* Set font color and draw; color format is 0x00bbggrr - where b is blue, g is green, and r is red */
@ -384,7 +384,7 @@ void OutputSetupTitle(HDC hDC)
SetTextColor(hDC, sgProduct.crSetupTitle0FontColor);
/* draw text */
TextOut(hDC, iLine0x, iLine0y, sgProduct.szSetupTitle0, lstrlen(sgProduct.szSetupTitle0));
TextOut(hDC, iLine0x, iLine0y, TEXT(sgProduct.szSetupTitle0), lstrlen(sgProduct.szSetupTitle0));
/*
@ -417,7 +417,7 @@ void OutputSetupTitle(HDC hDC)
/* Set shadow color to black and draw shadow */
SetTextColor(hDC, 0);
iShadowOffset = (int)(sgProduct.iSetupTitle1FontSize / 6);
TextOut(hDC, iLine1x + iShadowOffset, iLine1y + iShadowOffset, sgProduct.szSetupTitle1, lstrlen(sgProduct.szSetupTitle1));
TextOut(hDC, iLine1x + iShadowOffset, iLine1y + iShadowOffset, TEXT(sgProduct.szSetupTitle1), lstrlen(sgProduct.szSetupTitle1));
}
/* Set font color and draw; color format is 0x00bbggrr - where b is blue, g is green, and r is red */
@ -425,7 +425,7 @@ void OutputSetupTitle(HDC hDC)
SetTextColor(hDC, sgProduct.crSetupTitle1FontColor);
/* draw text */
TextOut(hDC, iLine1x, iLine1y, sgProduct.szSetupTitle1, lstrlen(sgProduct.szSetupTitle1));
TextOut(hDC, iLine1x, iLine1y, TEXT(sgProduct.szSetupTitle1), lstrlen(sgProduct.szSetupTitle1));
/*
@ -459,7 +459,7 @@ void OutputSetupTitle(HDC hDC)
SetTextColor(hDC, 0);
iShadowOffset = (int)(sgProduct.iSetupTitle2FontSize / 6);
TextOut(hDC, iLine2x + iShadowOffset, iLine2y + iShadowOffset, sgProduct.szSetupTitle2, lstrlen(sgProduct.szSetupTitle2));
TextOut(hDC, iLine2x + iShadowOffset, iLine2y + iShadowOffset, TEXT(sgProduct.szSetupTitle2), lstrlen(sgProduct.szSetupTitle2));
}
/* Set font color and draw; color format is 0x00bbggrr - where b is blue, g is green, and r is red */
@ -467,7 +467,7 @@ void OutputSetupTitle(HDC hDC)
SetTextColor(hDC, sgProduct.crSetupTitle2FontColor);
/* draw text */
TextOut(hDC, iLine2x, iLine2y, sgProduct.szSetupTitle2, lstrlen(sgProduct.szSetupTitle2));
TextOut(hDC, iLine2x, iLine2y, TEXT(sgProduct.szSetupTitle2), lstrlen(sgProduct.szSetupTitle2));
SelectObject(hDC, hfontOld);
DeleteObject(hfontTmp0);
@ -1659,7 +1659,7 @@ void DeInitDlgProgramFolder(diPF *diDialog)
FreeMemory(&(diDialog->szMessage0));
}
HRESULT InitDlgSiteSelector(diSS *diDialog)
HRESULT InitDlgAdvancedSettings(diSS *diDialog)
{
diDialog->bShowDialog = FALSE;
if((diDialog->szTitle = NS_GlobalAlloc(MAX_BUF)) == NULL)
@ -1670,7 +1670,7 @@ HRESULT InitDlgSiteSelector(diSS *diDialog)
return(0);
}
void DeInitDlgSiteSelector(diSS *diDialog)
void DeInitDlgAdvancedSettings(diSS *diDialog)
{
FreeMemory(&(diDialog->szTitle));
FreeMemory(&(diDialog->szMessage0));
@ -3961,7 +3961,7 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
return(1);
if(InitDlgProgramFolder(&diProgramFolder))
return(1);
if(InitDlgSiteSelector(&diSiteSelector))
if(InitDlgAdvancedSettings(&diAdvancedSettings))
return(1);
if(InitDlgStartInstall(&diStartInstall))
return(1);
@ -4126,12 +4126,12 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
if(lstrcmpi(szShowDialog, "TRUE") == 0)
diProgramFolder.bShowDialog = TRUE;
/* Site Selector dialog */
GetPrivateProfileString("Dialog Site Selector", "Show Dialog", "", szShowDialog, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Dialog Site Selector", "Title", "", diSiteSelector.szTitle, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Dialog Site Selector", "Message0", "", diSiteSelector.szMessage0, MAX_BUF, szFileIniConfig);
/* Advanced Settings dialog */
GetPrivateProfileString("Dialog Advanced Settings", "Show Dialog", "", szShowDialog, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Dialog Advanced Settings", "Title", "", diAdvancedSettings.szTitle, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Dialog Advanced Settings", "Message0", "", diAdvancedSettings.szMessage0, MAX_BUF, szFileIniConfig);
if(lstrcmpi(szShowDialog, "TRUE") == 0)
diSiteSelector.bShowDialog = TRUE;
diAdvancedSettings.bShowDialog = TRUE;
/* Start Install dialog */
GetPrivateProfileString("Dialog Start Install", "Show Dialog", "", szShowDialog, MAX_BUF, szFileIniConfig);
@ -4198,7 +4198,7 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
diSelectAdditionalComponents.bShowDialog = FALSE;
diWindowsIntegration.bShowDialog = FALSE;
diProgramFolder.bShowDialog = FALSE;
diSiteSelector.bShowDialog = FALSE;
diAdvancedSettings.bShowDialog = FALSE;
diStartInstall.bShowDialog = FALSE;
break;
}
@ -4872,7 +4872,7 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
wsprintf(szVariable, "Software\\Netscape\\Netscape 6\\%s", szBuf);
}
else if(lstrcmpi(szVariable, "NetscapeInstantMessenger CurrentVersion") == 0)
else if(lstrcmpi(szVariable, "Netscape Instant Messenger CurrentVersion") == 0)
{
/* parse for the current Netscape WinReg key */
GetWinReg(HKEY_LOCAL_MACHINE, "Software\\Netscape\\Netscape Instant Messenger", "CurrentVersion", szBuf, sizeof(szBuf));
@ -5285,7 +5285,7 @@ void DeInitialize()
DeInitSDObject();
DeInitDlgReboot(&diReboot);
DeInitDlgStartInstall(&diStartInstall);
DeInitDlgSiteSelector(&diSiteSelector);
DeInitDlgAdvancedSettings(&diAdvancedSettings);
DeInitDlgProgramFolder(&diProgramFolder);
DeInitDlgWindowsIntegration(&diWindowsIntegration);
DeInitDlgSelectComponents(&diSelectAdditionalComponents);

Просмотреть файл

@ -82,7 +82,7 @@ diSC diSelectComponents;
diSC diSelectAdditionalComponents;
diWI diWindowsIntegration;
diPF diProgramFolder;
diSS diSiteSelector;
diSS diAdvancedSettings;
diSI diStartInstall;
diR diReboot;
siSD siSDObject;

Просмотреть файл

@ -2,7 +2,6 @@
// Microsoft Developer Studio generated include file.
// Used by setuprsc.rc
//
#ifndef WINVER
#define WINVER 0x0400
#endif
@ -104,6 +103,7 @@
#define DLG_EXTRACTING 2009
#define DLG_RESTART 10206
#define DLG_SITE_SELECTOR 10207
#define DLG_ADVANCED_SETTINGS 10207
#define DLG_SELECT_ADDITIONAL_COMPONENTS 10208
#define IDB_BOX_CHECKED 10304
#define IDB_BOX_UNCHECKED 10306

Просмотреть файл

@ -144,15 +144,15 @@ BEGIN
WS_EX_STATICEDGE
END
DLG_PROGRAM_FOLDER DIALOGEX 51, 56, 316, 205
DLG_PROGRAM_FOLDER DIALOGEX 51, 56, 315, 205
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif", 0, 0, 0x1
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_EDIT_PROGRAM_FOLDER,101,64,204,12,ES_AUTOHSCROLL
LISTBOX IDC_LIST,101,94,204,79,LBS_SORT | LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
PUSHBUTTON "< &Back",IDWIZBACK,134,186,53,14
DEFPUSHBUTTON "&Install",IDWIZNEXT,188,186,53,14
DEFPUSHBUTTON "&Next",IDWIZNEXT,188,186,53,14
PUSHBUTTON "&Cancel",IDCANCEL,252,186,53,14
LTEXT "",IDC_MESSAGE0,101,11,204,33,NOT WS_GROUP
LTEXT "&Program Folder:",IDC_STATIC,101,54,105,8
@ -161,8 +161,6 @@ BEGIN
WS_EX_CLIENTEDGE
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,11,179,295,1,
WS_EX_STATICEDGE
PUSHBUTTON "Download Site Selector",IDC_BUTTON_SITE_SELECTOR,11,186,
90,14
END
DLG_LICENSE DIALOG DISCARDABLE 51, 56, 315, 205
@ -180,7 +178,7 @@ BEGIN
WS_EX_STATICEDGE
END
DLG_START_INSTALL DIALOG DISCARDABLE 51, 56, 315, 205
DLG_START_INSTALL DIALOGEX 51, 56, 315, 205
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
BEGIN
@ -189,13 +187,14 @@ BEGIN
PUSHBUTTON "< &Back",IDWIZBACK,134,186,53,14
DEFPUSHBUTTON "&Install",IDWIZNEXT,188,186,53,14
PUSHBUTTON "&Cancel",IDCANCEL,252,186,53,14
LTEXT "Click the type of Setup you prefer, then click Next.",
IDC_MESSAGE0,101,11,204,33,NOT WS_GROUP
LTEXT "",IDC_MESSAGE0,101,11,204,33,NOT WS_GROUP
LTEXT "Current Settings:",IDC_STATIC,101,57,163,8,NOT WS_GROUP
CONTROL 108,IDC_STATIC,"Static",SS_BITMAP,11,11,80,160,
WS_EX_CLIENTEDGE
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,11,179,295,1,
WS_EX_STATICEDGE
PUSHBUTTON "Advanced Settings",IDC_BUTTON_SITE_SELECTOR,11,186,90,
14
END
DLG_BROWSE_DIR DIALOG DISCARDABLE 147, 23, 190, 143
@ -248,9 +247,9 @@ BEGIN
CONTROL "",IDC_GAUGE_ARCHIVE,"GaugeArchive",0x0,9,21,175,11
END
DLG_SITE_SELECTOR DIALOGEX 51, 56, 315, 205
DLG_ADVANCED_SETTINGS DIALOGEX 51, 56, 315, 205
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
DEFPUSHBUTTON "&Ok",IDWIZNEXT,188,186,53,14
PUSHBUTTON "&Cancel",IDCANCEL,252,186,53,14
@ -318,11 +317,6 @@ IDB_BOX_CHECKED_DISABLED BITMAP FIXED IMPURE "box_ch_d.bmp"
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
DLG_PROGRAM_FOLDER, DIALOG
BEGIN
HORZGUIDE, 144
END
DLG_EXTRACTING, DIALOG
BEGIN
BOTTOMMARGIN, 72
@ -388,8 +382,8 @@ BEGIN
"The following directory does not exist:%sWould you like to create it?"
IDS_STR_CREATE_DIRECTORY "Create Directory?"
IDS_ERROR_PROGRAM_FOLDER_NAME "Invalid program folder name entered."
IDS_ERROR_DESTINATION_PATH "Invalid path entered."
IDS_CB_DEFAULT "Default"
IDS_ERROR_DESTINATION_PATH "Invalid path entered."
END
#endif // English (U.S.) resources

Просмотреть файл

@ -1499,7 +1499,11 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
wsprintf(szVariable, "Software\\Netscape\\Netscape 6\\%s", szBuf);
}
else if(lstrcmpi(szVariable, "NetscapeInstantMessenger CurrentVersion") == 0)
else if(lstrcmpi(szVariable, "WinRegKey Netscape Instant Messenger") == 0)
{
lstrcpy(szVariable, "Software\\Netscape\\Netscape Instant Messenger");
}
else if(lstrcmpi(szVariable, "Netscape Instant Messenger CurrentVersion") == 0)
{
/* parse for the current Netscape WinReg key */
GetWinReg(HKEY_LOCAL_MACHINE, "Software\\Netscape\\Netscape Instant Messenger", "CurrentVersion", szBuf, sizeof(szBuf));