Archive: Sections, list files.


Sections, list files.
Hi!

This is probably a well answered question, but I can not seem to be finding what I am looking for.

I've made a script that has one Section, but I want the files to be listed under that section so you can be able to check/uncheck the files you dont want. But if you toggle the "Neverlands PolNL" it automatic check all files inside the section, you get me? :P Of curse the whole section should always be check by default.

Here is my script, any help is very accepted! Thank you!


;--------------------------------
;Include Modern UI

!include "MUI.nsh"

;--------------------------------
;General

;Name and file
Name "Neverlands, The PolNL Edition"
OutFile "neverlands_polnl_2.0.exe"

;Default installation folder
InstallDir "$PROGRAMFILES\Neverlands_PolNL\"

;Get installation folder from registry if available
InstallDirRegKey HKLM "SOFTWARE\Origin Worlds Online\Ultima Online\1.0" "InstCDPath"

;--------------------------------
;Interface Settings
!define MUI_ICON "uo.ico"
!define MUI_ABORTWARNING
!define MUI_WELCOMEFINISHPAGE_BITMAP "wf.bmp"

; Finish page interface
!define MUI_FINISHPAGE_RUN "polnl_client.exe"
!define MUI_FINISHPAGE_RUN_TEXT "Lunch Ultima Online"

!define MUI_FINISHPAGE_SHOWREADME "http://www.neverlands.org/polnl/index.php"
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Visit our website"
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
;--------------------------------
;Pages

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Installer Sections

Section "Neverlands PolNL" SecDummy

SetOutPath "$INSTDIR"

File login.cfg
File polnl_client.exe
File statics0.mul
File staidx0.mul
File hues.mul
File verdata.mul
File multi.mul
File multi.idx
File skills.mul
File skills.idx
File tiledata.mul

;Store installation folder
WriteRegStr HKCU "Software\PolNL_Neverlands" "InstallDIR" $INSTDIR

;Various renaming
Rename "$INSTDIR\Transerv.exe" "Transerv.exe.bak"

;Create shortcuts
CreateShortCut "$SMPROGRAMS\Neverlands Shard - PolNL.lnk" "$INSTDIR\polnl_client.exe"
CreateShortCut "$DESKTOP\Neverlands Shard - PolNL.lnk" "$INSTDIR\polnl_client.exe"
SectionEnd

Simply use a SectionGroup named "Neverlands PolNL" and a section for each file under it.


Thanks champ! Works like a charm!