1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-29 13:52:03 +01:00

fix: merge hotfixes from stable

This commit is contained in:
aclist 2023-02-17 21:51:21 +09:00
parent 9172c25014
commit d78b753798

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -o pipefail set -o pipefail
version=3.3.0-rc.13 version=3.3.0-rc.14
aid=221100 aid=221100
game="dayz" game="dayz"
@ -1730,13 +1730,11 @@ check_map_count(){
count=1048576 count=1048576
echo "[DZGUI] Checking system map count" echo "[DZGUI] Checking system map count"
if [[ $(sysctl -q vm.max_map_count | awk -F"= " '{print $2}') -lt $count ]]; then if [[ $(sysctl -q vm.max_map_count | awk -F"= " '{print $2}') -lt $count ]]; then
echo "100" $steamsafe_zenity --question --width 500 --title="DZGUI" --text "System map count must be $count or higher to run DayZ with Wine.\nIncrease map count and make this change permanent? (will prompt for sudo password)" 2>/dev/null
map_warning=$($steamsafe_zenity --question --width 500 --title="DZGUI" --text "System map count must be $count or higher to run DayZ with Wine. Increase map count and make this change permanent? (will prompt for sudo password)" 2>/dev/null)
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
pass=$($steamsafe_zenity --password) pass=$($steamsafe_zenity --password)
sudo -S <<< "$pass" sh -c "echo 'vm.max_map_count=1048576' > /etc/sysctl.d/dayz.conf" sudo -S <<< "$pass" sh -c "echo 'vm.max_map_count=1048576' > /etc/sysctl.d/dayz.conf"
echo "" sudo sysctl -p /etc/sysctl.d/dayz.conf
fi fi
fi fi
} }
@ -1795,7 +1793,7 @@ update_steam_cmd(){
} }
steam_deps(){ steam_deps(){
local flatpak steam local flatpak steam
flatpak=$(flatpak list | grep valvesoftware.Steam) [[ $(command -v flatpak) ]] && flatpak=$(flatpak list | grep valvesoftware.Steam)
steam=$(command -v steam) steam=$(command -v steam)
if [[ -z "$steam" ]] && [[ -z "$flatpak" ]]; then if [[ -z "$steam" ]] && [[ -z "$flatpak" ]]; then
warn "Requires Steam or Flatpak Steam" warn "Requires Steam or Flatpak Steam"