Overhaul scripts for 2026 refresh

This commit is contained in:
2026-05-28 22:03:01 -07:00
parent f7c8dde867
commit 2d9be73419
10 changed files with 516 additions and 53 deletions
+80
View File
@@ -0,0 +1,80 @@
# AGENTS.md
EverQuest client config and a **minimal classic UI skin** (`UISkin=isuldor`) maintained as unified diffs against `uifiles/default/`.
## Docs
* Install paths and INI layout: [docs/steam-linux-paths.md](docs/steam-linux-paths.md)
* 2026 theme refresh (what broke, what we changed): [docs/ui-theme-2026-refresh.md](docs/ui-theme-2026-refresh.md)
## Patch-set model (advice)
We patch **six** `EQUI_*.xml` files plus two `dark_tile_*.tga` textures — not a full skin fork. That is intentional.
| Do | Avoid |
|----|--------|
| Keep the patch set small (persistent on-screen windows only) | Copying all of `uifiles/default/` into git |
| Patch `uifiles/default/` → install to `uifiles/isuldor/` | Patching `uiresources/` / `AtlasSkin` (HTML/Cohtml panels) |
| Run `bash ui/verify.sh` before every commit and after every game patch | Relying on `patch --fuzz 3` without a dry-run |
| Regenerate diffs with `bash ui/install.sh --update` (CRLF-aware) | Hand-editing diffs or `diff -u` from LF-only XML |
| Budget **manual re-merge** for `EQUI_PlayerWindow` after major client updates | Expecting every patch to apply for years unchanged |
**Highest-churn files:** `EQUI_PlayerWindow.xml` (roles, aggro, meters), then `EQUI_HotButtonWnd.xml` (many slot animations). Everything else has been stable across years.
**Pin the client you verified against:** `ui/.verified-build` (eqgame mtime, patch list). Refresh with `bash ui/verify.sh --record` after a successful in-game check.
## Non-obvious details
* **Two UI trees:** `UISkin``uifiles/<name>/` (XML we patch). `AtlasSkin``uiresources/<name>/` (modern panels; **out of scope** — stay stock Default).
* **Stock XML is CRLF.** `uifiles/default/*.xml` use Windows line endings. LF-only merged files produce giant whole-file diffs; `install.sh --update` normalizes to CRLF when the default file is CRLF.
* **`patch --fuzz 3`** helps when line numbers drift (e.g. `EQUI_Animations`) but can apply the wrong hunk if context is ambiguous. Verify always uses dry-run; treat any future `FAILED` on PlayerWindow as a hand-merge, not a fuzz tweak.
* **Textures:** Register new `.tga` only in `EQUI_Animations.diff`; reference by filename elsewhere. `install.sh` copies `ui/*.tga` into `uifiles/isuldor/`.
* **Theme vs layout:** XML = chrome/templates. Window positions and fade % live in `UI_<Char>_<Server>_<Class>.ini` (`UISkin`, fades). Chat colors in `eqclient.ini` `[TextColors]`. Client updates can stomp INIs — keep canonical copies in this repo.
* **`EQType` on labels:** The player-window theme uses shadow labels and specific EQTypes (e.g. HP `17`, mana `124`) so text overlays gauges; stock uses different types — do not “fix” to match default without checking in-game.
* **Required stub labels:** `HPPerLabel` / `ManPercLabel` / `FatiguePercLabel` must exist as minimal `<Label>` pieces (ScreenID only) or the client breaks.
* **Install script:** Use `bash ui/install.sh` (shebang can fail on some mounts). `EQ_GAME_PATH` overrides auto-detect (Steam Linux path is tried first).
* **Game path detection:** Looks for `eqgame.exe` in install root (including Proton/Steam Linux `.exe` name).
## Lint / verify (run before commit)
From repo root:
```bash
# 1. Patches apply cleanly against live uifiles/default/
bash ui/verify.sh
# 2. Optional: fail if eqgame.exe changed since ui/.verified-build
bash ui/verify.sh --strict
# 3. After game patch + in-game smoke test — update pin file
bash ui/verify.sh --record
```
**Install + verify together:**
```bash
bash ui/install.sh && bash ui/verify.sh
```
**After editing `uifiles/isuldor/` in-game or by hand:**
```bash
bash ui/install.sh --update # regenerate *.diff (CRLF-safe)
bash ui/verify.sh --record
```
**Manual checks** (no automated linter for EQ UI XML):
* No duplicate `<Pieces>` entries in `EQUI_PlayerWindow` (easy to introduce when merging).
* `grep -c Player_HPLabelShadow` in built XML — should appear twice (element + one Pieces line), not three.
* Diff size sanity: `EQUI_PlayerWindow.diff` should be hundreds of lines, not 1500+ (signals CRLF/LF mismatch).
**In-game smoke test** (after client update): player window (HP/mana/XP/AA, group roles, aggro), hotbars, chat, spell window; inventory/AA should still look like **Default**.
## Workflow summary
```
game patch → bash ui/install.sh → bash ui/verify.sh
→ fix failed hunks (usually EQUI_PlayerWindow) → install.sh --update → verify.sh --record
→ set UISkin=isuldor in UI INI → login smoke test
```
+8 -4
View File
@@ -59,27 +59,31 @@ Custom keyboard configuration is in eqclient.ini [KeyMaps] section. Note that on
### Minimal User Interface
A good UI gets out of your way. [My minimal UI](https://i.imgur.com/mcO4oAA.jpg) is available in this repo in diffs. Maintaining my custom UI changes as a patch set makes integrating official updates easier. I like to set the fade transparency level for most windows to 0%. The exceptions are the hotbars, spellbars and chat windows. I've avoided changing UI panels that are not persistently on screen in order to minimize the long-term maintenance.
**Out of scope:** `AtlasSkin` / `uiresources/` (guild, achievements, overseer, and other HTML panels) — only the classic `UISkin` XML layer is themed; modern panels stay stock Default.
Verify patches: `bash ui/verify.sh` (see [AGENTS.md](AGENTS.md)).
If you've installed [bash on Windows](https://docs.microsoft.com/en-us/windows/wsl/install-win10), you could install the UI with the following commands:
```bash
git clone https://github.com/isuldor/eqclient-conf
cd eqclient-conf/ui
./install
./install.sh
```
Copy UI_Player_server.ini into the game directory and try loading the window layout from it under General settings.
### Text colors
Chat colors are stored as separate RGB values in eqclient.ini [TextColors] section. The default color scheme is a relatively dark palette. I've implemented the ir_black theme and it can be found in the relevant section in the included eqclient.ini in this repo. This is an ideal light text on dark background scheme, so it'll only make sense if you have dark chat windows like I do.
I have experimented with [gradient backgrounds for chat windows](http://i.imgur.com/LwK7kyO.jpg), but the result wasn't great because I could only get 10 levels of transparency from a tga texture ingame.
I have experimented with [gradient backgrounds for chat windows](/docs/gradient-10.jpg), but the result wasn't great because I could only get 10 levels of transparency from a tga texture ingame.
### (Optionally) Reorganize game data
There's over 4.3 thousand files sitting in the root game directory. If that triggers your OCD (or you hate having to look for the same file over and over again), you can [reorganize everquest](//www.eqinterface.com/forums/showthread.php?t=21379) using symlinks. This made a little more sense back when I used a slow spinning disk rather than striped ssd storage.
There's over 4.3 thousand files sitting in the root game directory. If that triggers your OCD (or you hate having to look for the same file over and over again), you can [reorganize everquest](https://www.eqinterface.com/forums/showthread.php?t=21379) using symlinks. This made a little more sense back when I used a slow spinning disk rather than striped ssd storage.
### Extras
Useful information can be found at various third party websites:
* [Gambosoft](http://gambosoft.eqresource.com/gamparsegettingstarted.php) has a log parser (tip: for new characters, reduce the "discard if less than" damage option)
* [EQLogParser](https://github.com/kauffman12/EQLogParser) open source alternative to [Gamparse](http://gambosoft.eqresource.com/gamparsegettingstarted.php)
* [Brewall](http://www.eqmaps.info/) has detailed maps
* [EQStats](http://www.eqstats.net/) has a spell and item database
* [Raidloot](http://www.raidloot.com/) item and spell info
Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

+63
View File
@@ -0,0 +1,63 @@
Here are the default UI and settings paths in your Steam install:
**Install root:** `~/.local/share/Steam/steamapps/common/Everquest F2P`
---
## Default UI paths
EverQuest splits UI into two parallel trees, both keyed off skin names in the UI INI:
| Setting | Default value | Path |
|---------|---------------|------|
| `UISkin` | `Default` | `uifiles/default/` |
| `AtlasSkin` | `Default` | `uiresources/default/` |
### `uifiles/default/` — classic UI skin
- **173** `EQUI_*.xml` window/layout files (e.g. `EQUI_PlayerWindow.xml`, `EQUI_HotButtonWnd.xml`)
- Textures: `.tga`, `.dds`
- Subfolders: `loadscreens/`, `overseer/`
### `uiresources/default/` — newer UI resources
- HTML/JS/CSS for modern panels (`index.html`, `index.js`, `main.css`, `cohtml.js`)
- Subfolders: `assets/images/`, `fonts/`, `img/`, `windows/`
### Other UI-related folder
- `uifiles/classic_spell_icons/` — alternate spell icon set only (not a full skin)
Custom skins go under `uifiles/<SkinName>/` and are selected with `UISkin=<SkinName>` in the character UI INI (your repos `ui/install.sh` script targets `uifiles/isuldor/` this way).
---
## Settings paths
All of these live in the **game install root** (not under `~/.config` or similar):
| File / folder | Purpose |
|---------------|---------|
| `eqclient.ini` | Global client settings: video, audio, graphics, `[Options]`, `[TextColors]`, `[KeyMaps]`, etc. |
| `defaults.ini` | Shipped factory defaults for UI window layouts and positions (reset reference) |
| `UI_<Char>_<Server>_<Class>.ini` | Per-character UI state: window positions, fades, and `UISkin` / `AtlasSkin` |
| `<Char>_<Server>_<Class>.ini` | Per-character game settings: hotbars, combat, abilities, etc. |
| `_characters.ini` | Character registry (`Character0=Isuldor,bertox` on your install) |
| `userdata/` | Address book, ignore list, guild notes (`AddressBook.txt`, `IgnoreList.txt`, `GN_*.txt`) |
**LaunchPad / login UI** (separate from in-game UI):
| File | Purpose |
|------|---------|
| `eqlsClient.ini` | Launcher URLs and client config |
| `eqlsUIConfig.ini` | LaunchPad window positions |
| `eqlsPlayerData.ini` | LaunchPad player data |
| `LaunchPad.ini` / `LaunchPad-user.ini` | LaunchPad settings |
---
## Your current character
For `Isuldor` on `bertox`:
- UI layout: `UI_Isuldor_bertox_PAL.ini``UISkin=Default`, `AtlasSkin=Default`
- Character settings: `Isuldor_bertox_PAL.ini`
So right now youre on the stock UI at `uifiles/default/` and `uiresources/default/`, with layout/state stored in those per-character INI files in the install root.
+141
View File
@@ -0,0 +1,141 @@
# Isuldor UI theme refresh (March 2022 → May 2026)
This article records what changed in EverQuests stock UI between our last theme maintenance pass and this refresh, what we did to bring the **isuldor** minimal skin forward, and how to install and maintain it on the current client.
Paths for the local Steam/Linux install are in [steam-linux-paths.md](steam-linux-paths.md).
## What the theme does
The isuldor skin is a small set of patches against `uifiles/default/` (not a full skin replacement). It keeps only the windows that stay on screen most of the time and strips chrome so they fade into a dark layout:
| File | Purpose |
|------|---------|
| `EQUI_Templates.xml` | Adds `WDT_Def2_Minimal` and `WDT_Inner_Null` draw templates (dark tiled chrome, borderless inner panels) |
| `EQUI_Animations.xml` | Registers `dark_tile_64.tga` / `dark_tile_192.tga` and a 1×1 titlebar placeholder animation |
| `EQUI_HotButtonWnd.xml` | Replaces hotbar slot art with dark tiles; smaller 32×32 normal state |
| `EQUI_ChatWindow.xml` | Borderless chat shell; null inner template on input/output |
| `EQUI_CastSpellWnd.xml` | Transparent spell book shell; no close box or outer border |
| `EQUI_PlayerWindow.xml` | Compact player frame: overlaid HP/mana text, inline XP/AA XP bars, transparent shell |
Textures live in `ui/dark_tile_*.tga` and are copied beside the patched XML under `uifiles/isuldor/`.
The theme does **not** patch `uiresources/default/` (`AtlasSkin`). Modern HTML/Cohtml panels (guild, achievements, overseer, etc.) keep the stock look.
## Refresh summary (May 2026)
| Patch | Result against May 2026 `default` |
|-------|-----------------------------------|
| `EQUI_Animations` | Applies cleanly (line offsets shifted; hunks still match) |
| `EQUI_CastSpellWnd` | Applies cleanly |
| `EQUI_ChatWindow` | Applies cleanly |
| `EQUI_HotButtonWnd` | Applies cleanly |
| `EQUI_Templates` | Applies cleanly |
| `EQUI_PlayerWindow` | **Required rewrite** — see below |
`ui/install.sh` was updated to auto-detect the Steam Linux path (`~/.local/share/Steam/steamapps/common/Everquest F2P`) and honor `EQ_GAME_PATH`. The skin was rebuilt under `uifiles/isuldor/` on this machine.
## Why `EQUI_PlayerWindow` broke
The March 2022 patch set was generated against an older `EQUI_PlayerWindow.xml`. Three classes of drift caused `patch` to fail on hunks 57:
### 1. Label layout offsets
Stock UI moved percent labels (`HPPerLabel`, `ManPercLabel`, `FatiguePercLabel`) from `LeftAnchorOffset` **24** to **34**. Our diff still described the old coordinates, so context lines no longer matched.
### 2. New controls after the fatigue block
Daybreak added group-role buttons and aggro readouts **below** the fatigue labels, for example:
- `PW_GroupRoleTank`, `PW_GroupRoleAssist`, `PW_GroupRolePuller`, `PW_GroupRoleMarkNPC`
- `PW_AggroPctPlayerLabel`, `PW_AggroNameSecondaryLabel`, `PW_AggroPctSecondaryLabel`
- Parcel/mail icons and attack-indicator animations
The 2019 theme inserted custom **XP** and **AA XP** gauges in that slot. The refresh keeps those custom gauges but places them **immediately before** the group-role buttons so stock pieces are preserved.
### 3. Removed / relocated elements
- `PW_VoiceVolume` no longer exists; the old diff referenced it as a line anchor near the screen definition.
- `EQType` values for dynamic HP/mana text changed in stock UI (`19`/`20`); the theme uses `17` / `124` with shadow labels and live data from the client.
### 4. Line endings
Stock XML under `uifiles/default/` uses **CRLF**. Regenerating diffs from LF-only edits produces a whole-file diff and breaks `patch`. When updating `EQUI_PlayerWindow.diff`, normalize the built `isuldor` file to CRLF before `diff -u` (see [Maintenance](#maintenance)).
## Stock UI churn since March 2022
On this install, `uifiles/default/` still has **173** `EQUI_*.xml` window files (unchanged count), but **49** of them have filesystem dates after 2022-03-01. Notable areas touched by Daybreak in that window:
- **Player / target / pet** — `EQUI_PlayerWindow.xml`, `EQUI_TargetWindow.xml`, `EQUI_PetInfoWindow.xml`, blocked-buff windows
- **Inventory & loot** — `EQUI_Inventory.xml`, `EQUI_AdvancedLootWnd.xml`, `EQUI_LootWnd.xml`, `EQUI_DragonHoardWnd.xml`, banks, barter, tradeskill depot
- **Progression UI** — `EQUI_AAWindow.xml`, `EQUI_TaskWnd.xml`, `EQUI_TaskOverlayWnd.xml`, achievements
- **Social / commerce** — guild management/bank, overseer, real estate, merchant, purchase flows
- **Options & login** — `EQUI_OptionsWindow.xml`, character list/create, respawn selector
None of those files are in our patch set by design (see README: avoid maintaining rarely visible windows). After a major client patch, spot-check the six patched windows in-game; everything else stays on `Default`.
`uiresources/default/` (selected by `AtlasSkin`) continues to grow independently; expect modern panels to look stock even with `UISkin=isuldor`.
## Install and enable
From the repo:
```bash
cd ui
bash install.sh # or: EQ_GAME_PATH="/path/to/EverQuest" bash install.sh
```
Set the skin on a character in the UI INI in the game install root:
```ini
UISkin=isuldor
AtlasSkin=Default
```
(`UI_Vulch_coirnav.ini` in this repo is an example.) Reload UI layout from that INI under **Options → General** if windows look wrong after the first login.
Fade amounts (0% on most windows, higher on hotbars/chat) remain in the per-character UI INI, not in the XML patches.
## Maintenance
**Rebuild skin from patches**
```bash
bash ui/install.sh
```
**Refresh patches after editing `uifiles/isuldor/` in-game or by hand**
```bash
bash ui/install.sh --update
```
**Regenerate only `EQUI_PlayerWindow.diff` after hand-merging**
```bash
GAME="$HOME/.local/share/Steam/steamapps/common/Everquest F2P"
sed 's/$/\r/' "$GAME/uifiles/isuldor/EQUI_PlayerWindow.xml" > /tmp/pw.crlf.xml
diff -u "$GAME/uifiles/default/EQUI_PlayerWindow.xml" /tmp/pw.crlf.xml \
> ui/EQUI_PlayerWindow.diff
```
**Verify all patches before committing**
```bash
bash ui/verify.sh
bash ui/verify.sh --record # after in-game smoke test; updates ui/.verified-build
```
## Testing checklist
After each client update:
1. Run `bash ui/install.sh` and confirm no `FAILED` hunks.
2. Log in with `UISkin=isuldor` — check player window (HP/mana/XP/AA), hotbars, chat, spell gem window.
3. Open group roles and aggro labels on the player window; confirm they still render and click.
4. Toggle a few rarely used stock windows (inventory, AA) — they should look like **Default**, not broken.
## References
- [steam-linux-paths.md](steam-linux-paths.md) — install root, `UISkin` / `AtlasSkin`, character INI files
- [README.md](../README.md) — general client tuning (fullscreen, lighting, chat colors)
- Screenshot of the minimal layout: [imgur mcO4oAA](https://i.imgur.com/mcO4oAA.jpg) (2019; layout is similar after refresh)
+7
View File
@@ -0,0 +1,7 @@
# Last install verified to apply all UI patches. Refresh with: bash ui/verify.sh --record
verified_date=2026-05-26T11:02:00-07:00
eqgame_mtime=2026-05-22 10:52:08.000000000 -0700
EQUI_PlayerWindow_mtime=2022-09-15 08:04:02.000000000 -0700
game_path=/home/pleb/.local/share/Steam/steamapps/common/Everquest F2P
patch_count=6
patches=EQUI_Animations,EQUI_CastSpellWnd,EQUI_ChatWindow,EQUI_HotButtonWnd,EQUI_PlayerWindow,EQUI_Templates
+39
View File
@@ -0,0 +1,39 @@
# Shared EverQuest install root detection. Source from other ui/*.sh scripts.
find_game_path() {
if [[ -n "${EQ_GAME_PATH:-}" && -f "${EQ_GAME_PATH}/eqgame.exe" ]]; then
echo "${EQ_GAME_PATH}"
return 0
fi
local steam_linux="${HOME}/.local/share/Steam/steamapps/common/Everquest F2P"
if [[ -f "${steam_linux}/eqgame.exe" ]]; then
echo "${steam_linux}"
return 0
fi
if [[ -f "/mnt/d/EverQuest/eqgame.exe" ]]; then
echo "/mnt/d/EverQuest"
return 0
fi
local game_location
game_location=$(find /mnt -type f -name eqgame.exe ! -path '*RECYCLE.BIN*' 2>/dev/null | head -n1)
if [[ -n "${game_location}" ]]; then
dirname "${game_location}"
return 0
fi
return 1
}
resolve_game_path() {
local game_path="${EQ_GAME_PATH:-}"
if [[ -z "${game_path}" ]] || [[ ! -f "${game_path}/eqgame.exe" ]]; then
if ! game_path=$(find_game_path); then
echo "Error: EverQuest was not found! Set EQ_GAME_PATH to your install root." >&2
return 1
fi
echo "Using GAME_PATH=${game_path}" >&2
fi
echo "${game_path}"
}
-49
View File
@@ -1,49 +0,0 @@
#!/bin/bash
# Rebuild custom UI files using patches
# -u, --update to update the patch set with new changes
GAME_PATH=/mnt/d/EverQuest
UI_NAME=isuldor
if [[ ! -f "${GAME_PATH}/eqgame.exe" ]]
then
echo "Notice: Game path not set, searching for EverQuest..."
GAME_LOCATION=$(find /mnt -type f -name eqgame.exe ! -path '*RECYCLE.BIN*' 2>/dev/null | head -n1)
if [[ ${GAME_LOCATION} ]]
then
GAME_PATH=$(dirname ${GAME_LOCATION})
echo "Set GAME_PATH=${GAME_PATH}"
else
echo "Error: EverQuest was not found!"
exit 1
fi
fi
SCRIPT_PATH=$(dirname ${0})
UI_FOLDER="${GAME_PATH}/uifiles/${UI_NAME}"
# We can update our patch set with changes
if [[ "-u" == ${1} || "--update" == ${1} ]]
then
echo "Updating patch set!"
# rm -v "${SCRIPT_PATH}/EQUI_*.diff"
UI_FILES=( $( find "${UI_FOLDER}" -name '*.xml' -exec basename {} .xml \; ))
for UI_FILE in "${UI_FILES[@]}"
do
diff -u "${GAME_PATH}/uifiles/default/${UI_FILE}.xml" \
"${UI_FOLDER}/${UI_FILE}.xml" > ${SCRIPT_PATH}/${UI_FILE}.diff
done
exit 0
fi
# Build custom UI directory
mkdir -vp "${UI_FOLDER}"
cp ${SCRIPT_PATH}/*.tga "${UI_FOLDER}/"
# Build an array of all diffs to patch, stripping the extension
UI_FILES=( $( find "${SCRIPT_PATH}" -name '*.diff' -exec basename {} .diff \; ))
for UI_FILE in "${UI_FILES[@]}"
do
patch --ignore-whitespace --fuzz 3 -o "${UI_FOLDER}/${UI_FILE}.xml" "${GAME_PATH}/uifiles/default/${UI_FILE}.xml" < ${SCRIPT_PATH}/${UI_FILE}.diff
done
Executable
+66
View File
@@ -0,0 +1,66 @@
#!/bin/bash
# Rebuild custom UI files using patches
# install.sh — apply patches to uifiles/isuldor/
# install.sh --update — regenerate *.diff from uifiles/isuldor/ (CRLF-normalized)
#
# Set EQ_GAME_PATH to your install root, or rely on auto-detection.
set -euo pipefail
UI_NAME=isuldor
SCRIPT_PATH=$(dirname "${0}")
# shellcheck source=eq-path.sh
source "${SCRIPT_PATH}/eq-path.sh"
GAME_PATH=$(resolve_game_path) || exit 1
UI_FOLDER="${GAME_PATH}/uifiles/${UI_NAME}"
DEFAULT_UI="${GAME_PATH}/uifiles/default"
# Stock uifiles/default/*.xml use CRLF; LF-only isuldor files produce whole-file diffs.
crlf_temp() {
local src=$1
local dest=$2
sed 's/$/\r/' "${src}" > "${dest}"
}
needs_crlf_diff() {
local default_xml=$1
file "${default_xml}" 2>/dev/null | grep -q CRLF
}
# Regenerate patch set from built skin
if [[ "${1:-}" == "-u" || "${1:-}" == "--update" ]]; then
echo "Updating patch set from ${UI_FOLDER}..."
UI_FILES=( $( find "${UI_FOLDER}" -name '*.xml' -exec basename {} .xml \; ))
for UI_FILE in "${UI_FILES[@]}"; do
default_xml="${DEFAULT_UI}/${UI_FILE}.xml"
isuldor_xml="${UI_FOLDER}/${UI_FILE}.xml"
out_diff="${SCRIPT_PATH}/${UI_FILE}.diff"
if needs_crlf_diff "${default_xml}"; then
crlf_temp "${isuldor_xml}" "${out_diff}.isuldor.crlf"
diff -u "${default_xml}" "${out_diff}.isuldor.crlf" > "${out_diff}"
rm -f "${out_diff}.isuldor.crlf"
else
diff -u "${default_xml}" "${isuldor_xml}" > "${out_diff}"
fi
echo " ${UI_FILE}.diff"
done
echo "Run: bash ui/verify.sh --record"
exit 0
fi
mkdir -vp "${UI_FOLDER}"
cp "${SCRIPT_PATH}"/*.tga "${UI_FOLDER}/"
UI_FILES=( $( find "${SCRIPT_PATH}" -name '*.diff' -exec basename {} .diff \; ))
for UI_FILE in "${UI_FILES[@]}"; do
if ! patch --ignore-whitespace --fuzz 3 -o "${UI_FOLDER}/${UI_FILE}.xml" \
"${DEFAULT_UI}/${UI_FILE}.xml" < "${SCRIPT_PATH}/${UI_FILE}.diff"; then
echo "Error: patch failed for ${UI_FILE}" >&2
exit 1
fi
done
echo "Installed ${#UI_FILES[@]} files to ${UI_FOLDER}"
echo "Set UISkin=${UI_NAME} in your character UI INI, then: bash ui/verify.sh --record"
Executable
+112
View File
@@ -0,0 +1,112 @@
#!/bin/bash
# Dry-run all UI patches against uifiles/default. Exit 1 on any failure.
#
# Usage:
# bash ui/verify.sh # verify patches only
# bash ui/verify.sh --strict # also warn if eqgame.exe mtime differs from ui/.verified-build
# bash ui/verify.sh --record # verify, then refresh ui/.verified-build from current install
set -euo pipefail
SCRIPT_PATH=$(dirname "${0}")
# shellcheck source=eq-path.sh
source "${SCRIPT_PATH}/eq-path.sh"
STRICT=0
RECORD=0
for arg in "$@"; do
case "${arg}" in
--strict) STRICT=1 ;;
--record) RECORD=1 ;;
-h|--help)
echo "Usage: verify.sh [--strict] [--record]"
exit 0
;;
*)
echo "Unknown option: ${arg}" >&2
exit 2
;;
esac
done
GAME_PATH=$(resolve_game_path) || exit 1
DEFAULT_UI="${GAME_PATH}/uifiles/default"
PATCH_DIR="${SCRIPT_PATH}"
VERIFIED_FILE="${PATCH_DIR}/.verified-build"
if [[ ! -d "${DEFAULT_UI}" ]]; then
echo "Error: missing ${DEFAULT_UI}" >&2
exit 1
fi
shopt -s nullglob
diffs=( "${PATCH_DIR}"/*.diff )
if [[ ${#diffs[@]} -eq 0 ]]; then
echo "Error: no *.diff files in ${PATCH_DIR}" >&2
exit 1
fi
FAIL=0
for diff_file in "${diffs[@]}"; do
base=$(basename "${diff_file}" .diff)
default_xml="${DEFAULT_UI}/${base}.xml"
if [[ ! -f "${default_xml}" ]]; then
echo "FAIL: ${base} — missing ${default_xml}"
FAIL=1
continue
fi
if patch --dry-run --ignore-whitespace --fuzz 3 -o /dev/null \
"${default_xml}" < "${diff_file}" >/dev/null 2>&1; then
echo "OK: ${base}"
else
echo "FAIL: ${base}"
patch --dry-run --ignore-whitespace --fuzz 3 -o /dev/null \
"${default_xml}" < "${diff_file}" 2>&1 | tail -5
FAIL=1
fi
done
# Required theme textures
for tga in dark_tile_64.tga dark_tile_192.tga; do
if [[ ! -f "${PATCH_DIR}/${tga}" ]]; then
echo "FAIL: missing texture ${PATCH_DIR}/${tga}"
FAIL=1
fi
done
if [[ ${FAIL} -ne 0 ]]; then
echo "Verify failed." >&2
exit 1
fi
echo "All ${#diffs[@]} patches apply cleanly against ${DEFAULT_UI}"
if [[ ${STRICT} -eq 1 && -f "${VERIFIED_FILE}" ]]; then
pinned=$(grep -E '^eqgame_mtime=' "${VERIFIED_FILE}" | cut -d= -f2- | tr -d '\r\n' || true)
current=$(stat -c '%y' "${GAME_PATH}/eqgame.exe" 2>/dev/null | tr -d '\r\n')
if [[ -n "${pinned}" && "${pinned}" != "${current}" ]]; then
echo "WARN: eqgame.exe mtime differs from ui/.verified-build" >&2
echo " pinned: ${pinned}" >&2
echo " current: ${current}" >&2
echo " Re-run: bash ui/verify.sh --record (after confirming patches still OK in-game)" >&2
exit 1
fi
fi
if [[ ${RECORD} -eq 1 ]]; then
eq_mtime=$(stat -c '%y' "${GAME_PATH}/eqgame.exe")
pw_mtime=$(stat -c '%y' "${DEFAULT_UI}/EQUI_PlayerWindow.xml" 2>/dev/null || echo unknown)
patch_list=$(basename -a "${diffs[@]}" .diff | paste -sd, -)
cat > "${VERIFIED_FILE}" <<EOF
# Last install verified to apply all UI patches. Refresh with: bash ui/verify.sh --record
verified_date=$(date -Iseconds)
eqgame_mtime=${eq_mtime}
EQUI_PlayerWindow_mtime=${pw_mtime}
game_path=${GAME_PATH}
patch_count=${#diffs[@]}
patches=${patch_list}
EOF
echo "Recorded ${VERIFIED_FILE}"
fi
exit 0