1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2025-01-01 15:12:05 +01:00

chore: update docs

This commit is contained in:
aclist 2023-05-14 14:54:49 +09:00
parent 1803dd1166
commit 357f512f00
2 changed files with 15 additions and 22 deletions

View file

@ -8,13 +8,12 @@ DayZ official/community server graphical launcher for Linux | Last updated: 2022
== What this is == What this is
A GUI version of https://github.com/aclist/dztui[DZTUI] for Linux. Used to list official and community server details and quick connect to preferred servers by staging mods and concatenating launch options automatically. A GUI version of https://github.com/aclist/dztui[DZTUI] for Linux. Used to list official and community server details and quick connect to preferred servers by staging mods and concatenating launch options automatically.
DZGUI contains some expanded functionality that will eventually be backported to DZTUI. It is intended to be more of a user-friendly, turnkey solution for graphical desktop environments, and could also be used on the Steam Deck or similar devices. Development on DZTUI (terminal client) has stopped at this time. DZGUI brings numerous functionality and security improvements and is intended to be a more user-friendly, turnkey solution for graphical desktop environments, and can also be used on the Steam Deck or similar devices.
== Setup == Setup
=== Dependencies === Dependencies
If not already installed, the below can be found in your system's package manager. If not already installed, the below can be found in your system's package manager.
With the exception of Steam (which presumably you already have), in 99% of cases, With the exception of Steam (which presumably you already have), wmctrl, and xdotool, the other utilities should ship out of the box with mainstream distributions. They are provided here merely as a reference.
the other utilities should ship out of the box with mainstream distributions. They are provided here merely as a reference.
If any dependencies are missing when the application starts, it will warn you, so you need not take any preemptive measures here. If any dependencies are missing when the application starts, it will warn you, so you need not take any preemptive measures here.
@ -49,7 +48,7 @@ chmod +x dzgui.sh
[start=2] [start=2]
. **Update the `vm.max_map_count` value (see https://www.protondb.com/app/221100)** . **Update the `vm.max_map_count` value (see https://www.protondb.com/app/221100)**
This is handled automatically by DZGUI if you just choose to run the application out of the box. This is handled automatically by DZGUI if you just choose to run the application out of the box. You will be prompted for your sudo password in order to check whether the system map count is too small. This is a one-time check that will not be triggered again once the map count is updated. If using the automatic method, you can skip to Step 3 below.
Ephemeral method: Ephemeral method:
``` ```
@ -76,16 +75,13 @@ If it detects an incorrect map count value, DZGUI will prompt you to permanently
3. Give the token any name in the field at the top 3. Give the token any name in the field at the top
4. Leave all options **unchecked** and scroll to the bottom, select **Create Token** 4. Leave all options **unchecked** and scroll to the bottom, select **Create Token**
5. Copy the access token for later use (see below). This is the unique token you will use to query servers. 5. Copy the access token for later use (see below). This is the unique token you will use to query servers.
6. Use the https://www.battlemetrics.com/servers/dayz[DayZ server browser] to find servers of interest (proximity, player count, rules, etc.) 6. (Post-setup) Use the https://www.battlemetrics.com/servers/dayz[DayZ server browser] to find servers of interest (proximity, player count, rules, etc.)
7. Each server has a unique ID. This is the string of numbers at the end of the URL. Copy these IDs. For example, in the URL https://www.battlemetrics.com/servers/dayz/8039514, the ID is `8039514`. 7. (Post-setup) Each server has a unique ID. This is the string of numbers at the end of the URL. Copy these IDs. For example, in the URL https://www.battlemetrics.com/servers/dayz/8039514, the ID is `8039514`.
[NOTE]
You will be prompted to enter these IDs when starting the app, so you could refer to them in another window while you complete setup. More IDs can be added later.
==== Steam API key ==== Steam API key
1. Register for a https://steamcommunity.com/dev/apikey[Steam API key] using your Steam account. You will be asked for a unique URL for your app when registering. 1. Register for a https://steamcommunity.com/dev/apikey[Steam API key] using your Steam account. You will be asked for a unique URL for your app when registering.
2. Since this key is for a personal use application and does not actually call back anywhere, set a generic local identifier here like "127.0.0.1". 2. Since this key is for a personal use application and does not actually call back anywhere, set a generic local identifier here like "127.0.0.1".
3. Once configured, you can insert this key in the app when launching the "Connect by IP" feature for the first time. 3. Once configured, you can insert this key in the app when launching it for the first time.
=== First-time launch === First-time launch

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version=3.2.21 version=3.2.22
aid=221100 aid=221100
game="dayz" game="dayz"
@ -130,6 +130,7 @@ set_api_params(){
first_entry=1 first_entry=1
} }
query_api(){ query_api(){
echo "# Querying API"
#TODO: prevent drawing list if null values returned without API error #TODO: prevent drawing list if null values returned without API error
if [[ $one_shot_launch -eq 1 ]]; then if [[ $one_shot_launch -eq 1 ]]; then
list_of_ids="$fav" list_of_ids="$fav"
@ -1190,15 +1191,12 @@ options_menu(){
} }
query_and_connect(){ query_and_connect(){
[[ -z $whitelist ]] && { popup 600; return; } [[ -z $whitelist ]] && { popup 600; return; }
q(){
query_api query_api
parse_json parse_json
#TODO: create logger function
if [[ ! $delete -eq 1 ]]; then
echo "[DZGUI] Checking response time of servers"
create_array | $steamsafe_zenity --width 500 --progress --pulsate --title="DZGUI" --auto-close 2>/dev/null
else
create_array create_array
fi }
q | $steamsafe_zenity --width 500 --progress --pulsate --title="DZGUI" --auto-close 2>/dev/null
rc=$? rc=$?
if [[ $rc -eq 1 ]]; then if [[ $rc -eq 1 ]]; then
: :
@ -1540,6 +1538,7 @@ page_through(){
parse_json parse_json
} }
parse_json(){ parse_json(){
echo "# Parsing servers"
page=$(echo "$list_response" | jq -r '.links.next?') page=$(echo "$list_response" | jq -r '.links.next?')
if [[ $first_entry -eq 1 ]]; then if [[ $first_entry -eq 1 ]]; then
local list=$(echo "$list_response" | jq -r '.data[] .attributes | "\(.name)\t\(.ip):\(.port)\t\(.players)/\(.maxPlayers)\t\(.details.time)\t\(.status)\t\(.id)"') local list=$(echo "$list_response" | jq -r '.data[] .attributes | "\(.name)\t\(.ip):\(.port)\t\(.players)/\(.maxPlayers)\t\(.details.time)\t\(.status)\t\(.id)"')
@ -1547,8 +1546,6 @@ parse_json(){
first_entry=0 first_entry=0
fi fi
if [[ "$page" != "null" ]]; then if [[ "$page" != "null" ]]; then
local list=$(echo "$list_response" | jq -r '.data[] .attributes | "\(.name)\t\(.ip):\(.port)\t\(.players)/\(.maxPlayers)\t\(.details.time)\t\(.status)\t\(.id)"')
idarr+=("$list")
page_through page_through
else else
printf "%s\n" "${idarr[@]}" > $tmp printf "%s\n" "${idarr[@]}" > $tmp