-
-
Save bossfight/5cf2969b46f99f6115345081a7c60bc3 to your computer and use it in GitHub Desktop.
Guild Wars 2 arcdps - update script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
:: MIT License | |
:: | |
:: Copyright (c) 2018 DevineDestiny.1209 | |
:: | |
:: Permission is hereby granted, free of charge, to any person obtaining a copy | |
:: of this software and associated documentation files (the "Software"), to deal | |
:: in the Software without restriction, including without limitation the rights | |
:: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
:: copies of the Software, and to permit persons to whom the Software is | |
:: furnished to do so, subject to the following conditions: | |
:: | |
:: The above copyright notice and this permission notice shall be included in all | |
:: copies or substantial portions of the Software. | |
:: | |
:: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
:: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
:: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
:: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
:: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
:: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
:: SOFTWARE. | |
:: This is an update-script for arcdps. (arcdps requires 64-Bit Gw2) | |
:: It will compare your arcdps file with the arcdps file on the deltaconnected-server | |
:: and update your file if both files are not the same. It will also update your | |
:: buildtemplate and/or reshade-chainload dll-files if configured to do so. | |
:: | |
:: In most cases you will only need configure the User Config-section. If the file | |
:: location on the server changes, you can update the Path Config-section to fix the | |
:: script | |
:: | |
:: You can reach me in-game: DevineDestiny.1209 | |
:: This script is MIT licensed. | |
:: User Config | |
SET GW2_PATH=C:\Path\To\Guild Wars 2 | |
SET CHAINLOAD=no | |
SET START_GW=no | |
SET GW2LAUNCHBUDDY=no | |
:: Path Config | |
SET TEMP_FILENAME=arc.md5 | |
SET ARCURL=https://www.deltaconnected.com/arcdps/x64/ | |
SET ARCDPS=%ARCURL%/d3d9.dll | |
SET ARCMD5=%ARCURL%/d3d9.dll.md5sum | |
SET ARCCHAINLOAD=%ARCURL%/reshade_loader/d3d9_chainload.dll | |
:: Script | |
SETLOCAL enabledelayedexpansion | |
ECHO Updating arcdps... | |
SET DLLARC="%GW2_PATH%\bin64\d3d9.dll" | |
:: >> Set this to d3d9_chainload_noex.dll if using noex | |
SET DLLCHAINLOAD="%GW2_PATH%\bin64\d3d9_chainload.dll" | |
:: - Download latest md5 | |
ECHO - Download latest md5sum | |
curl -s %ARCMD5% > %TEMP_FILENAME% | |
SET /p MD5_FILE=<"%TEMP_FILENAME%" | |
SET LATEST_MD5=%MD5_FILE:~0,32% | |
DEL %TEMP_FILENAME% | |
:: - Calculate md5 from local arcdps-file | |
ECHO - Calculate md5 from local arcdps-file | |
SET /a count=1 | |
FOR /f "skip=1 delims=:" %%a IN ('certutil -hashfile %DLLARC% MD5') DO ( | |
IF !count! equ 1 SET "CURRENT_MD5=%%a" | |
SET/a count+=1 | |
) | |
SET "CURRENT_MD5=%CURRENT_MD5: =% | |
:: - compare both md5 and re-download arcdps if necessary | |
ECHO - Compare md5's | |
IF NOT %CURRENT_MD5% == %LATEST_MD5% ( | |
ECHO - Arcdps outdated, downloading new version | |
curl -s %ARCDPS% > %DLLARC% | |
IF %GW2LAUNCHBUDDY% == yes ( | |
ECHO - Copying arcdps to main gw2 folder | |
COPY %DLLARC% "%GW2_PATH%" | |
) | |
IF %CHAINLOAD% == yes ( | |
ECHO - Downloading chainload | |
curl -s %ARCCHAINLOAD% > %DLLCHAINLOAD% | |
) | |
) | |
ECHO Arcdps up to date! | |
IF %START_GW% == yes ( | |
ECHO Starting Guild Wars 2... | |
START "" "%GW2_PATH%\Gw2-64.exe" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment