From: SourceForge.net <no...@so...> - 2011-12-15 20:29:19
|
Feature Requests item #2818858, was opened at 2009-07-08 22:43 Message generated for change (Comment added) made by anders_k You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373088&aid=2818858&group_id=22049 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Scripting Group: None Status: Open Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Amir Szekely (kichik) Summary: Selection section through the installation type Initial Comment: Hello, I wonder if it is possible to ensure that following the installation type box is grayed out but not checked by default. Example: Installation Type: XP VISTA Section: Internet Explorer 8 XP VISTA At the launch of. Exe, therefore we choose the type of installation eg XP, and I would like the vista of the coup is grayed and conversely if I take the setup type that VISTA ca me gray section XP SECTION group of Internet Explorer. Sorry my English is not terrible, Thank you help is very appreciable. My code : !define SF_USELECTED 0 !macro AssignInstallSection P_SEC Push $0 IntOp $0 ${SF_SELECTED} | ${SF_RO} SectionSetFlags ${P_SEC} $0 Pop $0 !macroend !macro UnassignInstallSection P_SEC Push $0 IntOp $0 ${SF_USELECTED} | ${SF_RO} SectionSetFlags ${P_SEC} $0 Pop $0 !macroend !ifndef NOINSTTYPES InstType "XP" InstType "VISTA" !endif #Windows VISTA !insertmacro ClearSectionInInstType "${SEC0006}" "${INSTTYPE_2}" !insertmacro UnassignInstallSection ${SEC0006} I can not ensure that section 6 is not assigned to the installation type 2 Good day Goingoin ---------------------------------------------------------------------- Comment By: Anders (anders_k) Date: 2011-12-15 12:29 Message: It is a little unclear to me what you want but you should be able to just use the .onSelChange callback: !include WinVer.nsh !include Sections.nsh #InstType /NOCUSTOM !define IT_XP 0 !define /math ITS_XP ${IT_XP} + 1 InstType "XP" !define IT_VISTA 1 !define /math ITS_VISTA ${IT_VISTA} + 1 InstType "Vista" Page Components Page InstFiles SectionGroup /e "Internet Explorer" Section "XP" S_IE_XP SectionIn ${ITS_XP} SectionEnd Section "VISTA" S_IE_VISTA SectionIn ${ITS_VISTA} SectionEnd SectionGroupEnd Function .onSelChange ${If} ${AtLeastWinVista} StrCpy $0 ${S_IE_XP} ${Else} StrCpy $0 ${S_IE_VISTA} ${EndIf} !insertmacro SetSectionFlag $0 ${SF_RO} !insertmacro UnselectSection $0 FunctionEnd Function .onInit ${If} ${AtLeastWinVista} SetCurInstType ${IT_VISTA} ${EndIf} call .onSelChange ;Make sure our logic is enforced FunctionEnd ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373088&aid=2818858&group_id=22049 |