ffinstall.nsi 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ;NSIS Script For FFmpeg
  2. ;Title Of Your Application
  3. Name "FFmpeg"
  4. CompletedText "FFmpeg install completed! Enjoy your meal!"
  5. ; do a CRC check
  6. CRCCheck On
  7. ; output file name
  8. OutFile "FFinstall.exe"
  9. ; license page introduction
  10. LicenseText "You must agree to this license before installing."
  11. ; license data
  12. LicenseData ".\COPYING"
  13. ; the default installation directory
  14. InstallDir "$PROGRAMFILES\FFmpeg"
  15. ;The text to prompt the user to enter a directory
  16. DirText "Please select the folder below"
  17. Section "Install"
  18. ;Install Files
  19. SetOutPath $INSTDIR
  20. SetCompress Auto
  21. SetOverwrite IfNewer
  22. File ".\ffmpeg.exe"
  23. File ".\SDL.dll"
  24. File ".\ffplay.exe"
  25. File ".\COPYING"
  26. File ".\CREDITS"
  27. ; documentation
  28. SetOutPath $INSTDIR\doc
  29. File ".\doc\faq.html"
  30. File ".\doc\ffmpeg-doc.html"
  31. File ".\doc\ffplay-doc.html"
  32. ; Write the uninstall keys for Windows
  33. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\FFmpeg" "DisplayName" "FFmpeg (remove only)"
  34. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\FFmpeg" "UninstallString" "$INSTDIR\Uninst.exe"
  35. WriteUninstaller "Uninst.exe"
  36. SectionEnd
  37. Section "Shortcuts"
  38. ;Add Shortcuts
  39. SectionEnd
  40. UninstallText "This will uninstall FFmpeg from your system"
  41. Section Uninstall
  42. ; delete files
  43. Delete "$INSTDIR\ffmpeg.exe"
  44. Delete "$INSTDIR\SDL.dll"
  45. Delete "$INSTDIR\ffplay.exe"
  46. Delete "$INSTDIR\COPYING"
  47. Delete "$INSTDIR\CREDITS"
  48. ; delete documentation
  49. Delete "$INSTDIR\doc\faq.html"
  50. Delete "$INSTDIR\ffmpeg-doc.html"
  51. Delete "$INSTDIR\doc\ffplay-doc.html"
  52. RMDir /r $INSTDIR\doc
  53. ; delete uninstaller and unistall registry entries
  54. Delete "$INSTDIR\Uninst.exe"
  55. DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\FFmpeg"
  56. DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FFmpeg"
  57. RMDir "$INSTDIR"
  58. SectionEnd