Compare commits

..

4 Commits

Author SHA1 Message Date
Yehonal ffd81423f8 Merge branch '1.x' of https://github.com/azerothcore/azerothcore-wotlk into 1.x 2016-12-29 21:03:34 +01:00
Yehonal d3804b6d56 updated doc submodule 2016-12-29 21:02:55 +01:00
ShinDarth 988790892d DB/Auth: fix column name in update file, thanks @DarkmoonRabbit 2016-11-21 19:33:58 +01:00
ShinDarth ef49439b55 DB/Updates: fix syntax error in SQL update file 2016-11-20 17:17:13 +01:00
5949 changed files with 1343797 additions and 3213510 deletions
-9
View File
@@ -1,9 +0,0 @@
build*/
var/*
data/contrib/*
data/doc/*
conf/*
!conf/dist
docker/worldserver/data/*
.idea
cmake-build-debug/*
-8
View File
@@ -1,8 +0,0 @@
[*]
charset = utf-8
indent_style = space
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80
-12
View File
@@ -1,12 +0,0 @@
WORLDSERVER_DATA=./docker/worldserver/data
WORLDSERVER_ETC=./docker/worldserver/etc
WORLDSERVER_LOGS=./docker/worldserver/logs
AUTHSERVER_ETC=./docker/authserver/etc
AUTHSERVER_LOGS=./docker/authserver/logs
WORLD_EXTERNAL_PORT=8085
AUTH_EXTERNAL_PORT=3724
DB_EXTERNAL_PORT=3306
DB_ROOT_PASSWORD=password
SOAP_EXTERNAL_PORT=7878
-49
View File
@@ -1,49 +0,0 @@
### TITLE
## Type(Scope/Subscope): Commit ultra short explanation
## |---- Write below the examples with a maximum of 50 characters ----|
## Example 1: fix(DB/SAI): Missing spell to NPC Hogger
## Example 2: fix(CORE/Raid): Phase 2 of Ragnaros
## Example 3: feat(CORE/Commands): New GM command to do something
### DESCRIPTION
## Explain why this change is being made, what does it fix etc...
## |---- Write below the examples with a maximum of 72 characters per lines ----|
## Example: Hogger (id: 492) was not charging player when being engaged.
## Provide links to any issue, commit, pull request or other resource
## Example 1: Closes AzerothCore issue #23
## Example 2: Ported from other project's commit (link)
## Example 3: References taken from wowpedia / wowhead / wowwiki / https://wowgaming.altervista.org/aowow/
## =======================================================
## EXTRA INFOS
## =======================================================
## "Type" can be:
## feat (new feature)
## fix (bug fix)
## refactor (refactoring production code)
## style (formatting, missing semi colons, etc; no code change)
## docs (changes to documentation)
## test (adding or refactoring tests; no production code change)
## chore (updating bash scripts, git files etc; no production code change)
## --------------------
## Remember to
## Capitalize the subject line
## Use the imperative mood in the subject line
## Do not end the subject line with a period
## Separate subject from body with a blank line
## Use the body to explain what and why rather than how
## Can use multiple lines with "-" for bullet points in body
## --------------------
## More info here https://www.conventionalcommits.org/en/v1.0.0-beta.2/
## =======================================================
## "Scope" can be:
## CORE (core related, c++)
## DB (database related, sql)
## =======================================================
## "Subscope" is optional and depends on the nature of the commit.
## =======================================================
+1 -5
View File
@@ -1,10 +1,6 @@
# Auto detect text files and perform LF normalization
* text=auto
# End of line rules
*.sh eol=lf
*.sh.dist eol=lf
bin/* eol=lf
# Whitespace rules
# strict (no trailing, no tabs)
@@ -32,4 +28,4 @@ bin/* eol=lf
*.RTF diff=astextplain
# Ignore sql/* files
data/sql/* linguist-documentation
sql/* linguist-documentation
-76
View File
@@ -1,76 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the admin team at https://discord.gg/gkt4y2x. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
-43
View File
@@ -1,43 +0,0 @@
## CONTRIBUTING
AzerothCore is a learning project, and there are lots of different ways to contribute to the project:
* By [testing our fixes](http://www.azerothcore.org/wiki/How-to-test-a-PR) (we can teach you how to correctly use Git to help us but that will also help you out tremendously)
* By developing directly to the core or the modules
* By reporting bugs within the project
* By [creating new modules](http://www.azerothcore.org/wiki/Create-a-Module)
* By improving our wiki
* By providing direct support to our community (on discord, StackOverflow or specialized forums)
* By making extra content (video tutorial for example)
* By putting bounties on issues
If you want to contribute to the project, you will find a lot of resources that will guide you in our wiki.
Feel free to join us on [our Discord chat server](https://discord.gg/gkt4y2x) where we taught a lot of new people how to get started and who are now important contributors!
## AUTHORS & CONTRIBUTORS
This project exists thanks to:
- **The [AzerothCore developers and contributors](https://github.com/AzerothCore/azerothcore-wotlk/graphs/contributors)**
- The [SunwellCore developers xinef and pussywizard](http://www.azerothcore.org/pages/sunwell.pl/)
- All the [TrinityCore developers and contributors](https://github.com/TrinityCore/TrinityCore/blob/3.3.5/AUTHORS)
- All the [MaNGOS, ScriptDev2 and UDB developers and contributors](https://github.com/cmangos/mangos-wotlk/blob/master/AUTHORS.md)
## IMPORTANT LINKS
<!-- Remove if the PR 3210 is accepted
- [Code of Conduct](https://github.com/azerothcore-wotlk/.github/code_of_conduct.md
-->
- [Website](http://www.azerothcore.org/)
- [AzerothCore catalogue](http://www.azerothcore.org/catalogue/ "Modules, tools, and other things for AzerothCore") (modules, tools etc...)
- [Module template / Module skeleton](https://github.com/azerothcore/skeleton-module/)
- [Our community hub (Discord)](https://discord.gg/gkt4y2x)
- [Our wiki](http://www.azerothcore.org/wiki "Easy to use and developed by AzerothCore founder")
- [Our Facebook page](https://www.facebook.com/AzerothCore/)
- [Our LinkedIn page](https://www.linkedin.com/company/azerothcore/)
The AzerothCore Staff appreciate all the help and contribution that *you* put your time into.
Thank you!
-1
View File
@@ -1 +0,0 @@
custom: salt.bountysource.com/checkout/amount?team=azerothcore
-95
View File
@@ -1,95 +0,0 @@
---
name: Bug report
about: Create a report to help us improve.
title: ''
labels: ''
assignees: ''
---
<!-- IF YOU DO NOT FILL THIS TEMPLATE OUT, WE WILL CLOSE YOUR ISSUE! -->
<!-- This template is for problem reports, for feature suggestion etc... feel free to edit it.
If this is a crash report, upload the crashlog on https://gist.github.com/
For issues containing a fix, please create a Pull Request following this tutorial: http://www.azerothcore.org/wiki/Contribute#how-to-create-a-pull-request -->
<!-- WRITE A RELEVANT TITLE -->
##### CURRENT BEHAVIOUR:
<!-- Describe the bug in detail. Database to link spells, NPCs, quests etc https://wowgaming.altervista.org/aowow/ -->
##### EXPECTED BLIZZLIKE BEHAVIOUR:
<!-- Describe how it should be working without the bug. -->
##### STEPS TO REPRODUCE THE PROBLEM:
<!-- Describe precisely how to reproduce the bug so we can fix it or confirm its existence:
- Which commands to use? Which NPC to teleport to?
- Do we need to have debug flags on Cmake?
- Do we need to look at the console while the bug happens?
- Other steps
-->
1.
2.
3.
##### EXTRA NOTES:
<!--
Any information that can help the developers to identify and fix the issue should be put here.
Examples:
- was this bug always present in AzerothCore? if it was introduced after a change, please mention it
- the code line(s) that cause the issue
- does this feature work in other server applications (e.g. CMaNGOS, TrinityCore, etc...) ?
-->
##### AC HASH/COMMIT:
<!-- IF YOU DO NOT FILL THIS OUT, WE WILL CLOSE YOUR ISSUE! NEVER WRITE "LATEST", ALWAYS PUT THE ACTUAL VALUE INSTEAD.
Find the commit hash (unique identifier) by running "git log" on your own clone of AzerothCore or by looking at here https://github.com/azerothcore/azerothcore-wotlk/commits/master -->
##### OPERATING SYSTEM:
<!-- Windows 7/10, Debian 8/9/10, Ubuntu 16/18 etc... -->
##### MODULES:
<!-- Are you using modules? If yes, list them (note them down in a .txt for opening future issues) -->
##### OTHER CUSTOMIZATIONS:
<!-- Are you using any extra script?
- Did you apply any core patch/diff?
- Did you modify your database?
- Or do you have other customizations? If yes please specify them here.
-->
<!-- ------------------------- THE END ------------------------------
Thank you for your contribution.
If you use AzerothCore regularly, we really NEED your help to:
- TEST our fixes ( http://www.azerothcore.org/wiki/Contribute#how-to-test-a-pull-request )
- Report issues
- Improve the documentation/wiki
With your help the project can evolve much quicker!
-->
<!-- NOTE: If you intend to contribute more than once, you should really join us on our discord channel! We set cosmetic ranks for our contributors and may give access to special resources/knowledge to them! The link is on our site http://azerothcore.org/
-->
-14
View File
@@ -1,14 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Website
url: https://www.azerothcore.org
about: On the AC website you can find a lot of things, such as existing modules.
- name: Wiki
url: https://www.azerothcore.org/wiki
about: You can find plenty of information on our Wiki.
- name: How to ask for help
url: https://www.azerothcore.org/wiki/How-to-ask-for-help
about: Before submitting an issue we'd love if you take a minute to read this.
- name: Discord
url: https://discord.gg/gkt4y2x
about: Join the discussions over at our Discord Server.
-35
View File
@@ -1,35 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'Feature: '
labels: Suggestion
assignees: ''
---
<!-- IF YOU DO NOT FILL THIS TEMPLATE OUT, WE WILL CLOSE YOUR ISSUE! -->
<!-- This template is made for feature requests or suggestions on the project only. -->
**Describe your feature request or suggestion in detail**
<!-- A clear and concise description of what you want to happen. -->
**Describe a possible solution to your Feature or Suggestion in detail**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
<!-- ------------------------- THE END ------------------------------
Thank you for your contribution.
If you use AzerothCore regularly, we really NEED your help to:
- TEST our fixes ( http://www.azerothcore.org/wiki/Contribute#how-to-test-a-pull-request )
- Report issues
- Improve the documentation/wiki
With your help, the project can evolve much quicker!
-->
<!-- NOTE: If you intend to contribute more than once, you should really join us on our discord channel! We set cosmetic ranks for our contributors and may give access to special resources/knowledge to them! The link is on our site http://azerothcore.org/
-->
-173
View File
@@ -1,173 +0,0 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
[![CodeFactor](https://www.codefactor.io/repository/github/azerothcore/azerothcore-wotlk/badge)](https://www.codefactor.io/repository/github/azerothcore/azerothcore-wotlk)
[![core-build](https://github.com/azerothcore/azerothcore-wotlk/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/azerothcore-wotlk/actions?query=workflow%3Acore-build+branch%3Amaster+event%3Apush)
[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=40032087)](https://www.bountysource.com/teams/azerothcore/bounties "Put money on issues or get paid for fixing them")
[![StackOverflow](http://img.shields.io/badge/stackoverflow-azerothcore-blue.svg)](https://stackoverflow.com/questions/tagged/azerothcore?sort=newest "Ask / browse questions here")
[![Discord](https://img.shields.io/discord/217589275766685707.svg)](https://discord.gg/gkt4y2x "Our community hub on Discord")
## Introduction
AzerothCore (AC) is an open-source game-server application for World of Warcraft, currently supporting the 3.3.5a game version.
It is written in C++ and is based on MaNGOS, TrinityCore and SunwellCore.
## Why AzerothCore?
1. Stability
1. The authenticity of the content
1. [Modularity](https://en.wikipedia.org/wiki/Modular_programming)
1. A lot of modules to choose from
1. Better configuration files system
1. Compatibility with other emulators
1. Friendly and helpful community
### Stability
As players and administrators ourselves, we take great care into the stability of our core. Other projects focus on the development side of things and tend to forget that users want stability above everything else.
Hence why nobody is allowed to push commits directly to the core. All changes are reviewed and tested before they get to the `master` branch which means we need as many testers as possible to avoid stalling issues.
### Authenticity
Fixing and implementing missing blizzlike content is one of our priorities, and we can boast to offer the most content-complete open-source emulator.
<!-- Not sure for this below -->
<!-- We were the first open-source emulator to have almost every dungeon and raid working. -->
### Modules
Modules are essential to AzerothCore's success. Modules allow users to plug them in and out easily, and do not require to modify the core files. It also means users can keep pulling the git changes from the main repository and only develop their modules.
We have a lot of modules already made, some of them are very important and will ease your work:
* [Transmogrification](https://github.com/azerothcore/mod-transmog)
* [Eluna (lua engine) support](https://github.com/azerothcore/mod-eluna-lua-engine/ "Creator of Eluna is part of our core team")
* Full list available in the AzerothCore catalogue (link at the end)
### Configuration files
Our configuration file system allows the user to use a tiny configuration file for better readability and maintenance.
### Compatibility with other emulators
Not very far from its ancestor TrinityCore, most scripts can be adapted quite easily. For MaNGOS compatibility, it might require more knowledge but it shares a common base.
## Philosophy
Our main goal is to create a playable game server, offering a fully working game experience.
Here are the main points we focus on:
* Stability
* Ease of use / Practicability
* Playability (in-game content)
* Customization
* Community-driven software (check our discord)
We also welcome new users (even non-English speaking users!) and help them learn/improve their skills (C++, SQL, Git, software collaboration, tutoring/wiki, etc...).
Unlike other projects which focus more on the developer's side of things, we want users to be able to run their server with as few troubles as possible. All of our contributors run their private servers (local or public).
That's why AzerothCore is easier to use, to maintain, to understand, to develop on, and to customize to suit your needs, than other emulators.
In short, we focus on the **user experience (UX)**, whether it be the **player's experience**, the **developer's experience**, or the **administrator's experience**.
## How to Thank us
Being an open-source project, we rely on volunteers to pursue development. Here are ways to help us if you use AzerothCore:
### Github Star
Click on the "star this repository" button to help us gain more visibility on Github!
### By contributing
Check the **CONTRIBUTING** section below.
### Financially :moneybag:
You can support the project by financing the resolution of issues [using Bountysource](http://www.azerothcore.org/wiki/Bountysource "Bountysource explained in our wiki").
### Advertising
By talking about us on different platforms or to people who would like to get involved.
## Contributing
AzerothCore is a learning project, and there are lots of different ways to contribute to the project:
* By [testing our fixes](http://www.azerothcore.org/wiki/How-to-test-a-PR) (we can teach you how to correctly use Git to help us but that will also help you out tremendously)
* By developing directly to the core or the modules
* By reporting bugs within the project
* By [creating new modules](http://www.azerothcore.org/wiki/Create-a-Module)
* By improving our wiki
* By providing direct support to our community (on Discord, StackOverflow or specialized forums)
* By making extra content (video tutorial for example)
* By putting bounties on issues
If you want to contribute to the project, you will find a lot of resources that will guide you in our wiki.
Feel free to join us on [our Discord chat server](https://discord.gg/gkt4y2x) where we teach a lot of new people how to get started and who are now important contributors!
<!-- TO UNCOMMENT LATER -->
<!-- As we put a big emphasis on community, there are also special rewards for contributors such as reputation ranks (displayed in our Discord and our website), reputation badges (to display on your project/portfolio), premium software licenses, private modules access, private tools access and a lot of small private repositories access. -->
## Installation
Installation instructions are available [here](http://www.azerothcore.org/wiki/Installation).
We also have an auto-installation bash script [here](/apps/installer/main.sh) (*Warning: try it/analyze it before running it*).
Dockerization of AzerothCore is fully supported, and we have various community-made tutorials (eg: AWS / Digital Ocean installation).
## Support
Our self-made wiki probably has a lot of answers for you.
For help requests, it is recommended to ask your question on [StackOverflow](https://stackoverflow.com/questions/tagged/azerothcore) and link it in [our chat](https://discordapp.com/channels/217589275766685707/284406375495368704).
## Authors & Contributors
This project exists thanks to:
- **The [AzerothCore developers and contributors](https://github.com/AzerothCore/azerothcore-wotlk/graphs/contributors)**
- The [SunwellCore developers xinef and pussywizard](http://www.azerothcore.org/pages/sunwell.pl/)
- All the [TrinityCore developers and contributors](https://github.com/TrinityCore/TrinityCore/blob/3.3.5/AUTHORS)
- All the [MaNGOS, ScriptDev2 and UDB developers and contributors](https://github.com/cmangos/mangos-wotlk/blob/master/AUTHORS.md)
## Important Links
<!-- Remove if the PR 3210 is accepted
- [Code of Conduct](https://github.com/azerothcore-wotlk/.github/code_of_conduct.md
-->
- [Website](http://www.azerothcore.org/)
- [AzerothCore catalogue](http://www.azerothcore.org/catalogue.html "Modules, tools, and other stuff for AzerothCore") (modules, tools, etc...)
- [Module template / Module skeleton](https://github.com/azerothcore/skeleton-module/)
- [Our community hub (Discord)](https://discord.gg/gkt4y2x)
- [Our wiki](http://www.azerothcore.org/wiki "Easy to use and developed by AzerothCore founder")
- [Our Forum](https://github.com/azerothcore/azerothcore-wotlk/discussions/)
- [Our Facebook page](https://www.facebook.com/AzerothCore/)
- [Our LinkedIn page](https://www.linkedin.com/company/azerothcore/)
## Sponsors
List of organizations that help AzerothCore:
[![JetBrains](https://user-images.githubusercontent.com/75517/51205146-7f225c80-1905-11e9-82e0-835627be170d.png)](https://www.jetbrains.com/?from=AzerothCore)
## License
- The new AzerothCore source components are released under the [GNU AGPL v3](https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3)
- The old sources based on MaNGOS/TrinityCore are released under the [GNU GPL v2](https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2)
-34
View File
@@ -1,34 +0,0 @@
# Security Policy
## Supported Versions
We support these versions of AzerothCore:
| AzerothCore Branch | Supported |
| ------------------ | ------------------ |
| master | :white_check_mark: |
We support these versions of MySQL:
| MySQL Version | Supported |
| ------------- | ------------------ |
| 5.6 | :white_check_mark: |
| 5.7 | :white_check_mark: |
| 8.0 | :white_check_mark: |
We support these versions of MariaDB:
| MariaDB Version | Supported |
| --------------- | ------------------ |
| 10.2 | :white_check_mark: |
| 10.3 | :white_check_mark: |
| 10.4 | :white_check_mark: |
| 10.5 | :white_check_mark: |
Note: We do not support any repacks that may or may not have been made based on AzerothCore.
## Reporting a Vulnerability
We class a vulnerability to be any hack or exploit that has an impact on the server performance or that gives unfair advantages in the game (e.g fly hacking or injection tools).
If a new vulnerability is found you should always create a new [bug report](https://github.com/azerothcore/azerothcore-wotlk/issues/new/choose).
-97
View File
@@ -1,97 +0,0 @@
# How to ask for help
### Need help?
Do you need support with AzerothCore? No worries, we're happy to help you!
Whether you have troubles installing AzerothCore, or you want to ask how-to or generic help questions, **we will help you**.
We just want you to ask for support in the **proper way**. Please read this document before asking for any help.
### Why is the "proper way" so important?
If you ask a question directly in the chat, it can get easily lost and you might never be helped unless there is someone online in that specific moment that can help you.
If you put your question on StackOverflow it will **stay** there and someone can help you at any moment. You can also link your question in the chat to give it more visibility. Doesn't make sense for you? Just keep reading.
Also, most of the questions asked by users are repetitive. So we need an efficient way to handle all the support requests. We use StackOverflow for support questions and GitHub for bug reports.
Sounds complicated? Not at all! **Just keep reading**.
### Bug reports
A game feature (e.g. spell/quest/talent/etc..) doesn't work as it is supposed to?
Congratulations! You've just found a bug, please search among the [existing issues](https://github.com/azerothcore/azerothcore-wotlk/issues). There is a good chance that someone else has already reported the same bug that you found, in such case we kindly ask you to "confirm" it by leaving a comment.
Example:
![AzerothCore example issue search](https://user-images.githubusercontent.com/75517/51130957-9b9f9580-182e-11e9-8f7f-11aa5d7b6d67.png)
If after searching for an existing issue report, you didn't find any, then you should [open a new issue](https://github.com/azerothcore/azerothcore-wotlk/issues/new).
### Other support requests
- Getting an error while installing AzerothCore?
- Is there something in the documentation that is not clear for you?
- Do you want to know how to do something specific with AzerothCore?
- Are you trying to do something like implementing a new feature, fixing a bug, etc...?
- Do you have questions about C++ or SQL code that is related to AzerothCore or other AC custom modules?
These kinds of questions are considered support questions and are handled via [StackOverflow](https://stackoverflow.com/questions/tagged/azerothcore). **Read below**
### Do I need to register in StackOverflow?
**Not necessarily!** If you have a Google or a Facebook account, you can already log in [StackOverflow](https://stackoverflow.com/questions/tagged/azerothcore) (click the **_Log in_** button on the top-right corner of the website).
![image](https://user-images.githubusercontent.com/75517/51560794-d84e3b00-1e85-11e9-8510-6f1dd0b33d18.png)
### Search among the existing questions
There is a good chance that your question has already been asked by someone else, so please **search** it on [StackOverflow](https://stackoverflow.com/questions/tagged/azerothcore).
For example, are you getting an error from MySQL? Search it under the **[azerothcore]** tag!
![image](https://user-images.githubusercontent.com/75517/51131779-f0dca680-1830-11e9-8ccc-ef10ee8855a6.png)
Oh, there is already a question! And it has an answer! Let's open it!
![image](https://user-images.githubusercontent.com/75517/51132034-85df9f80-1831-11e9-9cc9-3eaee236396e.png)
**Another example**, imagine you're wondering whether you can use LUA scripts on AzerothCore:
![image](https://user-images.githubusercontent.com/75517/51131089-f802b500-182e-11e9-9b5d-a438172b22ea.png)
There is already a question and answer for that! Let's upvote the guys who asked and answered:
![image](https://user-images.githubusercontent.com/75517/51131658-ac510b00-1830-11e9-98dc-e7f3ef0da058.png)
## How to ask new questions
What if you can't find a question related to my specific problem? **Let's [open a new question](https://stackoverflow.com/questions/ask)**.
Remember to:
- Add a descriptive message.
- **Bad** example `I got DB error plz help me`.
- **Good** example: `After importing the sql updates, I get the error "XXX"`
- Don't forget the **[azerothcore]** tag!
- ![image](https://user-images.githubusercontent.com/75517/51132313-364da380-1832-11e9-8483-3bb6898d438a.png)
- It's useful to add **4 more tags** according to the category of your question (e.g. `c++`, `docker`, `MySQL`, `sql`, etc... ).
- Link your question in the #support-general channel of our [Discord chat](https://discordapp.com/channels/217589275766685707/284406375495368704)
- Read: [stackoverflow.com/help/how-to-ask](https://stackoverflow.com/help/how-to-ask)
### Share your knowledge!
Do you have anything to share with the community? Do you feel like some information could be useful to someone else (or to yourself in the future)? Have you solved a problem that took a while to figure out?
Ask a question on StackOverflow and then **answer it yourself**! Is it allowed? Yes, it is! Read this:
[https://stackoverflow.com/help/self-answer](https://stackoverflow.com/help/self-answer)
-28
View File
@@ -1,28 +0,0 @@
DB:
- data/**/*.sql
CORE:
- any: ['src/**/*', '!src/server/scripts/*', '!src/tests/*']
Script:
- src/server/scripts/**/*.cpp
- src/server/scripts/**/*.h
UnitTests:
- src/test/**/*
Documentation:
- ./*.md
Bash:
- ./*.sh
- apps/**/*.sh
- conf/**/*.sh
- deps/**/*.sh
- modules/**/*.sh
Cmake:
- ./*.cmake
Workflow:
- .github/workflows/*
-28
View File
@@ -1,28 +0,0 @@
name: Check pending SQL
on:
pull_request:
jobs:
check-pending-sql:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Check for Procedure/Function
run: |
for i in `find data/sql/updates/pending* -name "*.sql" -type f`; do
if $(cat "$i"|sed "s/'.*'\(.*\)/\1/g"|grep -q -i -E "(PROCEDURE|FUNCTION)"); then
exit 1
else
exit 0
fi
done
- name: Semicolon check
run: |
for i in `find data/sql/updates/pending* -name "*.sql" -type f`; do
if [[ $(cat "$i"|sed 's/ --.*$//'|tr -d '\n'|tail -c 1) != ";" ]]; then
echo "Missing Semicolon (;) or multiple newlines at the end of the file."
exit 1
else
exit 0
fi
done
-15
View File
@@ -1,15 +0,0 @@
name: check-codestyle
on:
push:
pull_request:
jobs:
check-codestyle:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
name: check codestyle
steps:
- uses: actions/checkout@v2
- name: Check core codestyle
run: source ./apps/ci/ci-codestyle.sh
-185
View File
@@ -1,185 +0,0 @@
name: core-build
on:
push:
branches:
- '**' # matches every branch
- '!coverity_scan' # excludes coverity_scan
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
# the result of the matrix will be the combination of all attributes, so we get os*compiler*modules builds
os: [ubuntu-20.04]
compiler: [clang]
modules: [with, without]
# we can include specific combinations here
include:
- os: ubuntu-20.04
compiler: clang9
modules: without
- os: ubuntu-18.04
compiler: clang # default in 18.04 is clang 6
modules: without
- os: ubuntu-18.04
compiler: gcc8
modules: without
- os: ubuntu-20.04
compiler: gcc # default in 20.04 is gcc 9
modules: without
- os: ubuntu-20.04
compiler: gcc10
modules: without
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.modules }}-modules
env:
COMPILER: ${{ matrix.compiler }}
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v2
- name: Checkout modules
run: ./apps/ci/ci-install-modules.sh
if: matrix.modules == 'with'
- name: Cache
uses: actions/cache@v2
with:
path: /home/runner/.ccache
key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}:${{ github.sha }}
restore-keys: |
ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}
ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules
- name: Configure OS
run: source ./acore.sh install-deps
env:
CONTINUOUS_INTEGRATION: true
- name: Create conf/config.sh
run: source ./apps/ci/ci-conf.sh
- name: Import db
run: source ./apps/ci/ci-import-db.sh
- name: Build
run: source ./apps/ci/ci-compile.sh
- name: Dry run
run: source ./apps/ci/ci-worldserver-dry-run.sh
- name: Check startup errors
run: source ./apps/ci/ci-error-check.sh
- name: Run unit tests
run: source ./apps/ci/ci-run-unit-tests.sh
mac-build:
strategy:
fail-fast: false
matrix:
os:
- macos-10.15
# - macos-11.0
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
needs: [build]
if: github.repository == 'azerothcore/azerothcore-wotlk' && success()
steps:
- uses: actions/checkout@v2
- name: Cache
uses: actions/cache@v1.1.2
with:
path: /Users/runner/.ccache
key: ccache:${{ matrix.os }}:${{ github.ref }}:${{ github.sha }}
restore-keys: |
ccache:${{ matrix.os }}:${{ github.ref }}
ccache:${{ matrix.os }}
- name: Install latest bash
run: brew install bash
- name: Configure OS
run: source ./acore.sh install-deps
- name: Build
run: source ./apps/ci/mac/ci-compile.sh
- name: Run unit tests
run: source ./apps/ci/ci-run-unit-tests.sh
windows-build:
strategy:
fail-fast: false
runs-on: windows-2019
name: windows-2019-MSVC16
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v2
- name: Configure OS
run: choco install --no-progress openssl
- name: Build
shell: bash
run: |
mkdir -p build && cd build
cmake .. -DTOOLS=ON
cmake --build . --config Release --parallel 4
- name: Copy dll files
shell: bash
run: |
cp "/c/mysql-5.7.21-winx64/lib/libmysql.dll" "build/bin/Release/"
cp "/c/Program Files/OpenSSL-Win64/bin/libcrypto-1_1-x64.dll" "build/bin/Release/"
cp "/c/Program Files/OpenSSL-Win64/bin/libssl-1_1-x64.dll" "build/bin/Release/"
- uses: actions/upload-artifact@v2
with:
name: windows-2019-MSVC16-release
path: build/bin/Release
docker-build:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
./bin/acore-docker-build-no-scripts
docker-worldserver:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
docker build -t azerothcore/worldserver -f docker/worldserver/Dockerfile docker/worldserver
docker-authserver:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
docker build -t azerothcore/authserver -f docker/authserver/Dockerfile docker/authserver
docker-database:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
docker build -t azerothcore/database -f docker/database/Dockerfile .
-35
View File
@@ -1,35 +0,0 @@
name: import-pending-sql
on:
push:
branches:
- master
jobs:
import-pending-sql:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Extract branch name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Import and commit pending sql
run: |
git config user.email "azerothcorebot@gmail.com" && git config user.name "AzerothCoreBot"
cd bin/
source acore-db-pendings
cd ..
git fetch --unshallow origin ${BRANCH}
git add -A .
git commit -am "chore(DB): import pending SQL update file" -m "Referenced commit(s): ${GITHUB_SHA}" || true
env:
BRANCH: ${{ steps.extract_branch.outputs.branch }}
- name: Push changes
uses: ad-m/github-push-action@fe38f0a751bf9149f0270cc1fe20bf9156854365
with:
github_token: ${{ secrets.AC_GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}
-12
View File
@@ -1,12 +0,0 @@
name: "Pull Request Labeler"
on: [pull_request_target]
jobs:
triage:
runs-on: ubuntu-20.04
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
sync-labels: true
+10 -27
View File
@@ -3,30 +3,16 @@
#
conf/*
!conf/dist
apps/drassil/*
env/dist/*
env/user/*
!conf/*.dist
modules/*
!modules/*.md
!modules/*.sh
build*/
var/*
docker/build/cache
docker/authserver/bin
docker/worldserver/bin
docker/authserver/etc/authserver.conf
docker/authserver/etc/authserver.conf.dist
docker/worldserver/etc/worldserver.conf
docker/worldserver/etc/worldserver.conf.dist
docker/authserver/logs/
docker/worldserver/logs/
docker/worldserver/data/
!docker/build
.env
apps/joiner
!.gitkeep
!modules/drassil/*
modules/drassil/joiner
!modules/hw-core
!modules/acore
!modules/worldengine
build*/
#
#Generic
@@ -50,7 +36,7 @@ CMakeLists.txt.user
*.LOCAL.*
#
# IDE & other software
# IDE & other softwares
#
/.settings/
/.externalToolBuilders/*
@@ -60,10 +46,6 @@ nbproject/
*.kate-swp
.browse.VC*
.vscode
.idea
cmake-build-debug/*
cmake-build-debug-coverage/*
coverage-report/
#
# Eclipse
@@ -93,3 +75,4 @@ local.properties
# !modules/yourmodule
#
# ==================
+3
View File
@@ -0,0 +1,3 @@
[submodule "data/doc"]
path = data/doc
url = https://github.com/azerothcore/azerothcore-wotlk.wiki.git
+36
View File
@@ -0,0 +1,36 @@
sudo: required
dist: trusty
language: cpp
compiler:
- clang
git:
depth: 1
before_install:
- sudo apt-get -qq install build-essential libtool make cmake cmake-data openssl
- sudo apt-get -qq install libssl-dev libmysqlclient-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev libace-dev
- sudo apt-get -qq install mysql-server
- git config user.email "travis@build.bot" && git config user.name "Travis CI"
- git tag -a -m "Travis build" init
install:
- mysql -uroot -e 'create database test_mysql;'
- cd bin
- cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=0 -DSCRIPTS=1 -DSERVERS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=check_install
- cd ..
script:
- $CXX --version
- mysql -uroot < data/sql/create/create_mysql.sql
- cat data/sql/base/db_auth/*.sql | mysql -uacore -pacore auth
- cat data/sql/base/db_characters/*.sql | mysql -uacore -pacore characters
- cat data/sql/base/db_world/*.sql | mysql -uacore -pacore world
- cat data/sql/updates/db_auth/*.sql | mysql -uacore -pacore auth
- cat data/sql/updates/db_characters/*.sql | mysql -uacore -pacore characters
- cat data/sql/updates/db_world/*.sql | mysql -uacore -pacore world
- mysql -uroot < data/sql/create/drop_mysql.sql
- cd bin
- make -j 8 -k && make install
- cd check_install/bin
+69 -123
View File
@@ -1,5 +1,4 @@
#
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
# Copyright (C)
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@@ -8,23 +7,13 @@
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Require a min version Cmake
cmake_minimum_required(VERSION 3.8...3.19)
# Fallback for using newer policies on CMake <3.12.
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
message(STATUS "CMake version: ${CMAKE_VERSION}")
# CMake policies (can not be handled elsewhere)
cmake_policy(SET CMP0005 NEW)
# Set projectname (must be done AFTER setting configurationtypes)
project(AzerothCore VERSION 3.0.0 LANGUAGES CXX C)
project(AzerothCore)
# CMake policies (can not be handled elsewhere)
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0005 OLD)
# add this options before PROJECT keyword
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
@@ -39,24 +28,80 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH 1)
set(AC_PATH_ROOT "${CMAKE_SOURCE_DIR}")
# set macro-directory
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/src/cmake/macros"
"${CMAKE_SOURCE_DIR}/deps/cotire/CMake")
set(CMAKE_MODULE_PATH "${AC_PATH_ROOT}/modules/worldengine/nucleus/src/cmake/macros")
include(CheckCXXSourceRuns)
include(CheckIncludeFiles)
# some utils for cmake
include(deps/drassil/cmake-utils/utils.cmake)
include(modules/uwd/cmake-utils/utils.cmake)
include(src/cmake/ac_macros.cmake)
# set default buildoptions and print them
include(conf/dist/config.cmake)
include(conf/config.cmake.dist)
# load custom configurations for cmake if exists
if(EXISTS "${CMAKE_SOURCE_DIR}/conf/config.cmake")
include(conf/config.cmake)
if(EXISTS "conf/config.cmake")
include(conf/config.cmake)
endif()
CU_RUN_HOOK("AFTER_LOAD_CONF")
# build in Release-mode by default if not explicitly set
if( NOT CMAKE_BUILD_TYPE )
set(CMAKE_BUILD_TYPE "Release")
endif()
# turn off PCH totally if enabled (hidden setting, mainly for devs)
if( NOPCH )
set(USE_COREPCH 0)
set(USE_SCRIPTPCH 0)
endif()
include(CheckPlatform)
# basic packagesearching and setup (further support will be needed, this is a preliminary release!)
set(OPENSSL_EXPECTED_VERSION 1.0.0)
set(ACE_EXPECTED_VERSION 6.0.3)
find_package(PCHSupport)
find_package(ACE REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(Threads REQUIRED)
find_package(MySQL REQUIRED)
if( UNIX )
find_package(Readline)
find_package(ZLIB)
find_package(BZip2)
endif()
if(NOT WITHOUT_GIT)
find_package(Git)
endif()
# Find revision ID and hash of the sourcetree
include(src/cmake/genrev.cmake)
# print out the results before continuing
include(src/cmake/showoptions.cmake)
#
# Loading framework
#
add_subdirectory(modules/worldengine/deps)
if( SERVERS OR TOOLS)
add_subdirectory(modules/worldengine/nucleus)
add_subdirectory(modules/worldengine/lib-collision)
add_subdirectory(modules/acore/game-framework)
endif()
if( TOOLS )
add_subdirectory(modules/acore/extractors)
endif()
#
@@ -66,13 +111,6 @@ endif()
# add modules and dependencies
CU_SUBDIRLIST(sub_DIRS "${CMAKE_SOURCE_DIR}/modules" FALSE FALSE)
FOREACH(subdir ${sub_DIRS})
get_filename_component(MODULENAME ${subdir} NAME)
if (";${DISABLED_AC_MODULES};" MATCHES ";${MODULENAME};")
continue()
endif()
STRING(REGEX REPLACE "^${CMAKE_SOURCE_DIR}/" "" subdir_rel ${subdir})
if(EXISTS "${subdir}/CMakeLists.txt")
message("Loading module: ${subdir_rel}")
@@ -80,64 +118,6 @@ FOREACH(subdir ${sub_DIRS})
endif()
ENDFOREACH()
CU_RUN_HOOK("AFTER_LOAD_CONF")
# build in Release-mode by default if not explicitly set
if( NOT CMAKE_BUILD_TYPE )
set(CMAKE_BUILD_TYPE "Release")
endif()
# turn off PCH totally if enabled (hidden setting, mainly for devs)
if( NOPCH )
set(USE_COREPCH 0)
set(USE_SCRIPTPCH 0)
endif()
include(ConfigureBaseTargets)
include(CheckPlatform)
include(GroupSources)
include(AutoCollect)
CU_RUN_HOOK("AFTER_LOAD_CMAKE_MODULES")
# basic packagesearching and setup (further support will be needed, this is a preliminary release!)
set(ACE_EXPECTED_VERSION 6.0.3)
find_package(PCHSupport)
find_package(ACE REQUIRED)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_definitions(-DACE_LACKS_AUTO_PTR=1)
endif()
find_package(MySQL REQUIRED)
if(UNIX AND WITH_PERFTOOLS)
find_package(Gperftools)
endif()
if(NOT WITHOUT_GIT)
find_package(Git)
endif()
# Find revision ID and hash of the sourcetree
include(src/cmake/genrev.cmake)
# print out the results before continuing
include(src/cmake/showoptions.cmake)
#
# Loading framework
#
add_subdirectory(deps)
if( SERVERS OR TOOLS)
add_subdirectory(src/common)
endif()
if( TOOLS )
add_subdirectory(src/tools)
endif()
#
# Loading application sources
#
@@ -148,37 +128,3 @@ CU_RUN_HOOK("BEFORE_SRC_LOAD")
add_subdirectory(src)
CU_RUN_HOOK("AFTER_SRC_LOAD")
if( BUILD_TESTING )
# we use these flags to get code coverage
set(UNIT_TEST_CXX_FLAGS "-fprofile-arcs -ftest-coverage -fno-inline")
# enable additional flags for GCC.
if ( CMAKE_CXX_COMPILER_ID MATCHES GNU )
set(UNIT_TEST_CXX_FLAGS "${UNIT_TEST_CXX_FLAGS} -fno-inline-small-functions -fno-default-inline")
endif()
message("Unit tests code coverage: enabling ${UNIT_TEST_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${UNIT_TEST_CXX_FLAGS}")
include(src/cmake/googletest.cmake)
fetch_googletest(
${PROJECT_SOURCE_DIR}/src/cmake
${PROJECT_BINARY_DIR}/googletest
)
enable_testing()
add_subdirectory(src/test)
add_custom_target(coverage DEPENDS coverage_command)
add_custom_command(OUTPUT coverage_command
# Run unit tests.
COMMAND ctest
# Run the graphical front-end for code coverage.
COMMAND lcov --directory src --capture --output-file coverage.info
COMMAND lcov --remove coverage.info '/usr/*' '${CMAKE_BINARY_DIR}/googletest/*' '${CMAKE_CURRENT_SOURCE_DIR}/src/test/*' --output-file coverage.info
COMMAND genhtml -o ${CMAKE_CURRENT_SOURCE_DIR}/coverage-report coverage.info
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
)
endif()
+41
View File
@@ -0,0 +1,41 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
[![Gitter](https://badges.gitter.im/azerothcore/azerothcore.svg)](https://gitter.im/azerothcore/azerothcore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=40032087)](https://www.bountysource.com/teams/azerothcore/bounties) [![Master Build Status](https://travis-ci.org/azerothcore/azerothcore-wotlk.svg)](https://travis-ci.org/azerothcore/azerothcore-wotlk) [![Issue Stats](http://www.issuestats.com/github/AzerothCore/azerothcore-wotlk/badge/issue)](http://www.issuestats.com/github/AzerothCore/azerothcore-wotlk) [![Issue Stats](http://www.issuestats.com/github/AzerothCore/azerothcore-wotlk/badge/pr)](http://www.issuestats.com/github/AzerothCore/azerothcore-wotlk)
## Introduction
AzerothCore is an open source game-server application for World of Warcraft, currently supporting the 3.3.5a game version.
It is written in C++ and based on MaNGOS, TrinityCore and SunwellCore.
## Why AzerothCore?
Our main goal is to create a playable game server, offering a fully working game experience. In short, we focus on the **user experience (UX)**.
We also believe in [software modularity](https://en.wikipedia.org/wiki/Modular_programming), because the more the software is modular, and the more it will be easy to be maintained, understood, developed, etc... So we organized the structure of AzerothCore as modular as possible, giving the possibility to [create new modules](https://github.com/azerothcore/azerothcore-wotlk/wiki/Create-a-Module) to add custom features (instead of patching the core).
## Learning project
AzerothCore is a learning project.
If you want to learn how to use C++, SQL, git, etc... you came to the right place! We will gladly to help you: **programming is our passion**.
If you want to contribute, in [our wiki](https://github.com/azerothcore/azerothcore-wotlk/wiki) you fill find a lot of resources that will guide you. Also you can poke us in [our gitter chat channel](https://gitter.im/azerothcore/azerothcore).
## Authors & Contributors
This project is brought to you thanks to:
- The [AzerothCore developers and contributors](https://github.com/AzerothCore/azerothcore-wotlk/graphs/contributors)
- The SunwellCore developers **xinef** and **pussywizard**
- All the [TrinityCore developers and contributors](https://github.com/TrinityCore/TrinityCore/blob/3.3.5/THANKS)
- All the [MaNGOS, ScriptDev2 and UDB developers and contributors](https://github.com/cmangos/mangos-wotlk/blob/master/AUTHORS.md)
## License
- The new AzerothCore source components are released under the [GNU AGPL v3](https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3)
- The old sources based on MaNGOS/TrinityCore are released under the [GNU GPL v2](https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2)
## Links
- [Website](https://azerothcore.github.io/)
-5
View File
@@ -1,5 +0,0 @@
{
"name" : "azerothcore-wotlk",
"version" : "3.0.0",
"license" : "AGPL3"
}
-7
View File
@@ -1,7 +0,0 @@
#!/usr/bin/env bash
set -e
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/apps/installer/main.sh"
-23
View File
@@ -1,23 +0,0 @@
function registerHooks() { hwc_event_register_hooks "$@"; }
function runHooks() { hwc_event_run_hooks "$@"; }
source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables
if [ -f "$AC_PATH_CONF/config.sh" ]; then
source "$AC_PATH_CONF/config.sh" # should overwrite previous
else
echo "NOTICE: file <$AC_PATH_CONF/config.sh> has not been found, you should create and configure it."
fi
#
# Load modules
#
for entry in "$AC_PATH_MODULES/"*/include.sh
do
if [ -e "$entry" ]; then
source "$entry"
fi
done
ACORE_VERSION=$("$AC_PATH_DEPS/jsonpath/JSONPath.sh" -f "$AC_PATH_ROOT/acore.json" -b '$.version')
-21
View File
@@ -1,21 +0,0 @@
unamestr=$(uname)
if [[ "$unamestr" == 'Darwin' ]]; then
if ! command -v brew &>/dev/null ; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
if ! [ "${BASH_VERSINFO}" -ge 4 ]; then
brew install bash
fi
if ! command -v greadlink &>/dev/null ; then
brew install coreutils
fi
AC_PATH_ROOT=$(greadlink -f "$AC_PATH_APPS/../")
else
AC_PATH_ROOT=$(readlink -f "$AC_PATH_APPS/../")
fi
AC_PATH_CONF="$AC_PATH_ROOT/conf"
AC_PATH_MODULES="$AC_PATH_ROOT/modules"
AC_PATH_DEPS="$AC_PATH_ROOT/deps"
-17
View File
@@ -1,17 +0,0 @@
[[ ${GUARDYVAR:-} -eq 1 ]] && return || readonly GUARDYVAR=1 # include it once
# force default language for applications
LC_ALL=C
AC_PATH_APPS="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
AC_PATH_SHARED="$AC_PATH_APPS/bash_shared"
source "$AC_PATH_SHARED/defines.sh"
source "$AC_PATH_DEPS/hw-core/bash-lib-event/src/hooks.sh"
source "$AC_PATH_SHARED/common.sh"
[[ "$OSTYPE" = "msys" ]] && AC_BINPATH_FULL="$BINPATH" || AC_BINPATH_FULL="$BINPATH/bin"
-23
View File
@@ -1,23 +0,0 @@
#!/bin/bash
set -e
echo "Codestyle check script:"
echo
declare -A singleLineRegexChecks=(
["[[:blank:]]$"]="Remove whitespace at the end of the lines above"
["\t"]="Replace tabs with 4 spaces in the lines above"
)
for check in ${!singleLineRegexChecks[@]}; do
echo " Checking RegEx: '${check}'"
if grep -P -r -I -n ${check} src; then
echo
echo "${singleLineRegexChecks[$check]}"
exit 1
fi
done
echo
echo "Everything looks good"
-11
View File
@@ -1,11 +0,0 @@
#!/bin/bash
set -e
echo "compile core"
export CCACHE_CPP2=true
export CCACHE_MAXSIZE='500MB'
export CCACHE_COMPRESS=1
ccache -s
./acore.sh "compiler" "all"
ccache -s
-72
View File
@@ -1,72 +0,0 @@
#!/bin/bash
set -e
cat >>conf/config.sh <<CONFIG_SH
MTHREADS=$(($(grep -c ^processor /proc/cpuinfo) + 2))
CWARNINGS=ON
CDEBUG=OFF
CTYPE=Release
CSCRIPTS=ON
CBUILD_TESTING=ON
CSERVERS=ON
CTOOLS=ON
CSCRIPTPCH=OFF
CCOREPCH=OFF
CCUSTOMOPTIONS='-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror"'
DB_CHARACTERS_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
CONFIG_SH
case $COMPILER in
# this is in order to use the "default" gcc version of the OS, without forcing a specific version
"gcc" )
time sudo apt-get install -y gcc g++
echo "CCOMPILERC=\"gcc\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"g++\"" >> ./conf/config.sh
;;
"gcc8" )
time sudo apt-get install -y gcc-8 g++-8
echo "CCOMPILERC=\"gcc-8\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"g++-8\"" >> ./conf/config.sh
;;
"gcc10" )
time sudo apt-get install -y gcc-10 g++-10
echo "CCOMPILERC=\"gcc-10\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"g++-10\"" >> ./conf/config.sh
;;
# this is in order to use the "default" clang version of the OS, without forcing a specific version
"clang" )
time sudo apt-get install -y clang
echo "CCOMPILERC=\"clang\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++\"" >> ./conf/config.sh
;;
"clang6" )
time sudo apt-get install -y clang-6.0
echo "CCOMPILERC=\"clang-6.0\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-6.0\"" >> ./conf/config.sh
;;
"clang9" )
time sudo apt-get install -y clang-9
echo "CCOMPILERC=\"clang-9\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-9\"" >> ./conf/config.sh
;;
"clang10" )
time sudo apt-get install -y clang-10
echo "CCOMPILERC=\"clang-10\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-10\"" >> ./conf/config.sh
;;
* )
echo "Unknown compiler $COMPILER"
exit 1
;;
esac
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
DB_ERRORS_FILE="./env/dist/bin/DBErrors.log";
if [[ ! -f ${DB_ERRORS_FILE} ]]; then
echo "File ${DB_ERRORS_FILE} not found!";
exit 1
fi
if [[ -s ${DB_ERRORS_FILE} ]]; then
printf "The DBErrors.log file contains startup errors:\n\n";
cat ${DB_ERRORS_FILE};
printf "\nPlease solve the startup errors listed above!\n";
exit 1;
else
echo "No startup errors found in DBErrors.log, good job!";
fi
-14
View File
@@ -1,14 +0,0 @@
#!/bin/bash
set -e
sudo systemctl start mysql
./acore.sh "db-assembler" "import-all"
if [ -s modules/mod-premium/sql/example_item_9017.sql ]
then
echo "Import custom module item..."
# if the premium module is available insert the example item or else the worldserver dry run will fail
mysql -uroot -proot acore_world < modules/mod-premium/sql/example_item_9017.sql
echo "Done!"
fi
-11
View File
@@ -1,11 +0,0 @@
#!/bin/bash
set -e
echo "install modules"
git clone --depth=1 --branch=master --recursive https://github.com/azerothcore/mod-eluna-lua-engine.git modules/mod-eluna-lua-engine
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-autobalance.git modules/mod-autobalance
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-transmog.git modules/mod-transmog
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-npc-beastmaster.git modules/mod-npc-beastmaster
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-duel-reset.git modules/mod-duel-reset
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-premium modules/mod-premium
-77
View File
@@ -1,77 +0,0 @@
#!/bin/bash
set -e
cat >>conf/config.sh <<CONFIG_SH
MTHREADS=$(($(grep -c ^processor /proc/cpuinfo) + 2))
CWARNINGS=ON
CDEBUG=OFF
CTYPE=Release
CSCRIPTS=ON
CBUILD_TESTING=ON
CSERVERS=ON
CTOOLS=ON
CSCRIPTPCH=OFF
CCOREPCH=OFF
CCUSTOMOPTIONS='-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror"'
DB_CHARACTERS_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
CONFIG_SH
time sudo apt-get update -y
# time sudo apt-get upgrade -y
time sudo apt-get install -y git lsb-release sudo ccache
time ./acore.sh install-deps
case $COMPILER in
# this is in order to use the "default" gcc version of the OS, without forcing a specific version
"gcc" )
time sudo apt-get install -y gcc g++
echo "CCOMPILERC=\"gcc\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"g++\"" >> ./conf/config.sh
;;
"gcc8" )
time sudo apt-get install -y gcc-8 g++-8
echo "CCOMPILERC=\"gcc-8\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"g++-8\"" >> ./conf/config.sh
;;
"gcc10" )
time sudo apt-get install -y gcc-10 g++-10
echo "CCOMPILERC=\"gcc-10\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"g++-10\"" >> ./conf/config.sh
;;
# this is in order to use the "default" clang version of the OS, without forcing a specific version
"clang" )
time sudo apt-get install -y clang
echo "CCOMPILERC=\"clang\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++\"" >> ./conf/config.sh
;;
"clang6" )
time sudo apt-get install -y clang-6.0
echo "CCOMPILERC=\"clang-6.0\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-6.0\"" >> ./conf/config.sh
;;
"clang9" )
time sudo apt-get install -y clang-9
echo "CCOMPILERC=\"clang-9\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-9\"" >> ./conf/config.sh
;;
"clang10" )
time sudo apt-get install -y clang-10
echo "CCOMPILERC=\"clang-10\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-10\"" >> ./conf/config.sh
;;
* )
echo "Unknown compiler $COMPILER"
exit 1
;;
esac
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
time var/build/obj/src/test/unit_tests
-11
View File
@@ -1,11 +0,0 @@
#!/bin/bash
set -e
echo "[worldserver]" >> ./env/dist/etc/worldserver.conf
echo "DataDir = \"../data/\"" >> ./env/dist/etc/worldserver.conf
echo "LoginDatabaseInfo = \"localhost;3306;root;root;acore_auth\"" >> ./env/dist/etc/worldserver.conf
echo "WorldDatabaseInfo = \"localhost;3306;root;root;acore_world\"" >> ./env/dist/etc/worldserver.conf
echo "CharacterDatabaseInfo = \"localhost;3306;root;root;acore_characters\"" >> ./env/dist/etc/worldserver.conf
git clone --depth=1 --branch=master --single-branch https://github.com/ac-data/ac-data.git ./env/dist/data
(cd ./env/dist/bin/ && timeout 5m ./worldserver --dry-run)
-11
View File
@@ -1,11 +0,0 @@
WORLDSERVER_DATA=./docker/worldserver/data
WORLDSERVER_ETC=./docker/worldserver/etc
WORLDSERVER_LOGS=./docker/worldserver/logs
AUTHSERVER_ETC=./docker/authserver/etc
AUTHSERVER_LOGS=./docker/authserver/logs
WORLD_EXTERNAL_PORT=8085
AUTH_EXTERNAL_PORT=3724
DB_EXTERNAL_PORT=9000
DB_ROOT_PASSWORD=password
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
cp apps/ci/docker/.env.dist .env
-30
View File
@@ -1,30 +0,0 @@
#!/usr/bin/env bash
export CCACHE_CPP2=true
export CCACHE_MAXSIZE='2G'
export CCACHE_COMPRESS=9
ccache -s
cd var/build/obj
time cmake ../../../ \
-DTOOLS=1 \
-DBUILD_TESTING=1 \
-DSCRIPTS=1 \
-DCMAKE_BUILD_TYPE=Debug \
-DMYSQL_ADD_INCLUDE_PATH=/usr/local/include \
-DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib \
-DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include \
-DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib \
-DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include \
-DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl/lib/libssl.dylib \
-DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl/lib/libcrypto.dylib \
-DCMAKE_C_FLAGS="-Werror" \
-DCMAKE_CXX_FLAGS="-Werror" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
;
time make -j $(($(sysctl -n hw.ncpu ) + 2))
ccache -s
-32
View File
@@ -1,32 +0,0 @@
## How to compile:
first of all, if you need some custom configuration you have to copy
/conf/dist/config.sh in /conf/config.sh and configure it
* for a "clean" compilation you must run all scripts in their order:
./1-clean.sh
./2-configure.sh
./3-build.sh
* if you add/rename/delete some sources and you need to compile it you have to run:
./2-configure.sh
./3-build.sh
* if you have modified code only, you just need to run
./3-build.sh
## compiler.sh
compiler.sh script contains an interactive menu to clean/compile/build. You can also run actions directly by command lines specifying the option.
Ex:
./compiler.sh 3
It will start the build process (it's equivalent to ./3-build.sh)
## Note:
For an optimal development process and **really faster** compilation time, is suggested to use clang instead of gcc
-72
View File
@@ -1,72 +0,0 @@
#!/usr/bin/env bash
set -e
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/includes/includes.sh"
function run_option() {
re='^[0-9]+$'
if [[ $1 =~ $re ]] && test "${comp_functions[$1-1]+'test'}"; then
${comp_functions[$1-1]}
elif [ -n "$(type -t comp_$1)" ] && [ "$(type -t comp_$1)" = function ]; then
fun="comp_$1"
$fun
else
echo "invalid option, use --help option for the commands list"
fi
}
function comp_quit() {
exit 0
}
comp_options=(
"build: Configure and compile"
"clean: Clean build files"
"configure: Run CMake"
"compile: Compile only"
"all: clean, configure and compile"
"quit: Close this menu")
comp_functions=(
"comp_build"
"comp_clean"
"comp_configure"
"comp_compile"
"comp_all"
"comp_quit")
PS3='[ Please enter your choice ]: '
runHooks "ON_AFTER_OPTIONS" #you can create your custom options
function _switch() {
_reply="$1"
_opt="$2"
case $_reply in
""|"--help")
echo "Available commands:"
printf '%s\n' "${options[@]}"
;;
*)
run_option $_reply $_opt
;;
esac
}
while true
do
# run option directly if specified in argument
[ ! -z $1 ] && _switch $@
[ ! -z $1 ] && exit 0
select opt in "${comp_options[@]}"
do
echo "==== ACORE COMPILER ===="
_switch $REPLY
break;
done
done
-7
View File
@@ -1,7 +0,0 @@
# you can choose build type from cmd argument
if [ ! -z $1 ]
then
CCTYPE=$1
CCTYPE=${CCTYPE^} # capitalize first letter if it's not yet
fi
-73
View File
@@ -1,73 +0,0 @@
function comp_clean() {
echo "Cleaning build files"
CWD=$(pwd)
cd $BUILDPATH
make -f Makefile clean || true
make clean || true
find -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} \+
cd $CWD
}
function comp_configure() {
CWD=$(pwd)
cd $BUILDPATH
echo "Build path: $BUILDPATH"
echo "DEBUG info: $CDEBUG"
echo "Compilation type: $CTYPE"
# -DCMAKE_BUILD_TYPE=$CCTYPE disable optimization "slow and huge amount of ram"
# -DWITH_COREDEBUG=$CDEBUG compiled with debug information
#-DSCRIPTS_COMMANDS=$CSCRIPTS -DSCRIPTS_CUSTOM=$CSCRIPTS -DSCRIPTS_EASTERNKINGDOMS=$CSCRIPTS -DSCRIPTS_EVENTS=$CSCRIPTS -DSCRIPTS_KALIMDOR=$CSCRIPTS \
#-DSCRIPTS_NORTHREND=$CSCRIPTS -DSCRIPTS_OUTDOORPVP=$CSCRIPTS -DSCRIPTS_OUTLAND=$CSCRIPTS -DSCRIPTS_PET=$CSCRIPTS -DSCRIPTS_SPELLS=$CSCRIPTS -DSCRIPTS_WORLD=$CSCRIPTS \
#-DAC_WITH_UNIT_TEST=$CAC_UNIT_TEST -DAC_WITH_PLUGINS=$CAC_PLG \
local DCONF=""
if [ ! -z "$CONFDIR" ]; then
DCONF="-DCONF_DIR=$CONFDIR"
fi
cmake $SRCPATH -DCMAKE_INSTALL_PREFIX=$BINPATH $DCONF -DSERVERS=$CSERVERS \
-DSCRIPTS=$CSCRIPTS \
-DBUILD_TESTING=$CBUILD_TESTING \
-DTOOLS=$CTOOLS -DUSE_SCRIPTPCH=$CSCRIPTPCH -DUSE_COREPCH=$CCOREPCH -DWITH_COREDEBUG=$CDEBUG -DCMAKE_BUILD_TYPE=$CTYPE -DWITH_WARNINGS=$CWARNINGS \
-DCMAKE_C_COMPILER=$CCOMPILERC -DCMAKE_CXX_COMPILER=$CCOMPILERCXX "-DDISABLED_AC_MODULES=$CDISABLED_AC_MODULES" $CCUSTOMOPTIONS
cd $CWD
runHooks "ON_AFTER_CONFIG"
}
function comp_compile() {
[ $MTHREADS == 0 ] && MTHREADS=$(grep -c ^processor /proc/cpuinfo) && MTHREADS=$(($MTHREADS + 2))
echo "Using $MTHREADS threads"
CWD=$(pwd)
cd $BUILDPATH
time make -j $MTHREADS
make -j $MTHREADS install
cd $CWD
runHooks "ON_AFTER_BUILD"
}
function comp_build() {
comp_configure
comp_compile
}
function comp_all() {
comp_clean
comp_build
}
-23
View File
@@ -1,23 +0,0 @@
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/../../bash_shared/includes.sh"
AC_PATH_COMPILER="$AC_PATH_APPS/compiler"
if [ -f "$AC_PATH_COMPILER/config.sh" ]; then
source "$AC_PATH_COMPILER/config.sh" # should overwrite previous
fi
function ac_on_after_build() {
# move the run engine
cp -rvf "$AC_PATH_APPS/startup-scripts/"* "$BINPATH"
}
registerHooks "ON_AFTER_BUILD" ac_on_after_build
source "$AC_PATH_COMPILER/includes/defines.sh"
source "$AC_PATH_COMPILER/includes/functions.sh"
mkdir -p $BUILDPATH
mkdir -p $BINPATH
-3
View File
@@ -1,3 +0,0 @@
/output/
/backup/
config.sh
-22
View File
@@ -1,22 +0,0 @@
## Description
This script allows you to assemble all sql files into one so you can easily import it to your databases (or use the main script to import directly). By default, it creates the merged files in `/env/dist`.
## How to use:
First of all, if you need some custom configuration, you have to copy `/conf/dist/config.sh` to `/conf/config.sh` and configure it. The file is here: https://github.com/azerothcore/azerothcore-wotlk/tree/master/conf
_Read it because there are several options to configure._
`db_assembler.sh` script contains an interactive menu to assemble and import sql files.
Just run it to display the options.
Note: You can even use actions directly by command lines specifying the option.
Ex:
./db_assembler.sh 1
It will merge all sql files without an interactive menu.
-77
View File
@@ -1,77 +0,0 @@
#!/usr/bin/env bash
set -e
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/includes/includes.sh"
cmdopt=$1
PS3='[Please enter your choice]: '
options=(
"all: Assemble all" # 1
"bases: Assemble only bases" # 2
"updates: Assemble only updates" # 3
"customs: Assemble only customs" # 4
"import-all: Assemble & Import all" # 5
"import-bases: Assemble & Import only bases" # 6
"import-updates: Assemble & Import only updates" # 7
"import-customs: Assemble & Import only customs" # 8
"quit: Exit from this menu" # 9
)
function _switch() {
_reply="$1"
_opt="$2"
case $_reply in
""|"all"|"1")
dbasm_run true true true
;;
""|"bases"|"2")
dbasm_run true false false
;;
""|"updates"|"3")
dbasm_run false true false
;;
""|"customs"|"4")
dbasm_run false false true
;;
""|"import-all"|"5")
dbasm_import true true true
;;
""|"import-bases"|"6")
dbasm_import true false false
;;
""|"import-updates"|"7")
dbasm_import false true false
;;
""|"import-customs"|"8")
dbasm_import false false true
;;
""|"quit"|"9")
echo "Goodbye!"
exit
;;
""|"--help")
echo "Available commands:"
printf '%s\n' "${options[@]}"
;;
*) echo "invalid option, use --help option for the commands list";;
esac
}
while true
do
# run option directly if specified in argument
[ ! -z $1 ] && _switch $@
[ ! -z $1 ] && exit 0
select opt in "${options[@]}"
do
echo "===== DB ASSEMBLER MENU ====="
_switch $REPLY
break
done
done
-389
View File
@@ -1,389 +0,0 @@
# globals
PROMPT_USER=""
PROMPT_PASS=""
# use in a subshell
function dbasm_resetExitCode() {
exit 0
}
function dbasm_mysqlExec() {
confs=$1
command=$2
options=$3
# MYSQL_PORT needs to be reseted as the next eval might not overwite the current value causing the commands to use wrong port
MYSQL_PORT=3306
eval $confs
if [[ ! -z "${PROMPT_USER// }" ]]; then
MYSQL_USER=$PROMPT_USER
MYSQL_PASS=$PROMPT_PASS
fi
export MYSQL_PWD=$MYSQL_PASS
retval=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" -P "$MYSQL_PORT" $options -e "$command")
if [[ $? -ne 0 ]]; then
err=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" -P "$MYSQL_PORT" $options -e "$command" 2>&1 )
if [[ "$err" == *"Access denied"* ]]; then
read -p "Insert mysql user:" PROMPT_USER
read -p "Insert mysql pass:" -s PROMPT_PASS
export MYSQL_PWD=$PROMPT_PASS
retval=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" -P "$MYSQL_PORT" $options -e "$command")
if [[ $? -ne 0 ]]; then
err=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" -P "$MYSQL_PORT" $options -e "$command" 2>&1 )
# it happens on new mysql 5.7 installations
# since mysql_native_password is explicit now
if [[ "$err" == *"Access denied"* ]]; then
echo "Setting mysql_native_password and for $PROMPT_USER ..."
sudo -h "$MYSQL_HOST" "$DB_MYSQL_EXEC" -P "$MYSQL_PORT" -e "UPDATE mysql.user SET authentication_string=PASSWORD('${PROMPT_PASS}'), plugin='mysql_native_password' WHERE User='${PROMPT_USER}'; FLUSH PRIVILEGES;"
fi
fi
# create configured account if not exists
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -P "$MYSQL_PORT" -e "CREATE USER IF NOT EXISTS '${MYSQL_USER}'@'${MYSQL_HOST}' IDENTIFIED BY '${MYSQL_PASS}' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;"
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -P "$MYSQL_PORT" -e "GRANT CREATE ON *.* TO '${MYSQL_USER}'@'${MYSQL_HOST}' WITH GRANT OPTION;"
for db in ${DATABASES[@]}
do
local _uc=${db^^}
local _name="DB_"$_uc"_CONF"
local _confs=${!_name}
local _name="DB_"$_uc"_NAME"
local _dbname=${!_name}
eval $_confs
echo "Grant permissions for ${MYSQL_USER}'@'${MYSQL_HOST} to ${_dbname}"
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -P "$MYSQL_PORT" -e "GRANT ALL PRIVILEGES ON ${_dbname}.* TO '${MYSQL_USER}'@'${MYSQL_HOST}' WITH GRANT OPTION;"
done
else
exit
fi
fi
}
function dbasm_isNotEmpty() {
dbname=$1
conf=$2
dbasm_mysqlExec "$conf" "SELECT COUNT(DISTINCT table_name) FROM information_schema.columns WHERE table_schema = '${dbname}'" "--skip-column-names"
if (( $retval > 0 )); then
true
else
false
fi
}
function dbasm_dbExists() {
dbname=$1
conf=$2
dbasm_mysqlExec "$conf" "SHOW DATABASES LIKE '${dbname}'" "--skip-column-names"
if [ "$retval" == "${dbname}" ]; then
true
else
false
fi
}
function dbasm_createDB() {
database=${1,,}
uc=${database^^}
name="DB_"$uc"_CONF"
confs=${!name}
name="DB_"$uc"_NAME"
dbname=${!name}
eval $confs
CONF_USER=$MYSQL_USER
CONF_PASS=$MYSQL_PASS
if dbasm_dbExists $dbname "$confs"; then
echo "$dbname database exists"
else
echo "Creating DB ${dbname} ..."
dbasm_mysqlExec "$confs" "CREATE DATABASE \`${dbname}\`" ""
dbasm_mysqlExec "$confs" "CREATE USER IF NOT EXISTS '${CONF_USER}'@'${MYSQL_HOST}' IDENTIFIED BY '${CONF_PASS}';"
dbasm_mysqlExec "$confs" "GRANT ALL PRIVILEGES ON \`${dbname}\`.* TO '${CONF_USER}'@'${MYSQL_HOST}' WITH GRANT OPTION;"
fi
}
function dbasm_assemble() {
# to lowercase
database=${1,,}
start_sql=$2
with_base=$3
with_updates=$4
with_custom=$5
uc=${database^^}
name="DB_"$uc"_PATHS"
v="$name[@]"
base=("${!v}")
name="DB_"$uc"_UPDATES_PATHS"
v="$name[@]"
updates=("${!v}")
name='DB_'$uc'_CUSTOM_PATHS'
v="$name[@]"
custom=("${!v}")
suffix_base="_base"
suffix_upd="_updates"
suffix_custom="_custom"
curTime=`date +%Y_%m_%d_%H_%M_%S`
# ALLOW FOR RECURSION WITH "**"
shopt -s globstar
if [ $with_base = true ]; then
echo "" > "$OUTPUT_FOLDER$database$suffix_base.sql"
if [ ! ${#base[@]} -eq 0 ]; then
echo "Generating $OUTPUT_FOLDER$database$suffix_base ..."
for d in "${base[@]}"
do
echo "Searching on $d ..."
if [ ! -z "$d" ]; then
for entry in "$d"/**/*.sql
do
if [[ -e $entry ]]; then
cat "$entry" >> "$OUTPUT_FOLDER$database$suffix_base.sql"
fi
done
fi
done
fi
fi
if [ $with_updates = true ]; then
updFile="$OUTPUT_FOLDER$database$suffix_upd.sql"
echo "" > "$updFile"
if [ ! ${#updates[@]} -eq 0 ]; then
echo "Generating $OUTPUT_FOLDER$database$suffix_upd ..."
for d in "${updates[@]}"
do
echo "Searching on $d ..."
if [ ! -z "$d" ]; then
for entry in "$d"/**/*.sql
do
if [[ ! -e $entry ]]; then
continue
fi
echo "-- $file" >> "$updFile"
cat "$entry" >> "$updFile"
done
fi
done
fi
fi
if [ $with_custom = true ]; then
custFile="$OUTPUT_FOLDER$database$suffix_custom.sql"
echo "" > "$custFile"
if [ ! ${#custom[@]} -eq 0 ]; then
echo "Generating $OUTPUT_FOLDER$database$suffix_custom ..."
for d in "${custom[@]}"
do
echo "Searching on $d ..."
if [ ! -z "$d" ]; then
for entry in "$d"/**/*.sql
do
if [[ ! -e $entry ]]; then
continue
fi
echo "-- $file" >> "$custFile"
cat "$entry" >> "$custFile"
done
fi
done
fi
fi
}
function dbasm_run() {
echo "===== STARTING ASSEMBLY PROCESS ====="
mkdir -p "$OUTPUT_FOLDER"
for db in ${DATABASES[@]}
do
dbasm_assemble "$db" $version".sql" $1 $2 $3
done
echo "===== DONE ====="
}
function dbasm_db_backup() {
echo "backing up $1"
database=${1,,}
uc=${database^^}
name="DB_"$uc"_CONF"
confs=${!name}
name="DB_"$uc"_NAME"
dbname=${!name}
# MYSQL_PORT needs to be reseted as the next eval might not overwite the current value causing the commands to use wrong port
MYSQL_PORT=3306
eval $confs;
if [[ ! -z "${PROMPT_USER// }" ]]; then
MYSQL_USER=$PROMPT_USER
MYSQL_PASS=$PROMPT_PASS
fi
export MYSQL_PWD=$MYSQL_PASS
now=`date +%s`
"$DB_MYSQL_DUMP_EXEC" --opt --user="$MYSQL_USER" --host="$MYSQL_HOST" --port="$MYSQL_PORT" "$dbname" > "${BACKUP_FOLDER}${database}_backup_${now}.sql" && echo "done"
if [[ $? -ne 0 ]]; then
err=$("$DB_MYSQL_DUMP_EXEC" --opt --user="$MYSQL_USER" --host="$MYSQL_HOST" --port="$MYSQL_PORT" "$dbname" 2>&1 )
if [[ "$err" == *"Access denied"* ]]; then
read -p "Insert mysql user:" PROMPT_USER
read -p "Insert mysql pass:" -s PROMPT_PASS
export MYSQL_PWD=$PROMPT_PASS
"$DB_MYSQL_DUMP_EXEC" --opt --user="$PROMPT_USER" --host="$MYSQL_HOST" --port="$MYSQL_PORT" "$dbname" > "${BACKUP_FOLDER}${database}_backup_${now}.sql" && echo "done"
else
exit
fi
fi
}
function dbasm_db_import() {
database=${1,,}
type=$2
uc=${database^^}
name="DB_"$uc"_CONF"
confs=${!name}
name="DB_"$uc"_NAME"
dbname=${!name}
if [[ $type = "base" && $DB_SKIP_BASE_IMPORT_IF_EXISTS = true ]]; then
if dbasm_isNotEmpty $dbname "$confs"; then
echo "$dbname is not empty, base importing skipped"
return
else
echo "$dbname seems empty"
fi
fi
echo "importing $1 - $2 ..."
# MYSQL_PORT needs to be reseted as the next eval might not overwite the current value causing the commands to use wrong port
MYSQL_PORT=3306
eval $confs;
if [[ ! -z "${PROMPT_USER// }" ]]; then
MYSQL_USER=$PROMPT_USER
MYSQL_PASS=$PROMPT_PASS
fi
export MYSQL_PWD=$MYSQL_PASS
# TODO: remove this line after we squash our DB updates
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" --port="$MYSQL_PORT" -e "SET GLOBAL max_allowed_packet=128*1024*1024;"
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" --port="$MYSQL_PORT" --default-character-set=utf8 "$dbname" < "${OUTPUT_FOLDER}${database}_${type}.sql"
if [[ $? -ne 0 ]]; then
err=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" -P "$MYSQL_PORT" "$dbname" 2>&1 )
if [[ "$err" == *"Access denied"* ]]; then
read -p "Insert mysql user:" PROMPT_USER
read -p "Insert mysql pass:" -s PROMPT_PASS
export MYSQL_PWD=$PROMPT_PASS
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" -P "$MYSQL_PORT" "$dbname" < "${OUTPUT_FOLDER}${database}_${type}.sql"
else
exit
fi
fi
}
function dbasm_import() {
dbasm_run $1 $2 $3
with_base=$1
with_updates=$2
with_custom=$3
echo "===== CHECKING DBs ====="
for db in ${DATABASES[@]}
do
dbasm_createDB "$db"
done
echo "===== DONE ====="
#
# BACKUP
#
if [ $BACKUP_ENABLE = true ]; then
echo "===== STARTING BACKUP PROCESS ====="
mkdir -p "$BACKUP_FOLDER"
for db in ${DATABASES[@]}
do
dbasm_db_backup "$db"
done
echo "===== DONE ====="
fi
echo "===== STARTING IMPORTING PROCESS ====="
#
# IMPORT
#
if [ $with_base = true ]; then
for db in ${DATABASES[@]}
do
dbasm_db_import "$db" "base"
done
fi
if [ $with_updates = true ]; then
for db in ${DATABASES[@]}
do
dbasm_db_import "$db" "updates"
done
fi
if [ $with_custom = true ]; then
for db in ${DATABASES[@]}
do
dbasm_db_import "$db" "custom"
done
fi
echo "===== DONE ====="
}
-11
View File
@@ -1,11 +0,0 @@
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/../../bash_shared/includes.sh"
AC_PATH_DBASSEMBLER="$AC_PATH_APPS/db_assembler"
if [ -f "$AC_PATH_DBASSEMBLER/config.sh" ]; then
source "$AC_PATH_DBASSEMBLER/config.sh" # should overwrite previous
fi
source "$AC_PATH_DBASSEMBLER/includes/functions.sh"
-12
View File
@@ -1,12 +0,0 @@
This script is used by devs to export the databases to base directories
You should use it on clean databases
## USAGE
NOTE: this script is only working under unix currently
1) You must create a config.sh file changing DB connection configurations
of /conf/config.sh.dist
2) Run the db_export.sh script and wait
-52
View File
@@ -1,52 +0,0 @@
#!/usr/bin/env bash
ROOTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd )"
source $ROOTPATH"/apps/bash_shared/includes.sh"
if [ -f "./config.sh" ]; then
source "./config.sh" # should overwrite previous
fi
echo "This is a dev-only procedure to export the DB into the SQL base files. All base files will be overwritten."
read -p "Are you sure you want to continue (y/N)? " choice
case "$choice" in
y|Y ) echo "Exporting the DB into the SQL base files...";;
* ) return;;
esac
echo "===== STARTING PROCESS ====="
function export() {
echo "Working on: "$1
database=$1
var_base_path="DB_"$database"_PATHS"
base_path=${!var_base_path}
base_conf="TPATH="$base_path";\
CLEANFOLDER=1; \
CHMODE=0; \
TEXTDUMPS=0; \
PARSEDUMP=1; \
FULL=0; \
DUMPOPTS='--skip-comments --skip-set-charset --routines --extended-insert --order-by-primary --single-transaction --quick'; \
"
var_base_conf="DB_"$database"_CONF"
base_conf=$base_conf${!var_base_conf}
var_base_name="DB_"$database"_NAME"
base_name=${!var_base_name}
bash $AC_PATH_DEPS"/drassil/mysql-tools/mysql-tools" dump "" $base_name "" "$base_conf"
}
for db in ${DATABASES[@]}
do
export "$db"
done
echo "===== DONE ====="
@@ -1,5 +0,0 @@
#!/usr/bin/env bash
## Set a local git commit template
git config --local commit.template ".git_commit_template.txt" ;
echo "--- Successfully set the default commit template for this repository only. Verify with: git config -e"
-227
View File
@@ -1,227 +0,0 @@
function inst_configureOS() {
echo "Platform: $OSTYPE"
case "$OSTYPE" in
solaris*) echo "Solaris is not supported yet" ;;
darwin*) source "$AC_PATH_INSTALLER/includes/os_configs/osx.sh" ;;
linux*)
# If $OSDISTRO is set, use this value (from config.sh)
if [ ! -z "$OSDISTRO" ]; then
DISTRO=$OSDISTRO
# If available, use LSB to identify distribution
elif [ -f /etc/lsb-release -o -d /etc/lsb-release.d ]; then
DISTRO=$(lsb_release -i | cut -d: -f2 | sed s/'^\t'//)
# Otherwise, use release info file
else
DISTRO=$(ls -d /etc/[A-Za-z]*[_-][rv]e[lr]* | grep -v "lsb" | cut -d'/' -f3 | cut -d'-' -f1 | cut -d'_' -f1)
fi
case $DISTRO in
# add here distro that are debian or ubuntu based
# TODO: find a better way, maybe checking the existance
# of a package manager
"neon" | "ubuntu")
DISTRO="ubuntu"
;;
"debian")
DISTRO="debian"
;;
*)
echo "Distro: $DISTRO, is not supported. If your distribution is based on debian or ubuntu,
please set the 'OSDISTRO' environment variable to one of these distro (you can use config.sh file)"
;;
esac
DISTRO=${DISTRO,,}
echo "Distro: $DISTRO"
# TODO: implement different configurations by distro
source "$AC_PATH_INSTALLER/includes/os_configs/$DISTRO.sh"
;;
bsd*) echo "BSD is not supported yet" ;;
msys*) source "$AC_PATH_INSTALLER/includes/os_configs/windows.sh" ;;
*) echo "This platform is not supported" ;;
esac
}
function inst_updateRepo() {
cd "$AC_PATH_ROOT"
git pull origin $(git rev-parse --abbrev-ref HEAD)
}
function inst_resetRepo() {
cd "$AC_PATH_ROOT"
git reset --hard $(git rev-parse --abbrev-ref HEAD)
git clean -f
}
function inst_compile() {
comp_configure
comp_build
}
function inst_cleanCompile() {
comp_clean
inst_compile
}
function inst_allInOne() {
inst_configureOS
inst_updateRepo
inst_compile
dbasm_import true true true
}
function inst_getVersionBranch() {
local res="master"
local v="not-defined"
local MODULE_MAJOR=0
local MODULE_MINOR=0
local MODULE_PATCH=0
local MODULE_SPECIAL=0;
local ACV_MAJOR=0
local ACV_MINOR=0
local ACV_PATCH=0
local ACV_SPECIAL=0;
local curldata=$(curl -f --silent -H 'Cache-Control: no-cache' "$1" || echo "{}")
local parsed=$(echo "$curldata" | "$AC_PATH_DEPS/jsonpath/JSONPath.sh" -b '$.compatibility.*.[version,branch]')
semverParseInto "$ACORE_VERSION" ACV_MAJOR ACV_MINOR ACV_PATCH ACV_SPECIAL
if [[ ! -z "$parsed" ]]; then
readarray -t vers < <(echo "$parsed")
local idx
res="none"
# since we've the pair version,branch alternated in not associative and one-dimensional
# array, we've to simulate the association with length/2 trick
for idx in `seq 0 $((${#vers[*]}/2-1))`; do
semverParseInto "${vers[idx*2]}" MODULE_MAJOR MODULE_MINOR MODULE_PATCH MODULE_SPECIAL
if [[ $MODULE_MAJOR -eq $ACV_MAJOR && $MODULE_MINOR -le $ACV_MINOR ]]; then
res="${vers[idx*2+1]}"
v="${vers[idx*2]}"
fi
done
fi
echo "$v" "$res"
}
function inst_module_search {
local res="$1"
local idx=0;
if [ -z "$1" ]; then
echo "Type what to search or leave blank for full list"
read -p "Insert name: " res
fi
local search="+$res"
echo "Searching $res..."
echo "";
readarray -t MODS < <(curl --silent "https://api.github.com/search/repositories?q=org%3Aazerothcore${search}+fork%3Atrue+topic%3Acore-module+sort%3Astars&type=" \
| "$AC_PATH_DEPS/jsonpath/JSONPath.sh" -b '$.items.*.name')
while (( ${#MODS[@]} > idx )); do
mod="${MODS[idx++]}"
read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/azerothcore/$mod/master/acore-module.json")
if [[ "$b" != "none" ]]; then
echo "-> $mod (tested with AC version: $v)"
else
echo "-> $mod (no revision available for AC v$AC_VERSION, it could not work!)"
fi
done
echo "";
echo "";
}
function inst_module_install {
local res
if [ -z "$1" ]; then
echo "Type the name of the module to install"
read -p "Insert name: " res
else
res="$1"
fi
read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/azerothcore/$res/master/acore-module.json")
if [[ "$b" != "none" ]]; then
Joiner:add_repo "https://github.com/azerothcore/$res" "$res" "$b" && echo "Done, please re-run compiling and db assembly. Read instruction on module repository for more information"
else
echo "Cannot install $res module: it doesn't exists or no version compatible with AC v$ACORE_VERSION are available"
fi
echo "";
echo "";
}
function inst_module_update {
local res;
local _tmp;
local branch;
local p;
if [ -z "$1" ]; then
echo "Type the name of the module to update"
read -p "Insert name: " res
else
res="$1"
fi
_tmp=$PWD
if [ -d "$J_PATH_MODULES/$res/" ]; then
read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/azerothcore/$res/master/acore-module.json")
cd "$J_PATH_MODULES/$res/"
# use current branch if something wrong with json
if [[ "$v" == "none" || "$v" == "not-defined" ]]; then
b=`git rev-parse --abbrev-ref HEAD`
fi
Joiner:upd_repo "https://github.com/azerothcore/$res" "$res" "$b" && echo "Done, please re-run compiling and db assembly" || echo "Cannot update"
cd $_tmp
else
echo "Cannot update! Path doesn't exist"
fi;
echo "";
echo "";
}
function inst_module_remove {
if [ -z "$1" ]; then
echo "Type the name of the module to remove"
read -p "Insert name: " res
else
res="$1"
fi
Joiner:remove "$res" && echo "Done, please re-run compiling" || echo "Cannot remove"
echo "";
echo "";
}
function inst_simple_restarter {
echo "Running $1 ..."
bash "$AC_PATH_APPS/startup-scripts/simple-restarter" "$AC_BINPATH_FULL" "$1"
echo
#disown -a
#jobs -l
}
function inst_download_client_data {
local path="$AC_BINPATH_FULL"
echo "Downloading client data in: $path/data.zip ..."
curl -L https://github.com/wowgaming/client-data/releases/download/v9/data.zip > "$path/data.zip" \
&& unzip -o "$path/data.zip" -d "$path/" && rm "$path/data.zip"
}
-38
View File
@@ -1,38 +0,0 @@
[[ ${INSTALLER_GUARDYVAR:-} -eq 1 ]] && return || readonly INSTALLER_GUARDYVAR=1 # include it once
CURRENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd )
source "$CURRENT_PATH/../../bash_shared/includes.sh"
AC_PATH_INSTALLER="$AC_PATH_APPS/installer"
J_VER_REQ="v0.8.3"
J_PATH="$AC_PATH_APPS/joiner"
J_PATH_MODULES="$AC_PATH_MODULES"
#install/update and include joiner
if [ ! -d "$J_PATH/.git" ]; then
git clone https://github.com/azerothcore/joiner "$J_PATH" -b master
git --git-dir="$J_PATH/.git/" --work-tree="$J_PATH/" reset --hard "$J_VER_REQ"
else
# legacy code, with new rev of joiner the update process is internally handled
_cur_branch=$(git --git-dir="$J_PATH/.git/" --work-tree="$J_PATH/" rev-parse --abbrev-ref HEAD)
_cur_ver=$(git --git-dir="$J_PATH/.git/" --work-tree="$J_PATH/" name-rev --tags --name-only $_cur_branch)
if [ "$_cur_ver" != "$J_VER_REQ" ]; then
git --git-dir="$J_PATH/.git" --work-tree="$J_PATH/" rev-parse && git --git-dir="$J_PATH/.git" --work-tree="$J_PATH/" fetch --tags origin master --quiet
git --git-dir="$J_PATH/.git/" --work-tree="$J_PATH/" reset --hard "$J_VER_REQ"
fi
fi
source "$J_PATH/joiner.sh"
if [ -f "$AC_PATH_INSTALLER/config.sh" ]; then
source "$AC_PATH_INSTALLER/config.sh" # should overwrite previous
fi
source "$AC_PATH_APPS/compiler/includes/includes.sh"
source "$AC_PATH_APPS/db_assembler/includes/includes.sh"
source "$AC_PATH_DEPS/semver_bash/semver.sh"
source "$AC_PATH_INSTALLER/includes/functions.sh"
@@ -1,5 +0,0 @@
sudo apt-get update
sudo apt-get install -y git cmake make gcc g++ clang libmysqlclient-dev \
libssl1.0-dev libbz2-dev libreadline-dev libncurses-dev \
mysql-server libace-6.* libace-dev curl unzip
-16
View File
@@ -1,16 +0,0 @@
##########################################
## workaround to fix macos-10.15 configure os from failing
brew reinstall openssl@1.1
rm '/usr/local/bin/2to3'
##########################################
brew update
##########################################
## workaround for cmake already being installed in the github runners
if ! command -v cmake &>/dev/null ; then
brew install cmake
fi
##########################################
brew install openssl readline ace bash-completion curl unzip mysql ccache
@@ -1,19 +0,0 @@
if ! command -v lsb_release &>/dev/null ; then
sudo apt-get install -y lsb-release
fi
UBUNTU_VERSION=$(lsb_release -sr);
sudo apt-get update -y
if [[ $CONTINUOUS_INTEGRATION ]]; then
sudo apt-get -y install build-essential libtool make cmake cmake-data clang openssl libgoogle-perftools-dev \
libssl-dev libmysqlclient-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev libace-dev mysql-client \
libncurses5-dev ccache
else
sudo apt-get install -y git cmake make gcc g++ clang libmysqlclient-dev \
libssl-dev libbz2-dev libreadline-dev libncurses-dev \
mysql-server libace-6.* libace-dev curl unzip
fi
@@ -1,17 +0,0 @@
echo "WARNING: Installer Script for Windows is not fully supported yet. Work in progress.."
echo "!!README!!: Please install openssl and mysql libraries manually following our wiki"
# install chocolatey before
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
# install automatically following packages:
# cmake
# git
# microsoft-build-tools
# mysql 5.6
choco install -y --skip-checksums cmake git git.install microsoft-build-tools
choco install -y --skip-checksums mysql --version 5.6.12
echo "!!README!!: Please remember to install openssl and mysql libraries manually following our wiki"
-93
View File
@@ -1,93 +0,0 @@
#!/usr/bin/env bash
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/includes/includes.sh"
PS3='[Please enter your choice]: '
options=(
"init (i): First Installation" # 1
"install-deps (d): Configure OS dep" # 2
"pull (u): Update Repository" # 3
"reset (r): Reset & Clean Repository" # 4
"compiler (c): Run compiler tool" # 5
"db-assembler (a): Run db assembler tool" # 6
"module-search (ms): Module Search by keyword" # 7
"module-install (mi): Module Install by name" # 8
"module-update (mu): Module Update by name" # 9
"module-remove: (mr): Module Remove by name" # 10
"client-data: (gd): download client data from github repository (beta)" # 11
"run-worldserver (rw): execute a simple restarter for worldserver" # 12
"run-authserver (ra): execute a simple restarter for authserver" # 13
"quit: Exit from this menu" # 14
)
function _switch() {
_reply="$1"
_opt="$2"
case $_reply in
""|"i"|"init"|"1")
inst_allInOne
;;
""|"d"|"install-deps"|"2")
inst_configureOS
;;
""|"u"|"pull"|"3")
inst_updateRepo
;;
""|"r"|"reset"|"4")
inst_resetRepo
;;
""|"c"|"compiler"|"5")
bash "$AC_PATH_APPS/compiler/compiler.sh" $_opt
;;
""|"a"|"db-assembler"|"6")
bash "$AC_PATH_APPS/db_assembler/db_assembler.sh" $_opt
;;
""|"ms"|"module-search"|"7")
inst_module_search "$_opt"
;;
""|"mi"|"module-install"|"8")
inst_module_install "$_opt"
;;
""|"mu"|"module-update"|"9")
inst_module_update "$_opt"
;;
""|"mr"|"module-remove"|"10")
inst_module_remove "$_opt"
;;
""|"gd"|"client-data"|"11")
inst_download_client_data
;;
""|"rw"|"run-worldserver"|"12")
inst_simple_restarter worldserver
;;
""|"ra"|"run-authserver"|"13")
inst_simple_restarter authserver
;;
""|"quit"|"14")
echo "Goodbye!"
exit
;;
""|"--help")
echo "Available commands:"
printf '%s\n' "${options[@]}"
;;
*) echo "invalid option, use --help option for the commands list";;
esac
}
while true
do
# run option directly if specified in argument
[ ! -z $1 ] && _switch $@ # old method: "${options[$cmdopt-1]}"
[ ! -z $1 ] && exit 0
echo "==== ACORE DASHBOARD ===="
select opt in "${options[@]}"
do
_switch $REPLY
break
done
done
-50
View File
@@ -1,50 +0,0 @@
# enable/disable GDB execution
export GDB_ENABLED=0
# [optional] gdb file
# default: gdb.txt
export GDB=""
# directory where binary are stored
export BINPATH=""
# Put here the pid you configured on your worldserver.conf file
# needed when GDB_ENABLED=1
export SERVERPID=""
# path to configuration file (including the file name)
# ex: /home/user/azerothcore/etc/worldserver.conf
export CONFIG=""
# path of log files
# needed by restarter to store its logs
export LOGS_PATH="";
# exec name
# ex: worldserver
export SERVERBIN=""
# prefix name for log files
# to avoid collision with other restarters
export LOG_PREFIX_NAME=""
# [optional] name of screen service
# if no specified, screen util won't be used
export SCREEN_NAME=""
# [optional] overwrite default screen options: -A -m -d -S
# WARNING: if you are running it under a systemd service
# please do not remove -m -d arguments from screen if are you using it,
# or keep WITH_CONSOLE=0 .
# otherwise the journald-logging system will take 100% of CPU slowing
# down the whole machine. It's because a systemd service should have
# low console output.
export SCREEN_OPTIONS=""
# enable/disable it to show the output
# within console, if disable the output will be redirect to
# logging files
#
export WITH_CONSOLE=0
-57
View File
@@ -1,57 +0,0 @@
#!/usr/bin/env bash
#PARAMETER 1: directory
#PARAMETER 2: binary file
_bin_path=$1
_bin_file=$2
_instant_crash_count=0
_restart_count=0
if [ "$#" -ne 2 ]; then
echo "Usage: $0 path filename"
echo "Example: $0 $HOME/azeroth-server/bin worldserver"
exit 1
fi
while true
do
if [ ! -f "$_bin_path/$_bin_file" ]; then
echo "$_bin_path/$_bin_file doesn't exists!"
exit 1
fi
STARTING_TIME=$(date +%s)
cd "$_bin_path" && "./$_bin_file" # &>/dev/null;
_exit_code=$?
echo "exit code: $_exit_code"
# stop restarter on SIGKILL (disabled for now)
# 128 + 9 (SIGKILL)
#if [ $_exit_code -eq 137 ]; then
# echo "$_bin_file has been killed"
# exit 0
#fi
echo "$_bin_file terminated, restarting..."
ENDING_TIME=$(date +%s)
DIFFERENCE=$(( $ENDING_TIME - $STARTING_TIME ))
((_restart_count++))
echo "$_bin_file Terminated after $DIFFERENCE seconds, termination count: : $_restart_count"
if [ $DIFFERENCE -lt 10 ]; then
# increment instant crash if runtime is lower than 10 seconds
((_instant_crash_count++))
else
_instant_crash_count=0 # reset count
fi
if [ $_instant_crash_count -gt 5 ]; then
echo "$_bin_file Restarter exited. Infinite crash loop prevented. Please check your system"
exit 1
fi
done
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/acore-installer"
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/compiler/compiler.sh"
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/db_assembler/db_assembler.sh"
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/db_exporter/db_export.sh"
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/db_pendings/import.sh"
-9
View File
@@ -1,9 +0,0 @@
#!/usr/bin/env bash
docker build -t acbuild -f docker/build/Dockerfile .
docker run \
-v /"$(pwd)"/docker/build/cache:/azerothcore/build \
-v /"$(pwd)"/docker/worldserver/bin:/binworldserver \
-v /"$(pwd)"/docker/authserver/bin:/binauthserver \
acbuild
-9
View File
@@ -1,9 +0,0 @@
#!/usr/bin/env bash
docker build --build-arg ENABLE_SCRIPTS=0 -t acbuild -f docker/build/Dockerfile .
docker run \
-v /"$(pwd)"/docker/build/cache:/azerothcore/build \
-v /"$(pwd)"/docker/worldserver/bin:/binworldserver \
-v /"$(pwd)"/docker/authserver/bin:/binauthserver \
acbuild
-7
View File
@@ -1,7 +0,0 @@
#!/usr/bin/env bash
cp src/server/worldserver/worldserver.conf.dist docker/worldserver/etc/worldserver.conf.dist
cp src/server/authserver/authserver.conf.dist docker/authserver/etc/authserver.conf.dist
cp docker/worldserver/etc/worldserver.conf.dockerdist docker/worldserver/etc/worldserver.conf
cp docker/authserver/etc/authserver.conf.dockerdist docker/authserver/etc/authserver.conf
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
if [ "$(id -u)" != "0" ] && [ "$OSTYPE" != "msys" ] ; then
echo "Please run the script with sudo"
else
rm -rf ./docker/build/cache/CMakeFiles
rm -rf ./docker/build/cache/deps
rm -rf ./docker/build/cache/src
rm ./docker/build/cache/*.cmake
rm ./docker/build/cache/*.txt
rm ./docker/build/cache/*.h
rm ./docker/build/cache/*.cpp
rm ./docker/build/cache/Makefile
fi
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/installer/main.sh"
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/startup-scripts/simple-restarter"
+11
View File
@@ -0,0 +1,11 @@
unamestr=`uname`
if [[ "$unamestr" == 'Darwin' ]]; then
AC_PATH_ROOT=$(greadlink -f "$AC_PATH_BIN/../")
else
AC_PATH_ROOT=$(readlink -f "$AC_PATH_BIN/../")
fi
AC_PATH_CONF="$AC_PATH_ROOT/conf"
AC_PATH_MODULES="$AC_PATH_ROOT/modules"
+31
View File
@@ -0,0 +1,31 @@
# force default language for applications
LC_ALL=C
AC_PATH_BIN="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
AC_PATH_SHARED="$AC_PATH_BIN/bash_shared"
source "$AC_PATH_SHARED/defines.sh"
source "$AC_PATH_MODULES/hw-core/bash-lib-event/src/hooks.sh"
function registerHooks() { hwc_event_register_hooks "$@"; }
function runHooks() { hwc_event_run_hooks "$@"; }
source "$AC_PATH_CONF/config.sh.dist" # "hack" to avoid missing conf variables
if [ -f "$AC_PATH_CONF/config.sh" ]; then
source "$AC_PATH_CONF/config.sh" # should overwrite previous
fi
#
# Load modules
#
for entry in "$AC_PATH_MODULES/"*/include.sh
do
if [ -e $entry ]; then
source $entry
fi
done
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
bash "$CURRENT_PATH/compiler.sh" 1
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
bash "$CURRENT_PATH/compiler.sh" 2
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
bash "$CURRENT_PATH/compiler.sh" 3
+24
View File
@@ -0,0 +1,24 @@
## How to compile:
first of all, if you need some custom configuration you have to copy and rename
/conf/config.sh.dist in /conf/config.sh and configure it
* for a "clean" compilation you must run all scripts in their order:
./1-clean.sh
./2-configure.sh
./3-build.sh
* if you add/rename/delete some sources and you need to compile it you have to run:
./2-configure.sh
./3-build.sh
* if you have modified code only, you just need to run
./3-build.sh
## Note:
For an optimal development process and **really faster** compilation time, is suggested to use clang instead of gcc
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/includes/includes.sh"
function all() {
clean
configure
build
}
function run_option() {
if test "${comp_functions[$1-1]+'test'}"; then
${comp_functions[$1-1]}
else
echo "invalid option"
fi
}
comp_options=("Clean" "Configure" "Build" "All")
comp_functions=("clean" "configure" "build" "all")
runHooks "ON_AFTER_OPTIONS" #you can create your custom options
# push exit after custom options
comp_options+=('Exit')
comp_functions+=('exit 0')
# run option directly if specified in argument
[ ! -z $1 ] && run_option $1 && exit 0
PS3='[ Please enter your choice ]: '
select opt in "${comp_options[@]}"
do
case $opt in
'Exit')
break
;;
*)
run_option $REPLY
;;
esac
done
+14
View File
@@ -0,0 +1,14 @@
# you can choose build type from cmd argument
if [ ! -z $1 ]
then
CCTYPE=$1
CCTYPE=${CCTYPE^} # capitalize first letter if it's not yet
fi
BUILDPATH=$BINPATH
INSTALL_PATH=$(readlink -f "$BINPATH/../")
[ $CTYPE == "Debug" ] && BUILDPATH="$BUILDPATH/debug/build/" || BUILDPATH="$BUILDPATH/release/build/"
[ $CTYPE == "Debug" ] && BINPATH="$BINPATH/debug" || BINPATH="$BINPATH/release"
+57
View File
@@ -0,0 +1,57 @@
function clean() {
echo "Cleaning build files"
CWD=$(pwd)
cd $BUILDPATH
make -f Makefile clean
make clean
find -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} \+
cd $CWD
}
function configure() {
CWD=$(pwd)
cd $BUILDPATH
echo "Build path: $BUILDPATH"
echo "DEBUG info: $CDEBUG"
echo "Compilation type: $CTYPE"
# -DCMAKE_BUILD_TYPE=$CCTYPE disable optimization "slow and huge amount of ram"
# -DWITH_COREDEBUG=$CDEBUG compiled with debug information
#-DSCRIPTS_COMMANDS=$CSCRIPTS -DSCRIPTS_CUSTOM=$CSCRIPTS -DSCRIPTS_EASTERNKINGDOMS=$CSCRIPTS -DSCRIPTS_EVENTS=$CSCRIPTS -DSCRIPTS_KALIMDOR=$CSCRIPTS \
#-DSCRIPTS_NORTHREND=$CSCRIPTS -DSCRIPTS_OUTDOORPVP=$CSCRIPTS -DSCRIPTS_OUTLAND=$CSCRIPTS -DSCRIPTS_PET=$CSCRIPTS -DSCRIPTS_SPELLS=$CSCRIPTS -DSCRIPTS_WORLD=$CSCRIPTS \
#-DAC_WITH_UNIT_TEST=$CAC_UNIT_TEST -DAC_WITH_PLUGINS=$CAC_PLG \
cmake $SRCPATH -DCMAKE_INSTALL_PREFIX=$BINPATH -DCONF_DIR=$CONFDIR -DSERVERS=$CSERVERS \
-DSCRIPTS=$CSCRIPTS \
-DTOOLS=$CTOOLS -DUSE_SCRIPTPCH=$CSCRIPTPCH -DUSE_COREPCH=$CCOREPCH -DWITH_COREDEBUG=$CDEBUG -DCMAKE_BUILD_TYPE=$CTYPE -DWITH_WARNINGS=$CWARNINGS \
-DCMAKE_C_COMPILER=$CCOMPILERC -DCMAKE_CXX_COMPILER=$CCOMPILERCXX $CCUSTOMOPTIONS
cd $CWD
runHooks "ON_AFTER_CONFIG"
}
function build() {
[ $MTHREADS == 0 ] && MTHREADS=`grep -c ^processor /proc/cpuinfo` && MTHREADS=$(($MTHREADS + 2))
echo "Using $MTHREADS threads"
CWD=$(pwd)
cd $BUILDPATH
time make -j $MTHREADS
make -j $MTHREADS install
cd $CWD
runHooks "ON_AFTER_BUILD"
}
+24
View File
@@ -0,0 +1,24 @@
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/../../bash_shared/includes.sh"
AC_PATH_COMPILER="$AC_PATH_BIN/compiler"
if [ -f "$AC_PATH_COMPILER/config.sh" ]; then
source "$AC_PATH_COMPILER/config.sh" # should overwrite previous
fi
function ac_on_after_build() {
# move the run engine
mkdir -p "$INSTALL_PATH/bin/"
cp -rvf "$AC_PATH_MODULES/acore/startup-scripts/"* "$INSTALL_PATH/bin/"
}
registerHooks "ON_AFTER_BUILD" ac_on_after_build
source "$AC_PATH_COMPILER/includes/defines.sh"
source "$AC_PATH_COMPILER/includes/functions.sh"
mkdir -p $BUILDPATH
mkdir -p $BINPATH
+2
View File
@@ -0,0 +1,2 @@
/output/
config.sh
+193
View File
@@ -0,0 +1,193 @@
#!/usr/bin/env bash
unamestr=`uname`
if [[ "$unamestr" == 'Darwin' ]]; then
SRCPATH=$(greadlink -f "../../")
else
SRCPATH=$(readlink -f "../../")
fi
source $SRCPATH"/bin/bash_shared/includes.sh"
if [ -f "./config.sh" ]; then
source "./config.sh" # should overwrite previous
fi
MD5_CMD="md5sum"
reg_file="$OUTPUT_FOLDER/__db_assembler_registry"
if [ -f "$reg_file" ]; then
source "$reg_file"
fi
function assemble() {
# to lowercase
database=${1,,}
start_sql=$2
with_base=$3
with_updates=$4
with_custom=$5
uc=${database^^}
name="DB_"$uc"_PATHS"
v="$name[@]"
base=("${!v}")
name="DB_"$uc"_UPDATE_PATHS"
v="$name[@]"
updates=("${!v}")
name='DB_'$uc'_CUSTOM_PATHS'
v="$name[@]"
custom=("${!v}")
suffix_base="_base"
suffix_upd="_update"
suffix_custom="_custom"
curTime=`date +%Y_%m_%d_%H_%M_%S`
if [ $with_base = true ]; then
echo "" > $OUTPUT_FOLDER$database$suffix_base".sql"
if [ ! ${#base[@]} -eq 0 ]; then
echo "Generating $OUTPUT_FOLDER$database$suffix_base ..."
for d in "${base[@]}"
do
echo "Searching on $d ..."
if [ ! -z $d ]; then
for entry in "$d"/*.sql "$d"/**/*.sql
do
if [[ -e $entry ]]; then
cat "$entry" >> $OUTPUT_FOLDER$database$suffix_base".sql"
fi
done
fi
done
fi
fi
if [ $with_updates = true ]; then
updFile=$OUTPUT_FOLDER$database$suffix_upd"_"$curTime".sql"
if [ ! ${#updates[@]} -eq 0 ]; then
echo "Generating $OUTPUT_FOLDER$database$suffix_upd ..."
for d in "${updates[@]}"
do
echo "Searching on $d ..."
if [ ! -z $d ]; then
for entry in "$d"/*.sql "$d"/**/*.sql
do
if [[ ! -e $entry ]]; then
continue
fi
file=$(basename "$entry")
hash=$($MD5_CMD "$entry")
hash="${hash%% *}" #remove file path
n="registry__$hash"
if [[ -z ${!n} ]]; then
if [ ! -e $updFile ]; then
echo "-- assembled updates" > $updFile
fi
printf -v "registry__${hash}" %s "$file"
echo "-- New update sql: "$file
echo "-- $file"
cat "$entry" >> $updFile
fi
done
fi
done
fi
fi
if [ $with_custom = true ]; then
custFile=$OUTPUT_FOLDER$database$suffix_custom".sql"
echo "" > $custFile
if [ ! ${#custom[@]} -eq 0 ]; then
echo "Generating $OUTPUT_FOLDER$database$suffix_custom ..."
for d in "${custom[@]}"
do
echo "Searching on $d ..."
if [ ! -z $d ]; then
for entry in "$d"/*.sql "$d"/**/*.sql
do
if [[ ! -e $entry ]]; then
continue
fi
if [[ ! -e $custFile ]]; then
echo "-- assembled custom" > "$custFile"
fi
echo "-- $file" >> $custFile
cat "$entry" >> $custFile
done
fi
done
fi
fi
}
function run() {
echo "===== STARTING PROCESS ====="
mkdir -p $OUTPUT_FOLDER
for db in ${DATABASES[@]}
do
assemble "$db" $version".sql" $1 $2 $3
done
echo "" > $reg_file
for k in ${!registry__*}
do
n=$k
echo "$k='${!n}';" >> "$reg_file"
done
echo "===== DONE ====="
}
PS3='Please enter your choice: '
options=("Create ALL" "Create only bases" "Create only updates" "Create only customs" "Clean registry" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Create ALL")
run true true true
break #avoid loop
;;
"Create only bases")
run true false false
break #avoid loop
;;
"Create only updates")
run false true false
break #avoid loop
;;
"Create only customs")
run false false true
break #avoid loop
;;
"Clean registry")
rm "$reg_file"
break #avoid loop
;;
"Quit")
break
;;
*) echo invalid option;;
esac
done
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
ROOTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd )"
source $ROOTPATH"/bin/bash_shared/includes.sh"
if [ -f "./config.sh" ]; then
source "./config.sh" # should overwrite previous
fi
echo "===== STARTING PROCESS ====="
function export() {
echo "Working on: "$1
database=$1
var_base_path="DB_"$database"_PATHS"
base_path=${!var_base_path}
base_conf="TPATH="$base_path";\
CLEANFOLDER=1; \
CHMODE=0; \
TEXTDUMPS=0; \
PARSEDUMP=1; \
FULL=0; \
DUMPOPTS='--skip-comments --skip-set-charset --routines --extended-insert --order-by-primary --single-transaction --quick'; \
"
var_base_conf="DB_"$database"_CONF"
base_conf=$base_conf${!var_base_conf}
var_base_name="DB_"$database"_NAME"
base_name=${!var_base_name}
bash $AC_PATH_MODULES"/uwd/mysql-tools/mysql-tools" dump "" $base_name "" "$base_conf"
}
for db in ${DATABASES[@]}
do
export "$db"
done
echo "===== DONE ====="
+2 -16
View File
@@ -6,8 +6,6 @@ source "$CURRENT_PATH/../bash_shared/includes.sh"
UPDATES_PATH="$AC_PATH_ROOT/data/sql/updates/"
COMMIT_HASH=
function import() {
db=$1
folder="db_"$db
@@ -65,10 +63,6 @@ function import() {
echo "DELIMITER //" >> "$newFile";
echo "CREATE PROCEDURE updateDb ()" >> "$newFile";
echo "proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';" >> "$newFile";
echo "SELECT COUNT(*) INTO @COLEXISTS" >> "$newFile";
echo "FROM information_schema.COLUMNS" >> "$newFile";
echo "WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_"$db"' AND COLUMN_NAME = '"$oldVer"';" >> "$newFile";
echo "IF @COLEXISTS = 0 THEN LEAVE proc; END IF;" >> "$newFile";
fi
echo "$startTransaction" >> "$newFile";
@@ -81,11 +75,9 @@ function import() {
echo "--" >> "$newFile";
echo "-- START UPDATING QUERIES" >> "$newFile";
echo "--" >> "$newFile";
echo "" >> "$newFile";
cat $entry >> "$newFile";
echo "" >> "$newFile";
echo "--" >> "$newFile";
echo "-- END UPDATING QUERIES" >> "$newFile";
echo "--" >> "$newFile";
@@ -93,19 +85,13 @@ function import() {
echo "$endTransaction" >> "$newFile";
if [[ $isRev -eq 1 ]]; then
echo "END //" >> "$newFile";
echo "END;" >> "$newFile";
echo "//" >> "$newFile";
echo "DELIMITER ;" >> "$newFile";
echo "CALL updateDb();" >> "$newFile";
echo "DROP PROCEDURE IF EXISTS \`updateDb\`;" >> "$newFile";
fi;
currentHash="$(git log --diff-filter=A "$entry" | grep "^commit " | sed -e 's/commit //')"
if [[ "$COMMIT_HASH" != *"$currentHash"* ]]
then
COMMIT_HASH="$COMMIT_HASH $currentHash"
fi
rm $entry;
oldDate=$dateToday
+9
View File
@@ -0,0 +1,9 @@
option(SERVERS "Build worldserver and authserver" 1)
option(SCRIPTS "Build core with scripts included" 1)
option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 0)
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
option(WITH_WARNINGS "Show all warnings during compile" 0)
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
option(WITH_MESHEXTRACTOR "Build meshextractor (alpha)" 0)
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
+124
View File
@@ -0,0 +1,124 @@
# absolute root path of your azerothshard repository
SRCPATH="$AC_PATH_ROOT"
# absolute path where binary files must be stored
BINPATH="$AC_PATH_ROOT/build/"
# absolute path where config. files must be stored
CONFDIR="$AC_PATH_ROOT/build/etc/"
##############################################
#
# COMPILER_CONFIGURATIONS
#
##############################################
# set preferred compilers
CCOMPILERC="/usr/bin/clang"
CCOMPILERCXX="/usr/bin/clang++"
#CCOMPILERC="/usr/bin/gcc"
#CCOMPILERCXX="/usr/bin/g++"
# how many thread must be used for compilation ( leave zero to use all available )
MTHREADS=0
# enable/disable warnings during compilation
CWARNINGS=OFF
# enable/disable some debug informations ( it's not a debug compilation )
CDEBUG=OFF
# specify compilation type
CTYPE=Release
# compile scripts
CSCRIPTS=ON
# compile server
CSERVERS=ON
# compile tools
CTOOLS=OFF
# use precompiled headers ( fatest compilation but not optimized if you change headers often )
CSCRIPTPCH=ON
CCOREPCH=ON
# you can add your custom definitions here ( -D )
CCUSTOMOPTIONS=""
##############################################
#
# DB ASSEMBLER / EXPORTER CONFIGURATIONS
#
##############################################
DATABASES=(
"AUTH"
"CHARACTERS"
"WORLD"
)
OUTPUT_FOLDER="output/"
# FULL DB
DB_CHARACTERS_PATHS=(
$SRCPATH"/data/sql/base/db_characters"
)
DB_AUTH_PATHS=(
$SRCPATH"/data/sql/base/db_auth/"
)
DB_WORLD_PATHS=(
$SRCPATH"/data/sql/base/db_world/"
)
# UPDATES
DB_CHARACTERS_UPDATE_PATHS=(
$SRCPATH"/data/sql/updates/db_characters/"
)
DB_AUTH_UPDATE_PATHS=(
$SRCPATH"/data/sql/updates/db_auth/"
)
DB_WORLD_UPDATE_PATHS=(
$SRCPATH"/data/sql/updates/db_world/"
)
# CUSTOM
DB_CHARACTERS_CUSTOM_PATHS=(
$SRCPATH"/data/sql/custom/db_characters/"
)
DB_AUTH_CUSTOM_PATHS=(
$SRCPATH"/data/sql/custom/db_auth/"
)
DB_WORLD_CUSTOM_PATHS=(
$SRCPATH"/data/sql/custom/db_world/"
)
##############################################
#
# DB EXPORTER/IMPORTER CONFIGURATIONS
#
##############################################
DB_CHARACTERS_CONF="MYSQL_USER='root'; \
MYSQL_PASS='root'; \
MYSQL_HOST='localhost';\
"
DB_AUTH_CONF="MYSQL_USER='root'; \
MYSQL_PASS='root'; \
MYSQL_HOST='localhost';\
"
DB_WORLD_CONF="MYSQL_USER='root'; \
MYSQL_PASS='root'; \
MYSQL_HOST='localhost';\
"
DB_CHARACTERS_NAME="characters"
DB_AUTH_NAME="auth"
DB_WORLD_NAME="world"
-18
View File
@@ -1,18 +0,0 @@
option(SERVERS "Build worldserver and authserver" 1)
option(SCRIPTS "Build core with scripts included" 1)
option(BUILD_TESTING "Build unit tests" 0)
option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 0)
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
option(WITH_WARNINGS "Show all warnings during compile" 0)
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
option(WITH_PERFTOOLS "Enable compilation with gperftools libraries included" 0)
option(WITH_MESHEXTRACTOR "Build meshextractor (alpha)" 0)
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
option(ENABLE_EXTRAS "Set to 0 to disable extra features optimizing performances" 1)
option(ENABLE_VMAP_CHECKS "Enable Checks relative to DisableMgr system on vmap" 1)
option(ENABLE_EXTRA_LOGS "Enable extra log functions that can be CPU intensive" 0)
# Source tree in IDE
set(WITH_SOURCE_TREE "hierarchical" CACHE STRING "Build the source tree for IDE's.")
set_property(CACHE WITH_SOURCE_TREE PROPERTY STRINGS no flat hierarchical)
-186
View File
@@ -1,186 +0,0 @@
# absolute root path of your azerothcore repository
# It should not be modified if you don't really know what you're doing
SRCPATH="$AC_PATH_ROOT"
# absolute path where build files must be stored
BUILDPATH="$AC_PATH_ROOT/var/build/obj"
# absolute path where binary files must be stored
BINPATH="$AC_PATH_ROOT/env/dist"
# bash fills it by default with your os type. No need to change it.
# Change it if you really know what you're doing.
# OSTYPE=""
# When using linux, our installer automatically get information about your distro
# using lsb_release. If your distro is not supported but it's based on ubuntu or debian,
# please change it to one of these values.
#OSDISTRO="ubuntu"
# absolute path where config. files must be stored
# default: the system will use binpath by default
# CONFDIR="$AC_PATH_ROOT/env/dist/etc/"
##############################################
#
# COMPILER_CONFIGURATIONS
#
##############################################
# Set preferred compilers.
# To use gcc (not suggested) instead of clang change in:
# CCOMPILERC="/usr/bin/gcc"
# CCOMPILERCXX="/usr/bin/g++"
#
CCOMPILERC="/usr/bin/clang"
CCOMPILERCXX="/usr/bin/clang++"
# how many thread must be used for compilation ( leave zero to use all available )
MTHREADS=0
# enable/disable warnings during compilation
CWARNINGS=ON
# enable/disable some debug informations ( it's not a debug compilation )
CDEBUG=OFF
# specify compilation type
CTYPE=Release
# compile scripts
CSCRIPTS=ON
# compile unit tests
CBUILD_TESTING=OFF
# compile server
CSERVERS=ON
# compile tools
CTOOLS=OFF
# use precompiled headers ( fatest compilation but not optimized if you change headers often )
CSCRIPTPCH=ON
CCOREPCH=ON
# Skip specific modules from compilation (cmake reconfigure needed)
# use semicolon ; to separate modules
CDISABLED_AC_MODULES=""
# you can add your custom definitions here ( -D )
# example: CCUSTOMOPTIONS=" -DWITH_PERFTOOLS=ON -DENABLE_EXTRA_LOGS=ON"
#
CCUSTOMOPTIONS=""
##############################################
#
# DB ASSEMBLER / EXPORTER CONFIGURATIONS
#
##############################################
#
# Basically you don't have to edit it
# but if you have another database you can add it here
# and create relative confiugurations below
#
DATABASES=(
"AUTH"
"CHARACTERS"
"WORLD"
)
OUTPUT_FOLDER="$AC_PATH_ROOT/env/dist/sql/"
####### BACKUP
# Set to true if you want to backup your azerothcore databases before importing the SQL with the db_assembler
# Do not forget to stop your database software (mysql) before doing so
BACKUP_ENABLE=false
BACKUP_FOLDER="$AC_PATH_ROOT/env/dist/sql/backup/"
#######
# FULL DB
DB_AUTH_PATHS=(
"$SRCPATH/data/sql/base/db_auth/"
)
DB_CHARACTERS_PATHS=(
"$SRCPATH/data/sql/base/db_characters"
)
DB_WORLD_PATHS=(
"$SRCPATH/data/sql/base/db_world/"
)
# UPDATES
DB_AUTH_UPDATES_PATHS=(
"$SRCPATH/data/sql/updates/db_auth/"
"$SRCPATH/data/sql/updates/pending_db_auth/"
)
DB_CHARACTERS_UPDATES_PATHS=(
"$SRCPATH/data/sql/updates/db_characters/"
"$SRCPATH/data/sql/updates/pending_db_characters/"
)
DB_WORLD_UPDATES_PATHS=(
"$SRCPATH/data/sql/updates/db_world/"
"$SRCPATH/data/sql/updates/pending_db_world/"
)
# CUSTOM
DB_AUTH_CUSTOM_PATHS=(
"$SRCPATH/data/sql/custom/db_auth/"
)
DB_CHARACTERS_CUSTOM_PATHS=(
"$SRCPATH/data/sql/custom/db_characters/"
)
DB_WORLD_CUSTOM_PATHS=(
"$SRCPATH/data/sql/custom/db_world/"
)
##############################################
#
# DB EXPORTER/IMPORTER CONFIGURATIONS
#
##############################################
#
# Skip import of base sql files to avoid
# table dropping
#
DB_SKIP_BASE_IMPORT_IF_EXISTS=true
#
# Example:
# "C:/Program Files/MySQL/MySQL Server 8.0/bin/mysql.exe"
# "/usr/bin/mysql"
# "mysql"
#
DB_MYSQL_EXEC="mysql"
DB_MYSQL_DUMP_EXEC="mysqldump"
DB_AUTH_CONF="MYSQL_USER='acore'; \
MYSQL_PASS='acore'; \
MYSQL_HOST='localhost';\
MYSQL_PORT='3306';\
"
DB_CHARACTERS_CONF="MYSQL_USER='acore'; \
MYSQL_PASS='acore'; \
MYSQL_HOST='localhost';\
MYSQL_PORT='3306';\
"
DB_WORLD_CONF="MYSQL_USER='acore'; \
MYSQL_PASS='acore'; \
MYSQL_HOST='localhost';\
MYSQL_PORT='3306';\
"
DB_AUTH_NAME="acore_auth"
DB_CHARACTERS_NAME="acore_characters"
DB_WORLD_NAME="acore_world"
Submodule
+1
Submodule data/doc added at 37da27f2f7
View File
@@ -1,21 +0,0 @@
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_auth' AND COLUMN_NAME = '2016_09_04_00';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_auth CHANGE COLUMN 2016_09_04_00 2016_11_18_00 bit;
--
-- Do not remove this file when we archive sql under this folder
-- it is needed for pending sql importer
--
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;
@@ -1,32 +0,0 @@
-- DB update 2016_11_18_00 -> 2016_11_19_00
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_auth' AND COLUMN_NAME = '2016_11_18_00';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_auth CHANGE COLUMN 2016_11_18_00 2016_11_19_00 bit;
SELECT sql_rev INTO OK FROM version_db_auth WHERE sql_rev = '1478975214169487000'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO version_db_auth (`sql_rev`) VALUES ('1478975214169487000');
SET SESSION sql_mode = "ONLY_FULL_GROUP_BY,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES";
ALTER TABLE `account`
ADD `token_key` VARCHAR(100) NOT NULL DEFAULT '' AFTER `s`,
ADD `reg_mail` VARCHAR(255) NOT NULL DEFAULT '' AFTER `email`,
ADD `last_attempt_ip` VARCHAR(15) NOT NULL DEFAULT '127.0.0.1' AFTER `last_ip`,
ADD `lock_country` VARCHAR(2) NOT NULL DEFAULT '00' AFTER `locked`;
--
-- END UPDATING QUERIES
--
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;
@@ -1,28 +0,0 @@
-- DB update 2016_11_19_00 -> 2017_08_19_00
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_auth' AND COLUMN_NAME = '2016_11_19_00';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_auth CHANGE COLUMN 2016_11_19_00 2017_08_19_00 bit;
SELECT sql_rev INTO OK FROM version_db_auth WHERE sql_rev = '1503135763068847900'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO version_db_auth (`sql_rev`) VALUES ('1503135763068847900');
SET SESSION sql_mode = "ONLY_FULL_GROUP_BY,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES";
ALTER TABLE `account` CHANGE `expansion` `expansion` TINYINT(3) UNSIGNED DEFAULT 2 NOT NULL;
--
-- END UPDATING QUERIES
--
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

Some files were not shown because too many files have changed in this diff Show More