update module profiles

This commit is contained in:
uprightbass360
2026-01-01 15:50:04 -05:00
parent 07110902a6
commit f5b3b07bcb
4 changed files with 38 additions and 12 deletions

View File

@@ -76,6 +76,12 @@ DB_GUARD_VERIFY_INTERVAL_SECONDS=86400
# ===================== # =====================
STAGE_PATH_MODULE_SQL=${STORAGE_MODULE_SQL_PATH} STAGE_PATH_MODULE_SQL=${STORAGE_MODULE_SQL_PATH}
# =====================
# Modules rebuild source path
# =====================
# Default AzerothCore source checkout used for module rebuilds
MODULES_REBUILD_SOURCE_PATH=${STORAGE_PATH_LOCAL}/source/azerothcore
# ===================== # =====================
# SQL Source Overlay # SQL Source Overlay
# ===================== # =====================
@@ -235,8 +241,6 @@ CLIENT_DATA_CACHE_PATH=${STORAGE_PATH_LOCAL}/client-data-cache
# Rebuild automation # Rebuild automation
# ===================== # =====================
AUTO_REBUILD_ON_DEPLOY=0 AUTO_REBUILD_ON_DEPLOY=0
# Default AzerothCore source checkout used for module rebuilds
MODULES_REBUILD_SOURCE_PATH=${STORAGE_PATH_LOCAL}/source/azerothcore
# ===================== # =====================
# Source repositories # Source repositories

View File

@@ -2,7 +2,7 @@
"modules": [ "modules": [
], ],
"label": "\u2b50 AzerothCore Main - Mod Free", "label": "\ud83d\udd30 AzerothCore Main - Mod Free",
"description": "Pure AzerothCore with no optional modules enabled", "description": "Pure AzerothCore with no optional modules enabled",
"order": 3 "order": 3
} }

View File

@@ -80,7 +80,7 @@ def cmd_list(directory: Path) -> int:
profiles.sort(key=lambda item: item[4]) profiles.sort(key=lambda item: item[4])
for name, modules, label, description, order in profiles: for name, modules, label, description, order in profiles:
modules_csv = ",".join(modules) modules_csv = ",".join(modules) if modules else "-"
print("\t".join([name, modules_csv, label, description, str(order)])) print("\t".join([name, modules_csv, label, description, str(order)]))
return 0 return 0

View File

