Skip to content

Commit

Permalink
lutris-wine v0.67
Browse files Browse the repository at this point in the history
  • Loading branch information
VHSgunzo committed Mar 5, 2022
1 parent a7b6de9 commit bd26bbb
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 7 deletions.
3 changes: 2 additions & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: VHSgunzo <vhsgunzo.github.io>
pkgname=lutris-wine-git
pkgver=0.66
pkgver=0.67
pkgrel=1
pkgdesc='Easy launch of your Windows applications and games with Wine/Proton'
arch=('any')
Expand Down Expand Up @@ -68,5 +68,6 @@ package() {
install -Dm644 usr/share/lutris-wine/db/DOOMEternalx64vk.lwdb ${pkgdir}/usr/share/lutris-wine/db/DOOMEternalx64vk.lwdb
install -Dm644 usr/share/lutris-wine/db/nvapi64-tests.lwdb ${pkgdir}/usr/share/lutris-wine/db/nvapi64-tests.lwdb
install -Dm644 usr/share/lutris-wine/gif/league-of-legends.gif ${pkgdir}/usr/share/lutris-wine/gif/league-of-legends.gif
install -Dm644 usr/share/lutris-wine/db/GenshinImpact.lwdb ${pkgdir}/usr/share/lutris-wine/db/GenshinImpact.lwdb
install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/lutris-wine/LICENSE
}
4 changes: 1 addition & 3 deletions usr/bin/lutris-wine
Original file line number Diff line number Diff line change
Expand Up @@ -1889,8 +1889,8 @@ lu_run() {
echo -en "$(cat "$TMP_DEB" 2>/dev/null)\n$PRINT_VARS\n"
$RUN_FPSLIMIT $RUN_SINGLE_CPU $RUN_GAMEMODE $RUN_MANGOHUD "$WINE" $RUN_VDESKTOP "$@" $EXE_ARG
fi
post_launch &>/dev/null
unset LD_LIBRARY_PATH
post_launch &>/dev/null
stop_loadbar
compositor_sw 2>/dev/null
gamma_sw 2>/dev/null
Expand Down Expand Up @@ -3372,8 +3372,6 @@ lu_winemgr() {
unset WINEINUSEDEL WDEL_SET
lu_winemgr
fi
else
print_info notify "Wine removing completed!"
fi
fi
if [[ "$PLU_INST" == 1 || "$PGE_INST" == 1 || "$WGE_INST" == 1 || "$PK4_INST" == 1 ]]
Expand Down
104 changes: 104 additions & 0 deletions usr/share/lutris-wine/db/GenshinImpact.lwdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#!/bin/bash
check_win_version '10'

check_deps() {
if [ -z "$(which xdelta3 2>/dev/null)" ]
then
print_error yad "xdelta3 not found in your system! Install xdelta3 in your system! \nArch-based: sudo pacman -S xdelta3"
return 1
fi
}

check_gi_patch() {
DIR="$WINEPREFIX/drive_c/Program Files/gi_patch"
if [ ! -d "$DIR" ]
then
if try_download "https://github.com/VHSgunzo/gi_patch/releases/download/v1/gi_patch.tar.gz" "$WINEPREFIX/drive_c/Program Files"
then
if unpack_tar_gz "$DIR.tar.gz" "$WINEPREFIX/drive_c/Program Files"
then
try_rm "$DIR.tar.gz" &>/dev/null
return 0
else
try_rm "$DIR"* &>/dev/null
return 1
fi
else
return 1
fi
fi
}

launch_helper() {
DATADIR=$(find -type d -name "*_Data")
FILE="UnityPlayer.dll"
CEXE1="$DATADIR/upload_crash.exe"
CEXE2="$DATADIR/Plugins/crashreport.exe"
sum=($(md5sum $FILE))
if [ "$sum" == "e1291ef7269feb9dcb1873e7096050c2" ]
then
print_info notify "Patch is already applied!"
else
if [ "${sum}" == "c61817c8246b018ba028b579a12a5a19" ]; then
reltype="os"
print_info notify "Applying patch for: International (OS) version"
else
print_error yad "Wrong file version\nmd5sum: ${sum}"
return 1
fi
if print_question "Hereby you are violating the game's Terms of Service! \nDo you accept the risk and possible consequences?"
then
print_info notify "Setting up blocked servers"
if [ -z "$(grep "Genshin logging servers" /etc/hosts)" ]; then
print_info yad "Blocking logging servers in /etc/hosts\n\n0.0.0.0 log-upload-os.mihoyo.com\n0.0.0.0 overseauspider.yuanshen.com"
pkexec sh -c 'echo -e "\n# Genshin logging servers (do not remove!)\n0.0.0.0 log-upload-os.mihoyo.com\n0.0.0.0 overseauspider.yuanshen.com\n" >> /etc/hosts'
else
print_info notify "Logging servers are already blocked. Skip."
fi
if [ -z "$(grep "Optional Unity proxy" /etc/hosts)" ]; then
if print_question "Blocking common Unity proxy/cdn servers in /etc/hosts\nIf issues arise in other games consider commenting a few lines to check what makes the difference.\n\n0.0.0.0 prd-lender.cdp.internal.unity3d.com\n0.0.0.0 thind-prd-knob.data.ie.unity3d.com\n0.0.0.0 thind-gke-usc.prd.data.corp.unity3d.com\n0.0.0.0 cdp.cloud.unity3d.com\n0.0.0.0 remote-config-proxy-prd.uca.cloud.unity3d.com\n\nBlock Unity proxy/cdn servers?"
then
pkexec sh -c 'echo -e "# Optional Unity proxy/cdn servers\n0.0.0.0 prd-lender.cdp.internal.unity3d.com\n0.0.0.0 thind-prd-knob.data.ie.unity3d.com\n0.0.0.0 thind-gke-usc.prd.data.corp.unity3d.com\n0.0.0.0 cdp.cloud.unity3d.com\n0.0.0.0 remote-config-proxy-prd.uca.cloud.unity3d.com\n" >> /etc/hosts'
fi
else
print_info notify "Unity proxy/cdn servers are already blocked. Skip."
fi
print_info notify "Renaming the crash reporter(s)"
if [[ -e "$CEXE1" ]]; then
try_mv "$CEXE1" "$CEXE1.bak"
fi
if [[ -e "$CEXE2" ]]; then
try_mv "$CEXE2" "$CEXE2.bak"
fi
try_cp "$DIR/mhyprot2_running.reg" ./
print_info notify "Patching UnityPlayer"
try_mv "$FILE" "$FILE.bak"
if xdelta3 -d -s "$FILE.bak" "$DIR/unityplayer_patch_${reltype}.vcdiff" "$FILE"
then
print_info notify "Patch applied! Enjoy the game."
else
try_mv "$FILE.bak" "$FILE"
return 1
fi
else
return 1
fi
fi
[ ! -f "$WINEPREFIX/drive_c/users/$USER/Temp/mhyprot2.Sys" ] && try_cp "mhyprot2.Sys" "$WINEPREFIX/drive_c/users/$USER/Temp/"
$WINE regedit mhyprot2_running.reg >/dev/null 2>&1
}

if check_deps
then
if check_gi_patch
then
if ! launch_helper
then
lu_exit
fi
else
lu_exit
fi
else
lu_exit
fi
5 changes: 2 additions & 3 deletions usr/share/lutris-wine/db/LeagueClient.lwdb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ check_deps() {
then
dialog --warning --text="Install openssl in your system!"
return 1

fi
}

dialog() {
zenity "$@" --window-icon="$DEFICO" --width="400" --title="League of Legends compatibility check"
zenity "$@" --window-icon="$DEFICO" --width="400" --title="Lutris Wine LOL compatibility check"
}

final_check() {
Expand Down Expand Up @@ -76,7 +75,7 @@ syscall_check() {
launch_helper() {
GIF_FILE="/usr/share/lutris-wine/gif/league-of-legends.gif"
yad --picture --filename="$GIF_FILE" --no-buttons --undecorated --center --skip-taskbar --on-top \
--width="$(file "$GIF_FILE"|awk '{print $7 + 20}')" --height="$(file "$GIF_FILE"|awk '{print $9 + 20}')" $ENVKEY &>/dev/null &
--width="$(file "$GIF_FILE"|awk '{print $7 + 20}')" --height="$(file "$GIF_FILE"|awk '{print $9 + 20}')" $ENVKEY Lutris Wine &>/dev/null &
LOADBARPID="$(pgrep -fa yad|grep "$(basename "$GIF_FILE")"|grep "$ENVKEY"|awk '{print$1}')"
process=LeagueClientUx.exe
uxpid=$(timeout 4m sh -c "until pidof ${process}; do sleep 1; done")
Expand Down

0 comments on commit bd26bbb

Please sign in to comment.