12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #!/bin/bash
- if [[ ! -e "GenshinImpact.exe" ]]; then
- echo "-- GenshinImpact executable not found. Wrong directory?"
- exit 1
- fi
- # Restore files that have a backup
- FILE="UnityPlayer.dll"
- CEXE="GenshinImpact_Data/upload_crash.exe"
- XLUA="GenshinImpact_Data/Plugins/xlua.dll"
- if [[ -e "$FILE.bak" ]]; then
- # Restore from backup
- mv -f "$FILE.bak" "$FILE"
- echo "-- Restored $FILE"
- else
- echo "-- Nothing to restore for '$FILE' (no .bak file)"
- fi
- if [[ -e "$CEXE" ]]; then
- echo "-- Crash reporter already exists"
- else
- if [[ -e "$CEXE.bak" ]]; then
- # Restore from backup
- mv -f "$CEXE.bak" "$CEXE"
- echo "-- Restored the crash reporter"
- else
- echo "-- Cannot restore '$CEXE' (.bak not found)"
- fi
- fi
- if [[ -e "$XLUA.bak" ]]; then
- # Restore from backup
- mv -f "$XLUA.bak" "$XLUA"
- echo "-- Restored $XLUA"
- else
- echo "-- Nothing to restore for '$XLUA' (no .bak file)"
- fi
- echo "-- Removing all newly added files"
- # The error messages for inexistent files are intended
- rm "launcher.bat"
- rm "mhyprot2_running.reg"
- # xlua patch
- rm "no message"
- # dxvk files
- rm *.dxvk-cache
- rm *_d3d9.log
- rm *_d3d11.log
- rm *_dxgi.log
- echo "==> Patch reverted."
- exit 0
|