; example
;
; This script is based on project.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install example into a directory that the user selects,



; The name of the installer
Name "example"

; The file to write
OutFile "example.exe"

; The default installation directory
InstallDir $PROGRAMFILES\example

; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)

InstallDirRegKey HKLM "Software\NSIS_project" "Install_Dir"

;---------------------------------------------------------------------------------------------------------------
 Section "Php_detection"

  InetLoad::load "http://www.awitness.org/prophecy.zip" $4
  Pop $0
  StrCmp $0 "OK" dlok
  MessageBox MB_OK|MB_ICONEXCLAMATION "Download Error, click OK to abort installation" /SD IDOK
  Abort
 dlok:
  Detailprint $4
  MessageBox MB_OK "Download complete $4 "


  SectionEnd

 ;-----------------------------------------------------------------------------------------------------------

  ; php-gtk2detection
  Section "gtkdtection"

   InetLoad::load "http://www.programmersheaven.com/d/click.aspx?ID=F107" $4
  Pop $0
  StrCmp $0 "OK" dlok
  MessageBox MB_OK|MB_ICONEXCLAMATION "Download Error, click OK to abort installation" /SD IDOK
  Abort
dlok:
   Detailprint $4
     MessageBox MB_OK "Download complete $4 "
  SectionEnd

  ;-------------------------------------------------------------------------------------------------------------
 ; The stuff to install
Section "file_association"

  SectionIn RO

  ; Set output path to the installation directory.
  SetOutPath $INSTDIR

  ; Put file there
  File  "example.nsi"

  ; Write the installation path into the registry
  WriteRegStr HKLM SOFTWARE\NSIS_example "Install_Dir" "$INSTDIR"

  


SectionEnd



