mirror of
https://github.com/aclist/dztui.git
synced 2024-12-29 13:52:03 +01:00
chore: debug test for steam deck
This commit is contained in:
parent
0dea295c76
commit
6caaa231de
1 changed files with 15 additions and 1 deletions
16
dzgui.sh
16
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
version=3.3.0-rc.6
|
version=3.3.0-rc.7
|
||||||
|
|
||||||
aid=221100
|
aid=221100
|
||||||
game="dayz"
|
game="dayz"
|
||||||
|
@ -88,6 +88,7 @@ depcheck(){
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
watcher_deps(){
|
watcher_deps(){
|
||||||
|
echo "watcher deps" >> /tmp/dzgui.log
|
||||||
if [[ ! $(command -v wmctrl) ]] && [[ ! $(command -v xdotool) ]]; then
|
if [[ ! $(command -v wmctrl) ]] && [[ ! $(command -v xdotool) ]]; then
|
||||||
echo "100"
|
echo "100"
|
||||||
warn "Missing dependency: requires 'wmctrl' or 'xdotool'.\nInstall from your system's package manager."
|
warn "Missing dependency: requires 'wmctrl' or 'xdotool'.\nInstall from your system's package manager."
|
||||||
|
@ -96,6 +97,7 @@ watcher_deps(){
|
||||||
}
|
}
|
||||||
init_items(){
|
init_items(){
|
||||||
#array order determines menu selector; this is destructive
|
#array order determines menu selector; this is destructive
|
||||||
|
echo "init" >> /tmp/dzgui.log
|
||||||
items=(
|
items=(
|
||||||
"[Connect]"
|
"[Connect]"
|
||||||
" Server browser"
|
" Server browser"
|
||||||
|
@ -294,6 +296,7 @@ varcheck(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
run_depcheck(){
|
run_depcheck(){
|
||||||
|
echo "depcheck" >> /tmp/dzgui.log
|
||||||
if [[ -n $(depcheck) ]]; then
|
if [[ -n $(depcheck) ]]; then
|
||||||
echo "100"
|
echo "100"
|
||||||
$steamsafe_zenity --warning --ok-label="Exit" --title="DZGUI" --text="$(depcheck)"
|
$steamsafe_zenity --warning --ok-label="Exit" --title="DZGUI" --text="$(depcheck)"
|
||||||
|
@ -308,6 +311,7 @@ check_pyver(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
run_varcheck(){
|
run_varcheck(){
|
||||||
|
echo "varcheck" >> /tmp/dzgui.log
|
||||||
source $config_file
|
source $config_file
|
||||||
workshop_dir="$steam_path/steamapps/workshop/content/$aid"
|
workshop_dir="$steam_path/steamapps/workshop/content/$aid"
|
||||||
game_dir="$steam_path/steamapps/common/DayZ"
|
game_dir="$steam_path/steamapps/common/DayZ"
|
||||||
|
@ -322,6 +326,7 @@ run_varcheck(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
config(){
|
config(){
|
||||||
|
echo "config" >> /tmp/dzgui.log
|
||||||
if [[ ! -f $config_file ]]; then
|
if [[ ! -f $config_file ]]; then
|
||||||
$steamsafe_zenity --width 500 --info --text="Config file not found. Click OK to proceed to first-time setup." 2>/dev/null
|
$steamsafe_zenity --width 500 --info --text="Config file not found. Click OK to proceed to first-time setup." 2>/dev/null
|
||||||
code=$?
|
code=$?
|
||||||
|
@ -419,6 +424,7 @@ encode(){
|
||||||
echo "$1" | md5sum | cut -c -8
|
echo "$1" | md5sum | cut -c -8
|
||||||
}
|
}
|
||||||
stale_symlinks(){
|
stale_symlinks(){
|
||||||
|
echo "symlinks" >> /tmp/dzgui.log
|
||||||
for l in $(find "$game_dir" -xtype l); do
|
for l in $(find "$game_dir" -xtype l); do
|
||||||
unlink $l
|
unlink $l
|
||||||
done
|
done
|
||||||
|
@ -1442,6 +1448,7 @@ mods_disk_size(){
|
||||||
printf "Location: %s/steamapps/workshop/content/221100" "$steam_path"
|
printf "Location: %s/steamapps/workshop/content/221100" "$steam_path"
|
||||||
}
|
}
|
||||||
main_menu(){
|
main_menu(){
|
||||||
|
echo "entered main" >> /tmp/dzgui.log
|
||||||
print_news
|
print_news
|
||||||
set_mode
|
set_mode
|
||||||
# if [[ -n $fav ]]; then
|
# if [[ -n $fav ]]; then
|
||||||
|
@ -1645,6 +1652,7 @@ prompt_dl(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
check_version(){
|
check_version(){
|
||||||
|
echo "version" >> /tmp/dzgui.log
|
||||||
[[ -f $config_file ]] && source $config_file
|
[[ -f $config_file ]] && source $config_file
|
||||||
[[ -z $branch ]] && branch="stable"
|
[[ -z $branch ]] && branch="stable"
|
||||||
check_branch
|
check_branch
|
||||||
|
@ -1662,6 +1670,7 @@ check_version(){
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
check_architecture(){
|
check_architecture(){
|
||||||
|
echo "checking architecture" >> /tmp/dzgui.log
|
||||||
cpu=$(cat /proc/cpuinfo | grep "AMD Custom APU 0405")
|
cpu=$(cat /proc/cpuinfo | grep "AMD Custom APU 0405")
|
||||||
if [[ -n "$cpu" ]]; then
|
if [[ -n "$cpu" ]]; then
|
||||||
is_steam_deck=1
|
is_steam_deck=1
|
||||||
|
@ -1710,12 +1719,14 @@ toggle_debug(){
|
||||||
|
|
||||||
}
|
}
|
||||||
setup(){
|
setup(){
|
||||||
|
echo "setup index" >> /tmp/dzgui.log
|
||||||
if [[ -n $fav ]]; then
|
if [[ -n $fav ]]; then
|
||||||
set_fav
|
set_fav
|
||||||
items[8]=" Change favorite server"
|
items[8]=" Change favorite server"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
check_map_count(){
|
check_map_count(){
|
||||||
|
echo "mapcount" >> /tmp/dzgui.log
|
||||||
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
|
||||||
|
@ -1783,6 +1794,7 @@ update_steam_cmd(){
|
||||||
awk -v "var=$new_cmd" -v "nr=$nr" 'NR==nr {$0=var}{print}' ${config_path}dztuirc.old > ${config_path}dztuirc
|
awk -v "var=$new_cmd" -v "nr=$nr" 'NR==nr {$0=var}{print}' ${config_path}dztuirc.old > ${config_path}dztuirc
|
||||||
}
|
}
|
||||||
steam_deps(){
|
steam_deps(){
|
||||||
|
echo "steam deps" >> /tmp/dzgui.log
|
||||||
local flatpak steam
|
local flatpak steam
|
||||||
flatpak=$(flatpak list | grep valvesoftware.Steam)
|
flatpak=$(flatpak list | grep valvesoftware.Steam)
|
||||||
steam=$(command -v steam)
|
steam=$(command -v steam)
|
||||||
|
@ -1817,8 +1829,10 @@ initial_setup(){
|
||||||
echo "100"
|
echo "100"
|
||||||
}
|
}
|
||||||
main(){
|
main(){
|
||||||
|
echo "setting lockfile" >> /tmp/dzgui.log
|
||||||
lock
|
lock
|
||||||
initial_setup > >($steamsafe_zenity --pulsate --progress --auto-close --title="DZGUI" --no-cancel --width=500 2>/dev/null)
|
initial_setup > >($steamsafe_zenity --pulsate --progress --auto-close --title="DZGUI" --no-cancel --width=500 2>/dev/null)
|
||||||
|
echo "entering main menu" >> /tmp/dzgui.log
|
||||||
main_menu
|
main_menu
|
||||||
#TODO: tech debt: cruddy handling for steam forking
|
#TODO: tech debt: cruddy handling for steam forking
|
||||||
[[ $? -eq 1 ]] && pkill -f dzgui.sh
|
[[ $? -eq 1 ]] && pkill -f dzgui.sh
|
||||||
|
|
Loading…
Reference in a new issue