;Script by Dirtbiker0, and Dygear ;Plugind ;---------------------------------------- !include "MUI.nsh" !include "NSISdl.nsh" !include "ZipDLL.nsh" ;Info ;---------------------------------------- Name "Updates" BrandingText "By Dirtbiker0, and Dygear" ;Pages ;---------------------------------------- !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH ;Defines ;----------------------------------------- !define MUI_ABORTWARNING !define MUI_ICON "C:\Documents and Settings\James\My Documents\Project\amx.ico" ;Language ;----------------------------------------- !insertmacro MUI_LANGUAGE "English" ;Install options ;----------------------------------------- OutFile "Amx.exe" InstallDir "C:\Sierra\Counter-strike\cstrike" ShowInstDetails show ;Files ;----------------------------------------- SubSection "Metamod and Plugins" SEC1 Section "Metamod" SEC2 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/metamod/metamod.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded" "metamod.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\metamod.zip" "$INSTDIR" ClearErrors FileOpen $0 "$INSTDIR\liblist.gam" "r" GetTempFileName $R0 FileOpen $1 $R0 "w" loop: FileRead $0 $2 IfErrors done1 StrCmp $2 "gamedll$\r$\n" 0 +3 FileWrite $1 "gamedll addons/metamod/dlls/metamod.dll$\r$\n" Goto loop StrCmp $2 "gamedll" 0 +3 FileWrite $1 'gamedll "addons/metamod/dlls/metamod.dll"' Goto loop FileWrite $1 $2 Goto loop done1: FileClose $0 FileClose $1 Delete "$INSTDIR\liblist.gam" CopyFiles /SILENT $R0 "$INSTDIR\liblist.gam" Delete $R0 Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 3000 done: Pop $R0 WriteINIStr "$INSTDIR\addons\downloaded\installed.ini" "Metamod" "Version" "1.16.2" Delete "$INSTDIR\addons\downloaded\metamod.zip" SectionEnd SubsectionEnd SubSection "Installers" SECA1 ;Installers for AMX Section "AMX 0.9.6j" SECA2 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/installers/amx.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded" "amx.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" FileOpen $4 "$INSTDIR\addons\metamod\plugins.ini" a ;The file u want to edit FileSeek $4 0 END FileWrite $4 "$\r$\n" ; we write a new line FileWrite $4 "win32 addons/amx/dlls/amx_mm.dll" FileWrite $4 "$\r$\n" ; we write an extra line FileClose $4 ; and close the file !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\amx.zip" "$INSTDIR" Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Quit error: DetailPrint "Download error" done: Pop $R0 Delete "$INSTDIR\addons\downloaded\amx.zip" SectionEnd SubSectionEnd SubSection "Modules" SECB1 ;All Modules for AMX Section "Vexd" SECB2 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/modules/vexd.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded\" "vexd.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\vexd.zip" "$INSTDIR" FileOpen $4 "$INSTDIR\addons\amx\modules.ini" a ;The file u want to edit FileSeek $4 0 END FileWrite $4 "$\r$\n" ; we write a new line FileWrite $4 "addons/amx/dlls/VexdUM_mm.dll" FileWrite $4 "$\r$\n" ; we write an extra line FileClose $4 ; and close the file Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 2000 done: Pop $R0 Delete "$INSTDIR\addons\downloaded\vexd.zip" SectionEnd Section "Xtrafun" SECB3 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/modules/xtrafun.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded\" "xtrafun.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\xtrafun.zip" "$INSTDIR" FileOpen $4 "$INSTDIR\addons\amx\modules.ini" a ;The file u want to edit FileSeek $4 0 END FileWrite $4 "$\r$\n" ; we write a new line FileWrite $4 "addons/amx/dlls/xtrafun_mm.dll" FileWrite $4 "$\r$\n" ; we write an extra line FileClose $4 ; and close the file Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 2000 done: DetailPrint "Xtra Fun Module successfully installed" Pop $R0 Delete "$INSTDIR\addons\downloaded\xtrafun.zip" SectionEnd Section "JGHG" SECB4 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/modules/jghg.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded\" "jghg.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\jghg.zip" "$INSTDIR" FileOpen $4 "$INSTDIR\addons\amx\modules.ini" a ;The file u want to edit FileSeek $4 0 END FileWrite $4 "$\r$\n" ; we write a new line FileWrite $4 "addons/amx/dlls/jghg_mm.dll" FileWrite $4 "$\r$\n" ; we write an extra line FileClose $4 ; and close the file Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 2000 done: DetailPrint "JGHG Module is successfully installed" Pop $R0 Delete "$INSTDIR\addons\downloaded\jghg.zip" SectionEnd Section "Warcraft 3" SECB5 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/modules/war3.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded\" "war3.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\war3.zip" "$INSTDIR" FileOpen $4 "$INSTDIR\addons\amx\modules.ini" a ;The file u want to edit FileSeek $4 0 END FileWrite $4 "$\r$\n" ; we write a new line FileWrite $4 "addons/amx/dlls/war3_mm.dll" FileWrite $4 "$\r$\n" ; we write an extra line FileClose $4 ; and close the file FileOpen $4 "$INSTDIR\addons\amx\plugins\plugins.ini" a ;The file u want to edit FileSeek $4 0 END FileWrite $4 "$\r$\n" ; we write a new line FileWrite $4 "warcraft3.amx" FileWrite $4 "$\r$\n" ; we write an extra line FileClose $4 ; and close the file Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 2000 done: DetailPrint "Warcraft 3 Module and plugin is successfully installed" Pop $R0 Delete "$INSTDIR\addons\downloaded\war3.zip" SectionEnd Section "UDP" SECB6 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/modules/udp.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded\" "udp.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\udp.zip" "$INSTDIR" FileOpen $4 "$INSTDIR\addons\amx\modules.ini" a ;The file u want to edit FileSeek $4 0 END FileWrite $4 "$\r$\n" ; we write a new line FileWrite $4 "addons/amx/dlls/udp.dll" FileWrite $4 "$\r$\n" ; we write an extra line FileClose $4 ; and close the file Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 2000 done: DetailPrint "UDP Module is successfully installed" Pop $R0 Delete "$INSTDIR\addons\downloaded\udp.zip" SectionEnd Section "Fun" SECB7 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/modules/fun.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded\" "fun.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\fun.zip" "$INSTDIR" Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 2000 done: DetailPrint "Fun Module is successfully installed" Pop $R0 Delete "$INSTDIR\addons\downloaded\fun.zip" SectionEnd Section "CSSTATS" SECB8 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/modules/csstats.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded\" "csstats.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\csstats.zip" "$INSTDIR" Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 2000 done: DetailPrint "CSSTATS Module is successfully installed" Pop $R0 Delete "$INSTDIR\addons\downloaded\csstats.zip" SectionEnd Section "Multi-Threading" SECB9 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/modules/multithreading.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded\" "multithreading.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\multithreading.zip" "$INSTDIR" FileOpen $4 "$INSTDIR\addons\amx\modules.ini" a ;The file u want to edit FileSeek $4 0 END FileWrite $4 "$\r$\n" ; we write a new line FileWrite $4 "addons/amx/dlls/mthread.dll" FileWrite $4 "$\r$\n" ; we write an extra line FileClose $4 ; and close the file Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 2000 done: DetailPrint "Multi-Threading Module is successfully installed" Pop $R0 Delete "$INSTDIR\addons\downloaded\multithreading.zip" SectionEnd Section "MySQL" SECB10 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/modules/mysql.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded\" "mysql.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\mysql.zip" "$INSTDIR" FileOpen $4 "$INSTDIR\addons\amx\modules.ini" a ;The file u want to edit FileSeek $4 0 END FileWrite $4 "$\r$\n" ; we write a new line FileWrite $4 "addons/amx/dlls/mysql.dll" FileWrite $4 "$\r$\n" ; we write an extra line FileClose $4 ; and close the file Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 2000 done: DetailPrint "MySQL Module is successfully installed" Pop $R0 Delete "$INSTDIR\addons\downloaded\mysql.zip" SectionEnd Section "Cmath" SECB11 !insertmacro URLS_START Push "http://www.pro-hosted.com/dygear/modules/cmath.zip" ;url1 !insertmacro URLS_END Push $R0 !insertmacro jumpto_NSISdl "" "" "$INSTDIR\addons\downloaded\" "cmath.zip" "success" "cancelled" "error" success: DetailPrint "Download successfull" !insertmacro MUI_ZIPDLL_EXTRACTALL "$INSTDIR\addons\downloaded\cmath.zip" "$INSTDIR" FileOpen $4 "$INSTDIR\addons\amx\modules.ini" a ;The file u want to edit FileSeek $4 0 END FileWrite $4 "$\r$\n" ; we write a new line FileWrite $4 "addons/amx/dlls/cmath.dll" FileWrite $4 "$\r$\n" ; we write an extra line FileClose $4 ; and close the file Goto done cancelled: DetailPrint "Download cancelled, installation will abort in 5 seconds" Sleep 5000 Quit error: DetailPrint "Download error" Sleep 2000 done: DetailPrint "Cmath Module is successfully installed" Pop $R0 Delete "$INSTDIR\addons\downloaded\cmath.zip" SectionEnd SubSectionEnd SubSection "Plugins" SECC1 ;All plugins for AMX SubSectionEnd ;Description ;----------------------------------------- !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SEC1} "This section contains metamod and metamod plugins" !insertmacro MUI_DESCRIPTION_TEXT ${SEC2} "This will install metamod for steam by Will Day" !insertmacro MUI_DESCRIPTION_TEXT ${SECA1} "This section will give u a list of installers and will install AMX for you." !insertmacro MUI_DESCRIPTION_TEXT ${SECA2} "This will download and install AMX 0.9.6j By OLO, installer made by Dygear" !insertmacro MUI_DESCRIPTION_TEXT ${SECB1} "Modules to expand the functionality of AMX" !insertmacro MUI_DESCRIPTION_TEXT ${SECB2} "made for sfx, By Vexd" !insertmacro MUI_DESCRIPTION_TEXT ${SECB3} "This is a module that is meant to add more fun functions, By SpaceDude" !insertmacro MUI_DESCRIPTION_TEXT ${SECB4} "You can push/pull any player and weapon, By Johnny Got His Gun" !insertmacro MUI_DESCRIPTION_TEXT ${SECB5} "Warcraft 3 module and plugin by SpaceDude" !insertmacro MUI_DESCRIPTION_TEXT ${SECB6} "UDP module by OLO" !insertmacro MUI_DESCRIPTION_TEXT ${SECB7} "Updated fun module by OLO" !insertmacro MUI_DESCRIPTION_TEXT ${SECB8} "Updated CSSTATS Module by OLO" !insertmacro MUI_DESCRIPTION_TEXT ${SECB9} "This module allows to determine an IP address' country, By djeyl" !insertmacro MUI_DESCRIPTION_TEXT ${SECB10} "MySQL by OLO" !insertmacro MUI_DESCRIPTION_TEXT ${SECB11} "extends amxmod to provide complex mathematical functions from your run-of-the-mill C/C++ math header, By jonathans" !insertmacro MUI_DESCRIPTION_TEXT ${SECC1} "Plugins" !insertmacro MUI_FUNCTION_DESCRIPTION_END