Go Back   Winamp Forums > Developer Center > NSIS Discussion

 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 23rd April 2004, 02:16   #1
mdlazreg
Junior Member
 
Join Date: Feb 2004
Posts: 44
InstallOptions Page disable the next button!

I created an installer with two components. The first page of the first component is giving me a headache because its Next button is disabled all the time and I can not get to the next page.... I could not find a way to enable it!!!

Thanks for any help.

Here is my nsi script :

Caption "install test"
SetDateSave on
SetDatablockOptimize on
CRCCheck on
SilentInstall normal
BGGradient 000000 800000 FFFFFF
InstallColors FF8080 000030
XPStyle on
InstallDir "C:\"
InstallDirRegKey HKCU "Software\Products" ""
AllowRootDirInstall true
BrandingText "test"
ShowInstDetails show

!define _PRODUCT "product 1.0"
!define _SHORTNAME product10
!define _INC "Home"
!define _SMLOCATION "Products"

Name "${_PRODUCT}"
OutFile "${_SHORTNAME}-ntx86_install.exe"

ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
ReserveFile "test.ini"


LicenseText "A test text, make sure it's all there"
LicenseData "..\source\exehead\main.c"
;Order of pages
Page license
Page components
Page directory
Page instfiles

!ifndef NOINSTTYPES ; only if not defined
InstType "Full"
!endif

AutoCloseWindow false
ShowInstDetails show

Section "Configure license file"
SectionIn 1
IfFileExists $INSTDIR\${_INC}\license\license.dat end found
found:
InstallOptions::dialog "$PLUGINSDIR\test.ini"
ReadINIStr $R0 "$PLUGINSDIR\test.ini" "Field 3" "State"
ReadINIStr $R1 "$PLUGINSDIR\test.ini" "Field 5" "State"
StrCmp $R0 "" done
FileOpen $9 $INSTDIR\${_INC}\license\license.dat w
FileWrite $9 "SERVER $R0 00000000 $R1 $\n"
FileWrite $9 "USE_SERVER $\n"
done:
end:
SectionEnd

Section "${_PRODUCT}"
SectionIn 1
SetOutPath "$INSTDIR"
WriteRegStr HKCU "Software\${_SMLOCATION}" "" "$INSTDIR\"
#File /a /r "${_INC}"
SectionEnd

Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\test.ini "test.ini"
FunctionEnd

And here my test.ini file :

[Settings]
NumFields=6
CancelEnabled=1
BackEnabled=1
NextEnabled=1
NextButtonText="next"

[Field 1]
Type=GroupBox
Left=0
Right=-1
Top=0
Bottom=-5
Text=" Setting the license file... "

[Field 2]
Type=Label
Left=10
Right=-10
Top=20
Bottom=28
Text="If you know the host name of your license server please enter it here:"

[Field 3]
Type=Text
Left=10
Right=100
Top=38
Bottom=50
State=""

[Field 4]
Type=Label
Left=10
Right=-10
Top=60
Bottom=68
Text="If you know the port number of your license server please enter it here:"

[Field 5]
Type=Text
Left=10
Right=100
Top=78
Bottom=90
State=""

[Field 6]
Type=Label
Left=10
Right=-10
Top=98
Bottom=130
Text="If you do not have the above information click on Next.\r\n"
mdlazreg is offline   Reply With Quote
 
Go Back   Winamp 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