install.nsi 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #setup vars
  2. Name "PhotoBunny"
  3. OutFile "setup.exe"
  4. InstallDir "$PROGRAMFILES\PhotoBunny"
  5. RequestExecutionLevel highest
  6. SetCompressor /SOLID lzma
  7. #version stuff
  8. VIAddVersionKey "ProductName" "PhotoBunny"
  9. VIAddVersionKey "CompanyName" "GwillzCorp"
  10. VIAddVersionKey "LegalTrademarks" "Licensed under GPL 3.0"
  11. VIAddVersionKey "LegalCopyright" "© Gwilyn Saunders"
  12. VIAddVersionKey "FileDescription" "Setup installer for PhotoBunny"
  13. VIAddVersionKey "FileVersion" "1.4"
  14. VIAddVersionKey "ProductVersion" "1.4.0.4"
  15. VIProductVersion "1.4.0.4"
  16. LicenseData "..\GPL3.txt"
  17. DirText "Select somewhere to install and junk"
  18. #imports
  19. !include "LogicLib.nsh"
  20. !include "Sections.nsh"
  21. #layout
  22. Page license
  23. Page directory
  24. Page instfiles
  25. UninstPage uninstConfirm
  26. UninstPage instfiles
  27. #default section
  28. Section "Common Files (Required)"
  29. SectionIn RO
  30. SetOutPath $INSTDIR
  31. #copy files
  32. File "photobunny.exe"
  33. File "$%QTDIR%\bin\Qt5Core.dll"
  34. File "$%QTDIR%\bin\Qt5Gui.dll"
  35. File "$%QTDIR%\bin\Qt5Multimedia.dll"
  36. File "$%QTDIR%\bin\Qt5MultimediaWidgets.dll"
  37. File "$%QTDIR%\bin\Qt5Network.dll"
  38. File "$%QTDIR%\bin\Qt5OpenGL.dll"
  39. File "$%QTDIR%\bin\Qt5Positioning.dll"
  40. File "$%QTDIR%\bin\Qt5PrintSupport.dll"
  41. File "$%QTDIR%\bin\Qt5Qml.dll"
  42. File "$%QTDIR%\bin\Qt5Quick.dll"
  43. File "$%QTDIR%\bin\Qt5Sensors.dll"
  44. File "$%QTDIR%\bin\Qt5Sql.dll"
  45. File "$%QTDIR%\bin\Qt5WebKit.dll"
  46. File "$%QTDIR%\bin\Qt5WebKitWidgets.dll"
  47. File "$%QTDIR%\bin\Qt5Widgets.dll"
  48. File "$%QTDIR%\bin\libgcc_s_dw2-1.dll"
  49. File "$%QTDIR%\bin\libstdc++-6.dll"
  50. File "$%QTDIR%\bin\libwinpthread-1.dll"
  51. File "$%QTDIR%\bin\icuin52.dll"
  52. File "$%QTDIR%\bin\icudt52.dll"
  53. File "$%QTDIR%\bin\icuuc52.dll"
  54. File "ssleay32.dll"
  55. File "libeay32.dll"
  56. File "..\GPL3.txt"
  57. CreateDirectory "$INSTDIR\imageformats"
  58. SetOutPath "$INSTDIR\imageformats"
  59. File "$%QTDIR%\plugins\imageformats\qjpeg.dll"
  60. CreateDirectory "$INSTDIR\platforms"
  61. SetOutPath "$INSTDIR\platforms"
  62. File "$%QTDIR%\plugins\platforms\qwindows.dll"
  63. #create uninstaller
  64. WriteUninstaller "$INSTDIR\uninstall.exe"
  65. #create shortcuts
  66. CreateDirectory "$SMPROGRAMS\Gwillz"
  67. CreateDirectory "$SMPROGRAMS\Gwillz\PhotoBunny"
  68. CreateShortCut "$SMPROGRAMS\Gwillz\PhotoBunny\PhotoBunny.lnk" "$INSTDIR\photobunny.exe"
  69. CreateShortCut "$SMPROGRAMS\Gwillz\PhotoBunny\Licence.lnk" "$INSTDIR\GPL3.txt"
  70. CreateShortCut "$SMPROGRAMS\Gwillz\PhotoBunny\Uninstall.lnk" "$INSTDIR\uninstall.exe"
  71. SectionEnd
  72. Section "Source Files"
  73. SectionIn 1
  74. SetOutPath "$INSTDIR\src"
  75. CreateDirectory "$INSTDIR\src"
  76. File "..\*.h"
  77. File "..\*.cpp"
  78. File "..\*.pro"
  79. File "..\*.qrc"
  80. File "..\*.rc"
  81. File "..\*.png"
  82. SectionEnd
  83. #uninstall section
  84. Section "Uninstall"
  85. #remove program files
  86. Delete "$INSTDIR\photobunny.exe"
  87. Delete "$INSTDIR\*.dll"
  88. Delete "$INSTDIR\GPL3.txt"
  89. Delete "$INSTDIR\uninstall.exe"
  90. Delete "$INSTDIR\imageformats\*"
  91. Delete "$INSTDIR\platforms\*"
  92. RMDir "$INSTDIR"
  93. #remove shortcut files
  94. Delete "$SMPROGRAMS\Gwillz\PhotoBunny\PhotoBunny.lnk"
  95. Delete "$SMPROGRAMS\Gwillz\PhotoBunny\Licence.lnk"
  96. Delete "$SMPROGRAMS\Gwillz\PhotoBunny\Uninstall.lnk"
  97. RMDir "$SMPROGRAMS\Gwillz\PhotoBunny"
  98. SectionEnd