install.nsi 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #setup vars
  2. Name "PhotoBunny"
  3. OutFile "setup.exe"
  4. InstallDir "$PROGRAMFILES\PhotoBunny"
  5. RequestExecutionLevel highest
  6. #version stuff
  7. VIAddVersionKey "ProductName" "PhotoBunny"
  8. VIAddVersionKey "CompanyName" "GwillzCorp"
  9. VIAddVersionKey "LegalTrademarks" "Licensed under GPL 3.0"
  10. VIAddVersionKey "LegalCopyright" "© Gwilyn Saunders"
  11. VIAddVersionKey "FileDescription" "Setup installer for PhotoBunny"
  12. VIAddVersionKey "FileVersion" "1.0"
  13. VIAddVersionKey "ProductVersion" "1.0.0.0"
  14. VIProductVersion "1.0.0.0"
  15. LicenseData "installer\GPL3.txt"
  16. DirText "Select somewhere to install and junk"
  17. #imports
  18. !include "LogicLib.nsh"
  19. #layout
  20. Page license
  21. Page directory
  22. Page instfiles
  23. UninstPage uninstConfirm
  24. UninstPage instfiles
  25. #default section
  26. Section "Common Files (Required)"
  27. SectionIn RO
  28. SetOutPath $INSTDIR
  29. #copy files
  30. File "build\release\PhotoBunny.exe"
  31. File "installer\QtCore4.dll"
  32. File "installer\QtGui4.dll"
  33. File "installer\QtNetwork4.dll"
  34. File "installer\QtWebKit4.dll"
  35. File "installer\qjson.dll"
  36. File "installer\libeay32.dll"
  37. File "installer\ssleay32.dll"
  38. File "installer\vcredist_sp1_x86.exe"
  39. File "installer\GPL3.txt"
  40. #Check for 32bit VC2010 on a 32bit system
  41. ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed"
  42. ${If} $0 == ""
  43. #then check on a 64bit system
  44. ReadRegDWORD $1 HKLM "SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x86" "Installed"
  45. ${If} $1 == ""
  46. ExecWait "$INSTDIR\vcredist_sp1_x86.exe"
  47. ${EndIf}
  48. ${EndIf}
  49. #create uninstaller
  50. WriteUninstaller "$INSTDIR\uninstall.exe"
  51. #create shortcuts
  52. CreateDirectory "$SMPROGRAMS\PhotoBunny"
  53. CreateShortCut "$SMPROGRAMS\PhotoBunny\PhotoBunny.lnk" "$INSTDIR\PhotoBunny.exe"
  54. CreateShortCut "$SMPROGRAMS\PhotoBunny\Licence.lnk" "$INSTDIR\GPL3.txt"
  55. CreateShortCut "$SMPROGRAMS\PhotoBunny\Uninstall.lnk" "$INSTDIR\uninstall.exe"
  56. SectionEnd
  57. #uninstall section
  58. Section "Uninstall"
  59. #remove program files
  60. Delete "$INSTDIR\PhotoBunny.exe"
  61. Delete "$INSTDIR\QtCore4.dll"
  62. Delete "$INSTDIR\QtGui4.dll"
  63. Delete "$INSTDIR\QtNetwork4.dll"
  64. Delete "$INSTDIR\QtWebKit4.dll"
  65. Delete "$INSTDIR\qjson.dll"
  66. Delete "$INSTDIR\libeay32.dll"
  67. Delete "$INSTDIR\ssleay32.dll"
  68. Delete "$INSTDIR\GPL3.txt"
  69. Delete "$INSTDIR\uninstall.exe"
  70. #remove shortcut files
  71. Delete "$SMPROGRAMS\PhotoBunny\PhotoBunny.lnk"
  72. Delete "$SMPROGRAMS\PhotoBunny\Licence.lnk"
  73. Delete "$SMPROGRAMS\PhotoBunny\Uninstall.lnk"
  74. RMDir "$SMPROGRAMS\PhotoBunny"
  75. SectionEnd