home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 February / PCWorld_2003-02_cd.bin / Komunik / sambar / sambar53b3.exe / SAMBAR.NSI < prev   
Encoding:
Text File  |  2002-11-26  |  4.3 KB  |  160 lines

  1. !define VER_MAJOR 5
  2. !define VER_MINOR 3
  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}b3.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} Beta 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 "Select a location to install the Sambar Server (WARNING! Installation will override any existing files):"
  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.   File /r syssoap
  59. SectionEnd
  60.  
  61. Section "config (no-overwrite)"
  62.   SectionIn 12
  63.   SetOverwrite off
  64.   SetOutPath $INSTDIR
  65.   File /r config
  66. SectionEnd
  67.  
  68. Section "syshelp (recommended)"
  69.   SectionIn 12
  70.   SetOutPath $INSTDIR
  71.   SetOverwrite on
  72.   File /r syshelp
  73.   File /r search
  74. SectionEnd
  75.  
  76. Section "docs (recommended)"
  77.   SectionIn 12
  78.   SetOverwrite off
  79.   SetOutPath $INSTDIR
  80.   File /r docs
  81. SectionEnd
  82.  
  83. Section "Perl and CGI Samples"
  84.   SectionIn 1
  85.   SetOverwrite off
  86.   SetOutPath $INSTDIR
  87.   File /r cgi-bin
  88.   File /r cgi-win
  89.   File /r perl
  90.   File /r servlets
  91.   SetOutPath $INSTDIR\tmp
  92.   File tmp\index
  93.   File tmp\samples
  94. SectionEnd
  95.  
  96. Section "DLL code Samples"
  97.   SectionIn 1
  98.   SetOutPath $INSTDIR
  99.   SetOverwrite on
  100.   File /r samples
  101. SectionEnd
  102.  
  103. Section "Start Menu + Desktop Icons"
  104.   SectionIn 123
  105.   SetOutPath "$SMPROGRAMS\Sambar Server"
  106.   Delete "$SMPROGRAMS\Sambar Server\Sambar Server ${VER_MAJOR}.${VER_MINOR}.com.lnk"
  107.   Delete "$SMPROGRAMS\Sambar Server\sambar.com.lnk"
  108.   Delete "$SMPROGRAMS\Sambar Server\Documentation.lnk"
  109.   Delete "$SMPROGRAMS\Sambar Server\Installation Directory.lnk"
  110.   WriteINIStr "$SMPROGRAMS\Sambar Server\sambar.com.url" \
  111.               "InternetShortcut" "URL" "http://www.sambar.com/"
  112.   CreateShortCut "$SMPROGRAMS\Sambar Server\README.lnk" \
  113.                  "$INSTDIR\README.TXT"
  114.   CreateShortCut "$SMPROGRAMS\Sambar Server\Documentation.lnk" \
  115.                  "$INSTDIR\syshelp\index.htm"
  116.   CreateShortCut "$SMPROGRAMS\Sambar Server\Installation Directory.lnk" \
  117.                  "$INSTDIR"
  118.   CreateShortCut "$SMPROGRAMS\Sambar Server\Uninstall Sambar.lnk" \
  119.                  "$INSTDIR\uninst-sambar.exe"
  120.   SetOutPath $INSTDIR
  121.   CreateShortCut "$DESKTOP\Sambar Server ${VER_MAJOR}.${VER_MINOR}.lnk" "$INSTDIR\bin\server.exe" '-b'
  122. SectionEnd
  123.  
  124. Section -post
  125.  
  126.   Delete $INSTDIR\uninst-sambar.exe 
  127.   WriteUninstaller $INSTDIR\uninst-sambar.exe
  128. SectionEnd
  129.  
  130. Function .onInstSuccess
  131.   MessageBox MB_YESNO|MB_ICONQUESTION \
  132.              "Setup has completed. View readme file now?" \
  133.              IDNO NoReadme
  134.     ExecShell open '$INSTDIR\readme.txt'
  135.   NoReadme:
  136. FunctionEnd
  137.  
  138. !ifndef NO_UNINST
  139. UninstallText "This will uninstall the Sambar Server from your system:"
  140.  
  141. Section Uninstall
  142.   IfFileExists $INSTDIR\bin\server.exe skip_confirmation
  143.     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
  144.     Abort "Uninstall aborted by user"
  145.   skip_confirmation:
  146.  
  147.   Delete "$SMPROGRAMS\Sambar Server\*.lnk"
  148.   Delete "$SMPROGRAMS\Sambar Server\*.url"
  149.   RMDir "$SMPROGRAMS\Sambar Server"
  150.   Delete "$DESKTOP\Sambar Server ${VER_MAJOR}.${VER_MINOR}.lnk"
  151.   RMDir /r $INSTDIR
  152.  
  153.   IfFileExists $INSTDIR 0 Removed 
  154.     MessageBox MB_OK|MB_ICONEXCLAMATION \
  155.                "Note: $INSTDIR could not be removed."
  156.   Removed:
  157. SectionEnd
  158.  
  159. !endif
  160.