From b5b009bc3b29317f031b77a8a2307a9bd9d2a983 Mon Sep 17 00:00:00 2001 From: Deckard Date: Fri, 24 Oct 2025 02:01:14 -0400 Subject: [PATCH] fix: Keep source builds local and disable mod-pocket-portal --- deploy.sh | 9 +++++- scripts/manage-modules-sql.sh | 5 +-- scripts/manage-modules.sh | 31 ++++++------------- scripts/rebuild-with-modules.sh | 33 +++++++++++++++++--- scripts/setup-source.sh | 55 +++++++++++++++++++++++++-------- setup.sh | 31 +++++++++++++++++-- 6 files changed, 119 insertions(+), 45 deletions(-) diff --git a/deploy.sh b/deploy.sh index 5358e8e..fe7930d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -106,8 +106,15 @@ compose(){ } ensure_source_repo(){ + local module_playerbots + module_playerbots="$(read_env MODULE_PLAYERBOTS "0")" + local default_source="./source/azerothcore" + if [ "$module_playerbots" = "1" ]; then + default_source="./source/azerothcore-playerbots" + fi + local src_path - src_path="$(read_env MODULES_REBUILD_SOURCE_PATH "./source/azerothcore")" + src_path="$(read_env MODULES_REBUILD_SOURCE_PATH "$default_source")" if [[ "$src_path" != /* ]]; then src_path="$ROOT_DIR/$src_path" fi diff --git a/scripts/manage-modules-sql.sh b/scripts/manage-modules-sql.sh index ec8d2f3..904c079 100755 --- a/scripts/manage-modules-sql.sh +++ b/scripts/manage-modules-sql.sh @@ -228,8 +228,9 @@ execute_module_sql_scripts() { execute_module_sql "mod-TimeIsTime" "Time Is Time" fi - if [ "$MODULE_POCKET_PORTAL" = "1" ] && [ -d "mod-pocket-portal" ]; then - execute_module_sql "mod-pocket-portal" "Pocket Portal" + if [ "$MODULE_POCKET_PORTAL" = "1" ]; then + echo 'âš ī¸ Skipping mod-pocket-portal SQL: module disabled until C++20 patch is applied.' + MODULE_POCKET_PORTAL=0 fi if [ "$MODULE_RANDOM_ENCHANTS" = "1" ] && [ -d "mod-random-enchants" ]; then diff --git a/scripts/manage-modules.sh b/scripts/manage-modules.sh index bc10b31..c55cdcd 100755 --- a/scripts/manage-modules.sh +++ b/scripts/manage-modules.sh @@ -117,6 +117,12 @@ if [ "$MODULE_TIME_IS_TIME" != "1" ] && [ -d "mod-TimeIsTime" ]; then rm -rf mod-TimeIsTime fi +if [ "$MODULE_POCKET_PORTAL" = "1" ]; then + echo 'âš ī¸ mod-pocket-portal is temporarily disabled (requires C++20 ). Skipping until patched.' + echo ' Apply the std::format -> SendSystemMessage fix before re-enabling this module.' + MODULE_POCKET_PORTAL=0 +fi + if [ "$MODULE_POCKET_PORTAL" != "1" ] && [ -d "mod-pocket-portal" ]; then echo 'Removing mod-pocket-portal (disabled)...' rm -rf mod-pocket-portal @@ -224,13 +230,12 @@ echo 'Installing enabled modules...' # Install Playerbots if enabled if [ "$MODULE_PLAYERBOTS" = "1" ] && [ ! -d "mod-playerbots" ]; then echo '🤖 Installing mod-playerbots...' - echo ' 📖 Project: https://github.com/liyunfan1223/mod-playerbots' - echo ' 🚨 CRITICAL: REQUIRES Custom AzerothCore branch (liyunfan1223/azerothcore-wotlk/tree/Playerbot)' + echo ' 📖 Project: https://github.com/uprightbass360/mod-playerbots' + echo ' 🚨 CRITICAL: REQUIRES Custom AzerothCore branch (uprightbass360/azerothcore-wotlk-playerbots/tree/Playerbot)' echo ' 🚨 INCOMPATIBLE with standard AzerothCore - module will not function properly' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' echo ' 📋 POST-INSTALL: Requires manual account/character configuration' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' - git clone https://github.com/liyunfan1223/mod-playerbots.git mod-playerbots + git clone https://github.com/uprightbass360/mod-playerbots.git mod-playerbots fi # Install AOE Loot if enabled @@ -239,7 +244,6 @@ if [ "$MODULE_AOE_LOOT" = "1" ] && [ ! -d "mod-aoe-loot" ]; then echo ' 📖 Project: https://github.com/azerothcore/mod-aoe-loot' echo ' â„šī¸ Allows looting multiple corpses with one action' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/azerothcore/mod-aoe-loot.git mod-aoe-loot fi @@ -249,7 +253,6 @@ if [ "$MODULE_LEARN_SPELLS" = "1" ] && [ ! -d "mod-learn-spells" ]; then echo ' 📖 Project: https://github.com/azerothcore/mod-learn-spells' echo ' â„šī¸ Automatically teaches class spells on level up' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/azerothcore/mod-learn-spells.git mod-learn-spells fi @@ -259,7 +262,6 @@ if [ "$MODULE_FIREWORKS" = "1" ] && [ ! -d "mod-fireworks-on-level" ]; then echo ' 📖 Project: https://github.com/azerothcore/mod-fireworks-on-level' echo ' â„šī¸ Displays fireworks when players level up' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/azerothcore/mod-fireworks-on-level.git mod-fireworks-on-level fi @@ -271,7 +273,6 @@ if [ "$MODULE_INDIVIDUAL_PROGRESSION" = "1" ] && [ ! -d "mod-individual-progress echo ' ✅ AUTO-CONFIG: Automatically sets EnablePlayerSettings=1 and DBC.EnforceItemAttributes=0' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' echo ' 📁 Optional client files available in optional/ directory' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/ZhengPeiRu21/mod-individual-progression.git mod-individual-progression fi @@ -298,7 +299,6 @@ if [ "$MODULE_TRANSMOG" = "1" ] && [ ! -d "mod-transmog" ]; then echo ' 📖 Project: https://github.com/azerothcore/mod-transmog' echo ' â„šī¸ Allows appearance customization of equipment' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/azerothcore/mod-transmog.git mod-transmog fi @@ -319,7 +319,6 @@ if [ "$MODULE_SOLO_LFG" = "1" ] && [ ! -d "mod-solo-lfg" ]; then echo ' â„šī¸ Allows dungeon finder for solo players and small groups' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' echo ' 💡 Pairs perfectly with mod-solocraft and mod-autobalance' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/azerothcore/mod-solo-lfg.git mod-solo-lfg fi @@ -369,7 +368,6 @@ if [ "$MODULE_ELUNA" = "1" ] && [ ! -d "mod-eluna" ]; then echo ' 📖 Project: https://github.com/azerothcore/mod-eluna' echo ' â„šī¸ Lua scripting engine for custom server functionality' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/azerothcore/mod-eluna.git mod-eluna fi if [ "$MODULE_ARAC" = "1" ] && [ ! -d "mod-arac" ]; then @@ -378,7 +376,6 @@ if [ "$MODULE_ARAC" = "1" ] && [ ! -d "mod-arac" ]; then echo ' â„šī¸ All Races All Classes - Removes class restrictions' echo ' 🚨 CRITICAL: Requires DBC file updates and client patch!' echo ' 📋 POST-INSTALL: Apply Patch-A.MPQ to client WoW/Data/ directory' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/heyitsbench/mod-arac.git mod-arac fi @@ -387,11 +384,6 @@ if [ "$MODULE_TIME_IS_TIME" = "1" ] && [ ! -d "mod-TimeIsTime" ]; then git clone https://github.com/dunjeon/mod-TimeIsTime.git mod-TimeIsTime fi -if [ "$MODULE_POCKET_PORTAL" = "1" ] && [ ! -d "mod-pocket-portal" ]; then - echo 'Installing mod-pocket-portal...' - git clone https://github.com/azerothcore/mod-pocket-portal.git mod-pocket-portal -fi - if [ "$MODULE_RANDOM_ENCHANTS" = "1" ] && [ ! -d "mod-random-enchants" ]; then echo 'Installing mod-random-enchants...' git clone https://github.com/azerothcore/mod-random-enchants.git mod-random-enchants @@ -421,7 +413,6 @@ if [ "$MODULE_NPC_ENCHANTER" = "1" ] && [ ! -d "mod-npc-enchanter" ]; then echo ' 📖 Project: https://github.com/azerothcore/mod-npc-enchanter' echo ' â„šī¸ NPC that provides enchanting services' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/azerothcore/mod-npc-enchanter.git mod-npc-enchanter fi @@ -439,7 +430,6 @@ if [ "$MODULE_ASSISTANT" = "1" ] && [ ! -d "mod-assistant" ]; then echo ' 📖 Project: https://github.com/noisiver/mod-assistant' echo ' â„šī¸ NPC (ID: 9000000) providing heirlooms, glyphs, gems, profession services' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/noisiver/mod-assistant.git mod-assistant fi if [ "$MODULE_REAGENT_BANK" = "1" ] && [ ! -d "mod-reagent-bank" ]; then @@ -447,7 +437,6 @@ if [ "$MODULE_REAGENT_BANK" = "1" ] && [ ! -d "mod-reagent-bank" ]; then echo ' 📖 Project: https://github.com/ZhengPeiRu21/mod-reagent-bank' echo ' â„šī¸ Reagent banker NPC for storing crafting materials, frees bag space' echo ' 🔧 REBUILD REQUIRED: Container must be rebuilt with source-based compilation' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/ZhengPeiRu21/mod-reagent-bank.git mod-reagent-bank fi if [ "$MODULE_BLACK_MARKET_AUCTION_HOUSE" = "1" ] && [ ! -d "mod-black-market" ]; then @@ -456,7 +445,6 @@ if [ "$MODULE_BLACK_MARKET_AUCTION_HOUSE" = "1" ] && [ ! -d "mod-black-market" ] echo ' â„šī¸ MoP Black Market Auction House backported using Eluna Lua engine' echo ' âš ī¸ SPECIAL MODULE: Uses Lua scripts, not C++ compilation' echo ' 🔧 REQUIRES: mod-eluna must be enabled and functional' - echo ' đŸ”Ŧ STATUS: IN TESTING - Currently under verification' git clone https://github.com/Youpeoples/Black-Market-Auction-House.git mod-black-market # Special handling: Copy Lua scripts to lua_scripts directory @@ -768,7 +756,6 @@ ENABLED_MODULES="" [ "$MODULE_GAIN_HONOR_GUARD" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-gain-honor-guard" [ "$MODULE_ELUNA" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-eluna" [ "$MODULE_TIME_IS_TIME" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-time-is-time" -[ "$MODULE_POCKET_PORTAL" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-pocket-portal" [ "$MODULE_RANDOM_ENCHANTS" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-random-enchants" [ "$MODULE_SOLOCRAFT" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-solocraft" [ "$MODULE_PVP_TITLES" = "1" ] && ENABLED_MODULES="$ENABLED_MODULES mod-pvp-titles" diff --git a/scripts/rebuild-with-modules.sh b/scripts/rebuild-with-modules.sh index 7728ebc..fa9c6e2 100755 --- a/scripts/rebuild-with-modules.sh +++ b/scripts/rebuild-with-modules.sh @@ -41,6 +41,16 @@ read_env(){ echo "$value" } +default_source_path(){ + local module_playerbots + module_playerbots="$(read_env MODULE_PLAYERBOTS "0")" + if [ "$module_playerbots" = "1" ]; then + echo "./source/azerothcore-playerbots" + else + echo "./source/azerothcore" + fi +} + confirm(){ local prompt="$1" default="$2" reply if [ "$ASSUME_YES" = "1" ]; then @@ -82,24 +92,39 @@ fi STORAGE_PATH="$(read_env STORAGE_PATH "./storage")" if [[ "$STORAGE_PATH" != /* ]]; then - STORAGE_PATH="$PROJECT_DIR/$STORAGE_PATH" + STORAGE_PATH="$PROJECT_DIR/${STORAGE_PATH#./}" fi MODULES_DIR="$STORAGE_PATH/modules" SENTINEL_FILE="$MODULES_DIR/.requires_rebuild" +STORAGE_PATH_ABS="$STORAGE_PATH" + REBUILD_SOURCE_PATH="$SOURCE_OVERRIDE" +default_path="$(default_source_path)" if [ -z "$REBUILD_SOURCE_PATH" ]; then - REBUILD_SOURCE_PATH="$(read_env MODULES_REBUILD_SOURCE_PATH "./source/azerothcore")" + REBUILD_SOURCE_PATH="$(read_env MODULES_REBUILD_SOURCE_PATH "$default_path")" fi if [ -z "$REBUILD_SOURCE_PATH" ]; then - REBUILD_SOURCE_PATH="./source/azerothcore" + REBUILD_SOURCE_PATH="$default_path" fi if [[ "$REBUILD_SOURCE_PATH" != /* ]]; then - REBUILD_SOURCE_PATH="$(realpath "$REBUILD_SOURCE_PATH" 2>/dev/null || echo "$REBUILD_SOURCE_PATH")" + REBUILD_SOURCE_PATH="$PROJECT_DIR/${REBUILD_SOURCE_PATH#./}" fi +if [[ "$default_path" != /* ]]; then + default_path_abs="$PROJECT_DIR/${default_path#./}" +else + default_path_abs="$default_path" +fi +if [[ "$REBUILD_SOURCE_PATH" == "$STORAGE_PATH_ABS"* ]]; then + echo "âš ī¸ Source path $REBUILD_SOURCE_PATH is inside shared storage ($STORAGE_PATH_ABS). Using local workspace $default_path_abs instead." + REBUILD_SOURCE_PATH="$default_path_abs" +fi + +REBUILD_SOURCE_PATH="$(realpath "$REBUILD_SOURCE_PATH" 2>/dev/null || echo "$REBUILD_SOURCE_PATH")" + SOURCE_COMPOSE="$REBUILD_SOURCE_PATH/docker-compose.yml" if [ ! -f "$SOURCE_COMPOSE" ]; then echo "❌ Source docker-compose.yml not found at $SOURCE_COMPOSE" diff --git a/scripts/setup-source.sh b/scripts/setup-source.sh index ff416b5..5a3b3f1 100755 --- a/scripts/setup-source.sh +++ b/scripts/setup-source.sh @@ -9,24 +9,53 @@ if [ -f .env ]; then source .env fi -# Default values -SOURCE_PATH="${MODULES_REBUILD_SOURCE_PATH:-./source/azerothcore}" +# Remember project root for path normalization +PROJECT_ROOT="$(pwd)" -# Convert to absolute path if relative -if [[ "$SOURCE_PATH" != /* ]]; then - SOURCE_PATH="$(pwd)/$SOURCE_PATH" -fi +# Default values MODULE_PLAYERBOTS="${MODULE_PLAYERBOTS:-0}" +DEFAULT_STANDARD_PATH="./source/azerothcore" +DEFAULT_PLAYERBOTS_PATH="./source/azerothcore-playerbots" + +SOURCE_PATH_DEFAULT="$DEFAULT_STANDARD_PATH" +if [ "$MODULE_PLAYERBOTS" = "1" ]; then + SOURCE_PATH_DEFAULT="$DEFAULT_PLAYERBOTS_PATH" +fi +SOURCE_PATH="${MODULES_REBUILD_SOURCE_PATH:-$SOURCE_PATH_DEFAULT}" + +STORAGE_PATH_VALUE="${STORAGE_PATH:-./storage}" +if [[ "$STORAGE_PATH_VALUE" != /* ]]; then + STORAGE_PATH_ABS="$PROJECT_ROOT/${STORAGE_PATH_VALUE#./}" +else + STORAGE_PATH_ABS="$STORAGE_PATH_VALUE" +fi + +DEFAULT_SOURCE_ABS="$PROJECT_ROOT/${SOURCE_PATH_DEFAULT#./}" + +# Convert to absolute path if relative and ensure we stay local +if [[ "$SOURCE_PATH" != /* ]]; then + SOURCE_PATH="$PROJECT_ROOT/${SOURCE_PATH#./}" +fi +if [[ "$SOURCE_PATH" == "$STORAGE_PATH_ABS"* ]]; then + echo "âš ī¸ Source path $SOURCE_PATH is inside shared storage ($STORAGE_PATH_ABS). Using local workspace $DEFAULT_SOURCE_ABS instead." + SOURCE_PATH="$DEFAULT_SOURCE_ABS" + MODULES_REBUILD_SOURCE_PATH="$SOURCE_PATH_DEFAULT" +fi + +ACORE_REPO_STANDARD="${ACORE_REPO_STANDARD:-https://github.com/azerothcore/azerothcore-wotlk.git}" +ACORE_BRANCH_STANDARD="${ACORE_BRANCH_STANDARD:-master}" +ACORE_REPO_PLAYERBOTS="${ACORE_REPO_PLAYERBOTS:-https://github.com/uprightbass360/azerothcore-wotlk-playerbots.git}" +ACORE_BRANCH_PLAYERBOTS="${ACORE_BRANCH_PLAYERBOTS:-Playerbot}" # Repository and branch selection based on playerbots mode if [ "$MODULE_PLAYERBOTS" = "1" ]; then - REPO_URL="https://github.com/liyunfan1223/azerothcore-wotlk.git" - BRANCH="Playerbot" - echo "📌 Playerbots mode: Using liyunfan1223 fork, Playerbot branch" + REPO_URL="$ACORE_REPO_PLAYERBOTS" + BRANCH="$ACORE_BRANCH_PLAYERBOTS" + echo "📌 Playerbots mode: Using $REPO_URL, branch $BRANCH" else - REPO_URL="https://github.com/azerothcore/azerothcore-wotlk.git" - BRANCH="master" - echo "📌 Standard mode: Using official AzerothCore, master branch" + REPO_URL="$ACORE_REPO_STANDARD" + BRANCH="$ACORE_BRANCH_STANDARD" + echo "📌 Standard mode: Using $REPO_URL, branch $BRANCH" fi echo "📍 Repository: $REPO_URL" @@ -75,4 +104,4 @@ echo " Branch: $CURRENT_BRANCH" echo " Commit: $CURRENT_COMMIT" echo " Last commit: $(git log -1 --pretty=format:'%s (%an, %ar)')" -echo '🎉 Source repository setup complete!' \ No newline at end of file +echo '🎉 Source repository setup complete!' diff --git a/setup.sh b/setup.sh index d31ab2c..2974ce8 100755 --- a/setup.sh +++ b/setup.sh @@ -904,14 +904,39 @@ fi fi if [ "$RUN_REBUILD_NOW" = "1" ] || [ "$AUTO_REBUILD_ON_DEPLOY" = "1" ]; then if [ -z "$MODULES_REBUILD_SOURCE_PATH_VALUE" ]; then - MODULES_REBUILD_SOURCE_PATH_VALUE="./source/azerothcore" + if [ "$MODULE_PLAYERBOTS" = "1" ]; then + MODULES_REBUILD_SOURCE_PATH_VALUE="./source/azerothcore-playerbots" + else + MODULES_REBUILD_SOURCE_PATH_VALUE="./source/azerothcore" + fi say INFO "Using default source path: ${MODULES_REBUILD_SOURCE_PATH_VALUE}" fi fi fi + local default_source_rel="./source/azerothcore" + if [ "$MODULE_PLAYERBOTS" = "1" ]; then + default_source_rel="./source/azerothcore-playerbots" + fi + + if [ -n "$MODULES_REBUILD_SOURCE_PATH_VALUE" ]; then + local storage_abs="$STORAGE_PATH" + if [[ "$storage_abs" != /* ]]; then + storage_abs="$(pwd)/${storage_abs#./}" + fi + local candidate_path="$MODULES_REBUILD_SOURCE_PATH_VALUE" + if [[ "$candidate_path" != /* ]]; then + candidate_path="$(pwd)/${candidate_path#./}" + fi + if [[ "$candidate_path" == "$storage_abs"* ]]; then + say WARNING "MODULES_REBUILD_SOURCE_PATH is inside shared storage (${candidate_path}). Using local workspace ${default_source_rel} instead." + MODULES_REBUILD_SOURCE_PATH_VALUE="$default_source_rel" + fi + fi + if [ "$RUN_REBUILD_NOW" = "1" ]; then - local rebuild_source_path="${MODULES_REBUILD_SOURCE_PATH_VALUE:-./source/azerothcore}" + local default_source_path="$default_source_rel" + local rebuild_source_path="${MODULES_REBUILD_SOURCE_PATH_VALUE:-$default_source_path}" if [ ! -f "$rebuild_source_path/docker-compose.yml" ]; then say INFO "Preparing source repository via scripts/setup-source.sh" if ! ./scripts/setup-source.sh >/dev/null 2>&1; then @@ -945,7 +970,7 @@ fi fi if [ -z "$MODULES_REBUILD_SOURCE_PATH_VALUE" ]; then - MODULES_REBUILD_SOURCE_PATH_VALUE="./source/azerothcore" + MODULES_REBUILD_SOURCE_PATH_VALUE="$default_source_rel" fi DB_PLAYERBOTS_NAME=${DB_PLAYERBOTS_NAME:-acore_playerbots}