apps/installer/includes/modules-manager/README.md
This directory contains the module management system for AzerothCore, providing advanced functionality for installing, updating, and managing server modules.
repo[:dirname][@branch[:commit]] formatmodules-manager/
āāā modules.sh # Core module management functions
āāā README.md # This documentation file
The module manager supports flexible syntax for specifying modules:
repo[:dirname][@branch[:commit]]
| Specification | Description |
|---|---|
mod-transmog | Simple module name, uses default branch and directory |
mod-transmog:my-custom-dir | Custom directory name |
mod-transmog@develop | Specific branch |
mod-transmog:custom@develop:abc123 | Custom directory, branch, and commit |
https://github.com/owner/repo.git@main | Full URL with branch |
[email protected]:owner/repo.git:custom-dir | SSH URL with custom directory |
# Simple module installation
./acore.sh module install mod-transmog
# Install with custom directory name
./acore.sh module install mod-transmog:my-transmog-dir
# Install specific branch
./acore.sh module install mod-transmog@develop
# Install with full specification
./acore.sh module install mod-transmog:custom-dir@develop:abc123
# Install from URL
./acore.sh module install https://github.com/azerothcore/mod-transmog.git@main
# Install multiple modules
./acore.sh module install mod-transmog mod-ale:custom-eluna
# Install all modules from list
./acore.sh module install --all
# Update specific module
./acore.sh module update mod-transmog
# Update all modules
./acore.sh module update --all
# Update with branch specification
./acore.sh module update mod-transmog@develop
# Remove by simple name (cross-format recognition)
./acore.sh module remove mod-transmog
# Remove by URL (recognizes same module)
./acore.sh module remove https://github.com/azerothcore/mod-transmog.git
# Remove multiple modules
./acore.sh module remove mod-transmog mod-ale
# Search for modules
./acore.sh module search transmog
# Search with multiple terms
./acore.sh module search auction house
# Search with input prompt
./acore.sh module search
# List all installed modules
./acore.sh module list
# Start interactive menu system
./acore.sh module
# Menu options:
# s - Search for available modules
# i - Install one or more modules
# u - Update installed modules
# r - Remove installed modules
# l - List installed modules
# h - Show detailed help
# q - Close this menu
The system intelligently recognizes the same module across different specification formats:
# These all refer to the same module:
mod-transmog
azerothcore/mod-transmog
https://github.com/azerothcore/mod-transmog.git
[email protected]:azerothcore/mod-transmog.git
This allows:
The system prevents common conflicts:
# If 'mod-transmog' directory already exists:
$ ./acore.sh module install mod-transmog:mod-transmog
Possible solutions:
1. Use a different directory name: mod-transmog:my-custom-name
2. Remove the existing directory first
3. Use the update command if this is the same module
The system uses intelligent owner/name matching to prevent installing the same module multiple times, even when specified in different formats.
You can exclude modules from installation using the MODULES_EXCLUDE_LIST environment variable:
# Exclude specific modules (space-separated)
export MODULES_EXCLUDE_LIST="mod-test-module azerothcore/mod-dev-only"
./acore.sh module install --all # Will skip excluded modules
# Supports cross-format matching
export MODULES_EXCLUDE_LIST="https://github.com/azerothcore/mod-transmog.git"
./acore.sh module install mod-transmog # Will be skipped as excluded
The exclusion system:
install, install --all)The module manager provides enhanced terminal output with colors:
Color support is automatically disabled when:
NO_COLOR environment variable is setYou can force color output with:
export FORCE_COLOR=1
# Source the module functions
source "$AC_PATH_INSTALLER/includes/modules-manager/modules.sh"
# Use module functions
inst_module_install "mod-transmog:custom-dir@develop"
The module system is tested through the main installer test suite:
./apps/installer/test/test_module_commands.bats
Modules are tracked in conf/modules.list with the format:
# Comments start with #
repo_reference branch commit
# Examples:
azerothcore/mod-transmog master abc123def456
https://github.com/custom/mod-custom.git develop def456abc789
mod-ale:custom-eluna-dir main 789abc123def
The list maintains:
| Variable | Description | Default |
|---|---|---|
MODULES_LIST_FILE | Override default modules list path | $AC_PATH_ROOT/conf/modules.list |
MODULES_EXCLUDE_LIST | Space-separated list of modules to exclude | - |
J_PATH_MODULES | Modules installation directory | $AC_PATH_ROOT/modules |
AC_PATH_ROOT | AzerothCore root path | - |
NO_COLOR | Disable colored output | - |
FORCE_COLOR | Force colored output even when not TTY | - |
$AC_PATH_ROOT/conf/modules.list$J_PATH_MODULES (flat structure, no owner subfolders)| Function | Purpose |
|---|---|
inst_module() | Main dispatcher and interactive menu |
inst_parse_module_spec() | Parse advanced module syntax |
inst_extract_owner_name() | Normalize modules for cross-format recognition |
inst_mod_list_*() | Module list management (read/write/update) |
inst_module_*() | Module operations (install/update/remove/search) |
modules/ without owner subdirectoriesacore-module.json for AzerothCore version compatibilityFor debugging module operations, you can examine the generated commands:
# Check what Joiner commands would be executed
tail -f /tmp/joiner_called.txt # In test environments
When modifying the module manager:
test_module_commands.bats for new functionality# Run all module-related tests
cd apps/installer
bats test/test_module_commands.bats
# Test with different environments
NO_COLOR=1 ./acore.sh module list
FORCE_COLOR=1 ./acore.sh module help