|
|
#1 |
|
Junior Member
Join Date: Apr 2007
Posts: 1
|
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. Last edited by Chappe; 19th April 2007 at 13:09. |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Nope, no array support. You'll have to use a custom page to display the combo box or wait for the InstTypeSetText issue to be resolved.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|