From f5b3b07bcb902e683d6747e9654ed3502c5be5fa Mon Sep 17 00:00:00 2001 From: uprightbass360 Date: Thu, 1 Jan 2026 15:50:04 -0500 Subject: [PATCH] update module profiles --- .env.template | 8 +++- .../module-profiles/azerothcore-vanilla.json | 2 +- scripts/python/setup_profiles.py | 2 +- setup.sh | 38 +++++++++++++++---- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/.env.template b/.env.template index 1ba5a47..fbb37b4 100644 --- a/.env.template +++ b/.env.template @@ -76,6 +76,12 @@ DB_GUARD_VERIFY_INTERVAL_SECONDS=86400 # ===================== 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 # ===================== @@ -235,8 +241,6 @@ CLIENT_DATA_CACHE_PATH=${STORAGE_PATH_LOCAL}/client-data-cache # Rebuild automation # ===================== AUTO_REBUILD_ON_DEPLOY=0 -# Default AzerothCore source checkout used for module rebuilds -MODULES_REBUILD_SOURCE_PATH=${STORAGE_PATH_LOCAL}/source/azerothcore # ===================== # Source repositories diff --git a/config/module-profiles/azerothcore-vanilla.json b/config/module-profiles/azerothcore-vanilla.json index e696a8e..5462160 100644 --- a/config/module-profiles/azerothcore-vanilla.json +++ b/config/module-profiles/azerothcore-vanilla.json @@ -2,7 +2,7 @@ "modules": [ ], - "label": "\u2b50 AzerothCore Main - Mod Free", + "label": "\ud83d\udd30 AzerothCore Main - Mod Free", "description": "Pure AzerothCore with no optional modules enabled", "order": 3 } diff --git a/scripts/python/setup_profiles.py b/scripts/python/setup_profiles.py index 50ff64b..f08be2c 100755 --- a/scripts/python/setup_profiles.py +++ b/scripts/python/setup_profiles.py @@ -80,7 +80,7 @@ def cmd_list(directory: Path) -> int: profiles.sort(key=lambda item: item[4]) 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)])) return 0 diff --git a/setup.sh b/setup.sh index 41347c2..f582c12 100755 --- a/setup.sh +++ b/setup.sh @@ -1139,12 +1139,29 @@ fi MODE_PRESET_NAME="$CLI_MODULE_PRESET" 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 say HEADER "MODULE PRESET" - echo "1) ${MODULE_PRESET_LABELS[$DEFAULT_PRESET_SUGGESTED]:-⭐ Suggested Modules}" - echo "2) ${MODULE_PRESET_LABELS[$DEFAULT_PRESET_PLAYERBOTS]:-🤖 Playerbots + Suggested modules}" - echo "3) ⚙️ Manual selection" - echo "4) 🚫 No modules" + printf " %s) %s\n" "1" "⭐ Suggested Modules" + printf " %s (%s)\n" "Baseline solo-friendly quality of life mix" "azerothcore-wotlk" + printf " %s) %s\n" "2" "🤖 Playerbots + Suggested 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 declare -A MENU_PRESET_INDEX=() @@ -1163,13 +1180,16 @@ fi for entry in "${ORDERED_PRESETS[@]}"; do local preset_name="${entry#*::}" [ -n "${MODULE_PRESET_CONFIGS[$preset_name]:-}" ] || continue - local pretty_name + local pretty_name preset_desc if [ -n "${MODULE_PRESET_LABELS[$preset_name]:-}" ]; then pretty_name="${MODULE_PRESET_LABELS[$preset_name]}" else pretty_name=$(echo "$preset_name" | tr '_-' ' ' | awk '{for(i=1;i<=NF;i++){$i=toupper(substr($i,1,1)) substr($i,2)}}1') 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_index=$((menu_index + 1)) done @@ -1567,7 +1587,7 @@ fi fi 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" fi @@ -1756,6 +1776,9 @@ DB_GUARD_VERIFY_INTERVAL_SECONDS=$(get_template_value "DB_GUARD_VERIFY_INTERVAL_ # Module SQL staging 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 SOURCE_DIR=$(get_template_value "SOURCE_DIR") AC_SQL_SOURCE_PATH=$(get_template_value "AC_SQL_SOURCE_PATH") @@ -1792,7 +1815,6 @@ EOF fi done cat <