i checked on the forum but the solutions are not working 🙁
I want my software installers to be able to isntall source code if the archive with sources (source.zip) is available in the same folder
so i have 2 sections : 1 which is RO and selected for isntalling the software, one which i want to dynamically be enabled or disabled if source.zip is existing.
so in .onInit i'm checking the existance of the file and changing the section's flag .. but i don't see any result in my installer 🙁
here is my script :
;--------------------------------
; Includes
!include "MUI.nsh"
!include "Sections.nsh"
;--------------------------------
; Parameters
Name "software"
OutFile "Install.exe"
!define MUI_HEADERIMAGE true
!define MUI_HEADERIMAGE_RIGHT true
!define MUI_COMPONENTSPAGE_SMALLDESC
CRCCheck off
InstallDir ""
;--------------------------------
; Pages
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "French"
Function .onInit
ifFileExists "$EXEDIR\source.zip" SOURCE_ok
!insertmacro SetSectionFlag SOURCE ${SF_RO}
SOURCE_ok:
FunctionEnd
;--------------------------------
; Sections
Section "Software" SOFT
SectionIn RO
; installing ...
Sectionend
Section /o "Source code" SOURCE
; installing ...
Sectionend
thanks
a not working section RO change :(
3 posts
!insertmacro SetSectionFlag SOURCE ${SF_RO}
Should be:
!insertmacro SetSectionFlag ${SOURCE} ${SF_RO}
-Stu
Should be:
!insertmacro SetSectionFlag ${SOURCE} ${SF_RO}
-Stu
I attached script to this thread see my post there http://forums.winamp.com/showthread.php?threadid=224844 , it also allows to skip sections page if no additional files (and skips finish page if launches dotnetfx.exe).