@@ -1139,12 +1139,29 @@ fi
MODE_PRESET_NAME="$CLI_MODULE_PRESET" MODE_PRESET_NAME="$CLI_MODULE_PRESET"
fi fi
# Function to determine source branch for a preset
get_preset_source_branch() {
local preset_name="$1"
local preset_modules="${MODULE_PRESET_CONFIGS[$preset_name]:-}"
# Check if playerbots module is in the preset
if [[ "$preset_modules" == *"MODULE_PLAYERBOTS"* ]]; then
echo "azerothcore-playerbots"
else
echo "azerothcore-wotlk"
fi
}
# Module config # Module config
say HEADER "MODULE PRESET" say HEADER "MODULE PRESET"
echo "1) ${MODULE_PRESET_LABELS[$DEFAULT_PRESET_SUGGESTED]:-⭐ Suggested Modules}" printf " %s) %s\n" "1" "⭐ Suggested Modules"
echo "2) ${MODULE_PRESET_LABELS[$DEFAULT_PRESET_PLAYERBOTS]:-🤖 Playerbots + Suggested modules}" printf " %s (%s)\n" "Baseline solo-friendly quality of life mix" "azerothcore-wotlk"
echo "3) ⚙️ Manual selection" printf " %s) %s\n" "2" "🤖 Playerbots + Suggested modules"
echo "4) 🚫 No modules" printf " %s (%s)\n" "Suggested stack plus playerbots enabled" "azerothcore-playerbots"
printf " %s) %s\n" "3" "⚙️ Manual selection"
printf " %s (%s)\n" "Choose individual modules manually" "(depends on modules)"
printf " %s) %s\n" "4" "🚫 No modules"
printf " %s (%s)\n" "Pure AzerothCore with no modules" "azerothcore-wotlk"
local menu_index=5 local menu_index=5
declare -A MENU_PRESET_INDEX=() declare -A MENU_PRESET_INDEX=()
@@ -1163,13 +1180,16 @@ fi
for entry in "${ORDERED_PRESETS[@]}"; do for entry in "${ORDERED_PRESETS[@]}"; do
local preset_name="${entry#*::}" local preset_name="${entry#*::}"
[ -n "${MODULE_PRESET_CONFIGS[$preset_name]:-}" ] || continue [ -n "${MODULE_PRESET_CONFIGS[$preset_name]:-}" ] || continue
local pretty_name local pretty_name preset_desc
if [ -n "${MODULE_PRESET_LABELS[$preset_name]:-}" ]; then if [ -n "${MODULE_PRESET_LABELS[$preset_name]:-}" ]; then
pretty_name="${MODULE_PRESET_LABELS[$preset_name]}" pretty_name="${MODULE_PRESET_LABELS[$preset_name]}"
else else
pretty_name=$(echo "$preset_name" | tr '_-' ' ' | awk '{for(i=1;i<=NF;i++){$i=toupper(substr($i,1,1)) substr($i,2)}}1') pretty_name=$(echo "$preset_name" | tr '_-' ' ' | awk '{for(i=1;i<=NF;i++){$i=toupper(substr($i,1,1)) substr($i,2)}}1')
fi fi
echo "${menu_index}) ${pretty_name} (config/module-profiles/${preset_name}.json)" preset_desc="${MODULE_PRESET_DESCRIPTIONS[$preset_name]:-No description available}"
local source_branch=$(get_preset_source_branch "$preset_name")
printf " %s) %s\n" "$menu_index" "$pretty_name"
printf " %s (%s)\n" "$preset_desc" "$source_branch"
MENU_PRESET_INDEX[$menu_index]="$preset_name" MENU_PRESET_INDEX[$menu_index]="$preset_name"
menu_index=$((menu_index + 1)) menu_index=$((menu_index + 1))
done done
@@ -1567,7 +1587,7 @@ fi
fi fi
local default_source_rel="${LOCAL_STORAGE_ROOT}/source/azerothcore" local default_source_rel="${LOCAL_STORAGE_ROOT}/source/azerothcore"
if [ "$NEEDS_CXX_REBUILD" = "1" ] || [ "$MODULE_PLAYERBOTS" = "1" ]; then if [ "$MODULE_PLAYERBOTS" = "1" ]; then
default_source_rel="${LOCAL_STORAGE_ROOT}/source/azerothcore-playerbots" default_source_rel="${LOCAL_STORAGE_ROOT}/source/azerothcore-playerbots"
fi fi
@@ -1756,6 +1776,9 @@ DB_GUARD_VERIFY_INTERVAL_SECONDS=$(get_template_value "DB_GUARD_VERIFY_INTERVAL_
# Module SQL staging # Module SQL staging
STAGE_PATH_MODULE_SQL=$(get_template_value "STAGE_PATH_MODULE_SQL") STAGE_PATH_MODULE_SQL=$(get_template_value "STAGE_PATH_MODULE_SQL")
# Modules rebuild source path
MODULES_REBUILD_SOURCE_PATH=$MODULES_REBUILD_SOURCE_PATH
# SQL Source Overlay # SQL Source Overlay
SOURCE_DIR=$(get_template_value "SOURCE_DIR") SOURCE_DIR=$(get_template_value "SOURCE_DIR")
AC_SQL_SOURCE_PATH=$(get_template_value "AC_SQL_SOURCE_PATH") AC_SQL_SOURCE_PATH=$(get_template_value "AC_SQL_SOURCE_PATH")
@@ -1792,7 +1815,6 @@ EOF
fi fi
done done
cat <<EOF cat <<EOF
MODULES_REBUILD_SOURCE_PATH=$MODULES_REBUILD_SOURCE_PATH
# Client data # Client data
CLIENT_DATA_VERSION=${CLIENT_DATA_VERSION:-$DEFAULT_CLIENT_DATA_VERSION} CLIENT_DATA_VERSION=${CLIENT_DATA_VERSION:-$DEFAULT_CLIENT_DATA_VERSION}