Adding recapture homepage functionality, but turning it off for mozilla in

the config.it.
  (Bug #122684, r=ssu, sr=dveditz, qa=gbush, a=dbaron)
This commit is contained in:
curt%netscape.com 2002-03-22 23:38:56 +00:00
Родитель b3ff354366
Коммит 42a6558aca
11 изменённых файлов: 190 добавлений и 90 удалений

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

@ -273,15 +273,20 @@ Title=$ProductName$ Setup - Select Program Folder
;*** LOCALIZE ME BABY ***
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 Folders list. Click Next to continue.
[Dialog Download Options]
[Dialog Additional Options]
Show Dialog=TRUE
;*** LOCALIZE ME BABY ***
Title=$ProductName$ Setup - Download Options
;*** LOCALIZE ME BABY ***
Message0=Select the region you wish to download from, or leave on Default to download from the nearest geographic location.
Title=$ProductName$ Setup - Additional Options
;*** LOCALIZE ME BABY ***
Message1=Select the following option if you wish to save downloaded Setup files on your own computer. This allows you to re-run Setup without downloading the files again. The Setup files will be saved to the path below.
Save Installer=
; The following settings control whether the Recapture Homepage checkbox is displayed.
; For this option to work the file nsResetPref.js must be installed into the
; components directory
Message0=The following checkbox gives users the option of reverting to
the default home page
Show Homepage Option=FALSE
Recapture Homepage=FALSE
[Dialog Advanced Settings]
Show Dialog=TRUE
@ -853,7 +858,23 @@ Wait=FALSE
Target=[SETUP PATH]\$MainExeFile$
Parameters=-installer
WorkingDir=[SETUP PATH]
;The Criterion ID=RecaptureHP associates the decision to run this app with
; the user input to the Recapture Homepage checkbox offered (optionally) in the
; Additional Options dialog.
Criterion ID=RecaptureHP
Run App If Criterion=FALSE
[RunApp1]
Timing=depend reboot
Wait=FALSE
Target=[SETUP PATH]\$MainExeFile$
Parameters=-installer -resetPref browser.startup.homepage
WorkingDir=[SETUP PATH]
;The Criterion ID=RecaptureHP associates the decision to run this app with
; the user input to the Recapture Homepage checkbox offered (optionally) in the
; Additional Options dialog.
Criterion ID=RecaptureHP
Run App If Criterion=TRUE
[Windows Registry0]
Root Key=HKEY_LOCAL_MACHINE
@ -1178,8 +1199,9 @@ IDC Use HTTP=Use &HTTP for downloading files
;*** LOCALIZE ME BABY ***
IDC Save Installer Files=&Save installer files locally
;*** LOCALIZE ME BABY ***
IDC Recapture Homepage=&Make Netscape.com my home page
;*** LOCALIZE ME BABY ***
IDC Turbo Mode=&Use Quick Launch for faster startup times when possible
;*** LOCALIZE ME BABY ***
Message Download Paused=Setup has encountered a network problem and has paused the download. If you have just lost your network connection, please click Resume once your network has been reestablished.
;*** LOCALIZE ME BABY ***

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

@ -1635,9 +1635,9 @@ LRESULT CALLBACK DlgProcProgramFolder(HWND hDlg, UINT msg, WPARAM wParam, LONG l
void SaveDownloadProtocolOption(HWND hDlg)
{
if(IsDlgButtonChecked(hDlg, IDC_USE_FTP) == BST_CHECKED)
diDownloadOptions.dwUseProtocol = UP_FTP;
diAdditionalOptions.dwUseProtocol = UP_FTP;
else if(IsDlgButtonChecked(hDlg, IDC_USE_HTTP) == BST_CHECKED)
diDownloadOptions.dwUseProtocol = UP_HTTP;
diAdditionalOptions.dwUseProtocol = UP_HTTP;
}
LRESULT CALLBACK DlgProcAdvancedSettings(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
@ -1692,7 +1692,7 @@ LRESULT CALLBACK DlgProcAdvancedSettings(HWND hDlg, UINT msg, WPARAM wParam, LON
SendDlgItemMessage (hDlg, IDC_USE_FTP, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
SendDlgItemMessage (hDlg, IDC_USE_HTTP, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
switch(diDownloadOptions.dwUseProtocol)
switch(diAdditionalOptions.dwUseProtocol)
{
case UP_HTTP:
CheckDlgButton(hDlg, IDC_USE_FTP, BST_UNCHECKED);
@ -1707,7 +1707,7 @@ LRESULT CALLBACK DlgProcAdvancedSettings(HWND hDlg, UINT msg, WPARAM wParam, LON
}
if((diDownloadOptions.bShowProtocols) && (diDownloadOptions.bUseProtocolSettings))
if((diAdditionalOptions.bShowProtocols) && (diAdditionalOptions.bUseProtocolSettings))
{
ShowWindow(GetDlgItem(hDlg, IDC_USE_FTP), SW_SHOW);
ShowWindow(GetDlgItem(hDlg, IDC_USE_HTTP), SW_SHOW);
@ -1751,7 +1751,7 @@ LRESULT CALLBACK DlgProcAdvancedSettings(HWND hDlg, UINT msg, WPARAM wParam, LON
return(0);
}
void SaveDownloadOptions(HWND hDlg, HWND hwndCBSiteSelector)
void SaveAdditionalOptions(HWND hDlg, HWND hwndCBSiteSelector)
{
int iIndex;
@ -1761,12 +1761,18 @@ void SaveDownloadOptions(HWND hDlg, HWND hwndCBSiteSelector)
/* get the state of the Save Installer Files checkbox */
if(IsDlgButtonChecked(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES) == BST_CHECKED)
diDownloadOptions.bSaveInstaller = TRUE;
diAdditionalOptions.bSaveInstaller = TRUE;
else
diDownloadOptions.bSaveInstaller = FALSE;
diAdditionalOptions.bSaveInstaller = FALSE;
/* get the state of the Recapture Homepage checkbox */
if(IsDlgButtonChecked(hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE) == BST_CHECKED)
diAdditionalOptions.bRecaptureHomepage = TRUE;
else
diAdditionalOptions.bRecaptureHomepage = FALSE;
}
LRESULT CALLBACK DlgProcDownloadOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
LRESULT CALLBACK DlgProcAdditionalOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
{
RECT rDlg;
char szBuf[MAX_BUF];
@ -1780,19 +1786,35 @@ LRESULT CALLBACK DlgProcDownloadOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG
switch(msg)
{
case WM_INITDIALOG:
if(gdwSiteSelectorStatus == SS_HIDE)
// if(gdwSiteSelectorStatus == SS_HIDE)
// {
// ShowWindow(GetDlgItem(hDlg, IDC_MESSAGE0), SW_HIDE);
// ShowWindow(GetDlgItem(hDlg, IDC_LIST_SITE_SELECTOR), SW_HIDE);
// }
if(diAdditionalOptions.bShowHomepageOption == FALSE)
{
ShowWindow(GetDlgItem(hDlg, IDC_MESSAGE0), SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDC_LIST_SITE_SELECTOR), SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE), SW_HIDE);
}
if(GetTotalArchivesToDownload() == 0)
{
ShowWindow(GetDlgItem(hDlg, IDC_MESSAGE1), SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES), SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDC_EDIT_LOCAL_INSTALLER_PATH), SW_HIDE);
ShowWindow(GetDlgItem(hDlg, IDC_BUTTON_PROXY_SETTINGS), SW_HIDE);
}
DisableSystemMenuItems(hDlg, FALSE);
SetWindowText(hDlg, diDownloadOptions.szTitle);
SetDlgItemText(hDlg, IDC_MESSAGE0, diDownloadOptions.szMessage0);
SetDlgItemText(hDlg, IDC_MESSAGE1, diDownloadOptions.szMessage1);
SetWindowText(hDlg, diAdditionalOptions.szTitle);
SetDlgItemText(hDlg, IDC_MESSAGE0, diAdditionalOptions.szMessage0);
SetDlgItemText(hDlg, IDC_MESSAGE1, diAdditionalOptions.szMessage1);
GetPrivateProfileString("Strings", "IDC Save Installer Files", "", szBuf, sizeof(szBuf), szFileIniConfig);
SetDlgItemText(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, szBuf);
GetPrivateProfileString("Strings", "IDC Recapture Homepage", "", szBuf, sizeof(szBuf), szFileIniConfig);
SetDlgItemText(hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE, szBuf);
GetSaveInstallerPath(szBuf, sizeof(szBuf));
SetDlgItemText(hDlg, IDC_EDIT_LOCAL_INSTALLER_PATH, szBuf);
@ -1809,6 +1831,7 @@ LRESULT CALLBACK DlgProcDownloadOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG
SendDlgItemMessage (hDlg, IDC_LIST_SITE_SELECTOR, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
SendDlgItemMessage (hDlg, IDC_MESSAGE1, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
SendDlgItemMessage (hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
SendDlgItemMessage (hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
SendDlgItemMessage (hDlg, IDC_EDIT_LOCAL_INSTALLER_PATH, WM_SETFONT, (WPARAM)sgInstallGui.systemFont, 0L);
if(GetClientRect(hDlg, &rDlg))
@ -1843,30 +1866,35 @@ LRESULT CALLBACK DlgProcDownloadOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG
else
SendMessage(hwndCBSiteSelector, CB_SETCURSEL, 0, 0);
if(diDownloadOptions.bSaveInstaller)
if(diAdditionalOptions.bSaveInstaller)
CheckDlgButton(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, BST_CHECKED);
else
CheckDlgButton(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, BST_UNCHECKED);
if(diAdditionalOptions.bRecaptureHomepage)
CheckDlgButton(hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE, BST_CHECKED);
else
CheckDlgButton(hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE, BST_UNCHECKED);
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDWIZNEXT:
SaveDownloadOptions(hDlg, hwndCBSiteSelector);
SaveAdditionalOptions(hDlg, hwndCBSiteSelector);
DestroyWindow(hDlg);
DlgSequenceNext();
break;
case IDWIZBACK:
SaveDownloadOptions(hDlg, hwndCBSiteSelector);
SaveAdditionalOptions(hDlg, hwndCBSiteSelector);
DestroyWindow(hDlg);
DlgSequencePrev();
break;
case IDC_BUTTON_ADDITIONAL_SETTINGS:
SaveDownloadOptions(hDlg, hwndCBSiteSelector);
SaveAdditionalOptions(hDlg, hwndCBSiteSelector);
dwWizardState = DLG_PROGRAM_FOLDER;
DestroyWindow(hDlg);
DlgSequenceNext();
@ -2003,7 +2031,7 @@ LPSTR GetStartInstallMessage()
dwBufSize += 4; // take into account 4 indentation spaces
dwBufSize += lstrlen(szSiteSelectorDescription) + 2; // the extra 2 bytes is for the \r\n characters
if(diDownloadOptions.bSaveInstaller)
if(diAdditionalOptions.bSaveInstaller)
{
dwBufSize += 2; // the extra 2 bytes is for the \r\n characters
@ -2127,7 +2155,7 @@ LPSTR GetStartInstallMessage()
lstrcat(szMessageBuf, szSiteSelectorDescription); // site selector description
lstrcat(szMessageBuf, "\r\n");
if(diDownloadOptions.bSaveInstaller)
if(diAdditionalOptions.bSaveInstaller)
{
lstrcat(szMessageBuf, "\r\n");
@ -2714,7 +2742,7 @@ void DlgSequenceNext()
case DLG_QUICK_LAUNCH:
dwWizardState = DLG_DOWNLOAD_OPTIONS;
dwWizardState = DLG_ADDITIONAL_OPTIONS;
gbProcessingXpnstallFiles = FALSE;
do
@ -2742,18 +2770,18 @@ void DlgSequenceNext()
break;
}
if((diDownloadOptions.bShowDialog == TRUE) && (GetTotalArchivesToDownload() > 0))
if(ShowAdditionalOptionsDialog() == TRUE)
{
hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diDownloadOptions.szTitle, DlgProcDownloadOptions);
hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diAdditionalOptions.szTitle, DlgProcAdditionalOptions);
bDone = TRUE;
}
else
{
dwWizardState = DLG_DOWNLOAD_OPTIONS;
dwWizardState = DLG_ADDITIONAL_OPTIONS;
}
break;
case DLG_DOWNLOAD_OPTIONS:
case DLG_ADDITIONAL_OPTIONS:
dwWizardState = DLG_START_INSTALL;
gbProcessingXpnstallFiles = FALSE;
if(diStartInstall.bShowDialog)
@ -2840,7 +2868,7 @@ void DlgSequenceNext()
ProcessFileOpsForAll(T_PRE_SMARTUPDATE);
/* save the installer files in the local machine */
if(diDownloadOptions.bSaveInstaller)
if(diAdditionalOptions.bSaveInstaller)
SaveInstallerFiles();
if(CheckInstances())
@ -2858,7 +2886,7 @@ void DlgSequenceNext()
CreateDirectoriesAll(szDestPath, TRUE);
/* save the installer files in the local machine */
if(diDownloadOptions.bSaveInstaller)
if(diAdditionalOptions.bSaveInstaller)
SaveInstallerFiles();
hrErr = SmartUpdateJars();
@ -2933,16 +2961,17 @@ void DlgSequencePrev()
break;
case DLG_ADVANCED_SETTINGS:
dwWizardState = DLG_DOWNLOAD_OPTIONS;
dwWizardState = DLG_ADDITIONAL_OPTIONS;
gbProcessingXpnstallFiles = FALSE;
if((diDownloadOptions.bShowDialog == TRUE) && (GetTotalArchivesToDownload() > 0))
if(ShowAdditionalOptionsDialog() == TRUE)
{
hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diDownloadOptions.szTitle, DlgProcDownloadOptions);
hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diAdditionalOptions.szTitle, DlgProcAdditionalOptions);
bDone = TRUE;
}
break;
case DLG_DOWNLOAD_OPTIONS:
case DLG_ADDITIONAL_OPTIONS:
dwWizardState = DLG_QUICK_LAUNCH;
gbProcessingXpnstallFiles = FALSE;
if(diQuickLaunch.bShowDialog)

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

@ -33,7 +33,7 @@ LRESULT CALLBACK DlgProcSelectComponents(HWND hDlg, UINT msg, WPARAM wParam, LO
LRESULT CALLBACK DlgProcSelectAdditionalComponents(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam);
LRESULT CALLBACK DlgProcWindowsIntegration(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam);
LRESULT CALLBACK DlgProcProgramFolder(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam);
LRESULT CALLBACK DlgProcDownloadOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam);
LRESULT CALLBACK DlgProcAdditionalOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam);
LRESULT CALLBACK DlgProcAdvancedSettings(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam);
LRESULT CALLBACK DlgProcQuickLaunch(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam);
LRESULT CALLBACK DlgProcSiteSelector(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam);
@ -60,7 +60,7 @@ BOOL CheckWizardStateCustom(DWORD dwDefault);
LPSTR GetStartInstallMessage(void);
void AppendStringWOAmpersand(LPSTR szInputString, DWORD dwInputStringSize, LPSTR szString);
void TruncateString(HWND hWnd, LPSTR szInPath, LPSTR szOutPath, DWORD dwOutPathBufSize);
void SaveDownloadOptions(HWND hDlg, HWND hwndCBSiteSelector);
void SaveAdditionalOptions(HWND hDlg, HWND hwndCBSiteSelector);
WNDPROC SubclassWindow( HWND hWnd, WNDPROC NewWndProc);
LRESULT CALLBACK ListBoxBrowseWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void DisableSystemMenuItems(HWND hWnd, BOOL bDisableClose);

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

@ -84,7 +84,7 @@ extern diSC diSelectComponents;
extern diSC diSelectAdditionalComponents;
extern diWI diWindowsIntegration;
extern diPF diProgramFolder;
extern diDO diDownloadOptions;
extern diDO diAdditionalOptions;
extern diAS diAdvancedSettings;
extern diSI diStartInstall;
extern diD diDownload;

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

@ -1128,11 +1128,11 @@ void SwapFTPAndHTTP(char *szInUrl, DWORD dwInUrlSize)
char szFtp[] = "ftp://";
char szHttp[] = "http://";
if((!szInUrl) || !diDownloadOptions.bUseProtocolSettings)
if((!szInUrl) || !diAdditionalOptions.bUseProtocolSettings)
return;
ZeroMemory(szTmpBuf, sizeof(szTmpBuf));
switch(diDownloadOptions.dwUseProtocol)
switch(diAdditionalOptions.dwUseProtocol)
{
case UP_HTTP:
if((strncmp(szInUrl, szFtp, FTPSTR_LEN) == 0) &&
@ -1656,8 +1656,8 @@ long RetrieveArchives()
LogISComponentsFailedCRC(NULL, W_DOWNLOAD);
}
LogISDownloadProtocol(diDownloadOptions.dwUseProtocol);
LogMSDownloadProtocol(diDownloadOptions.dwUseProtocol);
LogISDownloadProtocol(diAdditionalOptions.dwUseProtocol);
LogMSDownloadProtocol(diAdditionalOptions.dwUseProtocol);
if(lResult == WIZ_OK)
{
@ -2379,10 +2379,12 @@ void DeInitDlgProgramFolder(diPF *diDialog)
FreeMemory(&(diDialog->szMessage0));
}
HRESULT InitDlgDownloadOptions(diDO *diDialog)
HRESULT InitDlgAdditionalOptions(diDO *diDialog)
{
diDialog->bShowDialog = FALSE;
diDialog->bSaveInstaller = FALSE;
diDialog->bRecaptureHomepage = FALSE;
diDialog->bShowHomepageOption = FALSE;
diDialog->dwUseProtocol = UP_FTP;
diDialog->bUseProtocolSettings = TRUE;
diDialog->bShowProtocols = TRUE;
@ -2396,7 +2398,7 @@ HRESULT InitDlgDownloadOptions(diDO *diDialog)
return(0);
}
void DeInitDlgDownloadOptions(diDO *diDialog)
void DeInitDlgAdditionalOptions(diDO *diDialog)
{
FreeMemory(&(diDialog->szTitle));
FreeMemory(&(diDialog->szMessage0));
@ -5375,7 +5377,7 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
return(1);
if(InitDlgProgramFolder(&diProgramFolder))
return(1);
if(InitDlgDownloadOptions(&diDownloadOptions))
if(InitDlgAdditionalOptions(&diAdditionalOptions))
return(1);
if(InitDlgAdvancedSettings(&diAdvancedSettings))
return(1);
@ -5610,18 +5612,26 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
if(lstrcmpi(szShowDialog, "TRUE") == 0)
diProgramFolder.bShowDialog = TRUE;
/* Download Options dialog */
GetPrivateProfileString("Dialog Download Options", "Show Dialog", "", szShowDialog, sizeof(szShowDialog), szFileIniConfig);
GetPrivateProfileString("Dialog Download Options", "Title", "", diDownloadOptions.szTitle, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Dialog Download Options", "Message0", "", diDownloadOptions.szMessage0, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Dialog Download Options", "Message1", "", diDownloadOptions.szMessage1, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Dialog Download Options", "Save Installer", "", szBuf, sizeof(szBuf), szFileIniConfig);
/* Additional Options dialog */
GetPrivateProfileString("Dialog Additional Options", "Show Dialog", "", szShowDialog, sizeof(szShowDialog), szFileIniConfig);
GetPrivateProfileString("Dialog Additional Options", "Title", "", diAdditionalOptions.szTitle, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Dialog Additional Options", "Message0", "", diAdditionalOptions.szMessage0, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Dialog Additional Options", "Message1", "", diAdditionalOptions.szMessage1, MAX_BUF, szFileIniConfig);
GetPrivateProfileString("Dialog Additional Options", "Save Installer", "", szBuf, sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "TRUE") == 0)
diDownloadOptions.bSaveInstaller = TRUE;
diAdditionalOptions.bSaveInstaller = TRUE;
GetPrivateProfileString("Dialog Additional Options", "Recapture Homepage", "", szBuf, sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "TRUE") == 0)
diAdditionalOptions.bRecaptureHomepage = TRUE;
GetPrivateProfileString("Dialog Additional Options", "Show Homepage Option", "", szBuf, sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "TRUE") == 0)
diAdditionalOptions.bShowHomepageOption = TRUE;
if(lstrcmpi(szShowDialog, "TRUE") == 0)
diDownloadOptions.bShowDialog = TRUE;
diAdditionalOptions.bShowDialog = TRUE;
/* Advanced Settings dialog */
GetPrivateProfileString("Dialog Advanced Settings", "Show Dialog", "", szShowDialog, sizeof(szShowDialog), szFileIniConfig);
@ -5636,15 +5646,15 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
GetPrivateProfileString("Dialog Advanced Settings", "Use Protocol", "", szBuf, sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "HTTP") == 0)
diDownloadOptions.dwUseProtocol = UP_HTTP;
diAdditionalOptions.dwUseProtocol = UP_HTTP;
else
diDownloadOptions.dwUseProtocol = UP_FTP;
diAdditionalOptions.dwUseProtocol = UP_FTP;
GetPrivateProfileString("Dialog Advanced Settings", "Use Protocol Settings", "", szBuf, sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "DISABLED") == 0)
diDownloadOptions.bUseProtocolSettings = FALSE;
diAdditionalOptions.bUseProtocolSettings = FALSE;
else
diDownloadOptions.bUseProtocolSettings = TRUE;
diAdditionalOptions.bUseProtocolSettings = TRUE;
GetPrivateProfileString("Dialog Advanced Settings",
"Show Protocols",
@ -5652,9 +5662,9 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
szBuf,
sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "FALSE") == 0)
diDownloadOptions.bShowProtocols = FALSE;
diAdditionalOptions.bShowProtocols = FALSE;
else
diDownloadOptions.bShowProtocols = TRUE;
diAdditionalOptions.bShowProtocols = TRUE;
/* Program Folder dialog */
GetPrivateProfileString("Dialog Quick Launch", "Show Dialog", "", szShowDialog, sizeof(szShowDialog), szFileIniConfig);
@ -5754,7 +5764,7 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
diWindowsIntegration.bShowDialog = FALSE;
diProgramFolder.bShowDialog = FALSE;
diQuickLaunch.bShowDialog = FALSE;
diDownloadOptions.bShowDialog = FALSE;
diAdditionalOptions.bShowDialog = FALSE;
diAdvancedSettings.bShowDialog = FALSE;
diStartInstall.bShowDialog = FALSE;
diDownload.bShowDialog = FALSE;
@ -7049,7 +7059,7 @@ void DeInitialize()
DeInitDlgReboot(&diReboot);
DeInitDlgDownload(&diDownload);
DeInitDlgStartInstall(&diStartInstall);
DeInitDlgDownloadOptions(&diDownloadOptions);
DeInitDlgAdditionalOptions(&diAdditionalOptions);
DeInitDlgAdvancedSettings(&diAdvancedSettings);
DeInitDlgProgramFolder(&diProgramFolder);
DeInitDlgWindowsIntegration(&diWindowsIntegration);
@ -7574,3 +7584,13 @@ DWORD GetTitleIdx(HWND hWnd, LPTSTR Title[], DWORD LastIndex, LPTSTR Name)
return 0;
}
BOOL ShowAdditionalOptionsDialog(void)
{
if(diAdditionalOptions.bShowDialog == FALSE)
return(FALSE);
if( (diAdditionalOptions.bShowHomepageOption == FALSE) && (GetTotalArchivesToDownload() < 1) )
return(FALSE);
return(TRUE);
}

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

@ -206,6 +206,7 @@ char *GetSetupCurrentDownloadFile(char *szCurrentDownloadFile,
DWORD dwCurrentDownloadFileBufSize);
BOOL DeleteWGetLog(void);
DWORD ParseOSType(char *szOSType);
BOOL ShowAdditionalOptionsDialog(void);
#endif /* _EXTRA_H_ */

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

@ -1022,7 +1022,7 @@ void UpdateJSProxyInfo()
ZeroMemory(szBuf, sizeof(szBuf));
if(*diAdvancedSettings.szProxyServer != '\0')
{
if(diDownloadOptions.dwUseProtocol == UP_FTP)
if(diAdditionalOptions.dwUseProtocol == UP_FTP)
wsprintf(szBuf,
"pref(\"network.proxy.ftp\", \"%s\");\n",
diAdvancedSettings.szProxyServer);
@ -1034,7 +1034,7 @@ void UpdateJSProxyInfo()
if(*diAdvancedSettings.szProxyPort != '\0')
{
if(diDownloadOptions.dwUseProtocol == UP_FTP)
if(diAdditionalOptions.dwUseProtocol == UP_FTP)
wsprintf(szBuf,
"pref(\"network.proxy.ftp_port\", %s);\n",
diAdvancedSettings.szProxyPort);
@ -1260,6 +1260,7 @@ HRESULT ProcessRunApp(DWORD dwTiming, char *szSectionPrefix)
char szTarget[MAX_BUF];
char szParameters[MAX_BUF];
char szWorkingDir[MAX_BUF];
BOOL bRunApp;
BOOL bWait;
dwIndex = 0;
@ -1272,32 +1273,56 @@ HRESULT ProcessRunApp(DWORD dwTiming, char *szSectionPrefix)
DecryptString(szTarget, szBuf);
GetPrivateProfileString(szSection, "Parameters", "", szBuf, sizeof(szBuf), szFileIniConfig);
DecryptString(szParameters, szBuf);
// If we are given a criterion to test against, we expect also to be told whether we should run
// the app when that criterion is true or when it is false. If we are not told, we assume that
// we are to run the app when the criterion is true.
bRunApp = TRUE;
GetPrivateProfileString(szSection, "Criterion ID", "", szBuf, sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "RecaptureHP") == 0)
{
GetPrivateProfileString(szSection, "Run App If Criterion", "", szBuf, sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "FALSE") == 0)
{
if(diAdditionalOptions.bRecaptureHomepage == TRUE)
bRunApp = FALSE;
}
else
{
if(diAdditionalOptions.bRecaptureHomepage == FALSE)
bRunApp = FALSE;
}
}
GetPrivateProfileString(szSection, "WorkingDir", "", szBuf, sizeof(szBuf), szFileIniConfig);
DecryptString(szWorkingDir, szBuf);
GetPrivateProfileString(szSection, "Wait", "", szBuf, sizeof(szBuf), szFileIniConfig);
GetPrivateProfileString(szSection, "Wait", "", szBuf, sizeof(szBuf), szFileIniConfig);
if(lstrcmpi(szBuf, "FALSE") == 0)
bWait = FALSE;
else
bWait = TRUE;
if((dwTiming == T_DEPEND_REBOOT) && (NeedReboot() == TRUE))
if (bRunApp == TRUE)
{
lstrcat(szTarget, " ");
lstrcat(szTarget, szParameters);
SetWinReg(HKEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce",
TRUE,
"Netscape",
TRUE,
REG_SZ,
szTarget,
lstrlen(szTarget),
FALSE,
FALSE);
if((dwTiming == T_DEPEND_REBOOT) && (NeedReboot() == TRUE))
{
lstrcat(szTarget, " ");
lstrcat(szTarget, szParameters);
SetWinReg(HKEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce",
TRUE,
"Netscape",
TRUE,
REG_SZ,
szTarget,
lstrlen(szTarget),
FALSE,
FALSE);
}
else
WinSpawn(szTarget, szParameters, szWorkingDir, SW_SHOWNORMAL, bWait);
}
else
WinSpawn(szTarget, szParameters, szWorkingDir, SW_SHOWNORMAL, bWait);
}
++dwIndex;

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

@ -86,7 +86,7 @@ diSC diSelectComponents;
diSC diSelectAdditionalComponents;
diWI diWindowsIntegration;
diPF diProgramFolder;
diDO diDownloadOptions;
diDO diAdditionalOptions;
diAS diAdvancedSettings;
diSI diStartInstall;
diD diDownload;

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

@ -319,13 +319,15 @@ typedef struct dlgProgramFolder
LPSTR szMessage0;
} diPF;
typedef struct dlgDownloadOptions
typedef struct dlgAdditionalOptions
{
BOOL bShowDialog;
LPSTR szTitle;
LPSTR szMessage0;
LPSTR szMessage1;
BOOL bSaveInstaller;
BOOL bRecaptureHomepage;
BOOL bShowHomepageOption;
DWORD dwUseProtocol;
BOOL bUseProtocolSettings;
BOOL bShowProtocols;

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

@ -96,6 +96,7 @@
#define IDC_USE_FTP 1074
#define IDC_DESTINATION 1074
#define IDC_CHECK_TURBO_MODE 1075
#define IDC_CHECK_RECAPTURE_HOMEPAGE 1076
#define DLG_WELCOME 2001
#define DLG_LICENSE 2002
#define DLG_SETUP_TYPE 2003
@ -112,7 +113,7 @@
#define DLG_ADVANCED_SETTINGS 10207
#define DLG_SELECT_ADDITIONAL_COMPONENTS 10208
#define DLG_UPGRADE 10209
#define DLG_DOWNLOAD_OPTIONS 10210
#define DLG_ADDITIONAL_OPTIONS 10210
#define DLG_DOWNLOADING 10211
#define DLG_START_INSTALL1 10212
#define IDB_BOX_CHECKED 10304
@ -140,7 +141,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 116
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1076
#define _APS_NEXT_CONTROL_VALUE 1078
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

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

@ -339,27 +339,27 @@ BEGIN
DEFPUSHBUTTON "",IDWIZBACK,162,139,53,14
END
DLG_DOWNLOAD_OPTIONS DIALOG DISCARDABLE 51, 56, 315, 205
DLG_ADDITIONAL_OPTIONS DIALOG DISCARDABLE 51, 56, 315, 205
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CLASS "MozillaSetupDlg"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "",IDC_CHECK_SAVE_INSTALLER_FILES,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,101,48,204,9
EDITTEXT IDC_EDIT_LOCAL_INSTALLER_PATH,101,61,204,12,
BS_AUTOCHECKBOX | WS_TABSTOP,100,112,204,9
EDITTEXT IDC_EDIT_LOCAL_INSTALLER_PATH,100,124,204,12,
ES_AUTOHSCROLL | ES_READONLY
LTEXT "",IDC_MESSAGE0,101,85,204,25,NOT WS_GROUP
COMBOBOX IDC_LIST_SITE_SELECTOR,101,115,204,124,CBS_DROPDOWNLIST |
CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LTEXT "",IDC_MESSAGE0,100,20,204,33,NOT WS_GROUP
PUSHBUTTON "",IDC_BUTTON_PROXY_SETTINGS,221,159,84,14
PUSHBUTTON "",IDWIZBACK,134,186,53,14
DEFPUSHBUTTON "",IDWIZNEXT,188,186,53,14
PUSHBUTTON "",IDCANCEL,252,186,53,14
LTEXT "",IDC_MESSAGE1,101,11,204,33,NOT WS_GROUP
LTEXT "",IDC_MESSAGE1,100,76,204,33,NOT WS_GROUP
CONTROL 108,-1,"Static",SS_BITMAP,11,11,83,162,WS_EX_CLIENTEDGE
CONTROL "",-1,"Static",SS_ETCHEDHORZ,11,179,295,1,
WS_EX_STATICEDGE
CONTROL "",IDC_CHECK_RECAPTURE_HOMEPAGE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,100,56,202,8
END
DLG_DOWNLOADING DIALOG DISCARDABLE 0, 0, 312, 154