From 49908be1c15577803feaafe299ca4ae2c5ee0c11 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 4 Mar 2010 12:33:33 +1300 Subject: [PATCH] Mods all in NSIS script. --- packaging/windows/OpenRA.nsi | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi index ad8758a175..c8d3943d4e 100644 --- a/packaging/windows/OpenRA.nsi +++ b/packaging/windows/OpenRA.nsi @@ -40,6 +40,14 @@ SectionGroup /e "Mods" Section "Command & Conquer" CNC SetOutPath "$INSTDIR\mods\cnc" File /r "..\..\mods\cnc\*.*" + SectionEnd + Section "Red Alert: Aftermath" Aftermath + SetOutPath "$INSTDIR\mods\aftermath" + File /r "..\..\mods\aftermath\*.*" + SectionEnd + Section "Red Alert: Next Generation" RA_NG + SetOutPath "$INSTDIR\mods\ra-ng" + File /r "..\..\mods\ra-ng\*.*" SectionEnd SectionGroupEnd @@ -47,8 +55,31 @@ Section "Server" Server SetOutPath "$INSTDIR" File "..\..\OpenRA.Server\bin\Debug\OpenRA.Server.exe" SectionEnd + +Var previousSelection Function .onInit IntOp $0 ${SF_SELECTED} | ${SF_RO} - SectionSetFlags ${Client} $0 + SectionSetFlags ${Client} $0 + + IntOp $previousSelection ${SF_SELECTED} + 0 +FunctionEnd + +Function .onSelChange + SectionGetFlags ${RA} $0 + IntOp $1 ${SF_SELECTED} & $0 + IntCmp $1 $previousSelection done + + IntCmp 0 $1 deselected selected + deselected: + SectionSetFlags ${Aftermath} ${SF_RO} + SectionSetFlags ${RA_NG} ${SF_RO} + Goto done + selected: + SectionSetFlags ${Aftermath} ${SF_SELECTED} + SectionSetFlags ${RA_NG} ${SF_SELECTED} + Goto done + + done: + IntOp $previousSelection $1 + 0 FunctionEnd