Dynamic variable for use with InstTypeSetText
Is there any way to declare or use arrays (as in C/C++), because InstTypeSetText needs a variable. This global setup will read installtypes (1..100) from ini-file.
I know there are a NSISArray, but can't use it with InstTypeSetText
Some of the code I want to fix:
Var varSetupTypes[100] <--- Will not work in NSIS
StrCpy $varSetupIndex 0
LoopSetupTypes_Begin:
Push $varSetupIndex
Call Function_ReadSetupTypeData
${If} $varSetupIndex = 100
Goto LoopSetupTypes_End
${EndIf}
IntOp $varSetupIndex $varSetupIndex + 1
Goto LoopSetupTypes_Begin
LoopSetupTypes_End:
Function Function_ReadSetupTypeData
Var /GLOBAL varType
Pop $0 //1st time it's 0, 2nd it's 1 and so on
StrCpy $varType ${defIniFile_Type}$0
ReadINIStr $varSetupTypes[$0] ..\setup.ini "Setup Types" $varType
InstTypeSetText $0 $varSetupTypes[$0]
FunctionEnd
We have a working global setup in InstallShield, but we want to move to NSIS.