home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Komunik / sambar / sambar51p.exe / SAMBAR.NSI < prev   
Encoding:
Text File  |  2002-04-01  |  4.2 KB  |  159 lines

  1. !define VER_MAJOR 5
  2. !define VER_MINOR 1
  3.  
  4. Name "Sambar Server"
  5. Icon "docs\favicon.ico"
  6. Caption "Sambar Server ${VER_MAJOR}.${VER_MINOR} Production - Setup"
  7. OutFile sambar${VER_MAJOR}${VER_MINOR}p.exe
  8.  
  9. WindowIcon off
  10.  
  11. LicenseText "You must read the following license before installing:"
  12. LicenseData license.txt
  13. ComponentText "This will install the Sambar Server v${VER_MAJOR}.${VER_MINOR} Production on your computer:"
  14. InstType "Full Install"
  15. InstType "Compact (no Sample Code)"
  16. InstType "Upgrade (Executables Only)"
  17. AutoCloseWindow false
  18. ShowInstDetails show
  19. ShowUninstDetails show
  20. DirText "Please select a location to install the Sambar Server (or use the default):"
  21. SetOverwrite on
  22. SetDateSave on
  23.  
  24. InstallDir $EXEDIR\sambar${VER_MAJOR}${VER_MINOR}
  25.  
  26. Section "README.TXT (required)"
  27.   SectionIn 123
  28.   SetOutPath $INSTDIR
  29.   SetOverwrite on
  30.   File readme.txt
  31.   File install.txt
  32.   File license.txt
  33.   File sambar.nsi
  34. SectionEnd
  35.  
  36. Section "bin (required)"
  37.   SectionIn 123
  38.   SetOutPath $INSTDIR
  39.   SetOverwrite on
  40.   File /r bin
  41.   File /r lib
  42.   File /r include
  43.   SetOverwrite off
  44.   File /r messages
  45.   SetOutPath $INSTDIR\tmp
  46.   File tmp\README.TXT
  47.   SetOutPath $INSTDIR\log
  48.   File log\README.TXT
  49. SectionEnd
  50.  
  51. Section "sysadmin (required)"
  52.   SectionIn 123
  53.   SetOutPath $INSTDIR
  54.   SetOverwrite on
  55.   File /r sysadmin
  56.   File /r sysimage
  57.   File /r sysuser
  58. SectionEnd
  59.  
  60. Section "config (no-overwrite)"
  61.   SectionIn 12
  62.   SetOverwrite off
  63.   SetOutPath $INSTDIR
  64.   File /r config
  65. SectionEnd
  66.  
  67. Section "syshelp (recommended)"
  68.   SectionIn 12
  69.   SetOutPath $INSTDIR
  70.   SetOverwrite on
  71.   File /r syshelp
  72.   File /r search
  73. SectionEnd
  74.  
  75. Section "docs (recommended)"
  76.   SectionIn 12
  77.   SetOverwrite off
  78.   SetOutPath $INSTDIR
  79.   File /r docs
  80. SectionEnd
  81.  
  82. Section "Perl and CGI Samples"
  83.   SectionIn 1
  84.   SetOverwrite off
  85.   SetOutPath $INSTDIR
  86.   File /r cgi-bin
  87.   File /r cgi-win
  88.   File /r perl
  89.   File /r servlets
  90.   SetOutPath $INSTDIR\tmp
  91.   File tmp\index
  92.   File tmp\samples
  93. SectionEnd
  94.  
  95. Section "DLL code Samples"
  96.   SectionIn 1
  97.   SetOutPath $INSTDIR
  98.   SetOverwrite on
  99.   File /r samples
  100. SectionEnd
  101.  
  102. Section "Start Menu + Desktop Icons"
  103.   SectionIn 123
  104.   SetOutPath "$SMPROGRAMS\Sambar Server"
  105.   Delete "$SMPROGRAMS\Sambar Server\Sambar Server ${VER_MAJOR}.${VER_MINOR}.com.lnk"
  106.   Delete "$SMPROGRAMS\Sambar Server\sambar.com.lnk"
  107.   Delete "$SMPROGRAMS\Sambar Server\Documentation.lnk"
  108.   Delete "$SMPROGRAMS\Sambar Server\Installation Directory.lnk"
  109.   WriteINIStr "$SMPROGRAMS\Sambar Server\sambar.com.url" \
  110.               "InternetShortcut" "URL" "http://www.sambar.com/"
  111.   CreateShortCut "$SMPROGRAMS\Sambar Server\README.lnk" \
  112.                  "$INSTDIR\README.TXT"
  113.   CreateShortCut "$SMPROGRAMS\Sambar Server\Documentation.lnk" \
  114.                  "$INSTDIR\syshelp\index.htm"
  115.   CreateShortCut "$SMPROGRAMS\Sambar Server\Installation Directory.lnk" \
  116.                  "$INSTDIR"
  117.   CreateShortCut "$SMPROGRAMS\Sambar Server\Uninstall Sambar.lnk" \
  118.                  "$INSTDIR\uninst-sambar.exe"
  119.   SetOutPath $INSTDIR
  120.   CreateShortCut "$DESKTOP\Sambar Server ${VER_MAJOR}.${VER_MINOR}.lnk" "$INSTDIR\bin\server.exe" '-b'
  121. SectionEnd
  122.  
  123. Section -post
  124.  
  125.   Delete $INSTDIR\uninst-sambar.exe 
  126.   WriteUninstaller $INSTDIR\uninst-sambar.exe
  127. SectionEnd
  128.  
  129. Function .onInstSuccess
  130.   MessageBox MB_YESNO|MB_ICONQUESTION \
  131.              "Setup has completed. View readme file now?" \
  132.              IDNO NoReadme
  133.     ExecShell open '$INSTDIR\readme.txt'
  134.   NoReadme:
  135. FunctionEnd
  136.  
  137. !ifndef NO_UNINST
  138. UninstallText "This will uninstall the Sambar Server from your system:"
  139.  
  140. Section Uninstall
  141.   IfFileExists $INSTDIR\bin\server.exe skip_confirmation
  142.     MessageBox MB_YESNO "It does not appear that the Sambar Server is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)" IDYES skip_confirmation
  143.     Abort "Uninstall aborted by user"
  144.   skip_confirmation:
  145.  
  146.   Delete "$SMPROGRAMS\Sambar Server\*.lnk"
  147.   Delete "$SMPROGRAMS\Sambar Server\*.url"
  148.   RMDir "$SMPROGRAMS\Sambar Server"
  149.   Delete "$DESKTOP\Sambar Server ${VER_MAJOR}.${VER_MINOR}.lnk"
  150.   RMDir /r $INSTDIR
  151.  
  152.   IfFileExists $INSTDIR 0 Removed 
  153.     MessageBox MB_OK|MB_ICONEXCLAMATION \
  154.                "Note: $INSTDIR could not be removed."
  155.   Removed:
  156. SectionEnd
  157.  
  158. !endif
  159.