Last active
March 6, 2025 13:31
-
-
Save pirpyn/58dcce2e80f9edb7cf3d674627b39101 to your computer and use it in GitHub Desktop.
Install the Elden Ring Coop mod by saving this script (download zip) and execute it
This file contains hidden or 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 | |
setlocal | |
for /f "usebackq tokens=1,2,*" %%B IN (`reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop`) do set DESKTOP=%%D | |
for /f %%i in ('echo %DESKTOP%') do set DESKTOP=%%i | |
if NOT EXIST "%DESKTOP%/" ( | |
echo error: Desktop not found | |
goto :END | |
) | |
echo Desktop found at %DESKTOP% | |
cd "%APPDATA%" | |
set "version=1.5.1" | |
set "archive=%APPDATA%\eldenringcoop_v%version%.zip" | |
IF NOT EXIST "%archive%" ( | |
echo [1/5] Downloading the mod from Github ^(%version%^) | |
call:Download "https://github.com/LukeYui/EldenRingSeamlessCoopRelease/releases/download/v.%version%/betarealeasecoop%version%.zip" "%archive%" | |
) ELSE ( | |
echo [1/5] %archive% already downloaded | |
) | |
if NOT EXIST "%archive%" ( | |
echo error: Download failed | |
goto :END | |
) | |
set "tempdir=%APPDATA%\eldenringcoop_v%version%" | |
if NOT EXIST "%tempdir%\" ( | |
echo [2/5] Unziping archive | |
powershell Expand-Archive "%archive%" -DestinationPath "%tempdir%" | |
) | |
if NOT EXIST "%tempdir%\" ( | |
echo error: Unziping failed | |
goto :END | |
) | |
set "eldenringdir=C:\Program Files (x86)\Steam\steamapps\common\ELDEN RING\Game" | |
if NOT EXIST "%eldenringdir%\" ( | |
set "eldenringdir=C:\Program Files\Steam\steamapps\common\ELDEN RING\Game" | |
) | |
if NOT EXIST "%eldenringdir%\" ( | |
ECHO error: Elden Ring's Steam folder not found | |
goto :END | |
) | |
if NOT EXIST "%eldenringdir%\launch_elden_ring_seamlesscoop.exe" ( | |
echo [3/5] Moving files to Steam folder | |
xcopy /S "%tempdir%" "%eldenringdir%" | |
) ELSE ( | |
echo [3/5] Updating mod ^(removing old files^) | |
xcopy /Y "%eldenringdir%\SeamlessCoop\seamlesscoopsettings.ini" "%tempdir%\SeamlessCoop\seamlesscoopsettings.ini" | |
rmdir /S /Q "%eldenringdir%\SeamlessCoop" | |
xcopy /Y /S "%tempdir%" "%eldenringdir%" | |
) | |
if NOT EXIST "%eldenringdir%\launch_elden_ring_seamlesscoop.exe" ( | |
echo error: Moving failed | |
goto :END | |
) | |
set "shortcut=%DESKTOP%\Elden Ring Coop.lnk" | |
if NOT EXIST "%shortcut%" ( | |
echo [4/5] Creating Desktop shortcuts | |
call:CreateShortcut "%eldenringdir%\launch_elden_ring_seamlesscoop.exe" "%shortcut%" | |
call:CreateShortcut "%eldenringdir%\SeamlessCoop\seamlesscoopsettings.ini" "%DESKTOP%\Elden Ring Coop Password.lnk" | |
) ELSE ( | |
echo [4/5] Shortcuts created | |
) | |
if NOT EXIST "%shortcut%" ( | |
echo error: Shortcuts creation failed | |
) | |
echo Please set a coop password after 'cooppassword = ' | |
notepad.exe "%eldenringdir%\SeamlessCoop\seamlesscoopsettings.ini" | |
goto :END | |
:CreateShortcut | |
@echo off | |
( | |
echo $SourceFilePath = %1 | |
echo $ShortcutPath = %2 | |
echo $WScriptObj = New-Object -ComObject ^("WScript.Shell"^) | |
echo $shortcut = $WscriptObj.CreateShortcut^($ShortcutPath^) | |
echo $shortcut.TargetPath = $SourceFilePath | |
echo $Shortcut.WorkingDirectory = "%eldenringdir%" | |
echo $shortcut.Save^(^) | |
) > shortcut.ps1 | |
powershell -executionpolicy remotesigned -File shortcut.ps1 | |
del shortcut.ps1 | |
goto :EOF | |
:Download | |
set "URL=%1" | |
set "SaveAs=%2" | |
powershell "Import-Module BitsTransfer; Start-BitsTransfer '%URL%' '%SaveAs%'" | |
goto :EOF | |
:END | |
echo [5/5] Removing temporary files | |
:: if EXIST "%tempdir%" rmdir /S /Q "%tempdir%" | |
echo End of the script | |
pause | |
goto :EOF |
This file contains hidden or 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
#!/bin/bash | |
error() | |
{ | |
echo -e "error: $@" > /dev/stderr | |
msg --error "$@" | |
exit 1 | |
} | |
msg() | |
{ | |
kdialog "$@" 2>/dev/null | |
if [[ $? -ne 0 ]]; then | |
error "Aborted during $@" | |
fi | |
} | |
DESKTOP="$HOME/Desktop" | |
if [[ ! -d "$DESKTOP" ]]; then | |
error "Desktop not found" | |
fi | |
cd /tmp | |
url="https://github.com/LukeYui/EldenRingSeamlessCoopRelease/releases/latest/download/ersc.zip" | |
true_url="$(curl -L -i -s $url | awk '/^location:/ {print $2}' | head -n 1)" | |
version="$(echo $true_url | cut -d '/' -f 8)" | |
archive="/tmp/ersc_${version}.zip" | |
if [[ ! -f $archive ]]; then | |
msg --passivepopup "Telechargement de Elden Ring Seamless Coop (ERSC ${version})" | |
echo "[1/5] Downloading the mod from Github (${version})" | |
wget -q -O "${archive}" "${url}" | |
else | |
echo "[1/5] "${archive}" already downloaded" | |
fi | |
if [[ ! -f "${archive}" ]]; then | |
error "Download failed" | |
fi | |
tempdir="/tmp/ersc_${version}" | |
if [[ ! -d "${tempdir}" ]]; then | |
msg --passivepopup "Extraction des fichiers (ERSC ${version})" | |
echo "[2/5] Unziping archive" | |
# mkdir -p "${tempdir}" | |
unzip "${archive}" -d "${tempdir}" | |
fi | |
if [[ ! -d "${tempdir}" ]]; then | |
error "Unziping failed" | |
fi | |
eldenringdir="$HOME/.steam/steam/steamapps/common/ELDEN RING/Game" | |
if [[ ! -d "${eldenringdir}" ]]; then | |
error "Elden Ring's Steam folder not found" | |
fi | |
launcher="${eldenringdir}/ersc_launcher.exe" | |
if [[ ! -f "${launcher}" ]]; then | |
echo "[3/5] Moving files to Steam folder" | |
cp -r "${tempdir}/." "${eldenringdir}" | |
else | |
echo "[3/5] Updating mod (removing old files)" | |
# diff -q "${eldenringdir}/SeamlessCoop/ersc_settings.ini" "${tempdir}/SeamlessCoop/ersc_settings.ini" && { | |
# kompare "${eldenringdir}/SeamlessCoop/ersc_settings.ini" "${tempdir}/SeamlessCoop/ersc_settings.ini" | |
#} | |
cp "${eldenringdir}/SeamlessCoop/ersc_settings.ini" "${tempdir}/SeamlessCoop" | |
cp -r "${tempdir}" "${eldenringdir}" | |
fi | |
if [[ ! -f "${launcher}" ]]; then | |
error "Moving failed" | |
fi | |
chmod 755 "${launcher}" | |
create_shortcut() | |
{ | |
cat > "$1" << EOF | |
#!/usr/bin/env xdg-open | |
[Desktop Entry] | |
Name=$2 | |
Exec=$3 | |
Icon=${4:-/home/deck/.local/share/icons/emudeck/EmuDeck.png} | |
Terminal=false | |
Type=Application | |
Categories=Game; | |
StartupNotify=false | |
EOF | |
chmod 755 "$1" | |
} | |
shortcut="${DESKTOP}/Elden Ring Coop Password.desktop" | |
if [[ ! -f "${shortcut}" ]]; then | |
msg --passivepopup "Creation du raccourci du fichier de config sur le bureau" | |
echo "[4/5] Creating Desktop shortcuts" | |
# create_shortcut "${shortcut}" "Elden Ring Coop" "${launcher}" "${HOME}/.steam/steam/steam/games/2e048bfc2073ca30804ed5b8c454a9ca0e2f98de.ico" | |
create_shortcut "${shortcut}" "Elden Ring Coop Password" "xdg-open '${eldenringdir}/SeamlessCoop/ersc_settings.ini'" "accessories-text-editor" | |
else | |
echo "[4/5] Shortcuts created" | |
fi | |
if [[ ! -f "${shortcut}" ]]; then | |
error "Shortcuts creation failed" | |
fi | |
echo "Please set a coop password after 'cooppassword = '" | |
msg --msgbox "Definir un mot de passe de session 'cooppassword = ' \nRappel clavier (STEAM)+X" | |
xdg-open "${eldenringdir}/SeamlessCoop/ersc_settings.ini" 2>/dev/null | |
msg --yesno "Mot de passe defini ? ERSC ne demarrera pas sans." | |
echo "Please right click on ${launcher} and add it to steam" | |
msg --msgbox "Faites un clic droit / L2 sur ${launcher} et selectionnez 'Add to steam'" | |
xdg-open "${eldenringdir}" 2>/dev/null | |
msg --yesno "Clic droit / L2 sur ${launcher} et selectionner 'Add to steam' réussi ?" | |
echo "Please launch ersc_launcher.exe with compatibility mode Pronton" | |
msg --msgbox "Changer l'option steam pour ersc_launcher.exe en mode de compatibilité Proton 9.0-4 (clic droit / L2 -> propriétés)" | |
steam | |
msg --yesno "Compatibilité 9.0-4 pour ersc_launcher.exe réussi ? ((clic droit / L2 -> propriétés, cocher la case, valider Proton 9.O-4 )" | |
# echo "[5/5] Removing temporary files" | |
# rm -r "${tempdir}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment