problem with section name, possible bug
hi there!
i've got a problem with unvisible sections. from the docs i know, that sections name are unvisible, if their namestring is empty, or contains a '-' as first character.
so, i've written the following lines:
(i'm using the latest development snapshot from 7. nov.)
#script.nsi
#mainfile, variables and includes
Var BCDIR
# page.nsh
# defining the function, to edit the layout of the componentspage
!define MUI_PAGE_CUSTOMFUNCTION_SHOW PreComponents
!insertmacro MUI_PAGE_COMPONENTS
# functions.nsh
# the function
Function PreComponents
StrCpy $BCDIR ""
StrCpy $R0 ""
ClearErrors
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\bc42.exe" ""
IfErrors 0 +3
SectionSetText ${f_b} ""
Goto End
SectionSetText ${f_b} "$(files_bc)"
GetFullPathName $BCDIR $R0
End:
FunctionEnd
# sections.nsh
# the section
Section /o "" f_b
SectionIn 2
StrCmp $BCDIR "" 0 +3
StrCpy $R0 "0"
Goto End
Push $OUTDIR
SetOutPath $BCDIR
File /nonfatal /r ".\files_client_full\battlecraft\*.*"
Pop $OUTDIR
StrCpy $R0 "1"
End:
WriteRegDWORD HKLM "Software\${C_COMPANY}\${C_PRODUCT}" "BC1942SupportInstalled" $R0
SectionEnd
#lang.nsh
#langstrings
LangString files_bc ${LANG_ENGLISH} "Plug-in for Battlecraft42"
LangString files_bc ${LANG_GERMAN} "Plug-In für Battlecraft42"
(ive splitted the whole script to 8 files, 7* .nsh + 1* .nsi, so its easier for me to read and write.)
my problem is, that the section wont get unvisible, neither with '-' nor with empty namestring.
ps:
for all nsis-scripters interested in my work: i'm currently scripting a comfortable installer for modifications of the game "battlefield 1942". especially for the stuntfactory modification.