From dad0a8b8f2117cc3921207e1c193661631a97c49 Mon Sep 17 00:00:00 2001 From: "ssu%netscape.com" Date: Thu, 21 Dec 2000 21:41:28 +0000 Subject: [PATCH] fixing bug #63414 - Need to simplify the addition of components to the win32 installer. sr=vienvenu r=dveditz affects only windows platforms --- xpinstall/wizard/windows/setup/dialogs.c | 30 +- xpinstall/wizard/windows/setup/extra.c | 671 +++++++++++------- xpinstall/wizard/windows/setup/extra.h | 12 +- xpinstall/wizard/windows/setup/setup.h | 2 + xpinstall/wizard/windows/setuprsc/setuprsc.h | 1 + xpinstall/wizard/windows/setuprsc/setuprsc.rc | 1 + xpinstall/wizard/windows/uninstall/extra.c | 4 + 7 files changed, 457 insertions(+), 264 deletions(-) diff --git a/xpinstall/wizard/windows/setup/dialogs.c b/xpinstall/wizard/windows/setup/dialogs.c index b61abe191a7e..4cfdcedcb335 100644 --- a/xpinstall/wizard/windows/setup/dialogs.c +++ b/xpinstall/wizard/windows/setup/dialogs.c @@ -817,10 +817,7 @@ LRESULT CALLBACK DlgProcSetupType(HWND hDlg, UINT msg, WPARAM wParam, LONG lPara if(IsDlgButtonChecked(hDlg, IDC_RADIO_ST0) == BST_CHECKED) { if(dwSetupType != ST_RADIO0) - { - ResetComponentAttributes(szFileIniConfig); - SiCNodeSetItemsSelected(ST_RADIO0, diSetupType.stSetupType0.dwCItems, diSetupType.stSetupType0.dwCItemsSelected); - } + SiCNodeSetItemsSelected(ST_RADIO0); dwSetupType = ST_RADIO0; dwTempSetupType = dwSetupType; @@ -828,10 +825,7 @@ LRESULT CALLBACK DlgProcSetupType(HWND hDlg, UINT msg, WPARAM wParam, LONG lPara else if(IsDlgButtonChecked(hDlg, IDC_RADIO_ST1) == BST_CHECKED) { if(dwSetupType != ST_RADIO1) - { - ResetComponentAttributes(szFileIniConfig); - SiCNodeSetItemsSelected(ST_RADIO1, diSetupType.stSetupType1.dwCItems, diSetupType.stSetupType1.dwCItemsSelected); - } + SiCNodeSetItemsSelected(ST_RADIO1); dwSetupType = ST_RADIO1; dwTempSetupType = dwSetupType; @@ -839,10 +833,7 @@ LRESULT CALLBACK DlgProcSetupType(HWND hDlg, UINT msg, WPARAM wParam, LONG lPara else if(IsDlgButtonChecked(hDlg, IDC_RADIO_ST2) == BST_CHECKED) { if(dwSetupType != ST_RADIO2) - { - ResetComponentAttributes(szFileIniConfig); - SiCNodeSetItemsSelected(ST_RADIO2, diSetupType.stSetupType2.dwCItems, diSetupType.stSetupType2.dwCItemsSelected); - } + SiCNodeSetItemsSelected(ST_RADIO2); dwSetupType = ST_RADIO2; dwTempSetupType = dwSetupType; @@ -850,10 +841,7 @@ LRESULT CALLBACK DlgProcSetupType(HWND hDlg, UINT msg, WPARAM wParam, LONG lPara else if(IsDlgButtonChecked(hDlg, IDC_RADIO_ST3) == BST_CHECKED) { if(dwSetupType != ST_RADIO3) - { - ResetComponentAttributes(szFileIniConfig); - SiCNodeSetItemsSelected(ST_RADIO3, diSetupType.stSetupType3.dwCItems, diSetupType.stSetupType3.dwCItemsSelected); - } + SiCNodeSetItemsSelected(ST_RADIO3); dwSetupType = ST_RADIO3; dwTempSetupType = dwSetupType; @@ -961,7 +949,7 @@ void InvalidateLBCheckbox(HWND hwndListBox) void ToggleCheck(HWND hwndListBox, DWORD dwIndex, DWORD dwACFlag) { BOOL bMoreToResolve; - LPSTR szToggledDescriptionShort = NULL; + LPSTR szToggledReferenceName = NULL; DWORD dwAttributes; // Checks to see if the checkbox is checked or not checked, and @@ -972,8 +960,8 @@ void ToggleCheck(HWND hwndListBox, DWORD dwIndex, DWORD dwACFlag) if(dwAttributes & SIC_SELECTED) { SiCNodeSetAttributes(dwIndex, SIC_SELECTED, FALSE, FALSE, dwACFlag); - szToggledDescriptionShort = SiCNodeGetDescriptionShort(dwIndex, FALSE, dwACFlag); - ResolveDependees(szToggledDescriptionShort); + szToggledReferenceName = SiCNodeGetReferenceName(dwIndex, FALSE, dwACFlag); + ResolveDependees(szToggledReferenceName); } else { @@ -983,8 +971,8 @@ void ToggleCheck(HWND hwndListBox, DWORD dwIndex, DWORD dwACFlag) while(bMoreToResolve) bMoreToResolve = ResolveDependencies(-1); - szToggledDescriptionShort = SiCNodeGetDescriptionShort(dwIndex, FALSE, dwACFlag); - ResolveDependees(szToggledDescriptionShort); + szToggledReferenceName = SiCNodeGetReferenceName(dwIndex, FALSE, dwACFlag); + ResolveDependees(szToggledReferenceName); } InvalidateLBCheckbox(hwndListBox); diff --git a/xpinstall/wizard/windows/setup/extra.c b/xpinstall/wizard/windows/setup/extra.c index e182e0403d3b..9d9479e9f90e 100644 --- a/xpinstall/wizard/windows/setup/extra.c +++ b/xpinstall/wizard/windows/setup/extra.c @@ -1974,6 +1974,8 @@ siC *CreateSiCNode() exit(1); if((siCNode->szParameter = NS_GlobalAlloc(MAX_BUF)) == NULL) exit(1); + if((siCNode->szReferenceName = NS_GlobalAlloc(MAX_BUF)) == NULL) + exit(1); siCNode->siCDDependencies = NULL; siCNode->siCDDependees = NULL; siCNode->Next = NULL; @@ -2015,6 +2017,7 @@ void SiCNodeDelete(siC *siCTemp) FreeMemory(&(siCTemp->szArchivePath)); FreeMemory(&(siCTemp->szArchiveName)); FreeMemory(&(siCTemp->szParameter)); + FreeMemory(&(siCTemp->szReferenceName)); FreeMemory(&(siCTemp->szDescriptionLong)); FreeMemory(&(siCTemp->szDescriptionShort)); FreeMemory(&siCTemp); @@ -2030,6 +2033,8 @@ siCD *CreateSiCDepNode() if((siCDepNode->szDescriptionShort = NS_GlobalAlloc(MAX_BUF)) == NULL) exit(1); + if((siCDepNode->szReferenceName = NS_GlobalAlloc(MAX_BUF)) == NULL) + exit(1); siCDepNode->Next = NULL; siCDepNode->Prev = NULL; @@ -2063,6 +2068,7 @@ void SiCDepNodeDelete(siCD *siCDepTemp) siCDepTemp->Prev = NULL; FreeMemory(&(siCDepTemp->szDescriptionShort)); + FreeMemory(&(siCDepTemp->szReferenceName)); FreeMemory(&siCDepTemp); } } @@ -2217,32 +2223,100 @@ BOOL IsInList(DWORD dwCurrentItem, DWORD dwItems, DWORD *dwItemsSelected) return(FALSE); } -void SiCNodeSetItemsSelected(DWORD dwSetupType, DWORD dwItems, DWORD *dwItemsSelected) +void SiCNodeSetItemsSelected(DWORD dwSetupType) { - DWORD i; - siC *siCTemp; + siC *siCNode; + char szBuf[MAX_BUF]; + char szIndex0[MAX_BUF]; + char szSTSection[MAX_BUF]; + char szComponentKey[MAX_BUF]; + char szComponentSection[MAX_BUF]; + DWORD dwIndex0; - for(i = 0; i < sgProduct.dwNumberOfComponents; i++) + lstrcpy(szSTSection, "Setup Type"); + itoa(dwSetupType, szBuf, 10); + lstrcat(szSTSection, szBuf); + + /* for each component in the global list, unset its SELECTED attribute */ + siCNode = siComponents; + do { - siCTemp = SiCNodeGetObject(i, TRUE, AC_ALL); - if(IsInList(i, dwItems, dwItemsSelected)) + if(siCNode == NULL) + break; + + siCNode->dwAttributes &= ~SIC_SELECTED; + siCNode = siCNode->Next; + } while((siCNode != NULL) && (siCNode != siComponents)); + + /* for each component in a setup type, set its attribute to be SELECTED */ + dwIndex0 = 0; + itoa(dwIndex0, szIndex0, 10); + lstrcpy(szComponentKey, "C"); + lstrcat(szComponentKey, szIndex0); + GetPrivateProfileString(szSTSection, szComponentKey, "", szComponentSection, sizeof(szComponentSection), szFileIniConfig); + while(*szComponentSection != '\0') + { + if((siCNode = SiCNodeFind(siComponents, szComponentSection)) != NULL) { - if((siCTemp->lRandomInstallPercentage != 0) && - (siCTemp->lRandomInstallPercentage <= siCTemp->lRandomInstallValue)) - siCTemp->dwAttributes &= ~SIC_SELECTED; + if((siCNode->lRandomInstallPercentage != 0) && + (siCNode->lRandomInstallPercentage <= siCNode->lRandomInstallValue)) + siCNode->dwAttributes &= ~SIC_SELECTED; else if(sgProduct.dwCustomType != dwSetupType) - // If the user selected the Custom Setup Type, then do not set the - // Selected bit. Leave as default - which is what is set in - // config.ini originally. - // Else, make sure it's set because this component is listed in - // the dwSetupType's section to be installed. - siCTemp->dwAttributes |= SIC_SELECTED; + siCNode->dwAttributes |= SIC_SELECTED; + else + { + /* user selected Custom setup type. reset the component's attribute to default */ + GetPrivateProfileString(siCNode->szReferenceName, "Attributes", "", szBuf, sizeof(szBuf), szFileIniConfig); + siCNode->dwAttributes = ParseComponentAttributes(szBuf); + } } - else - siCTemp->dwAttributes &= ~SIC_SELECTED; + + ++dwIndex0; + itoa(dwIndex0, szIndex0, 10); + lstrcpy(szComponentKey, "C"); + lstrcat(szComponentKey, szIndex0); + GetPrivateProfileString(szSTSection, szComponentKey, "", szComponentSection, sizeof(szComponentSection), szFileIniConfig); } } +char *SiCNodeGetReferenceName(DWORD dwIndex, BOOL bIncludeInvisible, DWORD dwACFlag) +{ + DWORD dwCount = 0; + siC *siCTemp = siComponents; + + if(siCTemp != NULL) + { + if(((bIncludeInvisible == TRUE) || ((bIncludeInvisible == FALSE) && (!(siCTemp->dwAttributes & SIC_INVISIBLE)))) && + ((dwACFlag == AC_ALL) || + ((dwACFlag == AC_COMPONENTS) && (!(siCTemp->dwAttributes & SIC_ADDITIONAL))) || + ((dwACFlag == AC_ADDITIONAL_COMPONENTS) && (siCTemp->dwAttributes & SIC_ADDITIONAL)))) + { + if(dwIndex == 0) + return(siCTemp->szReferenceName); + + ++dwCount; + } + + siCTemp = siCTemp->Next; + while((siCTemp != NULL) && (siCTemp != siComponents)) + { + if(((bIncludeInvisible == TRUE) || ((bIncludeInvisible == FALSE) && (!(siCTemp->dwAttributes & SIC_INVISIBLE)))) && + ((dwACFlag == AC_ALL) || + ((dwACFlag == AC_COMPONENTS) && (!(siCTemp->dwAttributes & SIC_ADDITIONAL))) || + ((dwACFlag == AC_ADDITIONAL_COMPONENTS) && (siCTemp->dwAttributes & SIC_ADDITIONAL)))) + { + if(dwIndex == dwCount) + return(siCTemp->szReferenceName); + + ++dwCount; + } + + siCTemp = siCTemp->Next; + } + } + return(NULL); +} + char *SiCNodeGetDescriptionShort(DWORD dwIndex, BOOL bIncludeInvisible, DWORD dwACFlag) { DWORD dwCount = 0; @@ -2458,6 +2532,31 @@ int SiCNodeGetIndexDS(char *szInDescriptionShort) return(-1); } +/* retrieve Index of node containing Reference Name */ +int SiCNodeGetIndexRN(char *szInReferenceName) +{ + DWORD dwCount = 0; + siC *siCTemp = siComponents; + + if(siCTemp != NULL) + { + if(lstrcmpi(szInReferenceName, siCTemp->szReferenceName) == 0) + return(dwCount); + + ++dwCount; + siCTemp = siCTemp->Next; + while((siCTemp != NULL) && (siCTemp != siComponents)) + { + if(lstrcmpi(szInReferenceName, siCTemp->szReferenceName) == 0) + return(dwCount); + + ++dwCount; + siCTemp = siCTemp->Next; + } + } + return(-1); +} + siC *SiCNodeGetObject(DWORD dwIndex, BOOL bIncludeInvisibleObjs, DWORD dwACFlag) { DWORD dwCount = -1; @@ -3046,143 +3145,186 @@ long RandomSelect() return(lArbitrary); } +siC *SiCNodeFind(siC *siCHeadNode, char *szInReferenceName) +{ + siC *siCNode = siCHeadNode; + + do + { + if(siCNode == NULL) + break; + + if(lstrcmpi(siCNode->szReferenceName, szInReferenceName) == 0) + return(siCNode); + + siCNode = siCNode->Next; + } while((siCNode != NULL) && (siCNode != siCHeadNode)); + + return(NULL); +} + void InitSiComponents(char *szFileIni) { DWORD dwIndex0; DWORD dwIndex1; + int iCurrentLoop; char szIndex0[MAX_BUF]; char szIndex1[MAX_BUF]; char szBuf[MAX_BUF]; - char szComponentItem[MAX_BUF]; + char szComponentKey[MAX_BUF]; + char szComponentSection[MAX_BUF]; char szDependency[MAX_BUF]; char szDependee[MAX_BUF]; + char szSTSection[MAX_BUF]; char szDPSection[MAX_BUF]; - siC *siCTemp; - siCD *siCDepTemp; - siCD *siCDDependeeTemp; + siC *siCTemp = NULL; + siCD *siCDepTemp = NULL; + siCD *siCDDependeeTemp = NULL; - dwIndex0 = 0; - itoa(dwIndex0, szIndex0, 10); - lstrcpy(szComponentItem, "Component"); - lstrcat(szComponentItem, szIndex0); - GetPrivateProfileString(szComponentItem, "Archive", "", szBuf, MAX_BUF, szFileIni); - while(*szBuf != '\0') + /* clean up the list before reading new components given the Setup Type */ + DeInitSiComponents(&siComponents); + + /* Parse the Setup Type sections in reverse order because + * the Custom Setup Type is always last. It needs to be parsed + * first because the component list it has will be shown in its + * other custom dialogs. Order matters! */ + for(iCurrentLoop = 3; iCurrentLoop >= 0; iCurrentLoop--) { - /* create and initialize empty node */ - siCTemp = CreateSiCNode(); + lstrcpy(szSTSection, "Setup Type"); + itoa(iCurrentLoop, szBuf, 10); + lstrcat(szSTSection, szBuf); - /* store name of archive for component */ - lstrcpy(siCTemp->szArchiveName, szBuf); - - /* get short description of component */ - GetPrivateProfileString(szComponentItem, "Description Short", "", szBuf, MAX_BUF, szFileIni); - lstrcpy(siCTemp->szDescriptionShort, szBuf); - - /* get long description of component */ - GetPrivateProfileString(szComponentItem, "Description Long", "", szBuf, MAX_BUF, szFileIni); - lstrcpy(siCTemp->szDescriptionLong, szBuf); - - /* get commandline parameter for component */ - GetPrivateProfileString(szComponentItem, "Parameter", "", szBuf, MAX_BUF, szFileIni); - DecryptString(siCTemp->szParameter, szBuf); - - /* get install size required in destination for component. Sould be in Kilobytes */ - GetPrivateProfileString(szComponentItem, "Install Size", "", szBuf, MAX_BUF, szFileIni); - if(*szBuf != '\0') - siCTemp->ullInstallSize = _atoi64(szBuf); - else - siCTemp->ullInstallSize = 0; - - /* get install size required in system for component. Sould be in Kilobytes */ - GetPrivateProfileString(szComponentItem, "Install Size System", "", szBuf, MAX_BUF, szFileIni); - if(*szBuf != '\0') - siCTemp->ullInstallSizeSystem = _atoi64(szBuf); - else - siCTemp->ullInstallSizeSystem = 0; - - /* get install size required in temp for component. Sould be in Kilobytes */ - GetPrivateProfileString(szComponentItem, "Install Size Archive", "", szBuf, MAX_BUF, szFileIni); - if(*szBuf != '\0') - siCTemp->ullInstallSizeArchive = _atoi64(szBuf); - else - siCTemp->ullInstallSizeArchive = 0; - - /* get attributes of component */ - GetPrivateProfileString(szComponentItem, "Attributes", "", szBuf, MAX_BUF, szFileIni); - siCTemp->dwAttributes = ParseComponentAttributes(szBuf); - - /* get the random percentage value and select or deselect the component (by default) for - * installation */ - GetPrivateProfileString(szComponentItem, "Random Install Percentage", "", szBuf, MAX_BUF, szFileIni); - if(*szBuf != '\0') - { - siCTemp->lRandomInstallPercentage = atol(szBuf); - if(siCTemp->lRandomInstallPercentage != 0) - siCTemp->lRandomInstallValue = RandomSelect(); - } - - /* get all dependencies for this component */ - dwIndex1 = 0; - itoa(dwIndex1, szIndex1, 10); - lstrcpy(szDependency, "Dependency"); - lstrcat(szDependency, szIndex1); - GetPrivateProfileString(szComponentItem, szDependency, "", szBuf, MAX_BUF, szFileIni); - while(*szBuf != '\0') - { - /* create and initialize empty node */ - siCDepTemp = CreateSiCDepNode(); - - /* store name of archive for component */ - lstrcpy(siCDepTemp->szDescriptionShort, szBuf); - - /* inserts the newly created component into the global component queue */ - SiCDepNodeInsert(&(siCTemp->siCDDependencies), siCDepTemp); - - ++dwIndex1; - itoa(dwIndex1, szIndex1, 10); - lstrcpy(szDependency, "Dependency"); - lstrcat(szDependency, szIndex1); - GetPrivateProfileString(szComponentItem, szDependency, "", szBuf, MAX_BUF, szFileIni); - } - - /* get all dependees for this component */ - dwIndex1 = 0; - itoa(dwIndex1, szIndex1, 10); - lstrcpy(szDependee, "Dependee"); - lstrcat(szDependee, szIndex1); - GetPrivateProfileString(szComponentItem, szDependee, "", szBuf, MAX_BUF, szFileIni); - while(*szBuf != '\0') - { - /* create and initialize empty node */ - siCDDependeeTemp = CreateSiCDepNode(); - - /* store name of archive for component */ - lstrcpy(siCDDependeeTemp->szDescriptionShort, szBuf); - - /* inserts the newly created component into the global component queue */ - SiCDepNodeInsert(&(siCTemp->siCDDependees), siCDDependeeTemp); - - ++dwIndex1; - itoa(dwIndex1, szIndex1, 10); - lstrcpy(szDependee, "Dependee"); - lstrcat(szDependee, szIndex1); - GetPrivateProfileString(szComponentItem, szDependee, "", szBuf, MAX_BUF, szFileIni); - } - - // locate previous path if necessary - lstrcpy(szDPSection, szComponentItem); - lstrcat(szDPSection, "-Destination Path"); - if(LocatePreviousPath(szDPSection, siCTemp->szDestinationPath, MAX_PATH) == FALSE) - ZeroMemory(siCTemp->szDestinationPath, MAX_PATH); - - /* inserts the newly created component into the global component queue */ - SiCNodeInsert(&siComponents, siCTemp); - - ++dwIndex0; + /* read in each component given a setup type */ + dwIndex0 = 0; itoa(dwIndex0, szIndex0, 10); - lstrcpy(szComponentItem, "Component"); - lstrcat(szComponentItem, szIndex0); - GetPrivateProfileString(szComponentItem, "Archive", "", szBuf, MAX_BUF, szFileIni); + lstrcpy(szComponentKey, "C"); + lstrcat(szComponentKey, szIndex0); + GetPrivateProfileString(szSTSection, szComponentKey, "", szComponentSection, sizeof(szComponentSection), szFileIni); + while(*szComponentSection != '\0') + { + GetPrivateProfileString(szComponentSection, "Archive", "", szBuf, MAX_BUF, szFileIni); + if((*szBuf != '\0') && (SiCNodeFind(siComponents, szComponentSection) == NULL)) + { + /* create and initialize empty node */ + siCTemp = CreateSiCNode(); + + /* store name of archive for component */ + lstrcpy(siCTemp->szArchiveName, szBuf); + + /* get short description of component */ + GetPrivateProfileString(szComponentSection, "Description Short", "", szBuf, MAX_BUF, szFileIni); + lstrcpy(siCTemp->szDescriptionShort, szBuf); + + /* get long description of component */ + GetPrivateProfileString(szComponentSection, "Description Long", "", szBuf, MAX_BUF, szFileIni); + lstrcpy(siCTemp->szDescriptionLong, szBuf); + + /* get commandline parameter for component */ + GetPrivateProfileString(szComponentSection, "Parameter", "", szBuf, MAX_BUF, szFileIni); + DecryptString(siCTemp->szParameter, szBuf); + + /* set reference name for component */ + lstrcpy(siCTemp->szReferenceName, szComponentSection); + + /* get install size required in destination for component. Sould be in Kilobytes */ + GetPrivateProfileString(szComponentSection, "Install Size", "", szBuf, MAX_BUF, szFileIni); + if(*szBuf != '\0') + siCTemp->ullInstallSize = _atoi64(szBuf); + else + siCTemp->ullInstallSize = 0; + + /* get install size required in system for component. Sould be in Kilobytes */ + GetPrivateProfileString(szComponentSection, "Install Size System", "", szBuf, MAX_BUF, szFileIni); + if(*szBuf != '\0') + siCTemp->ullInstallSizeSystem = _atoi64(szBuf); + else + siCTemp->ullInstallSizeSystem = 0; + + /* get install size required in temp for component. Sould be in Kilobytes */ + GetPrivateProfileString(szComponentSection, "Install Size Archive", "", szBuf, MAX_BUF, szFileIni); + if(*szBuf != '\0') + siCTemp->ullInstallSizeArchive = _atoi64(szBuf); + else + siCTemp->ullInstallSizeArchive = 0; + + /* get attributes of component */ + GetPrivateProfileString(szComponentSection, "Attributes", "", szBuf, MAX_BUF, szFileIni); + siCTemp->dwAttributes = ParseComponentAttributes(szBuf); + + /* get the random percentage value and select or deselect the component (by default) for + * installation */ + GetPrivateProfileString(szComponentSection, "Random Install Percentage", "", szBuf, MAX_BUF, szFileIni); + if(*szBuf != '\0') + { + siCTemp->lRandomInstallPercentage = atol(szBuf); + if(siCTemp->lRandomInstallPercentage != 0) + siCTemp->lRandomInstallValue = RandomSelect(); + } + + /* get all dependencies for this component */ + dwIndex1 = 0; + itoa(dwIndex1, szIndex1, 10); + lstrcpy(szDependency, "Dependency"); + lstrcat(szDependency, szIndex1); + GetPrivateProfileString(szComponentSection, szDependency, "", szBuf, MAX_BUF, szFileIni); + while(*szBuf != '\0') + { + /* create and initialize empty node */ + siCDepTemp = CreateSiCDepNode(); + + /* store name of archive for component */ + lstrcpy(siCDepTemp->szReferenceName, szBuf); + + /* inserts the newly created component into the global component list */ + SiCDepNodeInsert(&(siCTemp->siCDDependencies), siCDepTemp); + + ++dwIndex1; + itoa(dwIndex1, szIndex1, 10); + lstrcpy(szDependency, "Dependency"); + lstrcat(szDependency, szIndex1); + GetPrivateProfileString(szComponentSection, szDependency, "", szBuf, MAX_BUF, szFileIni); + } + + /* get all dependees for this component */ + dwIndex1 = 0; + itoa(dwIndex1, szIndex1, 10); + lstrcpy(szDependee, "Dependee"); + lstrcat(szDependee, szIndex1); + GetPrivateProfileString(szComponentSection, szDependee, "", szBuf, MAX_BUF, szFileIni); + while(*szBuf != '\0') + { + /* create and initialize empty node */ + siCDDependeeTemp = CreateSiCDepNode(); + + /* store name of archive for component */ + lstrcpy(siCDDependeeTemp->szReferenceName, szBuf); + + /* inserts the newly created component into the global component list */ + SiCDepNodeInsert(&(siCTemp->siCDDependees), siCDDependeeTemp); + + ++dwIndex1; + itoa(dwIndex1, szIndex1, 10); + lstrcpy(szDependee, "Dependee"); + lstrcat(szDependee, szIndex1); + GetPrivateProfileString(szComponentSection, szDependee, "", szBuf, MAX_BUF, szFileIni); + } + + // locate previous path if necessary + lstrcpy(szDPSection, szComponentSection); + lstrcat(szDPSection, "-Destination Path"); + if(LocatePreviousPath(szDPSection, siCTemp->szDestinationPath, MAX_PATH) == FALSE) + ZeroMemory(siCTemp->szDestinationPath, MAX_PATH); + + /* inserts the newly created component into the global component list */ + SiCNodeInsert(&siComponents, siCTemp); + } + + ++dwIndex0; + itoa(dwIndex0, szIndex0, 10); + lstrcpy(szComponentKey, "C"); + lstrcat(szComponentKey, szIndex0); + GetPrivateProfileString(szSTSection, szComponentKey, "", szComponentSection, sizeof(szComponentSection), szFileIni); + } } sgProduct.dwNumberOfComponents = dwIndex0; @@ -3330,64 +3472,139 @@ void InitSiteSelector(char *szFileIni) } } +#ifdef SSU_DEBUG +void ViewSiComponentsDependency(char *szBuffer, char *szIndentation, siC *siCNode) +{ + siC *siCNodeTemp; + siCD *siCDependencyTemp; + + siCDependencyTemp = siCNode->siCDDependencies; + if(siCDependencyTemp != NULL) + { + char szIndentationPadding[MAX_BUF]; + DWORD dwIndex; + + lstrcpy(szIndentationPadding, szIndentation); + lstrcat(szIndentationPadding, " "); + + do + { + lstrcat(szBuffer, szIndentationPadding); + lstrcat(szBuffer, siCDependencyTemp->szReferenceName); + lstrcat(szBuffer, "::"); + + if((dwIndex = SiCNodeGetIndexRN(siCDependencyTemp->szReferenceName)) != -1) + lstrcat(szBuffer, SiCNodeGetDescriptionShort(dwIndex, TRUE, AC_ALL)); + else + lstrcat(szBuffer, "Component does not exist"); + + lstrcat(szBuffer, ":"); + lstrcat(szBuffer, "\n"); + + if(dwIndex != -1) + { + if((siCNodeTemp = SiCNodeGetObject(dwIndex, TRUE, AC_ALL)) != NULL) + ViewSiComponentsDependency(szBuffer, szIndentationPadding, siCNodeTemp); + else + lstrcat(szBuffer, "Node not found"); + } + + siCDependencyTemp = siCDependencyTemp->Next; + }while((siCDependencyTemp != NULL) && (siCDependencyTemp != siCNode->siCDDependencies)); + } +} + +void ViewSiComponentsDependee(char *szBuffer, char *szIndentation, siC *siCNode) +{ + siC *siCNodeTemp; + siCD *siCDependeeTemp; + + siCDependeeTemp = siCNode->siCDDependees; + if(siCDependeeTemp != NULL) + { + char szIndentationPadding[MAX_BUF]; + DWORD dwIndex; + + lstrcpy(szIndentationPadding, szIndentation); + lstrcat(szIndentationPadding, " "); + + do + { + lstrcat(szBuffer, szIndentationPadding); + lstrcat(szBuffer, siCDependeeTemp->szReferenceName); + lstrcat(szBuffer, "::"); + + if((dwIndex = SiCNodeGetIndexRN(siCDependeeTemp->szReferenceName)) != -1) + lstrcat(szBuffer, SiCNodeGetDescriptionShort(dwIndex, TRUE, AC_ALL)); + else + lstrcat(szBuffer, "Component does not exist"); + + lstrcat(szBuffer, ":"); + lstrcat(szBuffer, "\n"); + + if(dwIndex != -1) + { + if((siCNodeTemp = SiCNodeGetObject(dwIndex, TRUE, AC_ALL)) != NULL) + ViewSiComponentsDependency(szBuffer, szIndentationPadding, siCNodeTemp); + else + lstrcat(szBuffer, "Node not found"); + } + + siCDependeeTemp = siCDependeeTemp->Next; + }while((siCDependeeTemp != NULL) && (siCDependeeTemp != siCNode->siCDDependees)); + } +} + void ViewSiComponents() { char szBuf[MAX_BUF]; siC *siCTemp = siComponents; - siCD *siCDepTemp; - if(siCTemp != NULL) + // build dependency list + ZeroMemory(szBuf, sizeof(szBuf)); + lstrcpy(szBuf, "Dependency:\n"); + + do { - siCDepTemp = siCTemp->siCDDependencies; - lstrcpy(szBuf, siCTemp->szDescriptionShort); + if(siCTemp == NULL) + break; + + lstrcat(szBuf, " "); + lstrcat(szBuf, siCTemp->szReferenceName); + lstrcat(szBuf, "::"); + lstrcat(szBuf, siCTemp->szDescriptionShort); lstrcat(szBuf, ":\n"); - if(siCDepTemp != NULL) - { - lstrcat(szBuf, " "); - lstrcat(szBuf, siCDepTemp->szDescriptionShort); - lstrcat(szBuf, "\n"); - - siCDepTemp = siCDepTemp->Next; - while((siCDepTemp != NULL) && (siCDepTemp != siCTemp->siCDDependencies)) - { - lstrcat(szBuf, " "); - lstrcat(szBuf, siCDepTemp->szDescriptionShort); - lstrcat(szBuf, "\n"); - - siCDepTemp = siCDepTemp->Next; - } - } + ViewSiComponentsDependency(szBuf, " ", siCTemp); siCTemp = siCTemp->Next; - while((siCTemp != NULL) && (siCTemp != siComponents)) - { - siCDepTemp = siCTemp->siCDDependencies; - lstrcat(szBuf, siCTemp->szDescriptionShort); - lstrcat(szBuf, ":\n"); + } while((siCTemp != NULL) && (siCTemp != siComponents)); - if(siCDepTemp != NULL) - { - lstrcat(szBuf, " "); - lstrcat(szBuf, siCDepTemp->szDescriptionShort); - lstrcat(szBuf, "\n"); + MessageBox(hWndMain, szBuf, NULL, MB_ICONEXCLAMATION); - siCDepTemp = siCDepTemp->Next; - while((siCDepTemp != NULL) && (siCDepTemp != siCTemp->siCDDependencies)) - { - lstrcat(szBuf, " "); - lstrcat(szBuf, siCDepTemp->szDescriptionShort); - lstrcat(szBuf, "\n"); + // build dependee list + ZeroMemory(szBuf, sizeof(szBuf)); + lstrcpy(szBuf, "Dependee:\n"); - siCDepTemp = siCDepTemp->Next; - } - } - siCTemp = siCTemp->Next; - } + do + { + if(siCTemp == NULL) + break; - MessageBox(hWndMain, szBuf, NULL, MB_ICONEXCLAMATION); - } + lstrcat(szBuf, " "); + lstrcat(szBuf, siCTemp->szReferenceName); + lstrcat(szBuf, "::"); + lstrcat(szBuf, siCTemp->szDescriptionShort); + lstrcat(szBuf, ":\n"); + + ViewSiComponentsDependee(szBuf, " ", siCTemp); + + siCTemp = siCTemp->Next; + } while((siCTemp != NULL) && (siCTemp != siComponents)); + + MessageBox(hWndMain, szBuf, NULL, MB_ICONEXCLAMATION); } +#endif /* SSU_DEBUG */ void DeInitSiCDependencies(siCD *siCDDependencies) { @@ -3415,28 +3632,28 @@ void DeInitSiCDependencies(siCD *siCDDependencies) SiCDepNodeDelete(siCDepTemp); } -void DeInitSiComponents() +void DeInitSiComponents(siC **siCHeadNode) { siC *siCTemp; - if(siComponents == NULL) + if((*siCHeadNode) == NULL) { return; } - else if((siComponents->Prev == NULL) || (siComponents->Prev == siComponents)) + else if(((*siCHeadNode)->Prev == NULL) || ((*siCHeadNode)->Prev == (*siCHeadNode))) { - SiCNodeDelete(siComponents); + SiCNodeDelete((*siCHeadNode)); return; } else { - siCTemp = siComponents->Prev; + siCTemp = (*siCHeadNode)->Prev; } - while(siCTemp != siComponents) + while(siCTemp != (*siCHeadNode)) { SiCNodeDelete(siCTemp); - siCTemp = siComponents->Prev; + siCTemp = (*siCHeadNode)->Prev; } SiCNodeDelete(siCTemp); } @@ -3475,7 +3692,7 @@ BOOL ResolveComponentDependency(siCD *siCDInDependency) if(siCDepTemp != NULL) { - if((dwIndex = SiCNodeGetIndexDS(siCDepTemp->szDescriptionShort)) != -1) + if((dwIndex = SiCNodeGetIndexRN(siCDepTemp->szReferenceName)) != -1) { if((SiCNodeGetAttributes(dwIndex, TRUE, AC_ALL) & SIC_SELECTED) == FALSE) { @@ -3487,7 +3704,7 @@ BOOL ResolveComponentDependency(siCD *siCDInDependency) siCDepTemp = siCDepTemp->Next; while((siCDepTemp != NULL) && (siCDepTemp != siCDInDependency)) { - if((dwIndex = SiCNodeGetIndexDS(siCDepTemp->szDescriptionShort)) != -1) + if((dwIndex = SiCNodeGetIndexRN(siCDepTemp->szReferenceName)) != -1) { if((SiCNodeGetAttributes(dwIndex, TRUE, AC_ALL) & SIC_SELECTED) == FALSE) { @@ -3555,7 +3772,7 @@ BOOL ResolveComponentDependee(siCD *siCDInDependee) if(siCDDependeeTemp != NULL) { - if((dwIndex = SiCNodeGetIndexDS(siCDDependeeTemp->szDescriptionShort)) != -1) + if((dwIndex = SiCNodeGetIndexRN(siCDDependeeTemp->szReferenceName)) != -1) { if((SiCNodeGetAttributes(dwIndex, TRUE, AC_ALL) & SIC_SELECTED) == TRUE) { @@ -3566,7 +3783,7 @@ BOOL ResolveComponentDependee(siCD *siCDInDependee) siCDDependeeTemp = siCDDependeeTemp->Next; while((siCDDependeeTemp != NULL) && (siCDDependeeTemp != siCDInDependee)) { - if((dwIndex = SiCNodeGetIndexDS(siCDDependeeTemp->szDescriptionShort)) != -1) + if((dwIndex = SiCNodeGetIndexRN(siCDDependeeTemp->szReferenceName)) != -1) { if((SiCNodeGetAttributes(dwIndex, TRUE, AC_ALL) & SIC_SELECTED) == TRUE) { @@ -3598,7 +3815,7 @@ ssi* SsiGetNode(LPSTR szDescription) return(NULL); } -void ResolveDependees(LPSTR szToggledDescriptionShort) +void ResolveDependees(LPSTR szToggledReferenceName) { BOOL bAtLeastOneSelected; BOOL bMoreToResolve = FALSE; @@ -3611,12 +3828,12 @@ void ResolveDependees(LPSTR szToggledDescriptionShort) break; if((siCTemp->siCDDependees != NULL) && - (lstrcmpi(siCTemp->szDescriptionShort, szToggledDescriptionShort) != 0)) + (lstrcmpi(siCTemp->szReferenceName, szToggledReferenceName) != 0)) { bAtLeastOneSelected = ResolveComponentDependee(siCTemp->siCDDependees); if(bAtLeastOneSelected == FALSE) { - if((dwIndex = SiCNodeGetIndexDS(siCTemp->szDescriptionShort)) != -1) + if((dwIndex = SiCNodeGetIndexRN(siCTemp->szReferenceName)) != -1) { if((SiCNodeGetAttributes(dwIndex, TRUE, AC_ALL) & SIC_SELECTED) == TRUE) { @@ -3627,7 +3844,7 @@ void ResolveDependees(LPSTR szToggledDescriptionShort) } else { - if((dwIndex = SiCNodeGetIndexDS(siCTemp->szDescriptionShort)) != -1) + if((dwIndex = SiCNodeGetIndexRN(siCTemp->szReferenceName)) != -1) { if((SiCNodeGetAttributes(dwIndex, TRUE, AC_ALL) & SIC_SELECTED) == FALSE) { @@ -3642,7 +3859,7 @@ void ResolveDependees(LPSTR szToggledDescriptionShort) } while((siCTemp != NULL) && (siCTemp != siComponents)); if(bMoreToResolve == TRUE) - ResolveDependees(szToggledDescriptionShort); + ResolveDependees(szToggledReferenceName); } void ParseCommandLine(LPSTR lpszCmdLine) @@ -4120,6 +4337,7 @@ BOOL CheckLegacy(HWND hDlg) FreeMemory(&szMessage[0]); FreeMemory(&szMessage[1]); FreeMemory(&szMessage[2]); + FreeMemory(&szMessage[3]); /* returning TRUE means the user wants to go back and choose a different destination path * returning FALSE means the user is ignoring the warning @@ -4155,9 +4373,15 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine) { HDC hdc; char szBuf[MAX_BUF]; + char szMsgInitSetup[MAX_BUF]; char szPreviousPath[MAX_BUF]; char szShowDialog[MAX_BUF]; + if(NS_LoadString(hSetupRscInst, IDS_MSG_INIT_SETUP, szMsgInitSetup, sizeof(szMsgInitSetup)) != WIZ_OK) + return(1); + + ShowMessage(szMsgInitSetup, TRUE); + if(CheckInstances()) return(1); @@ -4360,19 +4584,19 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine) /* Get Setup Types info */ GetPrivateProfileString("Setup Type0", "Description Short", "", diSetupType.stSetupType0.szDescriptionShort, MAX_BUF, szFileIniConfig); GetPrivateProfileString("Setup Type0", "Description Long", "", diSetupType.stSetupType0.szDescriptionLong, MAX_BUF, szFileIniConfig); - STGetComponents("Setup Type0", &diSetupType.stSetupType0, szFileIniConfig); + STSetVisibility(&diSetupType.stSetupType0); GetPrivateProfileString("Setup Type1", "Description Short", "", diSetupType.stSetupType1.szDescriptionShort, MAX_BUF, szFileIniConfig); GetPrivateProfileString("Setup Type1", "Description Long", "", diSetupType.stSetupType1.szDescriptionLong, MAX_BUF, szFileIniConfig); - STGetComponents("Setup Type1", &diSetupType.stSetupType1, szFileIniConfig); + STSetVisibility(&diSetupType.stSetupType1); GetPrivateProfileString("Setup Type2", "Description Short", "", diSetupType.stSetupType2.szDescriptionShort, MAX_BUF, szFileIniConfig); GetPrivateProfileString("Setup Type2", "Description Long", "", diSetupType.stSetupType2.szDescriptionLong, MAX_BUF, szFileIniConfig); - STGetComponents("Setup Type2", &diSetupType.stSetupType2, szFileIniConfig); + STSetVisibility(&diSetupType.stSetupType2); GetPrivateProfileString("Setup Type3", "Description Short", "", diSetupType.stSetupType3.szDescriptionShort, MAX_BUF, szFileIniConfig); GetPrivateProfileString("Setup Type3", "Description Long", "", diSetupType.stSetupType3.szDescriptionLong, MAX_BUF, szFileIniConfig); - STGetComponents("Setup Type3", &diSetupType.stSetupType3, szFileIniConfig); + STSetVisibility(&diSetupType.stSetupType3); /* remember the radio button that is considered the Custom type (the last radio button) */ SetCustomType(); @@ -4507,25 +4731,21 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine) { dwSetupType = ST_RADIO0; dwTempSetupType = dwSetupType; - SiCNodeSetItemsSelected(dwSetupType, diSetupType.stSetupType0.dwCItems, diSetupType.stSetupType0.dwCItemsSelected); } else if((lstrcmpi(szBuf, "Setup Type 1") == 0) && diSetupType.stSetupType1.bVisible) { dwSetupType = ST_RADIO1; dwTempSetupType = dwSetupType; - SiCNodeSetItemsSelected(dwSetupType, diSetupType.stSetupType1.dwCItems, diSetupType.stSetupType1.dwCItemsSelected); } else if((lstrcmpi(szBuf, "Setup Type 2") == 0) && diSetupType.stSetupType2.bVisible) { dwSetupType = ST_RADIO2; dwTempSetupType = dwSetupType; - SiCNodeSetItemsSelected(dwSetupType, diSetupType.stSetupType2.dwCItems, diSetupType.stSetupType2.dwCItemsSelected); } else if((lstrcmpi(szBuf, "Setup Type 3") == 0) && diSetupType.stSetupType3.bVisible) { dwSetupType = ST_RADIO3; dwTempSetupType = dwSetupType; - SiCNodeSetItemsSelected(dwSetupType, diSetupType.stSetupType3.dwCItems, diSetupType.stSetupType3.dwCItemsSelected); } else { @@ -4533,27 +4753,24 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine) { dwSetupType = ST_RADIO0; dwTempSetupType = dwSetupType; - SiCNodeSetItemsSelected(dwSetupType, diSetupType.stSetupType0.dwCItems, diSetupType.stSetupType0.dwCItemsSelected); } else if(diSetupType.stSetupType1.bVisible) { dwSetupType = ST_RADIO1; dwTempSetupType = dwSetupType; - SiCNodeSetItemsSelected(dwSetupType, diSetupType.stSetupType1.dwCItems, diSetupType.stSetupType1.dwCItemsSelected); } else if(diSetupType.stSetupType2.bVisible) { dwSetupType = ST_RADIO2; dwTempSetupType = dwSetupType; - SiCNodeSetItemsSelected(dwSetupType, diSetupType.stSetupType2.dwCItems, diSetupType.stSetupType2.dwCItemsSelected); } else if(diSetupType.stSetupType3.bVisible) { dwSetupType = ST_RADIO3; dwTempSetupType = dwSetupType; - SiCNodeSetItemsSelected(dwSetupType, diSetupType.stSetupType3.dwCItems, diSetupType.stSetupType3.dwCItemsSelected); } } + SiCNodeSetItemsSelected(dwSetupType); /* get install size required in temp for component Xpcom. Sould be in Kilobytes */ GetPrivateProfileString("Core", "Install Size", "", szBuf, MAX_BUF, szFileIniConfig); @@ -4593,6 +4810,7 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine) OutputSetupTitle(hdc); ReleaseDC(hWndMain, hdc); CleanupXpcomFile(); + ShowMessage(szMsgInitSetup, FALSE); return(0); } @@ -4821,39 +5039,12 @@ void SetCustomType() sgProduct.dwCustomType = ST_RADIO0; } -void STGetComponents(LPSTR szSection, st *stSetupType, LPSTR szFileIniConfig) +void STSetVisibility(st *stSetupType) { - DWORD dwIndex; - char szIndex[MAX_BUF]; - char szKey[MAX_BUF]; - char szBuf[MAX_BUF]; - if(*(stSetupType->szDescriptionShort) == '\0') stSetupType->bVisible = FALSE; else stSetupType->bVisible = TRUE; - - dwIndex = 0; - stSetupType->dwCItems = 0; - itoa(dwIndex, szIndex, 10); - lstrcpy(szKey, "C"); - lstrcat(szKey, szIndex); - GetPrivateProfileString(szSection, szKey, "", szBuf, MAX_BUF, szFileIniConfig); - while(*szBuf != '\0') - { - /* hack used to determine the numerical value of the component */ - if(lstrlen(szBuf) > 8) - { - ++stSetupType->dwCItems; - stSetupType->dwCItemsSelected[dwIndex] = atoi(&szBuf[9]); - } - - ++dwIndex; - itoa(dwIndex, szIndex, 10); - lstrcpy(szKey, "C"); - lstrcat(szKey, szIndex); - GetPrivateProfileString(szSection, szKey, "", szBuf, MAX_BUF, szFileIniConfig); - } } HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize) @@ -5613,7 +5804,7 @@ void DeInitialize() CleanTempFiles(); DirectoryRemove(szTempDir, FALSE); - DeInitSiComponents(); + DeInitSiComponents(&siComponents); DeInitSXpcomFile(); DeInitSDObject(); DeInitDlgReboot(&diReboot); diff --git a/xpinstall/wizard/windows/setup/extra.h b/xpinstall/wizard/windows/setup/extra.h index 56e44e0458f5..4dd0b8a8cda7 100644 --- a/xpinstall/wizard/windows/setup/extra.h +++ b/xpinstall/wizard/windows/setup/extra.h @@ -75,13 +75,16 @@ void SiCDepNodeDelete(siCD *siCDepTemp); void SiCDepNodeInsert(siCD **siCDepHead, siCD *siCDepTemp); HRESULT SiCNodeGetAttributes(DWORD dwIndex, BOOL bIncludeInvisible, DWORD dwACFlag); void SiCNodeSetAttributes(DWORD dwIndex, DWORD dwAttributes, BOOL bSet, BOOL bIncludeInvisible, DWORD dwACFlag); -void SiCNodeSetItemsSelected(DWORD dwSetupType, DWORD dwItems, DWORD *dwItemsSelected); +void SiCNodeSetItemsSelected(DWORD dwSetupType); +char *SiCNodeGetReferenceName(DWORD dwIndex, BOOL bIncludeInvisible, DWORD dwACFlag); char *SiCNodeGetDescriptionShort(DWORD dwIndex, BOOL bIncludeInvisible, DWORD dwACFlag); char *SiCNodeGetDescriptionLong(DWORD dwIndex, BOOL bIncludeInvisible, DWORD dwACFlag); +char *SiCNodeGetReferenceName(DWORD dwIndex, BOOL bIncludeInvisible, DWORD dwACFlag); siC *SiCNodeGetObject(DWORD dwIndex, BOOL bIncludeInvisibleObjs, DWORD dwACFlag); ULONGLONG SiCNodeGetInstallSize(DWORD dwIndex, BOOL bIncludeInvisible, DWORD dwACFlag); ULONGLONG SiCNodeGetInstallSizeSystem(DWORD dwIndex, BOOL bIncludeInvisible, DWORD dwACFlag); ULONGLONG SiCNodeGetInstallSizeArchive(DWORD dwIndex, BOOL bIncludeInvisible, DWORD dwACFlag); +siC *SiCNodeFind(siC *siComponents, char *szInReferenceName); void InitSiComponents(char *szFileIni); HRESULT ParseComponentAttributes(char *szBuf); void InitSiteSelector(char *szFileIni); @@ -90,7 +93,7 @@ BOOL ResolveDependencies(DWORD dwIndex); BOOL ResolveComponentDependency(siCD *siCDInDependency); void ResolveDependees(LPSTR szToggledDescriptionShort); BOOL ResolveComponentDependee(siCD *siCDInDependee); -void STGetComponents(LPSTR szSection, st *stSetupType, LPSTR szFileIni); +void STSetVisibility(st *stSetupType); HRESULT InitSXpcomFile(void); void DeInitSXpcomFile(void); void DeInitialize(void); @@ -103,7 +106,7 @@ void DeInitDlgProgramFolder(diPF *diDialog); void DeInitDlgStartInstall(diSI *diDialog); void DeInitDlgSiteSelector(diAS *diDialog); void DetermineOSVersion(void); -void DeInitSiComponents(void); +void DeInitSiComponents(siC **siComponents); void DeInitSetupGeneral(void); HRESULT InitializeSmartDownload(void); HRESULT DeInitializeSmartDownload(void); @@ -132,6 +135,9 @@ int ExtractDirEntries(char* directory,void* vZip); BOOL LocateJar(siC *siCObject, LPSTR szPath, DWORD dwPathSize, BOOL bIncludeTempDir); HRESULT AddArchiveToIdiFile(siC *siCObject, char *szSComponent, char *szSFile, char *szFileIdiGetArchives); int SiCNodeGetIndexDS(char *szInDescriptionShort); +int SiCNodeGetIndexRN(char *szInReferenceName); +void ViewSiComponentsDependency(char *szBuffer, char *szIndentation, siC *siCNode); +void ViewSiComponentsDependee(char *szBuffer, char *szIndentation, siC *siCNode); void ViewSiComponents(void); BOOL IsWin95Debute(void); ULONGLONG GetDiskSpaceRequired(DWORD dwType); diff --git a/xpinstall/wizard/windows/setup/setup.h b/xpinstall/wizard/windows/setup/setup.h index e0e4a7289416..f8d8e430542f 100644 --- a/xpinstall/wizard/windows/setup/setup.h +++ b/xpinstall/wizard/windows/setup/setup.h @@ -323,6 +323,7 @@ typedef struct sinfoComponentDep siCD; struct sinfoComponentDep { LPSTR szDescriptionShort; + LPSTR szReferenceName; siCD *Next; siCD *Prev; }; @@ -342,6 +343,7 @@ struct sinfoComponent LPSTR szDescriptionShort; LPSTR szDescriptionLong; LPSTR szParameter; + LPSTR szReferenceName; siCD *siCDDependencies; siCD *siCDDependees; siC *Next; diff --git a/xpinstall/wizard/windows/setuprsc/setuprsc.h b/xpinstall/wizard/windows/setuprsc/setuprsc.h index 3693ea06f964..c0fed38c26d0 100644 --- a/xpinstall/wizard/windows/setuprsc/setuprsc.h +++ b/xpinstall/wizard/windows/setuprsc/setuprsc.h @@ -148,6 +148,7 @@ #define IDS_STR_SETUP 11025 #define IDS_STR_DOWNLOAD_SITE 11026 #define IDS_STR_SAVE_INSTALLER_FILES 11027 +#define IDS_MSG_INIT_SETUP 11028 #define IDC_STATIC -1 // Next default values for new objects diff --git a/xpinstall/wizard/windows/setuprsc/setuprsc.rc b/xpinstall/wizard/windows/setuprsc/setuprsc.rc index 94f878aa9fa9..b2a2622a92ac 100644 --- a/xpinstall/wizard/windows/setuprsc/setuprsc.rc +++ b/xpinstall/wizard/windows/setuprsc/setuprsc.rc @@ -443,6 +443,7 @@ BEGIN IDS_STR_SETUP "Setup" IDS_STR_DOWNLOAD_SITE "Download Site:" IDS_STR_SAVE_INSTALLER_FILES "Save downloaded and Setup program files to:" + IDS_MSG_INIT_SETUP "Initializing Setup, please wait..." END #endif // English (U.S.) resources diff --git a/xpinstall/wizard/windows/uninstall/extra.c b/xpinstall/wizard/windows/uninstall/extra.c index 0251a985ef57..4bb348a56682 100644 --- a/xpinstall/wizard/windows/uninstall/extra.c +++ b/xpinstall/wizard/windows/uninstall/extra.c @@ -196,6 +196,9 @@ HRESULT Initialize(HINSTANCE hInstance) if((szTempDir = NS_GlobalAlloc(MAX_BUF)) == NULL) return(1); + if((szOSTempDir = NS_GlobalAlloc(MAX_BUF)) == NULL) + return(1); + if((szFileIniUninstall = NS_GlobalAlloc(MAX_BUF)) == NULL) return(1); @@ -1641,6 +1644,7 @@ void DeInitialize() DeInitUninstallGeneral(); FreeMemory(&szTempDir); + FreeMemory(&szOSTempDir); FreeMemory(&szUninstallDir); FreeMemory(&szEGlobalAlloc); FreeMemory(&szEDllLoad);