changed 'download-content' options to be subitems, to avoid interruptions in install
This commit is contained in:
@@ -81,15 +81,12 @@ Section "Client" Client
|
|||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
SectionGroup /e "Mods"
|
SectionGroup /e "Mods"
|
||||||
Section "Red Alert" RA
|
SectionGroup "Red Alert" RA
|
||||||
SetOutPath "$INSTDIR\mods\ra"
|
Section "-RA_Core"
|
||||||
File "..\..\mods\ra\*.*"
|
SetOutPath "$INSTDIR\mods\ra"
|
||||||
MessageBox MB_YESNO "Setup will now download and install the Red Alert packages.$\n\
|
File "..\..\mods\ra\*.*"
|
||||||
The size of the download will be approximately 7MB in size.$\n\
|
SectionEnd
|
||||||
If you do not wish to download them at this time, you can find instructions on how to \
|
Section "Download content" RA_Content
|
||||||
download the packages in the INSTALL file found in the OpenRA program directory$\n$\n\
|
|
||||||
Continue?" IDYES download IDNO done
|
|
||||||
download:
|
|
||||||
AddSize 10137
|
AddSize 10137
|
||||||
SetOutPath "$OUTDIR\packages"
|
SetOutPath "$OUTDIR\packages"
|
||||||
NSISdl::download http://open-ra.org/packages/ra-packages.zip ra-packages.zip
|
NSISdl::download http://open-ra.org/packages/ra-packages.zip ra-packages.zip
|
||||||
@@ -98,18 +95,14 @@ SectionGroup /e "Mods"
|
|||||||
Abort
|
Abort
|
||||||
ZipDLL::extractall "ra-packages.zip" "$OUTDIR"
|
ZipDLL::extractall "ra-packages.zip" "$OUTDIR"
|
||||||
Delete ra-packages.zip
|
Delete ra-packages.zip
|
||||||
done:
|
SectionEnd
|
||||||
SectionEnd
|
SectionGroupEnd
|
||||||
Section "Command & Conquer" CNC
|
SectionGroup "Command & Conquer" CNC
|
||||||
SetOutPath "$INSTDIR\mods\cnc"
|
Section "-CNC_Core"
|
||||||
File "..\..\mods\cnc\*.*"
|
SetOutPath "$INSTDIR\mods\cnc"
|
||||||
|
File "..\..\mods\cnc\*.*"
|
||||||
MessageBox MB_YESNO "Setup will now download and install the Command and Conquer packages.$\n\
|
SectionEnd
|
||||||
The size of the download will be approximately 6MB in size.$\n\
|
Section "Download content" CNC_Content
|
||||||
If you do not wish to download them at this time, you can find instructions on how to \
|
|
||||||
download the packages in the INSTALL file found in the OpenRA program directory$\n$\n\
|
|
||||||
Continue?" IDYES download IDNO done
|
|
||||||
download:
|
|
||||||
AddSize 9431
|
AddSize 9431
|
||||||
SetOutPath "$OUTDIR\packages"
|
SetOutPath "$OUTDIR\packages"
|
||||||
NSISdl::download http://open-ra.org/packages/cnc-packages.zip cnc-packages.zip
|
NSISdl::download http://open-ra.org/packages/cnc-packages.zip cnc-packages.zip
|
||||||
@@ -118,12 +111,24 @@ SectionGroup /e "Mods"
|
|||||||
Abort
|
Abort
|
||||||
ZipDLL::extractall "cnc-packages.zip" "$OUTDIR"
|
ZipDLL::extractall "cnc-packages.zip" "$OUTDIR"
|
||||||
Delete cnc-packages.zip
|
Delete cnc-packages.zip
|
||||||
done:
|
SectionEnd
|
||||||
SectionEnd
|
SectionGroupEnd
|
||||||
Section "Red Alert: Aftermath" Aftermath
|
SectionGroup "Red Alert: Aftermath" Aftermath
|
||||||
SetOutPath "$INSTDIR\mods\aftermath"
|
Section "-AM_Core"
|
||||||
File "..\..\mods\aftermath\*.*"
|
SetOutPath "$INSTDIR\mods\aftermath"
|
||||||
SectionEnd
|
File "..\..\mods\aftermath\*.*"
|
||||||
|
SectionEnd
|
||||||
|
Section "Download content" AM_Content
|
||||||
|
AddSize 5941
|
||||||
|
SetOutPath "$OUTDIR\packages"
|
||||||
|
NSISdl::download http://open-ra.org/packages/aftermath-packages.zip aftermath-packages.zip
|
||||||
|
Pop $R0
|
||||||
|
StrCmp $R0 "success" +2
|
||||||
|
Abort
|
||||||
|
ZipDLL::extractall "aftermath-packages.zip" "$OUTDIR"
|
||||||
|
Delete aftermath-packages.zip
|
||||||
|
SectionEnd
|
||||||
|
SectionGroupEnd
|
||||||
Section "Red Alert: Next Generation" RA_NG
|
Section "Red Alert: Next Generation" RA_NG
|
||||||
SetOutPath "$INSTDIR\mods\ra-ng"
|
SetOutPath "$INSTDIR\mods\ra-ng"
|
||||||
File "..\..\mods\ra-ng\*.*"
|
File "..\..\mods\ra-ng\*.*"
|
||||||
@@ -240,33 +245,6 @@ LangString DESC_RA_NG ${LANG_ENGLISH} "Next-gen Red Alert mod (depends on base R
|
|||||||
;***************************
|
;***************************
|
||||||
;Callbacks
|
;Callbacks
|
||||||
;***************************
|
;***************************
|
||||||
Var previousSelection
|
|
||||||
|
|
||||||
Function .onInit
|
|
||||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
|
||||||
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} 0
|
|
||||||
SectionSetFlags ${RA_NG} 0
|
|
||||||
Goto done
|
|
||||||
|
|
||||||
done:
|
|
||||||
IntOp $previousSelection $1 + 0
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Function .onInstFailed
|
Function .onInstFailed
|
||||||
Call Clean
|
Call Clean
|
||||||
|
|||||||
Reference in New Issue
Block a user