mirror of
https://github.com/aclist/dztui.git
synced 2024-12-28 21:32:36 +01:00
chore: update docs
This commit is contained in:
parent
1803dd1166
commit
357f512f00
2 changed files with 15 additions and 22 deletions
18
dzgui.adoc
18
dzgui.adoc
|
@ -8,13 +8,12 @@ DayZ official/community server graphical launcher for Linux | Last updated: 2022
|
|||
== 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.
|
||||
|
||||
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
|
||||
=== Dependencies
|
||||
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,
|
||||
the other utilities should ship out of the box with mainstream distributions. They are provided here merely as a reference.
|
||||
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.
|
||||
|
||||
If any dependencies are missing when the application starts, it will warn you, so you need not take any preemptive measures here.
|
||||
|
||||
|
@ -36,7 +35,7 @@ curl -s "https://raw.githubusercontent.com/aclist/dztui/dzgui/install.sh" | bash
|
|||
Automatic method: nix-based systems (contributed by lelgenio)
|
||||
|
||||
Follow the instructions at https://github.com/lelgenio/dzgui-nix to ingest the package and dependencies
|
||||
into your system using flakes.
|
||||
into your system using flakes.
|
||||
|
||||
Manual method
|
||||
|
||||
|
@ -49,7 +48,7 @@ chmod +x dzgui.sh
|
|||
[start=2]
|
||||
. **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:
|
||||
```
|
||||
|
@ -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
|
||||
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.
|
||||
6. 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`.
|
||||
|
||||
[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.
|
||||
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. (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`.
|
||||
|
||||
==== 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.
|
||||
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
|
||||
|
||||
|
|
19
dzgui.sh
19
dzgui.sh
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o pipefail
|
||||
version=3.2.21
|
||||
version=3.2.22
|
||||
|
||||
aid=221100
|
||||
game="dayz"
|
||||
|
@ -130,6 +130,7 @@ set_api_params(){
|
|||
first_entry=1
|
||||
}
|
||||
query_api(){
|
||||
echo "# Querying API"
|
||||
#TODO: prevent drawing list if null values returned without API error
|
||||
if [[ $one_shot_launch -eq 1 ]]; then
|
||||
list_of_ids="$fav"
|
||||
|
@ -1190,15 +1191,12 @@ options_menu(){
|
|||
}
|
||||
query_and_connect(){
|
||||
[[ -z $whitelist ]] && { popup 600; return; }
|
||||
query_api
|
||||
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
|
||||
q(){
|
||||
query_api
|
||||
parse_json
|
||||
create_array
|
||||
fi
|
||||
}
|
||||
q | $steamsafe_zenity --width 500 --progress --pulsate --title="DZGUI" --auto-close 2>/dev/null
|
||||
rc=$?
|
||||
if [[ $rc -eq 1 ]]; then
|
||||
:
|
||||
|
@ -1540,6 +1538,7 @@ page_through(){
|
|||
parse_json
|
||||
}
|
||||
parse_json(){
|
||||
echo "# Parsing servers"
|
||||
page=$(echo "$list_response" | jq -r '.links.next?')
|
||||
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)"')
|
||||
|
@ -1547,8 +1546,6 @@ parse_json(){
|
|||
first_entry=0
|
||||
fi
|
||||
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
|
||||
else
|
||||
printf "%s\n" "${idarr[@]}" > $tmp
|
||||
|
|
Loading…
Reference in a new issue