Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 15th, 2012  |  syntax: None  |  size: 0.42 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to make files optional include in MainSection of NSIS installer
  2. !include LogicLib.nsh
  3. !include FileFunc.nsh
  4. var IsSpecialMode
  5.  
  6. Function .onInit
  7. StrCpy $IsSpecialMode 0
  8. ${GetParameters} $0
  9. ClearErrors
  10. ${GetOptions} $0 "/includespecial" $1
  11. ${IfNotThen} ${Errors} ${|} StrCpy $IsSpecialMode 1 ${|}
  12. FunctionEnd
  13.  
  14. Page InstFiles
  15.  
  16. Section
  17. SetOutPath "$instdir"
  18. ${If} $IsSpecialMode <> 0
  19.     File "${__FILE__}"
  20. ${EndIf}
  21. SectionEnd