Skip to content
⌘ NSIS Forum Archive

Read a List with files and use it in NSIS

3 posts

bumpelwumpel#

Read a List with files and use it in NSIS

Hi,


I want to write a special uninstaller. You can choose which files you want to delete. These fils are in the same folders.

So I have a list for every Section.

Example for such a list:

Objects
AutoTest
grass_mix13.dds
Effects
Natural
Forest_Ground_Leafs.dds
particle_grass_green.dds
particle_green_leafs.dds
particle_green_leafs_ddn.dds
How I can use this list with NSIS. Or should i rewrite the list?
I have searched for ini reading but i found nothing that could helped me.
LoRd_MuldeR#
If your list wasn't hierarchic you could use my NSISList plugin.

It would work like this:
;Required include to use NSISList
!include NSISList.nsh

;Reserve the NSISList plugin
ReserveFile "${NSISDIR}\Plugins\NSISList.dll"

;Set name and output file
Name "NSISList Example Installer"
OutFile "NSISList_Example.exe"

;Show the log
ShowInstDetails show

Section
${List.Create} MyList
${List.Load} $0 MyList "$INSTDIR\somelist.txt"

[...]

${List.Unload}
SectionEnd
But the list would need to look like this:
Objects\AutoTest\grass_mix13.dds
Objects\Effects\Natural\Forest_Ground_Leafs.dds
Objects\Effects\Natural\particle_grass_green.dds
Objects\Effects\Natural\particle_green_leafs.dds
Objects\Effects\Natural\particle_green_leafs_ddn.dds