зеркало из https://github.com/mozilla/gecko-dev.git
Getting closer and closer to NGInstaller1.0 every day...
This commit is contained in:
Родитель
78a205117e
Коммит
d48c628e11
|
@ -814,6 +814,10 @@ SOURCE=.\setuprsc\bitmap1.bmp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\setuprsc\browser.ico
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\setuprsc\Header.bmp
|
SOURCE=.\setuprsc\Header.bmp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
|
@ -357,7 +357,13 @@ LRESULT CALLBACK DlgProcLicense(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||||
// Wizard dialog title
|
// Wizard dialog title
|
||||||
PropSheet_SetTitle(GetParent(hDlg), 0, (LPTSTR)diLicense.szTitle);
|
PropSheet_SetTitle(GetParent(hDlg), 0, (LPTSTR)diLicense.szTitle);
|
||||||
|
|
||||||
|
SetFocus(GetDlgItem(hDlg, IDC_RADIO_ACCEPT));
|
||||||
|
|
||||||
|
if (IsDlgButtonChecked(hDlg, IDC_RADIO_DECLINE) == BST_CHECKED)
|
||||||
|
PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_BACK);
|
||||||
|
else
|
||||||
PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT|PSWIZB_BACK);
|
PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT|PSWIZB_BACK);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -494,13 +500,13 @@ void BrowseForDirectory(HWND hParent)
|
||||||
if (itemIDList) {
|
if (itemIDList) {
|
||||||
if (SHGetPathFromIDList(itemIDList, currDir)) {
|
if (SHGetPathFromIDList(itemIDList, currDir)) {
|
||||||
// Update the displayed path
|
// Update the displayed path
|
||||||
hDestinationPath = GetDlgItem(hParent, IDC_EDIT_DESTINATION); /* handle to the static destination path text window */
|
hDestinationPath = GetDlgItem(hParent, IDC_EDIT_DESTINATION);
|
||||||
TruncateString(hDestinationPath, currDir, szBuf, sizeof(szBuf));
|
TruncateString(hDestinationPath, currDir, szBuf, sizeof(szBuf));
|
||||||
SetDlgItemText(hParent, IDC_EDIT_DESTINATION, szBuf);
|
SetDlgItemText(hParent, IDC_EDIT_DESTINATION, szBuf);
|
||||||
|
|
||||||
SetCurrentDirectory(currDir);
|
SetCurrentDirectory(currDir);
|
||||||
|
|
||||||
lstrcpy(sgProduct.szPath, currDir);
|
lstrcpy(szTempSetupPath, currDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -508,6 +514,7 @@ void BrowseForDirectory(HWND hParent)
|
||||||
// "Free is not a member of IMalloc, see objidl.h for details"
|
// "Free is not a member of IMalloc, see objidl.h for details"
|
||||||
// but that's a bald-faced lie!
|
// but that's a bald-faced lie!
|
||||||
// The shell allocated an ITEMIDLIST, we need to free it.
|
// The shell allocated an ITEMIDLIST, we need to free it.
|
||||||
|
// I guess we'll just leak shell objects for now :-D
|
||||||
LPMALLOC shellMalloc;
|
LPMALLOC shellMalloc;
|
||||||
if (SUCCEEDED(SHGetMalloc(&shellMalloc))) {
|
if (SUCCEEDED(SHGetMalloc(&shellMalloc))) {
|
||||||
shellMalloc->Free(itemIDList);
|
shellMalloc->Free(itemIDList);
|
||||||
|
@ -517,6 +524,25 @@ void BrowseForDirectory(HWND hParent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RecoverFromPathError(HWND aPanel)
|
||||||
|
{
|
||||||
|
HWND destinationPath;
|
||||||
|
char buf[MAX_BUF];
|
||||||
|
|
||||||
|
// Reset the displayed path to the previous, valid value.
|
||||||
|
destinationPath = GetDlgItem(aPanel, IDC_EDIT_DESTINATION);
|
||||||
|
TruncateString(destinationPath, sgProduct.szPath, buf, sizeof(buf));
|
||||||
|
SetDlgItemText(aPanel, IDC_EDIT_DESTINATION, buf);
|
||||||
|
|
||||||
|
// Reset the temporary path string so we don't get stuck receiving
|
||||||
|
// the error message.
|
||||||
|
lstrcpy(szTempSetupPath, sgProduct.szPath);
|
||||||
|
|
||||||
|
// Prevent the Wizard from advancing because of this error.
|
||||||
|
SetWindowLong(aPanel, DWL_MSGRESULT, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
LRESULT CALLBACK DlgProcSelectInstallPath(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
LRESULT CALLBACK DlgProcSelectInstallPath(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||||
{
|
{
|
||||||
HWND hDestinationPath;
|
HWND hDestinationPath;
|
||||||
|
@ -537,7 +563,7 @@ LRESULT CALLBACK DlgProcSelectInstallPath(HWND hDlg, UINT msg, WPARAM wParam, LO
|
||||||
|
|
||||||
SetCurrentDirectory(szTempSetupPath);
|
SetCurrentDirectory(szTempSetupPath);
|
||||||
|
|
||||||
hDestinationPath = GetDlgItem(hDlg, IDC_EDIT_DESTINATION); /* handle to the static destination path text window */
|
hDestinationPath = GetDlgItem(hDlg, IDC_EDIT_DESTINATION);
|
||||||
TruncateString(hDestinationPath, szTempSetupPath, szBuf, sizeof(szBuf));
|
TruncateString(hDestinationPath, szTempSetupPath, szBuf, sizeof(szBuf));
|
||||||
SetDlgItemText(hDlg, IDC_EDIT_DESTINATION, szBuf);
|
SetDlgItemText(hDlg, IDC_EDIT_DESTINATION, szBuf);
|
||||||
|
|
||||||
|
@ -565,15 +591,8 @@ LRESULT CALLBACK DlgProcSelectInstallPath(HWND hDlg, UINT msg, WPARAM wParam, LO
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PSN_WIZNEXT:
|
case PSN_WIZNEXT:
|
||||||
lstrcpy(sgProduct.szPath, szTempSetupPath);
|
|
||||||
|
|
||||||
/* append a backslash to the path because CreateDirectoriesAll()
|
|
||||||
uses a backslash to determine directories */
|
|
||||||
lstrcpy(szBuf, sgProduct.szPath);
|
|
||||||
AppendBackSlash(szBuf, sizeof(szBuf));
|
|
||||||
|
|
||||||
/* Make sure that the path is not within the windows dir */
|
/* Make sure that the path is not within the windows dir */
|
||||||
if(IsPathWithinWindir(szBuf)) {
|
if(IsPathWithinWindir(szTempSetupPath)) {
|
||||||
char errorMsg[MAX_BUF];
|
char errorMsg[MAX_BUF];
|
||||||
char errorMsgTitle[MAX_BUF];
|
char errorMsgTitle[MAX_BUF];
|
||||||
|
|
||||||
|
@ -582,9 +601,18 @@ LRESULT CALLBACK DlgProcSelectInstallPath(HWND hDlg, UINT msg, WPARAM wParam, LO
|
||||||
GetPrivateProfileString("Messages", "ERROR_MESSAGE_TITLE", "",
|
GetPrivateProfileString("Messages", "ERROR_MESSAGE_TITLE", "",
|
||||||
errorMsgTitle, sizeof(errorMsgTitle), szFileIniInstall);
|
errorMsgTitle, sizeof(errorMsgTitle), szFileIniInstall);
|
||||||
MessageBox(hDlg, errorMsg, errorMsgTitle, MB_OK | MB_ICONERROR);
|
MessageBox(hDlg, errorMsg, errorMsgTitle, MB_OK | MB_ICONERROR);
|
||||||
break;
|
|
||||||
|
RecoverFromPathError(hDlg);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lstrcpy(sgProduct.szPath, szTempSetupPath);
|
||||||
|
/* append a backslash to the path because CreateDirectoriesAll()
|
||||||
|
uses a backslash to determine directories */
|
||||||
|
lstrcpy(szBuf, sgProduct.szPath);
|
||||||
|
AppendBackSlash(szBuf, sizeof(szBuf));
|
||||||
|
|
||||||
/* Create the path if it does not exist */
|
/* Create the path if it does not exist */
|
||||||
if(FileExists(szBuf) == FALSE) {
|
if(FileExists(szBuf) == FALSE) {
|
||||||
char szBuf2[MAX_PATH];
|
char szBuf2[MAX_PATH];
|
||||||
|
@ -604,7 +632,10 @@ LRESULT CALLBACK DlgProcSelectInstallPath(HWND hDlg, UINT msg, WPARAM wParam, LO
|
||||||
GetPrivateProfileString("Messages", "ERROR_MESSAGE_TITLE", "", szEMessageTitle, sizeof(szEMessageTitle), szFileIniInstall);
|
GetPrivateProfileString("Messages", "ERROR_MESSAGE_TITLE", "", szEMessageTitle, sizeof(szEMessageTitle), szFileIniInstall);
|
||||||
|
|
||||||
MessageBox(hDlg, szBuf, szEMessageTitle, MB_OK | MB_ICONERROR);
|
MessageBox(hDlg, szBuf, szEMessageTitle, MB_OK | MB_ICONERROR);
|
||||||
break;
|
|
||||||
|
RecoverFromPathError(hDlg);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(*sgProduct.szSubPath != '\0') {
|
if(*sgProduct.szSubPath != '\0') {
|
||||||
|
@ -1015,7 +1046,9 @@ LRESULT CALLBACK DlgProcSelectComponents(HWND hDlg, UINT msg, WPARAM wParam, LON
|
||||||
|
|
||||||
SetDlgItemText(hDlg, IDC_STATIC1, sgInstallGui.szComponents_);
|
SetDlgItemText(hDlg, IDC_STATIC1, sgInstallGui.szComponents_);
|
||||||
SetDlgItemText(hDlg, IDC_STATIC2, sgInstallGui.szDescription);
|
SetDlgItemText(hDlg, IDC_STATIC2, sgInstallGui.szDescription);
|
||||||
SetDlgItemText(hDlg, IDC_STATIC_DOWNLOAD_SIZE, sgInstallGui.szTotalDownloadSize);
|
|
||||||
|
// XXXben We don't support net stub installs yet.
|
||||||
|
// SetDlgItemText(hDlg, IDC_STATIC_DOWNLOAD_SIZE, sgInstallGui.szTotalDownloadSize);
|
||||||
|
|
||||||
gdwACFlag = AC_COMPONENTS;
|
gdwACFlag = AC_COMPONENTS;
|
||||||
OldListBoxWndProc = SubclassWindow(hwndLBComponents, (WNDPROC)NewListBoxWndProc);
|
OldListBoxWndProc = SubclassWindow(hwndLBComponents, (WNDPROC)NewListBoxWndProc);
|
||||||
|
@ -1051,7 +1084,8 @@ LRESULT CALLBACK DlgProcSelectComponents(HWND hDlg, UINT msg, WPARAM wParam, LON
|
||||||
_ui64toa(ullDSBuf, tchBuffer, 10);
|
_ui64toa(ullDSBuf, tchBuffer, 10);
|
||||||
wsprintf(szBuf, sgInstallGui.szDownloadSize, tchBuffer);
|
wsprintf(szBuf, sgInstallGui.szDownloadSize, tchBuffer);
|
||||||
|
|
||||||
SetDlgItemText(hDlg, IDC_STATIC_DOWNLOAD_SIZE, szBuf);
|
// XXXben We don't support net stub installs yet.
|
||||||
|
// SetDlgItemText(hDlg, IDC_STATIC_DOWNLOAD_SIZE, szBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1087,32 +1121,78 @@ BOOL IsSelectableComponent(siC* aComponent)
|
||||||
!(aComponent->dwAttributes & SIC_ADDITIONAL);
|
!(aComponent->dwAttributes & SIC_ADDITIONAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL IsComponentSelected(siC* aComponent)
|
||||||
|
{
|
||||||
|
return aComponent->dwAttributes & SIC_SELECTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetRelativeRect(HWND aWindow, int aResourceID, RECT* aRect)
|
||||||
|
{
|
||||||
|
HWND ctrl;
|
||||||
|
POINT pt;
|
||||||
|
|
||||||
|
ctrl = GetDlgItem(aWindow, aResourceID);
|
||||||
|
|
||||||
|
GetWindowRect(ctrl, aRect);
|
||||||
|
|
||||||
|
pt.x = aRect->left;
|
||||||
|
pt.y = aRect->top;
|
||||||
|
ScreenToClient(aWindow, &pt);
|
||||||
|
aRect->left = pt.x;
|
||||||
|
aRect->top = pt.y;
|
||||||
|
|
||||||
|
pt.x = aRect->right;
|
||||||
|
pt.y = aRect->bottom;
|
||||||
|
ScreenToClient(aWindow, &pt);
|
||||||
|
aRect->right = pt.x;
|
||||||
|
aRect->bottom = pt.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PositionControl(HWND aWindow, int aResourceIDRelative, int aResourceIDControl, int aOffset)
|
||||||
|
{
|
||||||
|
HWND ctrl;
|
||||||
|
RECT r1, r2;
|
||||||
|
|
||||||
|
GetRelativeRect(aWindow, aResourceIDRelative, &r1);
|
||||||
|
GetRelativeRect(aWindow, aResourceIDControl, &r2);
|
||||||
|
|
||||||
|
ctrl = GetDlgItem(aWindow, aResourceIDControl);
|
||||||
|
SetWindowPos(ctrl, NULL, r2.left, r1.bottom + aOffset, -1, -1, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
LRESULT CALLBACK DlgProcSummary(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
LRESULT CALLBACK DlgProcSummary(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||||
{
|
{
|
||||||
HWND hInstallFolder;
|
HWND ctrl;
|
||||||
LPSTR szMessage = NULL;
|
LPSTR szMessage = NULL;
|
||||||
LPNMHDR notifyMessage;
|
LPNMHDR notifyMessage;
|
||||||
char szAddtlComps[MAX_BUF];
|
char szAddtlComps[MAX_BUF];
|
||||||
char szTemp[MAX_BUF];
|
char szTemp[MAX_BUF];
|
||||||
char szFormat[MAX_BUF_TINY];
|
char szFormat[MAX_BUF_TINY];
|
||||||
BOOL hasAddtlComps;
|
BOOL hasAddtlComps = FALSE;
|
||||||
BOOL skipNext = FALSE;
|
BOOL skipNext = FALSE;
|
||||||
siC *currComponent, *mainComponent;
|
siC *currComponent, *mainComponent;
|
||||||
|
HICON largeIcon, smallIcon;
|
||||||
|
|
||||||
switch(msg) {
|
switch(msg) {
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
DisableSystemMenuItems(hDlg, FALSE);
|
|
||||||
SetWindowText(hDlg, diStartInstall.szTitle);
|
|
||||||
|
|
||||||
SetDlgItemText(hDlg, IDC_MESSAGE1, diStartInstall.szMessage0);
|
SetDlgItemText(hDlg, IDC_MESSAGE1, diStartInstall.szMessage0);
|
||||||
SetDlgItemText(hDlg, IDC_MESSAGE2, sgInstallGui.szProxyMessage);
|
SetDlgItemText(hDlg, IDC_MESSAGE2, sgInstallGui.szProxyMessage);
|
||||||
SetDlgItemText(hDlg, IDC_CONNECTION_SETTINGS, sgInstallGui.szProxyButton);
|
SetDlgItemText(hDlg, IDC_CONNECTION_SETTINGS, sgInstallGui.szProxyButton);
|
||||||
SetDlgItemText(hDlg, IDC_INSTALL_FOLDER_LABEL, sgInstallGui.szInstallFolder);
|
SetDlgItemText(hDlg, IDC_INSTALL_FOLDER_LABEL, sgInstallGui.szInstallFolder);
|
||||||
|
|
||||||
if ((diAdvancedSettings.bShowDialog == FALSE) || (GetTotalArchivesToDownload() == 0))
|
// This is a bit of a hack for now, not parameterizable as I'd like it to be.
|
||||||
SetDlgItemText(hDlg, IDC_MESSAGE0, diStartInstall.szMessageInstall);
|
// Unfortunately pressed for time. Revisit.
|
||||||
else
|
// -Ben
|
||||||
SetDlgItemText(hDlg, IDC_MESSAGE0, diStartInstall.szMessageDownload);
|
#if defined(MOZ_PHOENIX)
|
||||||
|
ExtractIconEx("setuprsc.dll", 1, &largeIcon, &smallIcon, 1);
|
||||||
|
#elif defined(MOZ_THUNDERBIRD)
|
||||||
|
ExtractIconEx("setuprsc.dll", 2, &largeIcon, &smallIcon, 1);
|
||||||
|
#endif
|
||||||
|
SendMessage(GetDlgItem(hDlg, IDC_APP_ICON), STM_SETICON, (LPARAM)smallIcon, 0);
|
||||||
|
|
||||||
|
ExtractIconEx("shell32.dll", 3, &largeIcon, &smallIcon, 1);
|
||||||
|
SendMessage(GetDlgItem(hDlg, IDC_FOLDER_ICON), STM_SETICON, (LPARAM)smallIcon, 0);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1128,8 +1208,20 @@ LRESULT CALLBACK DlgProcSummary(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||||
// options - WM_INITDIALOG only gets called once, not every time the
|
// options - WM_INITDIALOG only gets called once, not every time the
|
||||||
// panel is displayed.
|
// panel is displayed.
|
||||||
|
|
||||||
*szAddtlComps = '\0';
|
// Update strings that relate to whether or not files will be downloaded.
|
||||||
|
// The user may have selected additional components that require a download.
|
||||||
|
if ((diAdvancedSettings.bShowDialog == FALSE) || (GetTotalArchivesToDownload() == 0)) {
|
||||||
|
SetDlgItemText(hDlg, IDC_MESSAGE0, diStartInstall.szMessageInstall);
|
||||||
|
|
||||||
|
// Hide Download-related UI:
|
||||||
|
ShowWindow(GetDlgItem(hDlg, IDC_MESSAGE2), SW_HIDE);
|
||||||
|
ShowWindow(GetDlgItem(hDlg, IDC_CONNECTION_SETTINGS), SW_HIDE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
SetDlgItemText(hDlg, IDC_MESSAGE0, diStartInstall.szMessageDownload);
|
||||||
|
|
||||||
|
// Show the components we're going to install
|
||||||
|
szAddtlComps[0] = '\0';
|
||||||
currComponent = siComponents;
|
currComponent = siComponents;
|
||||||
do {
|
do {
|
||||||
if (!currComponent)
|
if (!currComponent)
|
||||||
|
@ -1137,7 +1229,8 @@ LRESULT CALLBACK DlgProcSummary(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||||
|
|
||||||
if (currComponent->dwAttributes & SIC_MAIN_COMPONENT)
|
if (currComponent->dwAttributes & SIC_MAIN_COMPONENT)
|
||||||
mainComponent = currComponent;
|
mainComponent = currComponent;
|
||||||
else if (IsSelectableComponent(currComponent)) {
|
else if (IsSelectableComponent(currComponent) &&
|
||||||
|
IsComponentSelected(currComponent)) {
|
||||||
wsprintf(szFormat, "%s\r\n", sgInstallGui.szAddtlCompWrapper);
|
wsprintf(szFormat, "%s\r\n", sgInstallGui.szAddtlCompWrapper);
|
||||||
wsprintf(szTemp, szFormat, currComponent->szDescriptionShort);
|
wsprintf(szTemp, szFormat, currComponent->szDescriptionShort);
|
||||||
lstrcat(szAddtlComps, szTemp);
|
lstrcat(szAddtlComps, szTemp);
|
||||||
|
@ -1149,17 +1242,35 @@ LRESULT CALLBACK DlgProcSummary(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||||
}
|
}
|
||||||
while (currComponent && currComponent != siComponents);
|
while (currComponent && currComponent != siComponents);
|
||||||
|
|
||||||
if (hasAddtlComps)
|
// Update the display to reflect whether or not additional components are going to
|
||||||
|
// be installed. If none are, we shift the install folder detail up so that it's
|
||||||
|
// neatly under the Primary Component name.
|
||||||
|
if (hasAddtlComps) {
|
||||||
wsprintf(szTemp, sgInstallGui.szPrimCompOthers, mainComponent->szDescriptionShort);
|
wsprintf(szTemp, sgInstallGui.szPrimCompOthers, mainComponent->szDescriptionShort);
|
||||||
else
|
|
||||||
wsprintf(szTemp, sgInstallGui.szPrimCompNoOthers, mainComponent->szDescriptionShort);
|
ShowWindow(GetDlgItem(hDlg, IDC_OPTIONAL_COMPONENTS), SW_SHOW);
|
||||||
SetDlgItemText(hDlg, IDC_PRIMARY_COMPONENT, szTemp);
|
|
||||||
|
|
||||||
SetDlgItemText(hDlg, IDC_OPTIONAL_COMPONENTS, szAddtlComps);
|
SetDlgItemText(hDlg, IDC_OPTIONAL_COMPONENTS, szAddtlComps);
|
||||||
|
|
||||||
SetDlgItemText(hDlg, IDC_INSTALL_FOLDER, sgProduct.szPath);
|
PositionControl(hDlg, IDC_OPTIONAL_COMPONENTS, IDC_INSTALL_FOLDER_LABEL, 10);
|
||||||
hInstallFolder = GetDlgItem(hDlg, IDC_INSTALL_FOLDER);
|
}
|
||||||
TruncateString(hInstallFolder, sgProduct.szPath, szTemp, sizeof(szTemp));
|
else {
|
||||||
|
wsprintf(szTemp, sgInstallGui.szPrimCompNoOthers, mainComponent->szDescriptionShort);
|
||||||
|
|
||||||
|
ShowWindow(GetDlgItem(hDlg, IDC_OPTIONAL_COMPONENTS), SW_HIDE);
|
||||||
|
|
||||||
|
// Shift the "Install Folder" text up in the "No Components" case
|
||||||
|
PositionControl(hDlg, IDC_PRIMARY_COMPONENT, IDC_INSTALL_FOLDER_LABEL, 10);
|
||||||
|
}
|
||||||
|
PositionControl(hDlg, IDC_INSTALL_FOLDER_LABEL, IDC_INSTALL_FOLDER, 10);
|
||||||
|
PositionControl(hDlg, IDC_INSTALL_FOLDER_LABEL, IDC_FOLDER_ICON, 7);
|
||||||
|
|
||||||
|
SetDlgItemText(hDlg, IDC_PRIMARY_COMPONENT, szTemp);
|
||||||
|
|
||||||
|
// Update the install folder.
|
||||||
|
ctrl = GetDlgItem(hDlg, IDC_INSTALL_FOLDER);
|
||||||
|
TruncateString(ctrl, sgProduct.szPath, szTemp, sizeof(szTemp));
|
||||||
|
SetDlgItemText(hDlg, IDC_INSTALL_FOLDER, szTemp);
|
||||||
|
|
||||||
PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT|PSWIZB_BACK);
|
PropSheet_SetWizButtons(GetParent(hDlg), PSWIZB_NEXT|PSWIZB_BACK);
|
||||||
|
|
||||||
|
@ -1522,11 +1633,33 @@ LRESULT CALLBACK DlgProcDownloading(HWND hDlg, UINT msg, WPARAM wParam, LONG lPa
|
||||||
// DIALOG: INSTALLING FILES
|
// DIALOG: INSTALLING FILES
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#define BTN_CLSNAME_LEN 7
|
||||||
|
#define BTN_CANCEL_OFFSET 4
|
||||||
|
BOOL CALLBACK DisableCancelButton(HWND aWindow, LPARAM aData)
|
||||||
|
{
|
||||||
|
static int offset = 0;
|
||||||
|
char className[BTN_CLSNAME_LEN];
|
||||||
|
char text[MAX_BUF];
|
||||||
|
|
||||||
|
GetClassName(aWindow, className, BTN_CLSNAME_LEN);
|
||||||
|
if (!strcmp(className, "Button") &&
|
||||||
|
GetParent(aWindow) == (HWND)aData) {
|
||||||
|
GetWindowText(aWindow, text, MAX_BUF-1);
|
||||||
|
if (++offset == BTN_CANCEL_OFFSET) {
|
||||||
|
offset = 0;
|
||||||
|
EnableWindow(aWindow, FALSE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
LRESULT CALLBACK DlgProcInstalling(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
LRESULT CALLBACK DlgProcInstalling(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||||
{
|
{
|
||||||
LPNMHDR notifyMessage;
|
LPNMHDR notifyMessage;
|
||||||
static BOOL initialized = FALSE;
|
static BOOL initialized = FALSE;
|
||||||
static int count = 0;
|
HWND parent = GetParent(hDlg);
|
||||||
|
|
||||||
switch(msg) {
|
switch(msg) {
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
@ -1538,11 +1671,6 @@ LRESULT CALLBACK DlgProcInstalling(HWND hDlg, UINT msg, WPARAM wParam, LONG lPar
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PBM_SETPOS:
|
|
||||||
++count;
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
if (initialized)
|
if (initialized)
|
||||||
break;
|
break;
|
||||||
|
@ -1552,10 +1680,10 @@ LRESULT CALLBACK DlgProcInstalling(HWND hDlg, UINT msg, WPARAM wParam, LONG lPar
|
||||||
if (InstallFiles(hDlg)) {
|
if (InstallFiles(hDlg)) {
|
||||||
#if WINTEGRATION_PAGE
|
#if WINTEGRATION_PAGE
|
||||||
if (dwSetupType == ST_RADIO0)
|
if (dwSetupType == ST_RADIO0)
|
||||||
PropSheet_SetCurSelByID(GetParent(hDlg), DLG_INSTALL_SUCCESSFUL);
|
PropSheet_SetCurSelByID(parent, DLG_INSTALL_SUCCESSFUL);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
PropSheet_SetCurSelByID(GetParent(hDlg), DLG_INSTALL_SUCCESSFUL);
|
PropSheet_SetCurSelByID(parent, DLG_INSTALL_SUCCESSFUL);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1571,9 +1699,16 @@ LRESULT CALLBACK DlgProcInstalling(HWND hDlg, UINT msg, WPARAM wParam, LONG lPar
|
||||||
switch (notifyMessage->code) {
|
switch (notifyMessage->code) {
|
||||||
case PSN_SETACTIVE:
|
case PSN_SETACTIVE:
|
||||||
// Wizard dialog title
|
// Wizard dialog title
|
||||||
PropSheet_SetTitle(GetParent(hDlg), 0, (LPTSTR)diInstalling.szTitle);
|
PropSheet_SetTitle(parent, 0, (LPTSTR)diInstalling.szTitle);
|
||||||
|
|
||||||
PropSheet_SetWizButtons(GetParent(hDlg), 0);
|
// Disable the Cancel button. This leaves the button disabled for
|
||||||
|
// this page (Installing) and the final page (Finish) because it
|
||||||
|
// is meaningless and potentially damaging in both places. If we
|
||||||
|
// ever bring back the Wintegration page we're going to have to
|
||||||
|
// do something about it.
|
||||||
|
EnumChildWindows(parent, DisableCancelButton, (LPARAM)parent);
|
||||||
|
|
||||||
|
PropSheet_SetWizButtons(parent, 0);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1646,8 +1781,6 @@ BOOL InstallFiles(HWND hDlg)
|
||||||
else
|
else
|
||||||
err = WIZ_OK;
|
err = WIZ_OK;
|
||||||
|
|
||||||
//XXXben TODO: shift this until after the FINISH step in DlgProcInstallSuccess
|
|
||||||
|
|
||||||
CleanupXpcomFile();
|
CleanupXpcomFile();
|
||||||
|
|
||||||
gbProcessingXpnstallFiles = FALSE;
|
gbProcessingXpnstallFiles = FALSE;
|
||||||
|
@ -2348,3 +2481,4 @@ void CommitInstall(void)
|
||||||
gbProcessingXpnstallFiles = FALSE;
|
gbProcessingXpnstallFiles = FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ LRESULT CALLBACK NewListBoxWndProc( HWND, UINT, WPARAM, LPARAM);
|
||||||
LRESULT CALLBACK DlgProcUpgrade(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam);
|
LRESULT CALLBACK DlgProcUpgrade(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam);
|
||||||
|
|
||||||
BOOL IsSelectableComponent(siC* aComponent);
|
BOOL IsSelectableComponent(siC* aComponent);
|
||||||
|
BOOL IsComponentSelected(siC* aComponent);
|
||||||
HFONT MakeFont(TCHAR* aFaceName, int aFontSize, LONG aWeight);
|
HFONT MakeFont(TCHAR* aFaceName, int aFontSize, LONG aWeight);
|
||||||
void SaveUserChanges();
|
void SaveUserChanges();
|
||||||
BOOL IsDownloadRequired();
|
BOOL IsDownloadRequired();
|
||||||
|
|
|
@ -193,7 +193,6 @@ HRESULT SmartUpdateJars(HWND aWizardPanel)
|
||||||
DWORD i = 0;
|
DWORD i = 0;
|
||||||
siC *siCObject = NULL;
|
siC *siCObject = NULL;
|
||||||
HRESULT hrResult;
|
HRESULT hrResult;
|
||||||
HWND ctrl;
|
|
||||||
char szBuf[MAX_BUF];
|
char szBuf[MAX_BUF];
|
||||||
char szEXpiInstall[MAX_BUF];
|
char szEXpiInstall[MAX_BUF];
|
||||||
char szArchive[MAX_BUF];
|
char szArchive[MAX_BUF];
|
||||||
|
@ -254,8 +253,8 @@ HRESULT SmartUpdateJars(HWND aWizardPanel)
|
||||||
|
|
||||||
GetTotalArchivesToInstall();
|
GetTotalArchivesToInstall();
|
||||||
|
|
||||||
ctrl = GetDlgItem(dlgInfo.hWndDlg, IDC_PROGRESS_ARCHIVE);
|
SendDlgItemMessage(dlgInfo.hWndDlg, IDC_PROGRESS_ARCHIVE, PBM_SETRANGE,
|
||||||
SendMessage(ctrl, PBM_SETRANGE, 0, dwTotalFiles);
|
0, MAKELPARAM(0, dwTotalFiles));
|
||||||
|
|
||||||
dwCurrentFile = 0;
|
dwCurrentFile = 0;
|
||||||
siCObject = SiCNodeGetObject(i, TRUE, AC_ALL);
|
siCObject = SiCNodeGetObject(i, TRUE, AC_ALL);
|
||||||
|
@ -383,19 +382,16 @@ void cbXPIProgress(const char* msg, PRInt32 val, PRInt32 max)
|
||||||
char szFilename[MAX_BUF];
|
char szFilename[MAX_BUF];
|
||||||
char szStrProcessingFileBuf[MAX_BUF];
|
char szStrProcessingFileBuf[MAX_BUF];
|
||||||
char szStrCopyingFileBuf[MAX_BUF];
|
char szStrCopyingFileBuf[MAX_BUF];
|
||||||
char szMsg[MAX_BUF];
|
|
||||||
|
|
||||||
if(sgProduct.mode != SILENT)
|
if(sgProduct.mode != SILENT)
|
||||||
{
|
{
|
||||||
ParsePath((char *)msg, szFilename, sizeof(szFilename), FALSE, PP_FILENAME_ONLY);
|
ParsePath((char *)msg, szFilename, sizeof(szFilename), FALSE, PP_FILENAME_ONLY);
|
||||||
ParsePath((char *)msg, szMsg, sizeof(szMsg), FALSE, PP_ROOT_ONLY);
|
|
||||||
|
|
||||||
dlgInfo.nFileBars = 0;
|
dlgInfo.nFileBars = 0;
|
||||||
|
|
||||||
// Holy jesus, I hate the motherfucking installer.
|
|
||||||
if ((!strncmp(msg, "Installing: ", 12) ||
|
if ((!strncmp(msg, "Installing: ", 12) ||
|
||||||
!strncmp(msg, "Replacing: ", 11))
|
!strncmp(msg, "Replacing: ", 11))
|
||||||
&& (max != 0 && val <= max))
|
&& (max != 0 && val <= max)) {
|
||||||
++dwCurrentFile;
|
++dwCurrentFile;
|
||||||
|
|
||||||
UpdateArchiveInstallProgress((int)dwCurrentFile);
|
UpdateArchiveInstallProgress((int)dwCurrentFile);
|
||||||
|
@ -404,6 +400,7 @@ void cbXPIProgress(const char* msg, PRInt32 val, PRInt32 max)
|
||||||
|
|
||||||
ProcessWindowsMessages();
|
ProcessWindowsMessages();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void cbXPIFinal(const char *URL, PRInt32 finalStatus)
|
void cbXPIFinal(const char *URL, PRInt32 finalStatus)
|
||||||
{
|
{
|
||||||
|
@ -414,9 +411,10 @@ void cbXPIFinal(const char *URL, PRInt32 finalStatus)
|
||||||
// Update the Archive Progress Bar to the specified percentage.
|
// Update the Archive Progress Bar to the specified percentage.
|
||||||
static void UpdateArchiveInstallProgress(int aValue)
|
static void UpdateArchiveInstallProgress(int aValue)
|
||||||
{
|
{
|
||||||
HWND progressBar;
|
if (sgProduct.mode != SILENT) {
|
||||||
|
SendDlgItemMessage(dlgInfo.hWndDlg, IDC_PROGRESS_ARCHIVE, PBM_SETPOS,
|
||||||
if (sgProduct.mode != SILENT)
|
(WPARAM)aValue, 0);
|
||||||
SendMessage(dlgInfo.hWndDlg, PBM_SETPOS, aValue, 0);
|
Sleep(5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.4 KiB |
Двоичные данные
toolkit/mozapps/installer/windows/wizard/setuprsc/setup.ico
Двоичные данные
toolkit/mozapps/installer/windows/wizard/setuprsc/setup.ico
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 1.1 KiB После Ширина: | Высота: | Размер: 9.9 KiB |
|
@ -12,8 +12,8 @@
|
||||||
#define IDRESUME 3
|
#define IDRESUME 3
|
||||||
#define IDPAUSE 4
|
#define IDPAUSE 4
|
||||||
#define IDS_MSG_RETRIEVE_INSTALLINI 11
|
#define IDS_MSG_RETRIEVE_INSTALLINI 11
|
||||||
#define IDI_ICON1 105
|
|
||||||
#define IDI_SETUP 105
|
#define IDI_SETUP 105
|
||||||
|
#define IDI_BROWSER 106
|
||||||
#define IDB_BITMAP_WELCOME 108
|
#define IDB_BITMAP_WELCOME 108
|
||||||
#define DLG_MESSAGE 110
|
#define DLG_MESSAGE 110
|
||||||
#define IDB_BITMAP_BANNER 114
|
#define IDB_BITMAP_BANNER 114
|
||||||
|
@ -115,6 +115,7 @@
|
||||||
#define IDC_STATIC_DOWNLOAD_SIZE 1088
|
#define IDC_STATIC_DOWNLOAD_SIZE 1088
|
||||||
#define DLG_INSTALL_SUCCESSFUL 1089
|
#define DLG_INSTALL_SUCCESSFUL 1089
|
||||||
#define IDC_START_APP 1090
|
#define IDC_START_APP 1090
|
||||||
|
#define IDC_APP_ICON 1091
|
||||||
#define DLG_WELCOME 2001
|
#define DLG_WELCOME 2001
|
||||||
#define DLG_LICENSE 2002
|
#define DLG_LICENSE 2002
|
||||||
#define DLG_SETUP_TYPE 2003
|
#define DLG_SETUP_TYPE 2003
|
||||||
|
|
|
@ -215,13 +215,9 @@ CLASS "MozillaSetupDlg"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL "",IDC_STATUS0,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX |
|
CONTROL "",IDC_STATUS0,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX |
|
||||||
WS_GROUP,11,64,295,8
|
WS_GROUP,11,72,295,8
|
||||||
CONTROL "",IDC_STATUS3,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX |
|
|
||||||
WS_GROUP,11,98,295,8
|
|
||||||
CONTROL "Progress1",IDC_PROGRESS_ARCHIVE,"msctls_progress32",
|
CONTROL "Progress1",IDC_PROGRESS_ARCHIVE,"msctls_progress32",
|
||||||
WS_BORDER,11,77,295,11
|
WS_BORDER,11,85,295,11
|
||||||
CONTROL "Progress1",IDC_PROGRESS_FILE,"msctls_progress32",
|
|
||||||
WS_BORDER,11,110,295,11
|
|
||||||
END
|
END
|
||||||
|
|
||||||
DLG_ADVANCED_SETTINGS DIALOG DISCARDABLE 51, 56, 315, 205
|
DLG_ADVANCED_SETTINGS DIALOG DISCARDABLE 51, 56, 315, 205
|
||||||
|
@ -347,10 +343,12 @@ BEGIN
|
||||||
LTEXT "",IDC_MESSAGE1,11,130,295,8
|
LTEXT "",IDC_MESSAGE1,11,130,295,8
|
||||||
PUSHBUTTON "",IDC_CONNECTION_SETTINGS,250,103,56,14
|
PUSHBUTTON "",IDC_CONNECTION_SETTINGS,250,103,56,14
|
||||||
LTEXT "",IDC_MESSAGE2,11,103,232,19
|
LTEXT "",IDC_MESSAGE2,11,103,232,19
|
||||||
LTEXT "",IDC_PRIMARY_COMPONENT,11,16,295,8,NOT WS_GROUP
|
LTEXT "",IDC_PRIMARY_COMPONENT,36,16,270,8,NOT WS_GROUP
|
||||||
LTEXT "",IDC_OPTIONAL_COMPONENTS,21,31,285,28,NOT WS_GROUP
|
LTEXT "",IDC_OPTIONAL_COMPONENTS,41,31,265,28,NOT WS_GROUP
|
||||||
LTEXT "",IDC_INSTALL_FOLDER,21,81,285,8,NOT WS_GROUP
|
LTEXT "",IDC_INSTALL_FOLDER,36,81,270,8,NOT WS_GROUP
|
||||||
LTEXT "",IDC_INSTALL_FOLDER_LABEL,11,66,295,8,NOT WS_GROUP
|
LTEXT "",IDC_INSTALL_FOLDER_LABEL,11,66,295,8,NOT WS_GROUP
|
||||||
|
ICON "",IDC_APP_ICON,21,14,20,20
|
||||||
|
ICON "",IDC_FOLDER_ICON,21,77,20,20
|
||||||
END
|
END
|
||||||
|
|
||||||
DLG_SELECT_INSTALL_PATH DIALOG DISCARDABLE 0, 0, 315, 143
|
DLG_SELECT_INSTALL_PATH DIALOG DISCARDABLE 0, 0, 315, 143
|
||||||
|
@ -364,15 +362,15 @@ BEGIN
|
||||||
ICON "",IDC_FOLDER_ICON,28,22,20,20
|
ICON "",IDC_FOLDER_ICON,28,22,20,20
|
||||||
END
|
END
|
||||||
|
|
||||||
DLG_INSTALL_SUCCESSFUL DIALOG DISCARDABLE 0, 0, 317, 193
|
DLG_INSTALL_SUCCESSFUL DIALOGEX 0, 0, 317, 193
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "",IDC_STATIC_TITLE,130,8,180,18,NOT WS_GROUP
|
LTEXT "",IDC_STATIC_TITLE,130,8,180,18,NOT WS_GROUP
|
||||||
LTEXT "",IDC_STATIC1,130,169,180,15
|
LTEXT "",IDC_STATIC1,130,169,180,15
|
||||||
LTEXT "",IDC_STATIC0,130,34,180,16,NOT WS_GROUP
|
LTEXT "",IDC_STATIC0,130,34,180,16,NOT WS_GROUP
|
||||||
CONTROL "",IDC_START_APP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
|
CONTROL "",IDC_START_APP,"Button",BS_AUTOCHECKBOX | BS_NOTIFY |
|
||||||
130,58,180,10
|
WS_TABSTOP,130,139,180,10,WS_EX_TRANSPARENT
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
@ -384,6 +382,7 @@ END
|
||||||
// Icon with lowest ID value placed first to ensure application icon
|
// Icon with lowest ID value placed first to ensure application icon
|
||||||
// remains consistent on all systems.
|
// remains consistent on all systems.
|
||||||
IDI_SETUP ICON DISCARDABLE "setup.ico"
|
IDI_SETUP ICON DISCARDABLE "setup.ico"
|
||||||
|
IDI_BROWSER ICON DISCARDABLE "browser.ico"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
@ -446,7 +445,7 @@ BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 310
|
RIGHTMARGIN, 310
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 186
|
BOTTOMMARGIN, 184
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
|
@ -40,7 +40,6 @@ LPSTR szEGlobalAlloc;
|
||||||
LPSTR szEStringLoad;
|
LPSTR szEStringLoad;
|
||||||
LPSTR szEDllLoad;
|
LPSTR szEDllLoad;
|
||||||
LPSTR szEStringNull;
|
LPSTR szEStringNull;
|
||||||
LPSTR szTempSetupPath;
|
|
||||||
|
|
||||||
LPSTR szClassName;
|
LPSTR szClassName;
|
||||||
LPSTR szUninstallDir;
|
LPSTR szUninstallDir;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче