Skip to content

Commit c9ffc62

Browse files
committed
Fix merge conflict
2 parents abc646f + 3d15a19 commit c9ffc62

File tree

513 files changed

+174036
-129894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

513 files changed

+174036
-129894
lines changed

acore.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "azerothcore-wotlk",
3-
"version": "14.0.0-dev",
3+
"version": "15.0.0-dev",
44
"license": "GPL2"
55
}

apps/config-merger/README.md

Lines changed: 57 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,66 @@
1-
# ==== PHP merger (index.php + merge.php) ====
1+
# AzerothCore Config Merger
22

3-
This is a PHP script for merging a new .dist file with your existing .conf file (worldserver.conf.dist and authserver.conf.dist)
3+
This directory contains configuration file merger tools to help update your AzerothCore server and module configurations with new options from distribution files.
44

5-
It uses sessions so it is multi user safe, it adds any options that are removed to the bottom of the file commented out, just in case it removes something it shouldn't.
6-
If you add your custom patch configs below "# Custom" they will be copied exactly as they are.
5+
**Available Options:** PHP and Python versions (**Python recommended for new users**)
76

8-
Your new config will be found under $basedir/session_id/newconfig.conf.merge
7+
## Purpose
98

10-
If you do not run a PHP server on your machiene you can read this guide on ["How to execute PHP code using command line?"](https://www.geeksforgeeks.org/how-to-execute-php-code-using-command-line/) on geeksforgeeks.org.
9+
The config merger tools help you update your existing configuration files (`.conf`) to include new options that have been added to the distribution files (`.conf.dist`). Distribution files always contain the most recent configuration changes and new options, while your personal config files may be missing these updates. These tools will:
1110

12-
```
13-
php -S localhost:port -t E:\Azerothcore-wotlk\apps\config-merger\
14-
```
11+
- Compare your existing config files with the latest distribution files
12+
- Show you new configuration options that are missing from your files
13+
- Allow you to selectively add new options to your configs
14+
- Create automatic backups before making any changes
15+
- Support authserver.conf, worldserver.conf, and all module configs
1516

16-
Change port to an available port to use. i.e 8000
17+
## Available Versions
1718

18-
Then go to your browser and type:
19+
### PHP Version
1920

21+
**Requirements:**
22+
- PHP 5.6 or higher
23+
- **Requires a web server** (Apache, Nginx, IIS, etc.) to function
24+
- No additional libraries required (uses built-in PHP functions only)
25+
26+
**Features:**
27+
- Web-based interface
28+
- Configuration file parsing and merging
29+
- Browser-accessible configuration management
30+
31+
**Usage:**
32+
- Deploy to web server with PHP support (can be local - XAMPP, WAMP, or built-in PHP server)
33+
- Access via web browser
34+
- Follow web interface instructions
35+
36+
### Python Version (Recommended)
37+
38+
**Requirements:**
39+
- Python 3.6 or higher
40+
- No additional setup required beyond installing Python
41+
- No additional libraries required (uses built-in modules only)
42+
43+
**Features:**
44+
- Interactive menu-driven interface
45+
- Support for server configs (authserver.conf, worldserver.conf)
46+
- Support for module configs with bulk or selective updates
47+
- Automatic backup creation with timestamps
48+
- Cross-platform compatibility (Windows, Linux, macOS, and others)
49+
- Can be run via command line or by double-clicking the .py file
50+
51+
**Usage:**
52+
```bash
53+
# Via command line
54+
cd /path/to/configs
55+
python config_merger.py
56+
57+
# Or double-click config_merger.py to open in terminal
2058
```
21-
localhost:8000/index.php
22-
```
59+
60+
## Installation
61+
62+
When building AzerothCore with the `TOOL_CONFIG_MERGER` CMake option enabled, **only the Python version** will be automatically copied to your configs directory during the build process. The PHP version must be manually deployed to a web server.
63+
64+
## Support
65+
66+
Both versions provide the same core functionality for merging configuration files. Choose the version that best fits your environment and preferences. Python is recommended for most users due to its simplicity and no web server requirement.

apps/config-merger/php/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ==== PHP merger (index.php + merge.php) ====
2+
3+
This is a PHP script for merging a new .dist file with your existing .conf file (worldserver.conf.dist and authserver.conf.dist)
4+
5+
It uses sessions so it is multi user safe, it adds any options that are removed to the bottom of the file commented out, just in case it removes something it shouldn't.
6+
If you add your custom patch configs below "# Custom" they will be copied exactly as they are.
7+
8+
Your new config will be found under $basedir/session_id/newconfig.conf.merge
9+
10+
If you do not run a PHP server on your machine you can read this guide on ["How to execute PHP code using command line?"](https://www.geeksforgeeks.org/how-to-execute-php-code-using-command-line/) on geeksforgeeks.org.
11+
12+
```
13+
php -S localhost:port -t E:\Azerothcore-wotlk\apps\config-merger\php\
14+
```
15+
16+
Change port to an available port to use. i.e 8000
17+
18+
Then go to your browser and type:
19+
20+
```
21+
localhost:8000/index.php
22+
```
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# AzerothCore Config Updater/Merger - Python Version
2+
3+
A command-line tool to update your AzerothCore configuration files with new options from distribution files.
4+
5+
> [!NOTE]
6+
> Based on and modified from [@BoiseComputer](https://github.com/BoiseComputer) (Brian Aldridge)'s [update_module_confs](https://github.com/Brian-Aldridge/update_module_confs) project to meet AzerothCore's needs
7+
8+
## Overview
9+
10+
This tool compares your existing configuration files (`.conf`) with the latest distribution files (`.conf.dist`) and helps you add new configuration options that may have been introduced in updates. It ensures your configs stay up-to-date while preserving your custom settings.
11+
12+
## Features
13+
14+
- **Interactive Menu System** - Easy-to-use numbered menu options
15+
- **Server Config Support** - Update authserver.conf and worldserver.conf
16+
- **Module Config Support** - Update all or selected module configurations
17+
- **Automatic Backups** - If you choose a valid option and there are changes, a timestamped backup is created before any changes are made (e.g. `filename(d11_m12_y2025_14h_30m_45s).bak`)
18+
- **Selective Updates** - Choose which new config options to add (y/n prompts)
19+
- **Safe Operation** - Only creates backups and makes changes when new options are found
20+
21+
## How to Use
22+
23+
### Interactive Mode (Default)
24+
25+
1. **Run the script** in your configs directory:
26+
```bash
27+
python config_merger.py
28+
```
29+
Or simply **double-click** the `config_merger.py` file to run it directly.
30+
31+
2. **Specify configs path** (or press Enter for current directory):
32+
```
33+
Enter the path to your configs folder (default: .) which means current folder:
34+
```
35+
36+
3. **Choose from the menu**:
37+
```
38+
AzerothCore Config Updater/Merger (v. 1)
39+
--------------------------
40+
1 - Update Auth Config
41+
2 - Update World Config
42+
3 - Update Auth and World Configs
43+
4 - Update All Modules Configs
44+
5 - Update Modules (Selection) Configs
45+
0 - Quit
46+
```
47+
48+
### Command Line Interface (CLI)
49+
50+
For automation and scripting, you can use CLI mode:
51+
52+
```bash
53+
python config_merger.py [config_dir] [target] [options]
54+
```
55+
56+
**Arguments:**
57+
- `config_dir` (optional): Path to configs directory (default: current directory)
58+
- `target` (optional): What to update:
59+
- `auth` - Update authserver.conf only
60+
- `world` - Update worldserver.conf only
61+
- `both` - Update both server configs
62+
- `modules` - Update all module configs
63+
- `modules-select` - Interactive module selection
64+
65+
**Options:**
66+
- `-y, --yes`: Skip prompts and auto-add all new config options (default: prompt for each option)
67+
- `--version`: Show version information
68+
69+
**Examples:**
70+
```bash
71+
# Interactive mode (default)
72+
python config_merger.py
73+
74+
# Update auth config with prompts
75+
python config_merger.py . auth
76+
77+
# Update both configs automatically (no prompts)
78+
python config_merger.py /path/to/configs both -y
79+
80+
# Update all modules with confirmation
81+
python config_merger.py . modules
82+
```
83+
84+
## Menu Options Explained
85+
86+
- **Option 1**: Updates only `authserver.conf` from `authserver.conf.dist`
87+
- **Option 2**: Updates only `worldserver.conf` from `worldserver.conf.dist`
88+
- **Option 3**: Updates both server config files
89+
- **Option 4**: Automatically processes all module config files in the `modules/` folder
90+
- **Option 5**: Shows you a list of available modules and lets you select specific ones to update
91+
- **Option 0**: Exit the program
92+
93+
## Interactive Process
94+
95+
For each missing configuration option found, the tool will:
96+
97+
1. **Show you the option** with its comments and default value
98+
2. **Ask for confirmation**: `Add [option_name] to config? (y/n):`
99+
3. **Add or skip** based on your choice
100+
4. **Create backup** (before any changes are made) only if you choose a valid option and there are changes (format: `filename(d11_m12_y2025_14h_30m_45s).bak`)
101+
102+
## Example Session
103+
104+
```
105+
Processing worldserver.conf ...
106+
Backup created: worldserver.conf(d11_m12_y2025_14h_30m_45s).bak
107+
108+
# New feature for XP rates
109+
XP.Rate = 1
110+
Add XP.Rate to config? (y/n): y
111+
Added XP.Rate.
112+
113+
# Database connection pool size
114+
Database.PoolSize = 5
115+
Add Database.PoolSize to config? (y/n): n
116+
Skipped Database.PoolSize.
117+
```
118+
119+
## Requirements
120+
121+
- Python 3.6 or higher
122+
- No additional libraries needed (uses built-in modules only)
123+
124+
## File Structure Expected
125+
126+
```
127+
configs/
128+
├── config_merger.py (this script)
129+
├── authserver.conf.dist
130+
├── authserver.conf
131+
├── worldserver.conf.dist
132+
├── worldserver.conf
133+
└── modules/
134+
├── mod_example.conf.dist
135+
├── mod_example.conf
136+
└── ...
137+
```
138+
139+
## License
140+
141+
This file is part of the AzerothCore Project. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
142+
143+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
144+
145+
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
146+
147+
**Note:** Original code portions were licensed under the MIT License by Brian Aldridge (https://github.com/BoiseComputer)
148+
Original project: https://github.com/Brian-Aldridge/update_module_confs

0 commit comments

Comments
 (0)