Old 16th September 2008, 10:25   #1
chuckler
Junior Member
 
Join Date: Jun 2008
Posts: 7
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?
chuckler is offline   Reply With Quote
Old 16th September 2008, 16:55   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Can you attach the complete script that causes this error?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th September 2008, 05:23   #3
chuckler
Junior Member
 
Join Date: Jun 2008
Posts: 7
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 is offline   Reply With Quote
Old 18th September 2008, 04:00   #4
chuckler
Junior Member
 
Join Date: Jun 2008
Posts: 7
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.
chuckler is offline   Reply With Quote
Old 19th September 2008, 07:12   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 23rd September 2008, 03:03   #6
chuckler
Junior Member
 
Join Date: Jun 2008
Posts: 7
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.
code:


!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..
chuckler is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump