Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Script generated by the HM NIS Edit Script Wizard.
- ;============================================================================
- ; Variable Reference
- ; $0 - multipurpose temp variable
- ; $1 - install status: 1=success, 0=fail
- ; $2 - installer version
- ;============================================================================
- ; HM NIS Edit Wizard helper defines
- !define PRODUCT_NAME "ThaneMOD"
- !define PRODUCT_VERSION "1.0A"
- !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
- !define PRODUCT_UNINST_ROOT_KEY "HKLM"
- ;=============================================================================
- ;Include
- ; MUI 1.67 compatible
- !include "MUI.nsh"
- ;InstallOptions for Custom Page
- !include "InstallOptions.nsh"
- ; allow If/Then/Else functionality
- !include "LogicLib.nsh"
- ;===============================================================================
- ; MUI Configuration
- !define MUI_ABORTWARNING
- !define MUI_HEADERIMAGE
- !define MUI_WELCOMEPAGE_TITLE_3LINES
- !define MUI_ICON "..\graphics_docs\icon_v1.ico"
- !define MUI_UNICON "..\graphics_docs\icon_v1.ico"
- !define MUI_HEADERIMAGE_BITMAP "..\graphics_docs\header_v1.bmp"
- !define MUI_HEADERIMAGE_UNBITMAP "..\graphics_docs\header_v1.bmp"
- !define MUI_WELCOMEFINISHPAGE_BITMAP "..\graphics_docs\welcomefinish_v1.bmp"
- !define MUI_UNWELCOMEFINISHPAGE_BITMAP "..\graphics_docs\welcomefinish_v1.bmp"
- !define MUI_WELCOMEPAGE_TITLE "Welcome to the ThaneMOD v1.0A Install Wizard!"
- !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of ThaneMOD.\r\n\r\nBefore proceeding, please open the Installation Guide that came with your download. ThaneMOD is not difficult to install, but process has multiple steps and the procedure will vary by version and user.\r\n\r\nPay special attention to the information on the following pages. It contains important details you should know PRIOR to installing the mod.\r\n\r\nPlease click Next to continue."
- !define MUI_DIRECTORYPAGE_TEXT_TOP "Please verify the installer has correctly detected your Mass Effect 3 installation folder. If the location below is incorrect, please change it manually. Click Install when ready."
- !define MUI_LICENSEPAGE_TEXT_TOP "Please scroll down to read the entire agreement."
- !define MUI_LICENSEPAGE_CHECKBOX_TEXT "WAIT! Have you read the information above? If not, Thane disapproves. Boo."
- !define MUI_COMPONENTSPAGE_TEXT_TOP "ThaneMOD v1.0A contains the items listed below. See the Install Guide and website for more detailed information. Click Next when finished."
- !define MUI_COMPONENTSPAGE_TEXT_COMPLIST "Select components to install. Gray items are required. See the adjacent Descriptions for more details."
- !define MUI_FINISHPAGE_TITLE "Installation Successful!"
- !define MUI_FINISHPAGE_TEXT "You have now completed STEP 3 in the ThaneMOD v1.0A Installation Process.\r\n\r\nRefer to the Installation Guide for your next step. Click Finish to close this window."
- !define MUI_FINISHPAGE_SHOWREADME_TEXT "Important -- you aren't done yet! View Readme PDF."
- ;============================================================================================
- ;Pages
- !insertmacro MUI_PAGE_WELCOME
- ;Page custom TexturesPage
- !define MUI_LICENSEPAGE_CHECKBOX
- !insertmacro MUI_PAGE_LICENSE "..\graphics_docs\license_agreement_v1.rtf"
- !insertmacro MUI_PAGE_COMPONENTS
- !insertmacro MUI_PAGE_DIRECTORY
- !insertmacro MUI_PAGE_INSTFILES
- Page custom CreditsPage
- !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\BIOGame\START_HERE _ThaneMOD_Install_Guide.pdf"
- !insertmacro MUI_UNPAGE_WELCOME
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_PAGE_FINISH
- !insertmacro MUI_UNPAGE_INSTFILES
- ;==============================================================================
- ;Languages
- !insertmacro MUI_LANGUAGE "English"
- ;==============================================================================
- ;Descriptions
- ; Language Strings
- ;LangString TEXTURESPAGE_TITLE ${LANG_ENGLISH} "Important Notice Below"
- ;LangString TEXTURESPAGE_SUBTITLE ${LANG_ENGLISH} "Please read and respond accordingly before continuing with installation of ThaneMOD."
- LangString CREDITSPAGE_TITLE ${LANG_ENGLISH} "Credits"
- LangString CREDITSPAGE_SUBTITLE ${LANG_ENGLISH} "ThaneMOD v1.0 is brought to you by the people below."
- ;==============================================================================
- ;Page Functions
- ;Textures Page Settings
- ;Function TexturesPage
- ;ReserveFile "..\Installer Testing\textures.ini"
- ;!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "..\Installer Testing\textures.ini" "textures"
- ;!insertmacro MUI_HEADER_TEXT $(TEXTURESPAGE_TITLE) $(TEXTURESPAGE_SUBTITLE)
- ;!insertmacro MUI_INSTALLOPTIONS_WRITE "textures" "Field 1" "Text" "..\graphics_docs\stop.bmp"
- ;!insertmacro MUI_INSTALLOPTIONS_DISPLAY "textures"
- ;FunctionEnd
- ;Credits Page Settings
- Function CreditsPage
- ReserveFile "..\Installer Testing\credits.ini"
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "..\Installer Testing\credits.ini" "credits"
- !insertmacro MUI_HEADER_TEXT $(CREDITSPAGE_TITLE) $(CREDITSPAGE_SUBTITLE)
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "credits"
- FunctionEnd
- ;======================================================================================
- ;Installation Parameters
- Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
- OutFile "ThaneMOD_v1A.exe"
- InstallDir "$PROGRAMFILES"
- InstallDirRegKey HKLM "Software\BioWare\Mass Effect 3" "Install Dir"
- ShowInstDetails show
- ShowUnInstDetails show
- Section "Core Module for EC" SEC01
- SectionIn RO
- SetOutPath "$INSTDIR\BIOGame\CookedPCConsole"
- SetOverwrite on
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\Conditionals.cnd" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\Conditionals.cnd" "$INSTDIR\BIOGame\CookedPCConsole\Conditionals.cnd.bu2"
- File "Conditionals.cnd"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_ProMar_750Finale.pcc" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_ProMar_750Finale.pcc" "$INSTDIR\BIOGame\CookedPCConsole\BioD_ProMar_750Finale.pcc.bu2"
- File "BioD_ProMar_750Finale.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_204Kro002_Debrief3_LOC_INT.pcc" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_204Kro002_Debrief3_LOC_INT.pcc" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_204Kro002_Debrief3_LOC_INT.pcc.bu2"
- File "BioD_Nor_204Kro002_Debrief3_LOC_INT.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_001Global.pcc" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_001Global.pcc" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_001Global.pcc.bu2"
- File "BioD_Nor_001Global.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Kro001_100LandingArea.pcc" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Kro001_100LandingArea.pcc" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Kro001_100LandingArea.pcc.bu2"
- File "BioD_Kro001_100LandingArea.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_CitHub_HospitalP3.pcc" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_CitHub_HospitalP3.pcc" "$INSTDIR\BIOGame\CookedPCConsole\BioD_CitHub_HospitalP3.pcc.bu2"
- File "BioD_CitHub_HospitalP3.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos_LOC_INT.pcc" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos_LOC_INT.pcc" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos_LOC_INT.pcc.bu2"
- File "BioD_Cat003_380DesksConvos_LOC_INT.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos.pcc" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos.pcc" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos.pcc.bu2"
- File "BioD_Cat003_380DesksConvos.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_180DocksCop_LOC_INT.pcc" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_180DocksCop_LOC_INT.pcc" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_180DocksCop_LOC_INT.pcc.bu2"
- File "BioD_Cat003_180DocksCop_LOC_INT.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_000LevelTrans_LOC_INT.pcc" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_000LevelTrans_LOC_INT.pcc" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_000LevelTrans_LOC_INT.pcc.bu2"
- File "BioD_Cat003_000LevelTrans_LOC_INT.pcc"
- SetOutPath "$INSTDIR\BIOGame\Movies"
- IfFileExists "$INSTDIR\BIOGame\Movies\ProMar_Smls_Load.bik" +2 0
- Rename "$INSTDIR\BIOGame\Movies\ProMar_Smls_Load.bik" "$INSTDIR\BIOGame\Movies\ProMar_Smls_Load.bik.bu2"
- File "ProMar_Smls_Load.bik"
- IfFileExists "$INSTDIR\BIOGame\Movies\load_f01.bik" +2 0
- Rename "$INSTDIR\BIOGame\Movies\load_f01.bik" "$INSTDIR\BIOGame\Movies\load_f01.bik.bu2"
- File "load_f01.bik"
- IfFileExists "$INSTDIR\BIOGame\Movies\AdvCombat3_PC.bik" +2 0
- Rename "$INSTDIR\BIOGame\Movies\AdvCombat3_PC.bik" "$INSTDIR\BIOGame\Movies\AdvCombat3_PC.bik.bu2"
- File "AdvCombat3_PC.bik"
- IfFileExists "$INSTDIR\BIOGame\Movies\AdvCombat2_PC.bik" +2 0
- Rename "$INSTDIR\BIOGame\Movies\AdvCombat2_PC.bik" "$INSTDIR\BIOGame\Movies\AdvCombat2_PC.bik.bu2"
- File "AdvCombat2_PC.bik"
- IfFileExists "$INSTDIR\BIOGame\Movies\AdvCombat1_PC.bik" +2 0
- Rename "$INSTDIR\BIOGame\Movies\AdvCombat1_PC.bik" "$INSTDIR\BIOGame\Movies\AdvCombat1_PC.bik.bu2"
- File "AdvCombat1_PC.bik"
- SectionEnd
- Section "50+ Saves" SEC02
- SetOutPath "$INSTDIR\BIOGame\CookedPCConsole"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\SFXGame.pcc" +2 0
- Rename "$INSTDIR\BIOGame\CookedPCConsole\SFXGame.pcc" "$INSTDIR\BIOGame\CookedPCConsole\SFXGame.pcc.bu2"
- File "SFXGame.pcc"
- SectionEnd
- Section "Readme" SEC03
- SectionIn RO
- SetOutPath "$INSTDIR\BIOGame"
- File "..\ThaneMOD_v1.0_Base\START_HERE _ThaneMOD_Install_Guide.pdf"
- SectionEnd
- ;======================================================================================
- ; Writing to the registry
- Section -Post
- WriteUninstaller "$INSTDIR\BIOGame\UNINSTALL_ThaneMOD_v1A.exe"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\BIOGame\UNINSTALL_ThaneMOD_v1A.exe"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
- SectionEnd
- ;======================================================================================
- ; Section descriptions, rollover text
- !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Requires the ME3 Extended Cut DLC. Simplest version of ThaneMOD. Thane is not present for the coup and returns in the epilogue, similar to other ME2 squadmates."
- !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Optional. Allows the player to have over 50 saves in a playthrough."
- !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Required. ThaneMOD Installation Guide...you should already have this open!"
- !insertmacro MUI_FUNCTION_DESCRIPTION_END
- ;======================================================================================
- ; Install/Unisntall Functions
- Function un.onUninstSuccess
- HideWindow
- MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
- FunctionEnd
- ;Function un.onInit
- ; MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
- ; Abort
- ;FunctionEnd
- ;======================================================================================
- ; Uninstallation
- Section Uninstall
- IfFileExists "$INSTDIR\BIOGame\UNINSTALL_ThaneMOD_v1A.exe" 0 +2
- Delete "$INSTDIR\BIOGame\UNINSTALL_ThaneMOD_v1A.exe"
- IfFileExists "$INSTDIR\BIOGame\START_HERE _ThaneMOD_Install_Guide.pdf" 0 +2
- Delete "$INSTDIR\BIOGame\START_HERE _ThaneMOD_Install_Guide.pdf"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\SFXGame.pcc.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\SFXGame.pcc"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\SFXGame.pcc.bu2" "$INSTDIR\BIOGame\CookedPCConsole\SFXGame.pcc"
- IfFileExists "$INSTDIR\BIOGame\Movies\AdvCombat1_PC.bik.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\Movies\AdvCombat1_PC.bik"
- Rename "$INSTDIR\BIOGame\Movies\AdvCombat1_PC.bik.bu2" "$INSTDIR\BIOGame\Movies\AdvCombat1_PC.bik"
- IfFileExists "$INSTDIR\BIOGame\Movies\AdvCombat2_PC.bik.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\Movies\AdvCombat2_PC.bik"
- Rename "$INSTDIR\BIOGame\Movies\AdvCombat2_PC.bik.bu2" "$INSTDIR\BIOGame\Movies\AdvCombat2_PC.bik"
- IfFileExists "$INSTDIR\BIOGame\Movies\AdvCombat3_PC.bik.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\Movies\AdvCombat3_PC.bik"
- Rename "$INSTDIR\BIOGame\Movies\AdvCombat3_PC.bik.bu2" "$INSTDIR\BIOGame\Movies\AdvCombat3_PC.bik"
- IfFileExists "$INSTDIR\BIOGame\Movies\load_f01.bik.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\Movies\load_f01.bik"
- Rename "$INSTDIR\BIOGame\Movies\load_f01.bik.bu2" "$INSTDIR\BIOGame\Movies\load_f01.bik"
- IfFileExists "$INSTDIR\BIOGame\Movies\ProMar_Smls_Load.bik.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\Movies\ProMar_Smls_Load.bik"
- Rename "$INSTDIR\BIOGame\Movies\ProMar_Smls_Load.bik.bu2" "$INSTDIR\BIOGame\Movies\ProMar_Smls_Load.bik"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_000LevelTrans_LOC_INT.pcc.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_000LevelTrans_LOC_INT.pcc"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_000LevelTrans_LOC_INT.pcc.bu2" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_000LevelTrans_LOC_INT.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_180DocksCop_LOC_INT.pcc.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_180DocksCop_LOC_INT.pcc"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_180DocksCop_LOC_INT.pcc.bu2" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_180DocksCop_LOC_INT.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos.pcc.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos.pcc"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos.pcc.bu2" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos_LOC_INT.pcc.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos_LOC_INT.pcc"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos_LOC_INT.pcc.bu2" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Cat003_380DesksConvos_LOC_INT.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_CitHub_HospitalP3.pcc.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\BioD_CitHub_HospitalP3.pcc"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_CitHub_HospitalP3.pcc.bu2" "$INSTDIR\BIOGame\CookedPCConsole\BioD_CitHub_HospitalP3.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Kro001_100LandingArea.pcc.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\BioD_Kro001_100LandingArea.pcc"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Kro001_100LandingArea.pcc.bu2" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Kro001_100LandingArea.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_001Global.pcc.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_001Global.pcc"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_001Global.pcc.bu2" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_001Global.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_204Kro002_Debrief3_LOC_INT.pcc.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_204Kro002_Debrief3_LOC_INT.pcc"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_204Kro002_Debrief3_LOC_INT.pcc.bu2" "$INSTDIR\BIOGame\CookedPCConsole\BioD_Nor_204Kro002_Debrief3_LOC_INT.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\BioD_ProMar_750Finale.pcc.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\BioD_ProMar_750Finale.pcc"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\BioD_ProMar_750Finale.pcc.bu2" "$INSTDIR\BIOGame\CookedPCConsole\BioD_ProMar_750Finale.pcc"
- IfFileExists "$INSTDIR\BIOGame\CookedPCConsole\Conditionals.cnd.bu2" 0 +2
- Delete "$INSTDIR\BIOGame\CookedPCConsole\Conditionals.cnd"
- Rename "$INSTDIR\BIOGame\CookedPCConsole\Conditionals.cnd.bu2" "$INSTDIR\BIOGame\CookedPCConsole\Conditionals.cnd"
- DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
- SetAutoClose true
- SectionEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement