Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Made by Elopus001
- ;Last edited March 22nd of 2015
- ;variable declaration and include statements
- !include MUI2.nsh
- ;this line is used by some editors at compilation
- !define MAKENSIS "C:\Program Files (x86)\NSIS\makensis.exe"
- !define FULL_VERSION "Rev 011 Beta 4"
- !define SOURCE_DIR "C:\4x4Revo"
- !define INSTALLER_FILENAME "C:\4x4Revo\PatchInstaller"
- !define COMPANY_NAME ""
- !define COPYRIGHT "(c)Copyright 2015"
- !define FILE_DESC "${FULL_VERSION}"
- ;original 4x4 evo stuff
- ;!define ORIGINAL_LICENSE_NAME "License.txt"
- ;No license file
- !define ORIGINAL_README_NAME "readme.txt"
- ;!define LICENSE_NAME "License.txt"
- ;No license file
- ;!define README_NAME "Readme.txt"
- ;No readme file
- !define ICON_FILE "revo.ico"
- !define IMAGE_FINISHED "Runner_finish.bmp"
- !define IMAGE_HEADER "Runner_header.bmp"
- !define PRODUCT_NAME "4x4 Revo"
- !define APP_NAME "${PRODUCT_NAME}"
- !define SHORT_NAME "${PRODUCT_NAME}"
- !define MIN_FRA_MAJOR "011"
- ;version of patch
- !define MIN_FRA_MINOR "beta4"
- ;build of patch
- !define MIN_FRA_BUILD "3"
- ;build of executable
- ;forces Vista into compliance
- RequestExecutionLevel user
- ;and the actual code
- ;use /SOLID for slightly higher compression ratios
- ;its slower though and provides less output
- ;SetCompressor /SOLID lzma
- SetCompressor lzma
- Name "${APP_NAME}"
- Caption "${APP_NAME}"
- BrandingText "${APP_NAME}"
- OutFile "${INSTALLER_FILENAME}_${MIN_FRA_MAJOR}_${MIN_FRA_MINOR}_${MIN_FRA_BUILD}.exe"
- InstallDir "C:\Program Files\Terminal Reality\4x4Revo"
- ;some graphics stuff
- !define MUI_HEADERIMAGE
- !define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
- !define MUI_ICON "${ICON_FILE}"
- !define MUI_UNICON "${ICON_FILE}"
- !define MUI_WELCOMEFINISHPAGE_BITMAP "${IMAGE_FINISHED}"
- !define MUI_HEADERIMAGE_BITMAP "${IMAGE_HEADER}"
- !define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
- ;the gui code
- !insertmacro MUI_PAGE_WELCOME
- ;!insertmacro MUI_PAGE_LICENSE "${LICENSE_NAME}"
- !insertmacro MUI_PAGE_COMPONENTS
- !insertmacro MUI_PAGE_DIRECTORY
- !insertmacro MUI_PAGE_INSTFILES
- !define MUI_FINISHPAGE_NOAUTOCLOSE
- !define MUI_FINISHPAGE_RUN_TEXT "Start 4x4Evo2"
- !define MUI_FINISHPAGE_RUN "$INSTDIR\4x4Evo2.exe"
- !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt"
- !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
- !define MUI_FINISHPAGE_LINK "Click here to visit us."
- !define MUI_FINISHPAGE_LINK_LOCATION "http://www.4x4evolution.com"
- !insertmacro MUI_PAGE_FINISH
- UninstPage uninstConfirm
- UninstPage instfiles
- !insertmacro MUI_LANGUAGE "English"
- ;install components
- Section "4x4 Evo2"
- SectionIn RO
- SetOutPath $INSTDIR
- ;File "${ORIGINAL_LICENSE_NAME}"
- File "${ORIGINAL_README_NAME}"
- File /r "${SOURCE_DIR}\base\*.*"
- WriteUninstaller "uninstall.exe"
- SectionEnd
- Section "4x4 Evo2 Trucks"
- SetOutPath $INSTDIR
- File /r "${SOURCE_DIR}\baseTrucks\*.*"
- WriteUninstaller "uninstall.exe"
- SectionEnd
- Section "4x4 Revo Patch"
- SetOutPath $INSTDIR
- ;File "${LICENSE_NAME}"
- ;File "${README_NAME}"
- File /r "${SOURCE_DIR}\patch\*.*"
- SectionEnd
- Section "4x4 Revo Patch Trucks"
- SetOutPath $INSTDIR
- File /r "${SOURCE_DIR}\patchTrucks\*.*"
- SectionEnd
- ;uncomment to allow users to install zip of patch
- ;Section "4x4 Revo Patch RAR"
- ; SetOutPath $INSTDIR
- ; File /r "${SOURCE_DIR}\zip\*"
- ;SectionEnd
- Section "Start Menu Shortcuts"
- CreateDirectory "$SMPROGRAMS\${APP_NAME}"
- CreateShortCut "$SMPROGRAMS\${APP_NAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
- CreateShortCut "$SMPROGRAMS\${APP_NAME}\4x4Evo2.lnk" "$INSTDIR\4x4Evo2.exe" "" "$INSTDIR\4x4Evo2.exe"
- ;CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} License.lnk" "notepad.exe" "$INSTDIR\License.txt"
- ;CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} Readme.lnk" "notepad.exe" "$INSTDIR\Readme.txt"
- SectionEnd
- Section /o "Desktop shortcut"
- CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\4x4Evo2.exe" ""
- SectionEnd
- Section "Revo Patch Start Menu Shortcuts"
- CreateDirectory "$SMPROGRAMS\${APP_NAME}"
- CreateShortCut "$SMPROGRAMS\${APP_NAME}\4x4Revo.lnk" "$INSTDIR\4x4Revo.exe" "" "$INSTDIR\4x4Revo.exe"
- ;CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} License.lnk" "notepad.exe" "$INSTDIR\License.txt"
- ;CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} Readme.lnk" "notepad.exe" "$INSTDIR\Readme.txt"
- SectionEnd
- Section /o "Revo Patch Desktop shortcut"
- CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\4x4Revo.exe" ""
- SectionEnd
- ; Uninstaller
- Section "Uninstall"
- RMDir /r "$INSTDIR"
- Delete "$DESKTOP\4x4Evo2.lnk"
- Delete "$DESKTOP\4x4Revo.lnk"
- Delete "$SMPROGRAMS\${APP_NAME}\*.*"
- RMDir "$SMPROGRAMS\${APP_NAME}"
- RMDir "$INSTDIR"
- SectionEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement