home *** CD-ROM | disk | FTP | other *** search
Wrap
!define VER_MAJOR 5 !define VER_MINOR 1 Name "Sambar Server" Icon "docs\favicon.ico" Caption "Sambar Server ${VER_MAJOR}.${VER_MINOR} Production - Setup" OutFile sambar${VER_MAJOR}${VER_MINOR}p.exe WindowIcon off LicenseText "You must read the following license before installing:" LicenseData license.txt ComponentText "This will install the Sambar Server v${VER_MAJOR}.${VER_MINOR} Production on your computer:" InstType "Full Install" InstType "Compact (no Sample Code)" InstType "Upgrade (Executables Only)" AutoCloseWindow false ShowInstDetails show ShowUninstDetails show DirText "Please select a location to install the Sambar Server (or use the default):" SetOverwrite on SetDateSave on InstallDir $EXEDIR\sambar${VER_MAJOR}${VER_MINOR} Section "README.TXT (required)" SectionIn 123 SetOutPath $INSTDIR SetOverwrite on File readme.txt File install.txt File license.txt File sambar.nsi SectionEnd Section "bin (required)" SectionIn 123 SetOutPath $INSTDIR SetOverwrite on File /r bin File /r lib File /r include SetOverwrite off File /r messages SetOutPath $INSTDIR\tmp File tmp\README.TXT SetOutPath $INSTDIR\log File log\README.TXT SectionEnd Section "sysadmin (required)" SectionIn 123 SetOutPath $INSTDIR SetOverwrite on File /r sysadmin File /r sysimage File /r sysuser SectionEnd Section "config (no-overwrite)" SectionIn 12 SetOverwrite off SetOutPath $INSTDIR File /r config SectionEnd Section "syshelp (recommended)" SectionIn 12 SetOutPath $INSTDIR SetOverwrite on File /r syshelp File /r search SectionEnd Section "docs (recommended)" SectionIn 12 SetOverwrite off SetOutPath $INSTDIR File /r docs SectionEnd Section "Perl and CGI Samples" SectionIn 1 SetOverwrite off SetOutPath $INSTDIR File /r cgi-bin File /r cgi-win File /r perl File /r servlets SetOutPath $INSTDIR\tmp File tmp\index File tmp\samples SectionEnd Section "DLL code Samples" SectionIn 1 SetOutPath $INSTDIR SetOverwrite on File /r samples SectionEnd Section "Start Menu + Desktop Icons" SectionIn 123 SetOutPath "$SMPROGRAMS\Sambar Server" Delete "$SMPROGRAMS\Sambar Server\Sambar Server ${VER_MAJOR}.${VER_MINOR}.com.lnk" Delete "$SMPROGRAMS\Sambar Server\sambar.com.lnk" Delete "$SMPROGRAMS\Sambar Server\Documentation.lnk" Delete "$SMPROGRAMS\Sambar Server\Installation Directory.lnk" WriteINIStr "$SMPROGRAMS\Sambar Server\sambar.com.url" \ "InternetShortcut" "URL" "http://www.sambar.com/" CreateShortCut "$SMPROGRAMS\Sambar Server\README.lnk" \ "$INSTDIR\README.TXT" CreateShortCut "$SMPROGRAMS\Sambar Server\Documentation.lnk" \ "$INSTDIR\syshelp\index.htm" CreateShortCut "$SMPROGRAMS\Sambar Server\Installation Directory.lnk" \ "$INSTDIR" CreateShortCut "$SMPROGRAMS\Sambar Server\Uninstall Sambar.lnk" \ "$INSTDIR\uninst-sambar.exe" SetOutPath $INSTDIR CreateShortCut "$DESKTOP\Sambar Server ${VER_MAJOR}.${VER_MINOR}.lnk" "$INSTDIR\bin\server.exe" '-b' SectionEnd Section -post Delete $INSTDIR\uninst-sambar.exe WriteUninstaller $INSTDIR\uninst-sambar.exe SectionEnd Function .onInstSuccess MessageBox MB_YESNO|MB_ICONQUESTION \ "Setup has completed. View readme file now?" \ IDNO NoReadme ExecShell open '$INSTDIR\readme.txt' NoReadme: FunctionEnd !ifndef NO_UNINST UninstallText "This will uninstall the Sambar Server from your system:" Section Uninstall IfFileExists $INSTDIR\bin\server.exe skip_confirmation 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 Abort "Uninstall aborted by user" skip_confirmation: Delete "$SMPROGRAMS\Sambar Server\*.lnk" Delete "$SMPROGRAMS\Sambar Server\*.url" RMDir "$SMPROGRAMS\Sambar Server" Delete "$DESKTOP\Sambar Server ${VER_MAJOR}.${VER_MINOR}.lnk" RMDir /r $INSTDIR IfFileExists $INSTDIR 0 Removed MessageBox MB_OK|MB_ICONEXCLAMATION \ "Note: $INSTDIR could not be removed." Removed: SectionEnd !endif