Resubmitted Sections.nsh with StrCpy ops back in (and added to my macros). Thanks Anders :S
I spose conditional compilation would be a better solution but meh! git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6076 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
4f1a78e939
commit
2170215b06
1 changed files with 42 additions and 21 deletions
|
@ -116,12 +116,12 @@
|
||||||
|
|
||||||
; A radio button
|
; A radio button
|
||||||
|
|
||||||
!macro RadioButton SECTION
|
!macro RadioButton SECTION_NAME
|
||||||
|
|
||||||
SectionGetFlags "${SECTION}" $R0
|
SectionGetFlags ${SECTION_NAME} $R0
|
||||||
IntOp $R0 $R0 & ${SF_SELECTED}
|
IntOp $R0 $R0 & ${SF_SELECTED}
|
||||||
IntCmp $R0 ${SF_SELECTED} 0 +2 +2
|
IntCmp $R0 ${SF_SELECTED} 0 +2 +2
|
||||||
StrCpy "${StartRadioButtons_Var}" "${SECTION}"
|
StrCpy "${StartRadioButtons_Var}" ${SECTION_NAME}
|
||||||
|
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
@ -185,25 +185,31 @@
|
||||||
!define INSTTYPE_31 1073741824
|
!define INSTTYPE_31 1073741824
|
||||||
!define INSTTYPE_32 2147483648
|
!define INSTTYPE_32 2147483648
|
||||||
|
|
||||||
!macro SetSectionInInstType SECTION WANTED_INSTTYPE
|
!macro SetSectionInInstType SECTION_NAME WANTED_INSTTYPE
|
||||||
|
|
||||||
Push $0
|
Push $0
|
||||||
SectionGetInstTypes "${SECTION}" $0
|
Push $1
|
||||||
|
StrCpy $1 "${SECTION_NAME}"
|
||||||
|
SectionGetInstTypes $1 $0
|
||||||
IntOp $0 $0 | ${WANTED_INSTTYPE}
|
IntOp $0 $0 | ${WANTED_INSTTYPE}
|
||||||
SectionSetInstTypes "${SECTION}" $0
|
SectionSetInstTypes $1 $0
|
||||||
|
Pop $1
|
||||||
Pop $0
|
Pop $0
|
||||||
|
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro ClearSectionInInstType SECTION WANTED_INSTTYPE
|
!macro ClearSectionInInstType SECTION_NAME WANTED_INSTTYPE
|
||||||
|
|
||||||
Push $0
|
Push $0
|
||||||
Push $1
|
Push $1
|
||||||
SectionGetInstTypes "${SECTION}" $0
|
Push $2
|
||||||
|
StrCpy $2 "${SECTION_NAME}"
|
||||||
|
SectionGetInstTypes $2 $0
|
||||||
StrCpy $1 ${WANTED_INSTTYPE}
|
StrCpy $1 ${WANTED_INSTTYPE}
|
||||||
IntOp $1 $1 ~
|
IntOp $1 $1 ~
|
||||||
IntOp $0 $0 & $1
|
IntOp $0 $0 & $1
|
||||||
SectionSetInstTypes "${SECTION}" $0
|
SectionSetInstTypes $2 $0
|
||||||
|
Pop $2
|
||||||
Pop $1
|
Pop $1
|
||||||
Pop $0
|
Pop $0
|
||||||
|
|
||||||
|
@ -219,9 +225,12 @@
|
||||||
!macro SetSectionFlag SECTION BITS
|
!macro SetSectionFlag SECTION BITS
|
||||||
|
|
||||||
Push $R0
|
Push $R0
|
||||||
SectionGetFlags "${SECTION}" $R0
|
Push $R1
|
||||||
|
StrCpy $R1 "${SECTION}"
|
||||||
|
SectionGetFlags $R1 $R0
|
||||||
IntOp $R0 $R0 | "${BITS}"
|
IntOp $R0 $R0 | "${BITS}"
|
||||||
SectionSetFlags "${SECTION}" $R0
|
SectionSetFlags $R1 $R0
|
||||||
|
Pop $R1
|
||||||
Pop $R0
|
Pop $R0
|
||||||
|
|
||||||
!macroend
|
!macroend
|
||||||
|
@ -232,10 +241,13 @@
|
||||||
|
|
||||||
Push $R0
|
Push $R0
|
||||||
Push $R1
|
Push $R1
|
||||||
SectionGetFlags "${SECTION}" $R0
|
Push $R2
|
||||||
|
StrCpy $R2 "${SECTION}"
|
||||||
|
SectionGetFlags $R2 $R0
|
||||||
IntOp $R1 "${BITS}" ~
|
IntOp $R1 "${BITS}" ~
|
||||||
IntOp $R0 $R0 & $R1
|
IntOp $R0 $R0 & $R1
|
||||||
SectionSetFlags "${SECTION}" $R0
|
SectionSetFlags $R2 $R0
|
||||||
|
Pop $R2
|
||||||
Pop $R1
|
Pop $R1
|
||||||
Pop $R0
|
Pop $R0
|
||||||
|
|
||||||
|
@ -263,10 +275,13 @@
|
||||||
!macro RemoveSection SECTION
|
!macro RemoveSection SECTION
|
||||||
|
|
||||||
Push $R0
|
Push $R0
|
||||||
SectionGetFlags `${SECTION}` $R0
|
Push $R1
|
||||||
|
StrCpy $R1 `${SECTION}`
|
||||||
|
SectionGetFlags $R1 $R0
|
||||||
IntOp $R0 $R0 & ${SECTION_OFF}
|
IntOp $R0 $R0 & ${SECTION_OFF}
|
||||||
SectionSetFlags `${SECTION}` $R0
|
SectionSetFlags $R1 $R0
|
||||||
SectionSetText `${SECTION}` ``
|
SectionSetText $R1 ``
|
||||||
|
Pop $R1
|
||||||
Pop $R0
|
Pop $R0
|
||||||
|
|
||||||
!macroend
|
!macroend
|
||||||
|
@ -276,14 +291,20 @@
|
||||||
!macro UnremoveSection SECTION SECTION_TEXT
|
!macro UnremoveSection SECTION SECTION_TEXT
|
||||||
|
|
||||||
Push $R0
|
Push $R0
|
||||||
SectionGetFlags `${SECTION}` $R0
|
Push $R1
|
||||||
|
Push $R2
|
||||||
|
StrCpy $R1 `${SECTION}`
|
||||||
|
StrCpy $R2 `${SECTION_TEXT}`
|
||||||
|
SectionGetFlags $R1 $R0
|
||||||
IntOp $R0 $R0 | ${SF_SELECTED}
|
IntOp $R0 $R0 | ${SF_SELECTED}
|
||||||
SectionSetFlags `${SECTION}` $R0
|
SectionSetFlags $R1 $R0
|
||||||
SectionSetText `${SECTION}` `${SECTION_TEXT}`
|
SectionSetText $R1 $R2
|
||||||
|
Pop $R2
|
||||||
|
Pop $R1
|
||||||
Pop $R0
|
Pop $R0
|
||||||
|
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!endif
|
;--------------------------------
|
||||||
|
|
||||||
;--------------------------------
|
!endif
|
Loading…
Add table
Add a link
Reference in a new issue