chuckler
16th September 2008 11:25 UTC
Compiling Sections.sh fails with radiobutton macros
Hi, I am getting an error when I try to compile the following macros and examples in the follwoing URL unchanged.
http://nsis.sourceforge.net/RadioButtons
I am basically trying to get radio buttons for my installer based on choices.
Name: "sections test"
OutFile: "sectest.exe"
!include: "sections.nsh"
!include: "C:\Program Files\NSIS\Include\LogicLib.nsh"
!define: "_LOGICLIB_VERBOSITY" already defined!
!include: error in script: "C:\Program Files\NSIS\Include\LogicLib.nsh" on line 75
!include: error in script: "sections.nsh" on line 9
!include: error in script: "C:\Program Files\NSIS\Include\LogicLib.nsh" on line 85
!include: error in script: "sections.nsh" on line 9
Error in script "C:\Documents and Settings\Administrator\My Documents\faheem-nsis-scripts\NSIS\test-2.0.2.2.nsi" on line 4 -- aborting creation process
Any ideas?
kichik
16th September 2008 17:55 UTC
Can you attach the complete script that causes this error?
chuckler
17th September 2008 06:23 UTC
Strange Error!
The script is the example script i found on the following page:
http://nsis.sourceforge.net/RadioButtons
I have put the macros mentioned here onto a separate .nsh file labelled "Sections.nsh".
Funny thing now - On a fresh VM (I work on VMs) i found that compiling my script ( an older known to be working script) worked fine. But, the moment i compile the example script found in the above URL, it fails - which in itself is not a problem. However I also found that the older script which had compiled perfectly a moment ago now fails with the same error as mentioned above. I'v reproduced this on three separate VMs.
I don't understand it at all. Is something getting corrupt while compiling the example script for radiobuttons found in the above URL? I cannot seem to get my NSIS working for any scripts after the above error. they all fail with the same LogicLib error. Any suggestions/help is greatly appreciated. Thanks
chuckler
18th September 2008 05:00 UTC
Kinda solved.
I Solved this by using Nsdialogs CreateRadioButton and it was perfect for my simple requiremnts of just two radio buttons. thanks anyway.
Not sure if i should post this separately:
How can i make the radiobutton choices go to the appropriate custom page?
Two choices: Each should go to the correct page decided by radio button choice only if selected and then continue on to a common custom page after.
I am using a page leave function to determine the choice with NSD_getstate.
Thanks.
kichik
19th September 2008 08:12 UTC
Looks like a corrupted LogicLib.nsh. Attach the entire script that caused this as is. RadioButtons.nsh works fine for me, so I'll need your version.
chuckler
23rd September 2008 04:03 UTC
Hi, The only script i tried which repeatedly kept corrupting my logiclib.sh was the example script found at the above URL
which i have included below.
!include "Sections.nsh"
;--------------------------------
Name "One Section"
OutFile "one-section.exe"
;--------------------------------
; Pages
Page components
Page instfiles
;--------------------------------
; Sections
Section "Group 1 - Option 1" g1o1
SectionEnd
Section /o "Group 1 - Option 2" g1o2
SectionEnd
Section /o "Group 1 - Option 3" g1o3
SectionEnd
Section "Group 2 - Option 1" g2o1
SectionEnd
Section /o "Group 2 - Option 2" g2o2
SectionEnd
Section /o "Group 2 - Option 3" g2o3
SectionEnd
;--------------------------------
; Functions
Function .onInit
!insertmacro RadioGetChecked "${g1o1}" "${g1o1},${g1o2},${g1o3}"
!insertmacro RadioGetChecked "${g2o1}" "${g2o1},${g2o2},${g2o3}"
FunctionEnd
Function .onSelChange
!insertmacro SectionRadioButtons "${g1o1}" "${g1o1},${g1o2},${g1o3}"
!insertmacro SectionRadioButtons "${g2o1}" "${g2o1},${g2o2},${g2o3}"
FunctionEnd
Everytime i compiled this script it corrupted my logiclib.sh and even a clean reinstall failed. strange, i think..