Advertisement
QuantumWarpCode

4x4 Revo Installer V3

Mar 22nd, 2015
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Made by Elopus001
  2. ;Last edited March 22nd of 2015
  3.  
  4. ;variable declaration and include statements
  5. !include MUI2.nsh
  6.  
  7. ;this line is used by some editors at compilation
  8. !define MAKENSIS "C:\Program Files (x86)\NSIS\makensis.exe"
  9.  
  10. !define FULL_VERSION "Rev 011 Beta 4"
  11. !define SOURCE_DIR "C:\4x4Revo"
  12. !define INSTALLER_FILENAME "C:\4x4Revo\PatchInstaller"
  13. !define COMPANY_NAME ""
  14. !define COPYRIGHT "(c)Copyright 2015"
  15. !define FILE_DESC "${FULL_VERSION}"
  16.  
  17. ;original 4x4 evo stuff
  18. ;!define ORIGINAL_LICENSE_NAME "License.txt"
  19. ;No license file
  20. !define ORIGINAL_README_NAME "readme.txt"
  21.  
  22. ;!define LICENSE_NAME "License.txt"
  23. ;No license file
  24. ;!define README_NAME "Readme.txt"
  25. ;No readme file
  26.  
  27. !define ICON_FILE "revo.ico"
  28. !define IMAGE_FINISHED "Runner_finish.bmp"
  29. !define IMAGE_HEADER "Runner_header.bmp"
  30.  
  31. !define PRODUCT_NAME "4x4 Revo"
  32. !define APP_NAME "${PRODUCT_NAME}"
  33. !define SHORT_NAME "${PRODUCT_NAME}"
  34.  
  35. !define MIN_FRA_MAJOR "011"
  36. ;version of patch
  37. !define MIN_FRA_MINOR "beta4"
  38. ;build of patch
  39. !define MIN_FRA_BUILD "3"
  40. ;build of executable
  41.  
  42. ;forces Vista into compliance
  43. RequestExecutionLevel user
  44.  
  45. ;and the actual code
  46.  
  47. ;use /SOLID for slightly higher compression ratios
  48. ;its slower though and provides less output
  49. ;SetCompressor /SOLID lzma
  50. SetCompressor lzma
  51.  
  52. Name "${APP_NAME}"
  53. Caption "${APP_NAME}"
  54. BrandingText "${APP_NAME}"
  55.  
  56. OutFile "${INSTALLER_FILENAME}_${MIN_FRA_MAJOR}_${MIN_FRA_MINOR}_${MIN_FRA_BUILD}.exe"
  57. InstallDir "C:\Program Files\Terminal Reality\4x4Revo"
  58.  
  59. ;some graphics stuff
  60. !define MUI_HEADERIMAGE
  61. !define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
  62. !define MUI_ICON "${ICON_FILE}"
  63. !define MUI_UNICON "${ICON_FILE}"
  64. !define MUI_WELCOMEFINISHPAGE_BITMAP "${IMAGE_FINISHED}"
  65. !define MUI_HEADERIMAGE_BITMAP "${IMAGE_HEADER}"
  66. !define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
  67.  
  68. ;the gui code
  69.  
  70. !insertmacro MUI_PAGE_WELCOME
  71. ;!insertmacro MUI_PAGE_LICENSE "${LICENSE_NAME}"
  72. !insertmacro MUI_PAGE_COMPONENTS
  73. !insertmacro MUI_PAGE_DIRECTORY
  74. !insertmacro MUI_PAGE_INSTFILES
  75.         !define MUI_FINISHPAGE_NOAUTOCLOSE
  76.         !define MUI_FINISHPAGE_RUN_TEXT "Start 4x4Evo2"
  77.         !define MUI_FINISHPAGE_RUN "$INSTDIR\4x4Evo2.exe"
  78.         !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt"
  79.         !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
  80.         !define MUI_FINISHPAGE_LINK "Click here to visit us."
  81.         !define MUI_FINISHPAGE_LINK_LOCATION "http://www.4x4evolution.com"
  82. !insertmacro MUI_PAGE_FINISH
  83.  
  84. UninstPage uninstConfirm
  85. UninstPage instfiles
  86.  
  87. !insertmacro MUI_LANGUAGE "English"
  88.  
  89. ;install components
  90.  
  91. Section  "4x4 Evo2"
  92.         SectionIn RO
  93.     SetOutPath $INSTDIR
  94.     ;File "${ORIGINAL_LICENSE_NAME}"
  95.     File "${ORIGINAL_README_NAME}"
  96.     File /r "${SOURCE_DIR}\base\*.*"
  97.         WriteUninstaller "uninstall.exe"
  98. SectionEnd
  99.  
  100. Section  "4x4 Evo2 Trucks"
  101.     SetOutPath $INSTDIR
  102.     File /r "${SOURCE_DIR}\baseTrucks\*.*"
  103.         WriteUninstaller "uninstall.exe"
  104. SectionEnd
  105.  
  106. Section  "4x4 Revo Patch"
  107.     SetOutPath $INSTDIR
  108.     ;File "${LICENSE_NAME}"
  109.     ;File "${README_NAME}"
  110.     File /r "${SOURCE_DIR}\patch\*.*"
  111. SectionEnd
  112.  
  113. Section  "4x4 Revo Patch Trucks"
  114.     SetOutPath $INSTDIR
  115.     File /r "${SOURCE_DIR}\patchTrucks\*.*"
  116. SectionEnd
  117.  
  118. ;uncomment to allow users to install zip of patch
  119. ;Section  "4x4 Revo Patch RAR"
  120. ;   SetOutPath $INSTDIR
  121. ;   File /r "${SOURCE_DIR}\zip\*"
  122. ;SectionEnd
  123.  
  124. Section "Start Menu Shortcuts"
  125.         CreateDirectory "$SMPROGRAMS\${APP_NAME}"
  126.         CreateShortCut "$SMPROGRAMS\${APP_NAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
  127.         CreateShortCut "$SMPROGRAMS\${APP_NAME}\4x4Evo2.lnk" "$INSTDIR\4x4Evo2.exe" "" "$INSTDIR\4x4Evo2.exe"
  128.         ;CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} License.lnk" "notepad.exe" "$INSTDIR\License.txt"
  129.         ;CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} Readme.lnk" "notepad.exe" "$INSTDIR\Readme.txt"
  130. SectionEnd
  131.  
  132. Section /o "Desktop shortcut"
  133.         CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\4x4Evo2.exe" ""
  134. SectionEnd
  135.  
  136. Section "Revo Patch Start Menu Shortcuts"
  137.         CreateDirectory "$SMPROGRAMS\${APP_NAME}"
  138.         CreateShortCut "$SMPROGRAMS\${APP_NAME}\4x4Revo.lnk" "$INSTDIR\4x4Revo.exe" "" "$INSTDIR\4x4Revo.exe"
  139.         ;CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} License.lnk" "notepad.exe" "$INSTDIR\License.txt"
  140.         ;CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} Readme.lnk" "notepad.exe" "$INSTDIR\Readme.txt"
  141. SectionEnd
  142.  
  143. Section /o "Revo Patch Desktop shortcut"
  144.         CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\4x4Revo.exe" ""
  145. SectionEnd
  146.  
  147. ; Uninstaller
  148. Section "Uninstall"
  149.         RMDir /r "$INSTDIR"
  150.         Delete "$DESKTOP\4x4Evo2.lnk"
  151.         Delete "$DESKTOP\4x4Revo.lnk"
  152.         Delete "$SMPROGRAMS\${APP_NAME}\*.*"
  153.         RMDir "$SMPROGRAMS\${APP_NAME}"
  154.         RMDir "$INSTDIR"
  155. SectionEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement