зеркало из https://github.com/mozilla/pjs.git
fixing bugs: 23221, 33354, 34599
This commit is contained in:
Родитель
2c58f807d1
Коммит
1b078f6276
|
@ -1629,24 +1629,202 @@ LRESULT CALLBACK DlgAdvancedSettings(HWND hDlg, UINT msg, WPARAM wParam, LONG lP
|
|||
return(0);
|
||||
}
|
||||
|
||||
void AppendStringWOAmpersand(LPSTR szInputString, DWORD dwInputStringSize, LPSTR szString)
|
||||
{
|
||||
DWORD i;
|
||||
DWORD iInputStringCounter;
|
||||
DWORD iInputStringLen;
|
||||
DWORD iStringLen;
|
||||
|
||||
|
||||
iInputStringLen = lstrlen(szInputString);
|
||||
iStringLen = lstrlen(szString);
|
||||
|
||||
if((iInputStringLen + iStringLen) >= dwInputStringSize)
|
||||
return;
|
||||
|
||||
iInputStringCounter = iInputStringLen;
|
||||
for(i = 0; i < iStringLen; i++)
|
||||
{
|
||||
if(szString[i] != '&')
|
||||
szInputString[iInputStringCounter++] = szString[i];
|
||||
}
|
||||
}
|
||||
|
||||
LPSTR GetStartInstallMessage()
|
||||
{
|
||||
char szBuf[MAX_BUF];
|
||||
siC *siCObject = NULL;
|
||||
LPSTR szMessageBuf = NULL;
|
||||
DWORD dwBufSize;
|
||||
DWORD dwIndex0;
|
||||
|
||||
/* calculate the amount of memory to allocate for the buffer */
|
||||
dwBufSize = 0;
|
||||
|
||||
/* setup type */
|
||||
if(NS_LoadString(hSetupRscInst, IDS_STR_SETUP_TYPE, szBuf, MAX_BUF) == WIZ_OK)
|
||||
dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
dwBufSize += 4; // take into account 4 indentation spaces
|
||||
|
||||
switch(dwSetupType)
|
||||
{
|
||||
case ST_RADIO3:
|
||||
dwBufSize += lstrlen(diSetupType.stSetupType3.szDescriptionShort) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
break;
|
||||
|
||||
case ST_RADIO2:
|
||||
dwBufSize += lstrlen(diSetupType.stSetupType2.szDescriptionShort) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
break;
|
||||
|
||||
case ST_RADIO1:
|
||||
dwBufSize += lstrlen(diSetupType.stSetupType1.szDescriptionShort) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
break;
|
||||
|
||||
default:
|
||||
dwBufSize += lstrlen(diSetupType.stSetupType0.szDescriptionShort) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
break;
|
||||
}
|
||||
dwBufSize += 2; // the extra 2 bytes is for the \r\n characters
|
||||
|
||||
/* selected components */
|
||||
if(NS_LoadString(hSetupRscInst, IDS_STR_SELECTED_COMPONENTS, szBuf, MAX_BUF) == WIZ_OK)
|
||||
dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
|
||||
dwIndex0 = 0;
|
||||
siCObject = SiCNodeGetObject(dwIndex0, FALSE, AC_ALL);
|
||||
while(siCObject)
|
||||
{
|
||||
dwBufSize += 4; // take into account 4 indentation spaces
|
||||
dwBufSize += lstrlen(siCObject->szDescriptionShort) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
|
||||
++dwIndex0;
|
||||
siCObject = SiCNodeGetObject(dwIndex0, FALSE, AC_ALL);
|
||||
}
|
||||
dwBufSize += 2; // the extra 2 bytes is for the \r\n characters
|
||||
|
||||
/* destination path */
|
||||
if(NS_LoadString(hSetupRscInst, IDS_STR_DESTINATION_DIRECTORY, szBuf, MAX_BUF) == WIZ_OK)
|
||||
dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
|
||||
dwBufSize += 4; // take into account 4 indentation spaces
|
||||
dwBufSize += lstrlen(sgProduct.szPath) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
dwBufSize += 2; // the extra 2 bytes is for the \r\n characters
|
||||
|
||||
/* program folder */
|
||||
if(NS_LoadString(hSetupRscInst, IDS_STR_PROGRAM_FOLDER, szBuf, MAX_BUF) == WIZ_OK)
|
||||
dwBufSize += lstrlen(szBuf) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
|
||||
dwBufSize += 4; // take into account 4 indentation spaces
|
||||
dwBufSize += lstrlen(sgProduct.szProgramFolderName) + 2; // the extra 2 bytes is for the \r\n characters
|
||||
dwBufSize += 1; // take into account the null character
|
||||
|
||||
/* allocate the memory */
|
||||
if((szMessageBuf = NS_GlobalAlloc(dwBufSize)) != NULL)
|
||||
{
|
||||
ZeroMemory(szMessageBuf, dwBufSize);
|
||||
|
||||
/* Setup Type */
|
||||
if(NS_LoadString(hSetupRscInst, IDS_STR_SETUP_TYPE, szBuf, MAX_BUF) == WIZ_OK)
|
||||
{
|
||||
lstrcat(szMessageBuf, szBuf);
|
||||
lstrcat(szMessageBuf, "\r\n");
|
||||
}
|
||||
lstrcat(szMessageBuf, " "); // add 4 indentation spaces
|
||||
|
||||
switch(dwSetupType)
|
||||
{
|
||||
case ST_RADIO3:
|
||||
AppendStringWOAmpersand(szMessageBuf, dwBufSize, diSetupType.stSetupType3.szDescriptionShort);
|
||||
break;
|
||||
|
||||
case ST_RADIO2:
|
||||
AppendStringWOAmpersand(szMessageBuf, dwBufSize, diSetupType.stSetupType2.szDescriptionShort);
|
||||
break;
|
||||
|
||||
case ST_RADIO1:
|
||||
AppendStringWOAmpersand(szMessageBuf, dwBufSize, diSetupType.stSetupType1.szDescriptionShort);
|
||||
break;
|
||||
|
||||
default:
|
||||
AppendStringWOAmpersand(szMessageBuf, dwBufSize, diSetupType.stSetupType1.szDescriptionShort);
|
||||
break;
|
||||
}
|
||||
lstrcat(szMessageBuf, "\r\n\r\n");
|
||||
|
||||
/* Selected Components */
|
||||
if(NS_LoadString(hSetupRscInst, IDS_STR_SELECTED_COMPONENTS, szBuf, MAX_BUF) == WIZ_OK)
|
||||
{
|
||||
lstrcat(szMessageBuf, szBuf);
|
||||
lstrcat(szMessageBuf, "\r\n");
|
||||
}
|
||||
|
||||
dwIndex0 = 0;
|
||||
siCObject = SiCNodeGetObject(dwIndex0, FALSE, AC_ALL);
|
||||
while(siCObject)
|
||||
{
|
||||
lstrcat(szMessageBuf, " "); // add 4 indentation spaces
|
||||
lstrcat(szMessageBuf, siCObject->szDescriptionShort);
|
||||
lstrcat(szMessageBuf, "\r\n");
|
||||
|
||||
++dwIndex0;
|
||||
siCObject = SiCNodeGetObject(dwIndex0, FALSE, AC_ALL);
|
||||
}
|
||||
lstrcat(szMessageBuf, "\r\n");
|
||||
|
||||
/* destination directory */
|
||||
if(NS_LoadString(hSetupRscInst, IDS_STR_DESTINATION_DIRECTORY, szBuf, MAX_BUF) == WIZ_OK)
|
||||
{
|
||||
lstrcat(szMessageBuf, szBuf);
|
||||
lstrcat(szMessageBuf, "\r\n");
|
||||
}
|
||||
lstrcat(szMessageBuf, " "); // add 4 indentation spaces
|
||||
lstrcat(szMessageBuf, sgProduct.szPath);
|
||||
lstrcat(szMessageBuf, "\r\n\r\n");
|
||||
|
||||
/* program folder */
|
||||
if(NS_LoadString(hSetupRscInst, IDS_STR_PROGRAM_FOLDER, szBuf, MAX_BUF) == WIZ_OK)
|
||||
{
|
||||
lstrcat(szMessageBuf, szBuf);
|
||||
lstrcat(szMessageBuf, "\r\n");
|
||||
}
|
||||
lstrcat(szMessageBuf, " "); // add 4 indentation spaces
|
||||
lstrcat(szMessageBuf, sgProduct.szProgramFolderName);
|
||||
lstrcat(szMessageBuf, "\r\n");
|
||||
}
|
||||
|
||||
return(szMessageBuf);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK DlgProcStartInstall(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||
{
|
||||
RECT rDlg;
|
||||
RECT rDlg;
|
||||
LPSTR szMessage = NULL;
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
SetWindowText(hDlg, diStartInstall.szTitle);
|
||||
SetDlgItemText(hDlg, IDC_MESSAGE0, diStartInstall.szMessage0);
|
||||
|
||||
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);
|
||||
SetDlgItemText(hDlg, IDC_MESSAGE0, diStartInstall.szMessageInstall);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowWindow(GetDlgItem(hDlg, IDC_BUTTON_SITE_SELECTOR), SW_SHOW);
|
||||
SetDlgItemText(hDlg, IDC_MESSAGE0, diStartInstall.szMessageDownload);
|
||||
}
|
||||
|
||||
if((szMessage = GetStartInstallMessage()) != NULL)
|
||||
{
|
||||
SetDlgItemText(hDlg, IDC_CURRENT_SETTINGS, szMessage);
|
||||
FreeMemory(&szMessage);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
@ -2002,6 +2180,15 @@ void DlgSequenceNext()
|
|||
if(bSaveInstallerFiles)
|
||||
SaveInstallerFiles();
|
||||
|
||||
if(CheckInstances())
|
||||
{
|
||||
CleanupXpcomFile();
|
||||
PostQuitMessage(0);
|
||||
|
||||
/* break out of switch statment */
|
||||
break;
|
||||
}
|
||||
|
||||
hrErr = SmartUpdateJars();
|
||||
if((hrErr == WIZ_OK) || (hrErr == 999))
|
||||
{
|
||||
|
|
|
@ -54,5 +54,7 @@ void InvalidateLBCheckbox(HWND hwndListBox);
|
|||
void ProcessWindowsMessages(void);
|
||||
void CheckWizardStateCustom(DWORD dwDefault);
|
||||
void SunJavaDependencyHack(DWORD dwIndex, BOOL bSelected, DWORD dwACFlag);
|
||||
LPSTR GetStartInstallMessage(void);
|
||||
void AppendStringWOAmpersand(LPSTR szInputString, DWORD dwInputStringSize, LPSTR szString);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -51,7 +51,6 @@ extern LPSTR szEDllLoad;
|
|||
extern LPSTR szEStringNull;
|
||||
extern LPSTR szTempSetupPath;
|
||||
|
||||
extern LPSTR szClassName;
|
||||
extern LPSTR szSetupDir;
|
||||
extern LPSTR szTempDir;
|
||||
extern LPSTR szOSTempDir;
|
||||
|
|
|
@ -62,26 +62,27 @@ DWORD GetPerfData (HKEY hPerfKey,
|
|||
PPERF_DATA *ppData,
|
||||
DWORD *pDataSize);
|
||||
|
||||
BOOL InitDialogClass(HINSTANCE hInstance)
|
||||
BOOL InitDialogClass(HINSTANCE hInstance, HINSTANCE hSetupRscInst)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
WNDCLASS wc;
|
||||
|
||||
wc.style = CS_DBLCLKS | CS_SAVEBITS | CS_BYTEALIGNWINDOW;
|
||||
wc.lpfnWndProc = DefDlgProc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = DLGWINDOWEXTRA;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SETUP));
|
||||
wc.hInstance = hSetupRscInst;
|
||||
wc.hIcon = LoadIcon(hSetupRscInst, MAKEINTRESOURCE(IDI_SETUP));
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.lpszClassName = szClassName;
|
||||
wc.lpszClassName = CLASS_NAME_SETUP_DLG;
|
||||
|
||||
return(RegisterClass(&wc));
|
||||
}
|
||||
|
||||
BOOL InitApplication(HINSTANCE hInstance, HINSTANCE hSetupRscInst)
|
||||
{
|
||||
BOOL bRv;
|
||||
WNDCLASS wc;
|
||||
|
||||
wc.style = CS_HREDRAW | CS_VREDRAW | CS_PARENTDC | CS_SAVEBITS;
|
||||
|
@ -93,10 +94,13 @@ BOOL InitApplication(HINSTANCE hInstance, HINSTANCE hSetupRscInst)
|
|||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)(COLOR_ACTIVECAPTION + 1);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.lpszClassName = szClassName;
|
||||
wc.lpszClassName = CLASS_NAME_SETUP;
|
||||
|
||||
// InitDialogClass(HINSTANCE hInstance);
|
||||
return(RegisterClass(&wc));
|
||||
bRv = RegisterClass(&wc);
|
||||
if(bRv == FALSE)
|
||||
return(bRv);
|
||||
|
||||
return(InitDialogClass(hInstance, hSetupRscInst));
|
||||
}
|
||||
|
||||
BOOL InitInstance(HINSTANCE hInstance, DWORD dwCmdShow)
|
||||
|
@ -107,8 +111,8 @@ BOOL InitInstance(HINSTANCE hInstance, DWORD dwCmdShow)
|
|||
dwScreenY = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
hInst = hInstance;
|
||||
hWnd = CreateWindow(szClassName,
|
||||
szClassName,
|
||||
hWnd = CreateWindow(CLASS_NAME_SETUP,
|
||||
CLASS_NAME_SETUP,
|
||||
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_MAXIMIZE,
|
||||
0,
|
||||
0,
|
||||
|
@ -238,23 +242,17 @@ HRESULT Initialize(HINSTANCE hInstance)
|
|||
if(NS_LoadStringAlloc(hInstance, IDS_ERROR_STRING_NULL, &szEStringNull, MAX_BUF))
|
||||
return(1);
|
||||
|
||||
ZeroMemory(szBuf, sizeof(MAX_BUF));
|
||||
if((szClassName = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
return(1);
|
||||
|
||||
lstrcpy(szClassName, CLASS_NAME);
|
||||
|
||||
/* Allow only one instance of setup to run.
|
||||
* Detect a previous instance of setup, bring it to the
|
||||
* foreground, and quit current instance */
|
||||
if((hwndFW = FindWindow(szClassName, szClassName)) != NULL)
|
||||
if((hwndFW = FindWindow(CLASS_NAME_SETUP, CLASS_NAME_SETUP)) != NULL)
|
||||
{
|
||||
ShowWindow(hwndFW, SW_RESTORE);
|
||||
SetForegroundWindow(hwndFW);
|
||||
return(1);
|
||||
}
|
||||
|
||||
hAccelTable = LoadAccelerators(hInstance, szClassName);
|
||||
hAccelTable = LoadAccelerators(hInstance, CLASS_NAME_SETUP);
|
||||
|
||||
if((hSetupRscInst = LoadLibraryEx("Setuprsc.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH)) == NULL)
|
||||
{
|
||||
|
@ -276,6 +274,9 @@ HRESULT Initialize(HINSTANCE hInstance)
|
|||
if((szTempDir = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
return(1);
|
||||
|
||||
if((szOSTempDir = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
return(1);
|
||||
|
||||
if((szFileIniConfig = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
return(1);
|
||||
|
||||
|
@ -1571,10 +1572,6 @@ HRESULT InitDlgSetupType(diST *diDialog)
|
|||
diDialog->stSetupType1.dwCItems = 0;
|
||||
diDialog->stSetupType2.dwCItems = 0;
|
||||
diDialog->stSetupType3.dwCItems = 0;
|
||||
diDialog->stSetupType0.dwAItems = 0;
|
||||
diDialog->stSetupType1.dwAItems = 0;
|
||||
diDialog->stSetupType2.dwAItems = 0;
|
||||
diDialog->stSetupType3.dwAItems = 0;
|
||||
if((diDialog->stSetupType0.szDescriptionShort = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
return(1);
|
||||
if((diDialog->stSetupType0.szDescriptionLong = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
|
@ -1734,7 +1731,9 @@ HRESULT InitDlgStartInstall(diSI *diDialog)
|
|||
diDialog->bShowDialog = FALSE;
|
||||
if((diDialog->szTitle = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
return(1);
|
||||
if((diDialog->szMessage0 = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
if((diDialog->szMessageInstall = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
return(1);
|
||||
if((diDialog->szMessageDownload = NS_GlobalAlloc(MAX_BUF)) == NULL)
|
||||
return(1);
|
||||
|
||||
return(0);
|
||||
|
@ -1743,7 +1742,8 @@ HRESULT InitDlgStartInstall(diSI *diDialog)
|
|||
void DeInitDlgStartInstall(diSI *diDialog)
|
||||
{
|
||||
FreeMemory(&(diDialog->szTitle));
|
||||
FreeMemory(&(diDialog->szMessage0));
|
||||
FreeMemory(&(diDialog->szMessageInstall));
|
||||
FreeMemory(&(diDialog->szMessageDownload));
|
||||
}
|
||||
|
||||
DWORD InitDlgReboot(diR *diDialog)
|
||||
|
@ -3762,17 +3762,33 @@ HRESULT CheckInstances()
|
|||
{
|
||||
if((sgProduct.dwMode != SILENT) && (sgProduct.dwMode != AUTO))
|
||||
{
|
||||
MessageBox(hWndMain, szMessage, NULL, MB_ICONEXCLAMATION);
|
||||
switch(MessageBox(hWndMain, szMessage, NULL, MB_ICONEXCLAMATION | MB_RETRYCANCEL))
|
||||
{
|
||||
case IDCANCEL:
|
||||
/* User selected to cancel Setup */
|
||||
return(TRUE);
|
||||
|
||||
case IDRETRY:
|
||||
/* User selected to retry. Reset counter */
|
||||
iIndex = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(sgProduct.dwMode == AUTO)
|
||||
{
|
||||
ShowMessage(szMessage, TRUE);
|
||||
Delay(5);
|
||||
ShowMessage(szMessage, FALSE);
|
||||
|
||||
/* Setup mode is AUTO. Show message, timeout, then cancel because we can't allow user to continue */
|
||||
return(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
else
|
||||
{
|
||||
/* No message to display. Assume cancel because we can't allow user to continue */
|
||||
return(TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3781,7 +3797,7 @@ HRESULT CheckInstances()
|
|||
}
|
||||
|
||||
/* Process Name= key did not exist, so look for other keys */
|
||||
dwRv0 = GetPrivateProfileString(szSection, "Class Name", "", szClassName, MAX_BUF, szFileIniConfig);
|
||||
dwRv0 = GetPrivateProfileString(szSection, "Class Name", "", szClassName, MAX_BUF, szFileIniConfig);
|
||||
dwRv1 = GetPrivateProfileString(szSection, "Window Name", "", szWindowName, MAX_BUF, szFileIniConfig);
|
||||
if((dwRv0 == 0L) &&
|
||||
(dwRv1 == 0L))
|
||||
|
@ -3806,17 +3822,33 @@ HRESULT CheckInstances()
|
|||
{
|
||||
if((sgProduct.dwMode != SILENT) && (sgProduct.dwMode != AUTO))
|
||||
{
|
||||
MessageBox(hWndMain, szMessage, NULL, MB_ICONEXCLAMATION);
|
||||
switch(MessageBox(hWndMain, szMessage, NULL, MB_ICONEXCLAMATION | MB_RETRYCANCEL))
|
||||
{
|
||||
case IDCANCEL:
|
||||
/* User selected to cancel Setup */
|
||||
return(TRUE);
|
||||
|
||||
case IDRETRY:
|
||||
/* User selected to retry. Reset counter */
|
||||
iIndex = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(sgProduct.dwMode == AUTO)
|
||||
{
|
||||
ShowMessage(szMessage, TRUE);
|
||||
Delay(5);
|
||||
ShowMessage(szMessage, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
/* Setup mode is AUTO. Show message, timeout, then cancel because we can't allow user to continue */
|
||||
return(TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No message to display. Assume cancel because we can't allow user to continue */
|
||||
return(TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4203,22 +4235,23 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
|
|||
diAdvancedSettings.bShowDialog = TRUE;
|
||||
|
||||
/* Start Install dialog */
|
||||
GetPrivateProfileString("Dialog Start Install", "Show Dialog", "", szShowDialog, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Dialog Start Install", "Title", "", diStartInstall.szTitle, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Dialog Start Install", "Message0", "", diStartInstall.szMessage0, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Dialog Start Install", "Show Dialog", "", szShowDialog, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Dialog Start Install", "Title", "", diStartInstall.szTitle, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Dialog Start Install", "Message Install", "", diStartInstall.szMessageInstall, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Dialog Start Install", "Message Download", "", diStartInstall.szMessageDownload, MAX_BUF, szFileIniConfig);
|
||||
if(lstrcmpi(szShowDialog, "TRUE") == 0)
|
||||
diStartInstall.bShowDialog = TRUE;
|
||||
|
||||
/* Reboot dialog */
|
||||
GetPrivateProfileString("Dialog Reboot", "Show Dialog", "", szShowDialog, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Dialog Reboot", "Show Dialog", "", szShowDialog, MAX_BUF, szFileIniConfig);
|
||||
if(lstrcmpi(szShowDialog, "TRUE") == 0)
|
||||
diReboot.dwShowDialog = TRUE;
|
||||
else if(lstrcmpi(szShowDialog, "AUTO") == 0)
|
||||
diReboot.dwShowDialog = AUTO;
|
||||
|
||||
GetPrivateProfileString("Windows Integration-Item0", "CheckBoxState", "", szBuf, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Windows Integration-Item0", "CheckBoxState", "", szBuf, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Windows Integration-Item0", "Description", "", diWindowsIntegration.wiCB0.szDescription, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Windows Integration-Item0", "Archive", "", diWindowsIntegration.wiCB0.szArchive, MAX_BUF, szFileIniConfig);
|
||||
GetPrivateProfileString("Windows Integration-Item0", "Archive", "", diWindowsIntegration.wiCB0.szArchive, MAX_BUF, szFileIniConfig);
|
||||
/* Check to see if the checkbox need to be shown at all or not */
|
||||
if(*diWindowsIntegration.wiCB0.szDescription != '\0')
|
||||
diWindowsIntegration.wiCB0.bEnabled = TRUE;
|
||||
|
@ -5365,6 +5398,7 @@ void DeInitialize()
|
|||
DeInitSetupGeneral();
|
||||
|
||||
FreeMemory(&szTempDir);
|
||||
FreeMemory(&szOSTempDir);
|
||||
FreeMemory(&sgProduct.szProgramFolderPath);
|
||||
FreeMemory(&sgProduct.szProgramFolderName);
|
||||
FreeMemory(&sgProduct.szProductName);
|
||||
|
|
|
@ -42,6 +42,7 @@ typedef struct structVer
|
|||
ULONGLONG ullBuild;
|
||||
} verBlock;
|
||||
|
||||
BOOL InitDialogClass(HINSTANCE hInstance, HINSTANCE hSetupRscInst);
|
||||
BOOL InitApplication(HINSTANCE hInstance, HINSTANCE hSetupRscInst);
|
||||
BOOL InitInstance(HINSTANCE hInstance, DWORD dwCmdShow);
|
||||
void PrintError(LPSTR szMsg, DWORD dwErrorCodeSH);
|
||||
|
|
|
@ -51,7 +51,6 @@ LPSTR szEDllLoad;
|
|||
LPSTR szEStringNull;
|
||||
LPSTR szTempSetupPath;
|
||||
|
||||
LPSTR szClassName;
|
||||
LPSTR szSetupDir;
|
||||
LPSTR szTempDir;
|
||||
LPSTR szOSTempDir;
|
||||
|
@ -113,6 +112,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmd
|
|||
|
||||
if(!hPrevInstance)
|
||||
{
|
||||
// hInstance = GetModuleHandle(NULL);
|
||||
if(Initialize(hInstance))
|
||||
PostQuitMessage(1);
|
||||
else if(!InitApplication(hInstance, hSetupRscInst))
|
||||
|
|
|
@ -55,7 +55,8 @@ typedef int PRInt32;
|
|||
#include "sdinst.h"
|
||||
#endif
|
||||
|
||||
#define CLASS_NAME "Setup"
|
||||
#define CLASS_NAME_SETUP "Setup"
|
||||
#define CLASS_NAME_SETUP_DLG "SetupDlg"
|
||||
#define FILE_INI_SETUP "setup.ini"
|
||||
#define FILE_INI_CONFIG "config.ini"
|
||||
#define FILE_IDI_GETCONFIGINI "getconfigini.idi"
|
||||
|
@ -177,8 +178,6 @@ typedef struct stStruct
|
|||
BOOL bVisible;
|
||||
DWORD dwCItems;
|
||||
DWORD dwCItemsSelected[MAX_BUF]; /* components */
|
||||
DWORD dwAItems;
|
||||
// DWORD dwAItemsSelected[MAX_BUF]; /* additions */
|
||||
LPSTR szDescriptionShort;
|
||||
LPSTR szDescriptionLong;
|
||||
} st;
|
||||
|
@ -243,7 +242,8 @@ typedef struct dlgStartInstall
|
|||
{
|
||||
BOOL bShowDialog;
|
||||
LPSTR szTitle;
|
||||
LPSTR szMessage0;
|
||||
LPSTR szMessageInstall;
|
||||
LPSTR szMessageDownload;
|
||||
} diSI;
|
||||
|
||||
typedef struct dlgReboot
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
#define IDC_CHECK3 1024
|
||||
#define IDC_EDIT_LICENSE 1024
|
||||
#define IDC_CHECK0 1025
|
||||
#define IDC_EDIT_CURRENT_SETTINGS 1026
|
||||
#define IDC_CURRENT_SETTINGS 1026
|
||||
#define IDC_LIST_COMPONENTS 1027
|
||||
#define IDC_LIST_SUBCOMPONENTS 1029
|
||||
#define IDC_STATIC_DRIVE_SPACE_REQUIRED 1030
|
||||
|
@ -130,6 +130,10 @@
|
|||
#define IDS_ERROR_PROGRAM_FOLDER_NAME 11017
|
||||
#define IDS_CB_DEFAULT 11018
|
||||
#define IDS_ERROR_DESTINATION_PATH 11019
|
||||
#define IDS_STR_SETUP_TYPE 11020
|
||||
#define IDS_STR_SELECTED_COMPONENTS 11021
|
||||
#define IDS_STR_DESTINATION_DIRECTORY 11022
|
||||
#define IDS_STR_PROGRAM_FOLDER 11023
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
|
|
|
@ -52,8 +52,9 @@ END
|
|||
// Dialog
|
||||
//
|
||||
|
||||
DLG_WELCOME DIALOG DISCARDABLE 51, 56, 315, 205
|
||||
DLG_WELCOME DIALOGEX 51, 56, 315, 205
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Next >",IDWIZNEXT,188,186,53,14
|
||||
|
@ -69,6 +70,7 @@ END
|
|||
|
||||
DLG_SETUP_TYPE DIALOGEX 51, 56, 315, 205
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "",IDC_RADIO_ST0,"Button",BS_AUTORADIOBUTTON |
|
||||
|
@ -97,6 +99,7 @@ END
|
|||
|
||||
DLG_SELECT_COMPONENTS DIALOGEX 51, 56, 315, 205
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
PUSHBUTTON "< &Back",IDWIZBACK,134,186,53,14
|
||||
|
@ -121,8 +124,9 @@ BEGIN
|
|||
LTEXT "Space Available:",IDC_STATIC,206,148,94,9
|
||||
END
|
||||
|
||||
DLG_WINDOWS_INTEGRATION DIALOG DISCARDABLE 51, 56, 315, 205
|
||||
DLG_WINDOWS_INTEGRATION DIALOGEX 51, 56, 315, 205
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "Check0",IDC_CHECK0,"Button",BS_AUTOCHECKBOX | BS_TOP |
|
||||
|
@ -146,7 +150,8 @@ END
|
|||
|
||||
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
|
||||
CLASS "SetupDlg"
|
||||
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 |
|
||||
|
@ -163,8 +168,9 @@ BEGIN
|
|||
WS_EX_STATICEDGE
|
||||
END
|
||||
|
||||
DLG_LICENSE DIALOG DISCARDABLE 51, 56, 315, 205
|
||||
DLG_LICENSE DIALOGEX 51, 56, 315, 205
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Accept",IDWIZNEXT,188,186,53,14
|
||||
|
@ -180,26 +186,28 @@ END
|
|||
|
||||
DLG_START_INSTALL DIALOGEX 51, 56, 315, 205
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
EDITTEXT IDC_EDIT_CURRENT_SETTINGS,101,67,204,106,ES_MULTILINE |
|
||||
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY
|
||||
PUSHBUTTON "&Advanced Settings",IDC_BUTTON_SITE_SELECTOR,11,186,90,
|
||||
EDITTEXT IDC_CURRENT_SETTINGS,101,67,204,106,ES_MULTILINE |
|
||||
ES_OEMCONVERT | ES_READONLY | WS_VSCROLL | WS_HSCROLL
|
||||
PUSHBUTTON "&Advanced Settings",IDC_BUTTON_SITE_SELECTOR,11,186,84,
|
||||
14
|
||||
PUSHBUTTON "< &Back",IDWIZBACK,134,186,53,14
|
||||
DEFPUSHBUTTON "&Install",IDWIZNEXT,188,186,53,14
|
||||
PUSHBUTTON "&Cancel",IDCANCEL,252,186,53,14
|
||||
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,
|
||||
CONTROL 108,IDC_STATIC,"Static",SS_BITMAP,11,11,83,162,
|
||||
WS_EX_CLIENTEDGE
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,11,179,295,1,
|
||||
WS_EX_STATICEDGE
|
||||
END
|
||||
|
||||
DLG_BROWSE_DIR DIALOG DISCARDABLE 147, 23, 190, 143
|
||||
DLG_BROWSE_DIR DIALOGEX 147, 23, 190, 143
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Select a directory"
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
EDITTEXT IDC_EDIT_DESTINATION,8,16,177,12,ES_AUTOHSCROLL |
|
||||
|
@ -219,6 +227,7 @@ END
|
|||
|
||||
DLG_RESTART DIALOG FIXED IMPURE 133, 69, 226, 110
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
LTEXT "Setup has finished copying files to your computer. Before you can use the program, you must restart Windows or your computer.\n\n Choose one of the following options and click OK to finish setup.",
|
||||
|
@ -232,6 +241,7 @@ END
|
|||
|
||||
DLG_MESSAGE DIALOG DISCARDABLE 0, 0, 236, 34
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CTEXT "",IDC_MESSAGE,0,0,236,34,SS_CENTERIMAGE
|
||||
|
@ -239,6 +249,7 @@ END
|
|||
|
||||
DLG_EXTRACTING DIALOG DISCARDABLE 0, 0, 193, 73
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "",IDC_GAUGE_FILE,"GaugeFile",0x0,9,52,175,11
|
||||
|
@ -249,6 +260,7 @@ END
|
|||
|
||||
DLG_ADVANCED_SETTINGS DIALOGEX 51, 56, 315, 205
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
COMBOBOX IDC_LIST_SITE_SELECTOR,101,49,206,124,CBS_DROPDOWNLIST |
|
||||
|
@ -274,6 +286,7 @@ END
|
|||
|
||||
DLG_SELECT_ADDITIONAL_COMPONENTS DIALOGEX 51, 56, 315, 205
|
||||
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CLASS "SetupDlg"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
PUSHBUTTON "< &Back",IDWIZBACK,134,186,53,14
|
||||
|
@ -393,6 +406,10 @@ BEGIN
|
|||
IDS_ERROR_PROGRAM_FOLDER_NAME "Invalid program folder name entered."
|
||||
IDS_CB_DEFAULT "Default"
|
||||
IDS_ERROR_DESTINATION_PATH "Invalid path entered."
|
||||
IDS_STR_SETUP_TYPE "Setup Type:"
|
||||
IDS_STR_SELECTED_COMPONENTS "Selected Components:"
|
||||
IDS_STR_DESTINATION_DIRECTORY "Destination Directory:"
|
||||
IDS_STR_PROGRAM_FOLDER "Program Folder:"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
|
|
Загрузка…
Ссылка в новой задаче