Open Source Snapmatic picture and Savegame viewer/editor for GTA V https://gta5view.syping.de/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gta5view.nsi 9.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. ######################################################################
  2. !define APP_NAME "gta5view"
  3. !define COMP_NAME "Syping"
  4. !define WEB_SITE "https://gta5view.syping.de/"
  5. !define VERSION "1.6.1.0"
  6. !define COPYRIGHT "Copyright © 2016-2018 Syping"
  7. !define DESCRIPTION "Grand Theft Auto V Savegame and Snapmatic Viewer/Editor"
  8. !define INSTALLER_NAME "gta5view_setup.exe"
  9. !define MAIN_APP_EXE "gta5view.exe"
  10. !define INSTALL_TYPE "SetShellVarContext all"
  11. !define REG_ROOT "HKLM"
  12. !define REG_APP_PATH "Software\Microsoft\Windows\CurrentVersion\App Paths\${MAIN_APP_EXE}"
  13. !define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
  14. !define LICENSE_TXT "../LICENSE"
  15. ######################################################################
  16. VIProductVersion "${VERSION}"
  17. VIAddVersionKey "ProductName" "${APP_NAME}"
  18. VIAddVersionKey "ProductVersion" "${VERSION}"
  19. VIAddVersionKey "CompanyName" "${COMP_NAME}"
  20. VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
  21. VIAddVersionKey "FileDescription" "${DESCRIPTION}"
  22. VIAddVersionKey "FileVersion" "${VERSION}"
  23. ######################################################################
  24. !include "x64.nsh"
  25. SetCompressor LZMA
  26. Name "${APP_NAME}"
  27. Caption "${APP_NAME}"
  28. OutFile "${INSTALLER_NAME}"
  29. #BrandingText "${APP_NAME}"
  30. XPStyle on
  31. InstallDirRegKey "${REG_ROOT}" "${REG_APP_PATH}" ""
  32. InstallDir "$PROGRAMFILES64\Syping\gta5view"
  33. ######################################################################
  34. !include "MUI2.nsh"
  35. !define MUI_ABORTWARNING
  36. !define MUI_UNABORTWARNING
  37. !define MUI_LANGDLL_REGISTRY_ROOT "${REG_ROOT}"
  38. !define MUI_LANGDLL_REGISTRY_KEY "${UNINSTALL_PATH}"
  39. !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
  40. !insertmacro MUI_PAGE_WELCOME
  41. !ifdef LICENSE_TXT
  42. !insertmacro MUI_PAGE_LICENSE "${LICENSE_TXT}"
  43. !endif
  44. !insertmacro MUI_PAGE_DIRECTORY
  45. !ifdef REG_START_MENU
  46. !define MUI_STARTMENUPAGE_NODISABLE
  47. !define MUI_STARTMENUPAGE_DEFAULTFOLDER "gta5view"
  48. !define MUI_STARTMENUPAGE_REGISTRY_ROOT "${REG_ROOT}"
  49. !define MUI_STARTMENUPAGE_REGISTRY_KEY "${UNINSTALL_PATH}"
  50. !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${REG_START_MENU}"
  51. !insertmacro MUI_PAGE_STARTMENU Application $SM_Folder
  52. !endif
  53. !insertmacro MUI_PAGE_INSTFILES
  54. !define MUI_FINISHPAGE_RUN "$INSTDIR\${MAIN_APP_EXE}"
  55. !insertmacro MUI_PAGE_FINISH
  56. !insertmacro MUI_UNPAGE_CONFIRM
  57. !insertmacro MUI_UNPAGE_INSTFILES
  58. !insertmacro MUI_UNPAGE_FINISH
  59. !insertmacro MUI_LANGUAGE "English"
  60. !insertmacro MUI_LANGUAGE "French"
  61. !insertmacro MUI_LANGUAGE "German"
  62. !insertmacro MUI_LANGUAGE "Russian"
  63. !insertmacro MUI_LANGUAGE "Ukrainian"
  64. !insertmacro MUI_LANGUAGE "TradChinese"
  65. !insertmacro MUI_RESERVEFILE_LANGDLL
  66. ######################################################################
  67. Function .onInit
  68. !insertmacro MUI_LANGDLL_DISPLAY
  69. !ifdef WIN32
  70. MessageBox MB_OK|MB_ICONSTOP "Windows 32-Bit is not supported anymore!"
  71. Quit
  72. !endif
  73. SetRegView 64
  74. FunctionEnd
  75. ######################################################################
  76. Section -MainProgram
  77. ${INSTALL_TYPE}
  78. SetOverwrite ifnewer
  79. SetOutPath "$INSTDIR"
  80. File "../build/release/gta5view.exe"
  81. File "/usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/libgcc_s_seh-1.dll"
  82. File "/usr/lib/gcc/x86_64-w64-mingw32/6.3-win32/libstdc++-6.dll"
  83. File "/opt/windev/libressl-latest_qt64d/bin/libcrypto-43.dll"
  84. File "/opt/windev/libressl-latest_qt64d/bin/libssl-45.dll"
  85. File "/opt/windev/libjpeg-turbo-latest_qt64d/bin/libjpeg-62.dll"
  86. File "/opt/windev/qt64d-latest/bin/Qt5Core.dll"
  87. File "/opt/windev/qt64d-latest/bin/Qt5Gui.dll"
  88. File "/opt/windev/qt64d-latest/bin/Qt5Network.dll"
  89. File "/opt/windev/qt64d-latest/bin/Qt5Svg.dll"
  90. File "/opt/windev/qt64d-latest/bin/Qt5Widgets.dll"
  91. File "/opt/windev/qt64d-latest/bin/Qt5WinExtras.dll"
  92. SetOutPath "$INSTDIR\lang"
  93. File "../res/gta5sync_en_US.qm"
  94. File "../res/gta5sync_de.qm"
  95. File "../res/gta5sync_fr.qm"
  96. File "../res/gta5sync_ru.qm"
  97. File "../res/gta5sync_uk.qm"
  98. File "../res/gta5sync_zh_TW.qm"
  99. File "../res/qtbase_en_GB.qm"
  100. File "../res/qtbase_de.qm"
  101. File "../res/qtbase_fr.qm"
  102. File "../res/qtbase_ru.qm"
  103. File "../res/qtbase_uk.qm"
  104. File "../res/qtbase_zh_TW.qm"
  105. SetOutPath "$INSTDIR\audio"
  106. File "/opt/windev/qt64d-latest/plugins/audio/qtaudio_windows.dll"
  107. SetOutPath "$INSTDIR\imageformats"
  108. File "/opt/windev/qt64d-latest/plugins/imageformats/qgif.dll"
  109. File "/opt/windev/qt64d-latest/plugins/imageformats/qicns.dll"
  110. File "/opt/windev/qt64d-latest/plugins/imageformats/qico.dll"
  111. File "/opt/windev/qt64d-latest/plugins/imageformats/qjpeg.dll"
  112. File "/opt/windev/qt64d-latest/plugins/imageformats/qsvg.dll"
  113. File "/opt/windev/qt64d-latest/plugins/imageformats/qtga.dll"
  114. File "/opt/windev/qt64d-latest/plugins/imageformats/qtiff.dll"
  115. File "/opt/windev/qt64d-latest/plugins/imageformats/qwbmp.dll"
  116. File "/opt/windev/qt64d-latest/plugins/imageformats/qwebp.dll"
  117. SetOutPath "$INSTDIR\platforms"
  118. File "/opt/windev/qt64d-latest/plugins/platforms/qwindows.dll"
  119. SetOutPath "$INSTDIR\styles"
  120. File "/opt/windev/qt64d-latest/plugins/styles/qcleanlooksstyle.dll"
  121. File "/opt/windev/qt64d-latest/plugins/styles/qplastiquestyle.dll"
  122. SectionEnd
  123. ######################################################################
  124. Section -Icons_Reg
  125. SetOutPath "$INSTDIR"
  126. WriteUninstaller "$INSTDIR\uninstall.exe"
  127. !ifdef REG_START_MENU
  128. !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  129. CreateDirectory "$SMPROGRAMS\$SM_Folder"
  130. CreateShortCut "$SMPROGRAMS\$SM_Folder\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
  131. CreateShortCut "$SMPROGRAMS\$SM_Folder\Uninstall ${APP_NAME}.lnk" "$INSTDIR\uninstall.exe"
  132. !ifdef WEB_SITE
  133. WriteIniStr "$INSTDIR\${APP_NAME} website.url" "InternetShortcut" "URL" "${WEB_SITE}"
  134. CreateShortCut "$SMPROGRAMS\$SM_Folder\gta5view Website.lnk" "$INSTDIR\${APP_NAME} website.url"
  135. !endif
  136. !insertmacro MUI_STARTMENU_WRITE_END
  137. !endif
  138. !ifndef REG_START_MENU
  139. CreateDirectory "$SMPROGRAMS\gta5view"
  140. CreateShortCut "$SMPROGRAMS\gta5view\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
  141. CreateShortCut "$SMPROGRAMS\gta5view\Uninstall ${APP_NAME}.lnk" "$INSTDIR\uninstall.exe"
  142. !ifdef WEB_SITE
  143. WriteIniStr "$INSTDIR\${APP_NAME} website.url" "InternetShortcut" "URL" "${WEB_SITE}"
  144. CreateShortCut "$SMPROGRAMS\gta5view\gta5view Website.lnk" "$INSTDIR\${APP_NAME} website.url"
  145. !endif
  146. !endif
  147. WriteRegStr ${REG_ROOT} "${REG_APP_PATH}" "" "$INSTDIR\${MAIN_APP_EXE}"
  148. WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayName" "${APP_NAME}"
  149. WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "UninstallString" "$INSTDIR\uninstall.exe"
  150. WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${MAIN_APP_EXE}"
  151. WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}"
  152. WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "Publisher" "${COMP_NAME}"
  153. !ifdef WEB_SITE
  154. WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "URLInfoAbout" "${WEB_SITE}"
  155. !endif
  156. SectionEnd
  157. ######################################################################
  158. Section Uninstall
  159. ${INSTALL_TYPE}
  160. Delete "$INSTDIR\gta5view.exe"
  161. Delete "$INSTDIR\libgcc_s_seh-1.dll"
  162. Delete "$INSTDIR\libstdc++-6.dll"
  163. Delete "$INSTDIR\libcrypto-43.dll"
  164. Delete "$INSTDIR\libssl-45.dll"
  165. Delete "$INSTDIR\libjpeg-62.dll"
  166. Delete "$INSTDIR\Qt5Core.dll"
  167. Delete "$INSTDIR\Qt5Gui.dll"
  168. Delete "$INSTDIR\Qt5Network.dll"
  169. Delete "$INSTDIR\Qt5Svg.dll"
  170. Delete "$INSTDIR\Qt5Widgets.dll"
  171. Delete "$INSTDIR\Qt5WinExtras.dll"
  172. Delete "$INSTDIR\lang\gta5sync_en_US.qm"
  173. Delete "$INSTDIR\lang\gta5sync_de.qm"
  174. Delete "$INSTDIR\lang\gta5sync_fr.qm"
  175. Delete "$INSTDIR\lang\gta5sync_ru.qm"
  176. Delete "$INSTDIR\lang\gta5sync_uk.qm"
  177. Delete "$INSTDIR\lang\gta5sync_zh_TW.qm"
  178. Delete "$INSTDIR\lang\qtbase_en_GB.qm"
  179. Delete "$INSTDIR\lang\qtbase_de.qm"
  180. Delete "$INSTDIR\lang\qtbase_fr.qm"
  181. Delete "$INSTDIR\lang\qtbase_ru.qm"
  182. Delete "$INSTDIR\lang\qtbase_uk.qm"
  183. Delete "$INSTDIR\lang\qtbase_zh_TW.qm"
  184. Delete "$INSTDIR\audio\qtaudio_windows.dll"
  185. Delete "$INSTDIR\imageformats\qgif.dll"
  186. Delete "$INSTDIR\imageformats\qicns.dll"
  187. Delete "$INSTDIR\imageformats\qico.dll"
  188. Delete "$INSTDIR\imageformats\qjpeg.dll"
  189. Delete "$INSTDIR\imageformats\qsvg.dll"
  190. Delete "$INSTDIR\imageformats\qtga.dll"
  191. Delete "$INSTDIR\imageformats\qtiff.dll"
  192. Delete "$INSTDIR\imageformats\qwbmp.dll"
  193. Delete "$INSTDIR\imageformats\qwebp.dll"
  194. Delete "$INSTDIR\platforms\qwindows.dll"
  195. Delete "$INSTDIR\styles\qcleanlooksstyle.dll"
  196. Delete "$INSTDIR\styles\qplastiquestyle.dll"
  197. RmDir "$INSTDIR\lang"
  198. RmDir "$INSTDIR\audio"
  199. RmDir "$INSTDIR\imageformats"
  200. RmDir "$INSTDIR\platforms"
  201. RmDir "$INSTDIR\styles"
  202. Delete "$INSTDIR\uninstall.exe"
  203. !ifdef WEB_SITE
  204. Delete "$INSTDIR\${APP_NAME} website.url"
  205. !endif
  206. RmDir "$INSTDIR"
  207. !ifdef REG_START_MENU
  208. !insertmacro MUI_STARTMENU_GETFOLDER "Application" $SM_Folder
  209. Delete "$SMPROGRAMS\$SM_Folder\${APP_NAME}.lnk"
  210. Delete "$SMPROGRAMS\$SM_Folder\Uninstall ${APP_NAME}.lnk"
  211. !ifdef WEB_SITE
  212. Delete "$SMPROGRAMS\$SM_Folder\gta5view Website.lnk"
  213. !endif
  214. RmDir "$SMPROGRAMS\$SM_Folder"
  215. !endif
  216. !ifndef REG_START_MENU
  217. Delete "$SMPROGRAMS\gta5view\${APP_NAME}.lnk"
  218. Delete "$SMPROGRAMS\gta5view\Uninstall ${APP_NAME}.lnk"
  219. !ifdef WEB_SITE
  220. Delete "$SMPROGRAMS\gta5view\gta5view Website.lnk"
  221. !endif
  222. RmDir "$SMPROGRAMS\gta5view"
  223. !endif
  224. DeleteRegKey ${REG_ROOT} "${REG_APP_PATH}"
  225. DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}"
  226. SectionEnd
  227. ######################################################################
  228. Function un.onInit
  229. !insertmacro MUI_UNGETLANGUAGE
  230. SetRegView 64
  231. FunctionEnd
  232. ######################################################################