_http://cheatportal.ru/f29/thread537.htmlmlevel писал(а):Скиньте ссылку по настройке сервер под WoW 3.0.2 (или выше). Спасибо!
_http://www.xakep.ru/magazine/xa/123/130/1.asp
совместишь и у тебя все получиться
_http://cheatportal.ru/f29/thread537.htmlmlevel писал(а):Скиньте ссылку по настройке сервер под WoW 3.0.2 (или выше). Спасибо!
Код: Выделить всё
Материал из MaNGOS Wiki
Перейти к: навигация, поискСодержание
1 Необходимое ПО
2 Установка ПО
3 Установка сервера
4 Создание БД
5 Настройка конфигов
6 Необходимые файлы
7 Скрипты запуска
8 Запуск программы
9 Запуск
Необходимое ПО
Для работы нам необходимо (все это можно ставить из портов):
GIT (/usr/ports/devel/git) - для получения исходных текстов мангоса
SVN (/usr/ports/devel/subversion) - для получения исходных текстов скриптов и архивов базы
MySQL (/usr/ports/databases/mysql51-server) - для базы, если база на другом хосте, вместо сервера ставим клиент
autotools (/usr/ports/devel/autotools) - для генерации целей сборки
GNUmake (/usr/ports/devel/gmake) - для сборки (можно собирать и родным)
screen (/usr/ports/sysutils/screen) - для работы сервера в фиктивном терминале
7zip (/usr/ports/archivers/p7zip) - для распаковки бд
Установка ПО
Если есть лишнее время трафик и какойто опыт работы с портами, то ставим всё из портов
% su
Password:
# make -C /usr/ports/devel/subversion install clean
# make -C /usr/ports/devel/git install clean
# make -C /usr/ports/databases/mysql51-server install clean
# make -C /usr/ports/sysutils/screen install clean
# make -C /usr/ports/archivers/p7zip install clean
неудивляйтесь что так мало, остальное установится как зависимости
Если мы недружим с портами, то ставим пакаджи
% su
Password:
# pkg_add -r git subversion mysql51-server autotools screen gmake p7zip
Установка сервера
Получаем исходники мангоса из github:
% cd
% git clone git://github.com/mangos/mangos.git
Получаем исходники ScriptDev2 из svn:
% svn co http://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2 ~/mangos/src/bindings/ScriptDev2
Применяем последний патч, идущий вместе с ScriptDev2
% cd mangos
% git apply < src/bindings/ScriptDev2/patches/MaNGOS-2008-12-22-ScriptDev2.patch
Далее делаем реконфигурацию и создаём директорию для сборки сервера, лучше смонтировать её в озу или кинуть более быстрое устройство (например в туже озу):
% autoreconf -fi
% mkdir comp
% cd comp
Затем конфигурируем... для 32бит ос, одноядерник (например ставите сервер дома эксперимента ради)
% ../configure CFLAGS="-O2 -pipe -fomit-frame-pointer" CXXFLAGS="-O2 -pipe -fomit-frame-pointer" --prefix=/usr/local/mangos --sysconfdir=/usr/local/etc/mangos --enable-cli --with-gnu-ld
для 64бит ос, двуядерник (для рабочей конфигурации со стабильно-опитмизироваными параметрами)
% ../configure \
? CFLAGS="-march=athlon64 -m64 -O2 -msse3 -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -frename-registers -fno-strict-aliasing -fno-strength-reduce -fno-delete-null-pointer-checks" \
? CXXFLAGS="-march=athlon64 -m64 -O2 -msse3 -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -frename-registers -fno-strict-aliasing -fno-strength-reduce -fno-delete-null-pointer-checks" \
? MAKEOPTS="-j3" \
? --prefix=/usr/local/mangos --sysconfdir=/usr/local/etc/mangos --enable-cli --with-gnu-ld
...компилим и устанавливаем
% gmake
...
% su
Password:
# gmake install
Создание БД
Создаем базы сервера, пользователя и структуру:
% mysql -u root -p < ~/mangos/sql/create_mysql.sql
% mysql -u mangos -p mangos < ~/mangos/sql/mangos.sql
% mysql -u mangos -p realmd < ~/mangos/sql/realmd.sql
% mysql -u mangos -p characters < ~/mangos/sql/characters.sql
Теперь заполняем базу, так как UDB вообще отстали от времени, будем качать YTDB (плюс в ней сразу rudb есть)
% svn co http://svn2.assembla.com/svn/ytdbase ~/YTDB
распаковываем, ставим, обновляем скрипты
% 7z e ~/YTDB/WOtLK/YTDB_097_R45.FINAL_rev6969_WotLK_R29_RuDB.7z
% mysql -u mangos -p mangos < YTDB_097_R45.FINAL_rev6969_WotLK_R29_+RUDB.sql
% mysql -u root -p < ~/mangos/src/bindings/ScriptDev2/sql/scriptdev2_create_database.sql
% mysql -u mangos -p scriptdev2 < ~/mangos/src/bindings/ScriptDev2/sql/scriptdev2_script_full.sql
Теперь добавляем свой реалмлист и аккаунт гма. xxx.xxx.xxx.xxx необходимо заменить на ip на котором реалм будет слушать входящие подключения:
% mysql -u mangos -p realmd
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8016
Server version: 5.1.20-beta FreeBSD port: mysql-server-5.1.20
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> UPDATE realmlist SET name='my super server', address='xxx.xxx.xxx.xxx' WHERE id='1';
mysql> DELETE FROM account;
mysql> INSERT INTO account (username,sha_pass_hash,gmlevel) VALUES
->('megaadmin',SHA1(CONCAT(UPPER('megaadmin'),':',UPPER('megapassword'))),'3');
Настройка конфигов
Редактируем конфиги для запуска (остальное настроим потом)
Первое что сделаем, это настроим доступ к базе через unix-cокет, вместо внутрисетевой петли, и корректный путь к необходимым базам данных
/usr/local/mangos/etc/realmd.conf
LoginDatabaseInfo = ".;/tmp/mysql.sock;mangos;mangos;realmd"
/usr/local/mangos/etc/mangosd.conf
LoginDatabaseInfo = ".;/tmp/mysql.sock;mangos;mangos;realmd"
WorldDatabaseInfo = ".;/tmp/mysql.sock;mangos;mangos;mangos"
CharacterDatabaseInfo = ".;/tmp/mysql.sock;mangos;mangos;characters"
Необходимые файлы
Создаем необходимые папки:
# mkdir /usr/local/mangos/share/mangos/maps
# mkdir /usr/local/mangos/share/mangos/dbc
# mkdir /usr/local/mangos/share/mangos/vmaps
экстракторы берём тут: ~/mangos/contrib/extractor/ad.exe и ~/mangos/contrib/vmap_extract_assembler_bin (копируем всю папку) Копируем экстракторы в корневую папку клиента wow, на машину под управлением ОС Windows. Запускаем ad.exe, ждём завершения, потом идём в vmap_extract_assembler_bin, запускаем makevmaps_SIMPLE и тоже ждём завершения.
заливаем всё это счастье (папки vmap_extract_assembler_bin\vmaps, maps, dbc) на вашу FreeBSD (посредством ftp, smb, nfs, силой мысли) и копируем в соответствующие папки
Скрипты запуска
создаём скрипты такого содержания (заодно они будут рестартить серв в случае краха)
/usr/local/mangos/bin/mangos.sh
#!/bin/sh
while true ; do
servlog='/usr/local/mangos/bin/Server.log';
outpatch='/usr/local/mangos/bin/crash/';
date=`date "+%Y-%m-%d_%H:%M:%S"`;
echo "Server CRASHED !!! Start Bugreport System." >> $outpatch$date.txt;
echo "Server.log Log FILE Last 30 Lines:" >> $outpatch$date.txt;
cat $servlog | tail -n 30 >> $outpatch$date.txt;
echo "" >> $outpatch$date.txt;
echo "END bugtracker system." >> $outpatch$date.txt;
nice -n -20 /usr/local/mangos/bin/mangos-worldd
done
/usr/local/mangos/bin/realm.sh
#!/bin/sh
while true ; do
echo `date` ", Realm daemon crashed and restarted." >> /usr/local/mangos/bin/realmcrash
nice -n -20 /usr/local/mangos/bin/mangos-realmd
done
/usr/local/mangos/bin/start
cd /usr/local/mangos/bin/
screen -AmdS world /usr/local/mangos/bin/mangos.sh
screen -AmdS realm /usr/local/mangos/bin/realm.sh
делаем их исполняемыми
# chmod +x /usr/local/mangos/bin/*.sh /usr/local/mangos/bin/start
Запуск программы
Запускаем сервер так
# /usr/local/mangos/bin/start
чтобы посмотреть что там происходит, вводим команды
для реалма
# screen -r realm
для мира
# screen -r world
когда насмотрелись, жмём Ctrl+A,D
Запуск
для автоматического запуска мангоса, вместе с системой, можно воспользоваться rc-скриптом, приведённым ниже (не проверялся)
/usr/local/etc/rc.d/mangos
#!/bin/sh
# REQUIRE: mysql
. /etc/rc.subr
command=/usr/local/mangos/bin/start
pidfile=/var/run/mangos.pid
stop_postcmd=stop_postcmd
stop_postcmd()
{
screen -AvdS world && screen -AvdS realm
}
Источник — «http://mangos.ru:8080/wiki/index.php/Install:FreeBSD»
Код: Выделить всё
svn co http://svn2.assembla.com/svn/ytdbase ~/YTDB
Код: Выделить всё
# cat check_mangos.sh
#!/usr/local/bin/bash
CH_s="/usr/home/mangos/source/"
CH_c="/usr/src/compile/compile"
USER="mangos:wheel";
cd ${CH_s}
echo "`pwd`"
case "$1" in
mk-dir)
mkdir -p /home/mangos/source/mangos
mkdir -p /home/mangos/source/script
mkdir -p ${CH_c}
;;
remove)
cd /home/mangos/source
if [ -e mangos ];then
echo "Директория mangos удаляется!!!"
sleep 3
rm -Rfv mangos
else
echo "Директория mangos не существует!!!"
fi
if [ -e script ];then
echo "Директория script удаляется!!!"
sleep 3
rm -Rfv script
else
echo "Директория script не существует!!!"
fi
;;
clone)
cd /home/mangos/source
rm -rf ./*.old
mv mangos mangos.old
echo "Ждем закачки клона проекта mangos..."
# svn co https://mangos.svn.sourceforge.net/svnroot/mangos/trunk /home/mangos/source/mangos
git clone git://github.com/mangos/mangos.git
echo "Ждем закачки клона проекта ScriptDev2..."
svn co http://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2 /home/mangos/source/script
MaN_ver="`cat mangos/src/realmd/AuthCodes.h | grep EXPECTED_MANGOS_CLIENT_BUILD | awk '{print $3}'| sed 's/,//' | sed 's/{//'`"
echo "MaNGOS: ${MaN_ver}" > /home/mangos/source/MaNGOS.rev
cd /home/mangos/source/
svn info script/ | grep 'Revision:' > /home/mangos/source/ScriptDev2.rev
;;
update)
if [ -e "${CH_c}" ];then
echo "Директория /usr/src/compile/compile существует!"
sleep 3
else
echo "Директория compile не существует!!!"
mkdir -p ${CH_c}/compile
fi
cd /usr/home/mangos/source/mangos
git pull origin master >> /home/mangos/source/update.log
MaN_ver="`cat src/realmd/AuthCodes.h | grep EXPECTED_MANGOS_CLIENT_BUILD | awk '{print $3}'| sed 's/,//' | sed 's/{//'`"
echo "MaNGOS: ${MaN_ver}" > /home/mangos/source/MaNGOS.rev
echo "MaNGOS: ${MaN_ver}" >> /home/mangos/source/update.log
cd /home/mangos/source
svn info script/ | grep 'Revision:' >/home/mangos/source/ScriptDev2.rev
svn up /home/mangos/source/script >> /home/mangos/source/update.log
sleep 1
MaN_ver="`cat mangos/src/realmd/AuthCodes.h | grep EXPECTED_MANGOS_CLIENT_BUILD | awk '{print $3}'| sed 's/,//' | sed 's/{//'`"
echo "MaNGOS: ${MaN_ver}">/home/mangos/source/MaNGOS.rev
NEWREV="${MaN_ver}"
echo -e "\E[37mMangos revision: \E[36m$NEWREV"
echo "Текущая версия MaNGOS = $NEWREV"
echo "Текущая версия MaNGOS = $NEWREV" > MaNGOS.rev
NEWREVSC="$(svn info /home/mangos/source/script|grep 'Revision:')"
NEWREVSC=`echo $NEWREVSC | awk '{print $2}'`
echo "Текущая версия ScriptDev2 = $NEWREVSC "
echo "Текущая версия ScriptDev2 = $NEWREVSC " > ScriptDev2.rev
echo -e "\E[37mScriptDev revision: \E[36m$NEWREVSC"
echo "`date`">>/home/mangos/source/update.log
;;
compil-up)
if [ -e "${CH_c}" ];then
echo "Директория ${CH_c} существует!"
else
echo "Директория ${CH_c} не существует!!!"
mkdir -p ${CH_c}
fi
rm -rf ${CH_c}/*
cp -Rf /home/mangos/source/mangos/* ${CH_c}/
mkdir -p ${CH_c}/src/bindings/ScriptDev2
echo "cp -Rf /home/mangos/source/script/* ${CH_c}/compile/src/bindings/ScriptDev2"
sleep 3
cp -Rf /home/mangos/source/script/* ${CH_c}/src/bindings/ScriptDev2
echo "Ждем-с..."
echo "Меняем владельца инструкции выполнению компиляции: mangos:wheel"
echo "\n"
echo "и делаем сим-линк к в папку с готовыми сырцами"
sleep 3
chown -Rv mangos:wheel /home/mangos/source/patch_compil.sh
sudo -u mangos ln -s /home/mangos/source/patch_compil.sh ${CH_c}/
echo "Текущая директория: `pwd`"
sleep 3
cd ${CH_c}
echo "Текущая директория: `pwd`"
sleep 3
NEWREV="${MaN_ver}"
echo -e "\E[37mMangos revision: \E[36m$NEWREV"
echo "Текущая версия MaNGOS = $NEWREV"
echo "Текущая версия MaNGOS = $NEWREV" > MaNGOS.rev
NEWREVSC="$(svn info /home/mangos/source/script|grep 'Revision:')"
NEWREVSC=`echo $NEWREVSC | awk '{print $2}'`
echo "Текущая версия ScriptDev2 = $NEWREVSC "
echo "Текущая версия ScriptDev2 = $NEWREVSC " > ScriptDev2.rev
echo -e "\E[37mScriptDev revision: \E[36m$NEWREVSC"
echo "Меняем владельца папки компиляции: mangos:wheel"
echo "\n"
sleep 3
chown -Rv mangos:wheel ${CH_c}
;;
*)
echo $"Usage: $0 compil-up | mk-dir | remove | clone | update}"
exit 1
esac
Код: Выделить всё
# cat patch_compil.sh
#!/bin/sh
CH_comp="/usr/src/compile/compile"
case "$1" in
mk-dir)
echo "Директории уже созданы.."
;;
compile)
compil="compile"
path="`pwd`"
svn_f="find ./ -type d -name .svn -print -depth"
echo "`${svn_f}`" > svn_file
if [ -e svn_file ] ;then
while read LINE; do
echo "${LINE%:}"
rm -rv ${LINE%:}
done <svn_file
rm svn_file
fi
ptch="`find ./ \( -name "MaNGOS-*" -a -name "*patch" \) -type f`"
echo "Путь до файла применяемого патча: ${ptch}"
gitign="`cat src/bindings/.gitignore | tail -1`"
echo "До применения патча: ${gitign}"
if [ ${gitign} != "ScriptDev2" ] ;then
git apply ${ptch}
fi
gitign="`cat src/bindings/.gitignore | tail -1`"
echo "После применения патча: ${gitign}"
echo "Применяем: autoreconf && aclocal && autoheader && autoconf && automake ...."
autoreconf -fi
echo "Применяем: aclocal...."
aclocal
echo "Применяем: autoheader...."
autoheader
echo "Применяем: autoconf...."
autoconf
echo "Применяем: automake --add-missing...."
automake --add-missing
echo "Применяем: automake src/bindings/ScriptDev2/Makefile...."
automake src/bindings/ScriptDev2/Makefile
echo "Создаем каталог для компилирования"
mkdir objdir; cd objdir
CH_game="/usr/src/compile/server" # Директория для установки Серверного Софта
suf="-3.2.2-WoTLK" # Суффикс программ
n_ser="-3.2.2-WoTLK" # Серийный номер(имя) Сервера
echo "Создаем или проверяем наличие каталога для сервера"
if [ -e "${CH_game}" ];then
echo "Директория /usr/src/compile/server существует!"
sleep 3
else
echo "Директория /usr/src/compile/server не существует!!!"
mkdir -p ${CH_game}
fi
../configure LDFLAGS=" -L/usr/local/lib" \
--prefix=/usr/local \
--enable-builtin-ace --enable-ra --with-gnu-ld --with-python --enable-cli \
--bindir=${CH_game}/game/mangos${n_ser}/bin \
--sbindir=${CH_game}/game/mangos${n_ser}/sbin \
--libexecdir=${CH_game}/game/mangos${n_ser}/libexecdir \
--sysconfdir=${CH_game}/game/mangos${n_ser}/etc \
--libdir=${CH_game}/game/mangos${n_ser}/lib \
--datadir=${CH_game}/game/mangos${n_ser}/data/3_2_2 \
--infodir=${CH_game}/game/mangos${n_ser}/info \
--mandir=${CH_game}/game/mangos${n_ser}/man \
--docdir=${CH_game}/game/mangos${n_ser}/doc \
--htmldir=${CH_game}/game/mangos${n_ser}/html \
--program-suffix="${suf}"
;;
svn_rm)
compil="compile"
path="`pwd`"
svn_f="find ./ -type d -name .svn -print -depth"
echo "`${svn_f}`" > svn_file
if [ -e svn_file ] ;then
while read LINE; do
echo "${LINE%:}"
rm -rv ${LINE%:}
done <svn_file
rm svn_file
fi
;;
*)
echo $"Usage: $0 compile | mk-dir | svn_rm | clone | update}"
exit 1
esac
Код: Выделить всё
# [1:23] root@lissi YTDB # cat check_ver.sh
#!/bin/sh
#svn co http://svn2.assembla.com/svn/ytdbase ./
svn up ./
svn info |grep 'Revision:' > YTDB.ver
Код: Выделить всё
cat /etc/newsyslog.conf
/var/log/mangos/log/Server.log 644 7 100 * JC
/var/log/mangos/log/Realmd.log 644 7 100 * JC
/var/log/mangos/log/Char.log 644 7 100 * JC
/var/log/mangos/log/DBErrors.log 644 7 100 * JC
/var/log/mangos/log/Gm.log 644 7 100 * JC
/var/log/mangos/log3/Server.log 644 7 100 * JC
/var/log/mangos/log3/Realmd.log 644 7 100 * JC
/var/log/mangos/log3/Char.log 644 7 100 * JC
/var/log/mangos/log3/DBErrors.log 644 7 100 * JC
/var/log/mangos/log3/Gm.log 644 7 100 * JC
Код: Выделить всё
$ patch < src/bindings/ScriptDev2/patches/MaNGOS-8759-ScriptDev2.patch
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From 114944adbcff81cac4d31339f597b3a245290f69 Mon Sep 17 00:00:00 2001
|From: Reve <reve@scriptdev2.com>
|Date: Mon, 2 Nov 2009 10:44:52 +0100
|Subject: [PATCH] ScriptDev2 patch.
|
|---
| configure.ac | 6 +++++-
| src/bindings/.gitignore | 2 +-
| src/bindings/Makefile.am | 2 +-
| src/mangosd/Makefile.am | 4 ++--
| 4 files changed, 9 insertions(+), 5 deletions(-)
|
|diff --git a/configure.ac b/configure.ac
|index e016db0..b29d062 100644
|--- a/configure.ac
|+++ b/configure.ac
--------------------------
Patching file configure.ac using Plan A...
Hunk #1 succeeded at 312 (offset 36 lines).
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/bindings/.gitignore b/src/bindings/.gitignore
|index eeddf0d..95eebf7 100644
|--- a/src/bindings/.gitignore
|+++ b/src/bindings/.gitignore
--------------------------
File to patch:
No file found--skip this patch? [n] ^[
File to patch:
No file found--skip this patch? [n] y
Skipping patch...
Hunk #1 ignored at 11.
1 out of 1 hunks ignored--saving rejects to .gitignore.rej
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/bindings/Makefile.am b/src/bindings/Makefile.am
|index 2cc0efd..f2dbbc7 100644
|--- a/src/bindings/Makefile.am
|+++ b/src/bindings/Makefile.am
--------------------------
Patching file Makefile.am using Plan A...
Hunk #1 succeeded at 14 with fuzz 1.
Hmm... The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/src/mangosd/Makefile.am b/src/mangosd/Makefile.am
|index 3fd4068..076d8d8 100644
|--- a/src/mangosd/Makefile.am
|+++ b/src/mangosd/Makefile.am
--------------------------
Patching file Makefile.am using Plan A...
Hunk #1 failed at 34.
Hunk #2 failed at 45.
2 out of 2 hunks failed--saving rejects to Makefile.am.rej
Hmm... Ignoring the trailing garbage.
done
Код: Выделить всё
/home/zeone/mangos/comp/>autoreconf -f -i
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `aux_config'.
libtoolize: copying file `aux_config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoheader-2.62: warning: missing template: AS_TR_CPP
autoheader-2.62: Use AC_DEFINE([AS_TR_CPP], [], [Description])
autoreconf-2.62: /usr/local/bin/autoheader-2.62 failed with exit status: 1
тут последовательность действий нарушена - применяется не тот патч или не туда - можно пошагово разобраться и вручную поправить(наложить патч)$ patch < src/bindings/ScriptDev2/patches/MaNGOS-8759-ScriptDev2.patch
Hmm... Looks like a unified diff to me...
The text leading up to this was:
Код: Выделить всё
post-patch:
.ifdef WITH_SCRIPTDEV2
@cd ${WRKSRC}/ && git apply ./src/bindings/ScriptDev2/patches/MaNGOS-8759-ScriptDev2.patch
.endif
Код: Выделить всё
@cd ${WRKSRC}/ && patch configure.ac< ../../files/configure.patch
Код: Выделить всё
--- configure.ac 2010-01-28 18:08:52.000000000 +0800
+++ configure.ac 2010-01-28 18:10:38.000000000 +0800
@@ -303,11 +303,6 @@
src/bindings/ScriptDev2/sql/Updates/Makefile
])
-## Configure ACE, if needed
-if test X$enable_builtin_ace_support = Xyes; then
- AC_CONFIG_SUBDIRS([dep/ACE_wrappers])
-fi
-
AC_CONFIG_COMMANDS([default],[
echo ""
echo "Configuration of MaNGOS $PACKAGE_VERSION is now complete."
--- dep/Makefile.am 2010-01-25 13:08:54.000000000 +0800
+++ dep/Makefile.am 2010-01-28 20:05:13.000000000 +0800
@@ -19,10 +19,6 @@
## Sub-directories to parse
SUBDIRS = include lib src
-if MANGOS_BUILD_ACE
-SUBDIRS += ACE_wrappers
-endif
-
# Intel's TBB
SUBDIRS += tbb
--- src/shared/Database/QueryResultPostgre.h 2010-01-30 23:08:42.000000000 +0800
+++ src/shared/Database/QueryResultPostgre.h 2010-01-30 23:08:49.000000000 +0800
@@ -26,7 +26,7 @@
#include <postgre/pg_type.h>
#else
#include <libpq-fe.h>
-//#include <pg_type.h>
+#include <pg_type.h>
#endif
class QueryResultPostgre : public QueryResult
Код: Выделить всё
cat /usr/ports/devel/ace/distinfo
MD5 (ACE-5.5.2.tar.bz2) = 423b52602f72c1b8c5ddf6f957d8153f
SHA256 (ACE-5.5.2.tar.bz2) = 80e1e17477ddaf48ebeaf439ca2571bed0c46abd85c04e678aebc3ce99a567b1
SIZE (ACE-5.5.2.tar.bz2) = 7495797
Код: Выделить всё
ftp://goszakaz38.ru/distfiles/ace-5.7.5.tar.bz2
Код: Выделить всё
#!/bin/sh
case "$1" in
2.4.3)
##Версия 2.4.3:.
hg clone https://www.bitbucket.org/KingPin/trinitycore/
;;
3.2.2a)
##Версия 3.2.2a:
hg up https://trinitycore.googlecode.com/hg/ ./3.2.2a/hg
;;.
KPsN)
##Версия 3.2.2a:
hg clone http://bitbucket.org/KPsN/trinitycore/ ./KPsN
;;
1.12.x)
#Версия 1.12.x:
hg clone https://www.bitbucket.org/KingPin/trinity-zero/
;;
converts)
hg clone http://bitbucket.org/spyder/trinity-converters/ ./converts
;;
geo)
hg clone http://dev.trinitycore.org/trinitycore/ ./GeoData
;;
TrDB)
svn co http://subversion.assembla.com/svn/TrinityDB/ ./TrDB
;;
*)
echo $"Usage: $0 { 2.4.3 | 3.2.2a | KPsN | 1.12.x | converts | geo | TrDB }"
exit 1
esac
тут вроде не все..у меня жаловался на отсутствие библы dnl или как то так, вычитал в нете, что это линуксовая библа, а во фре ее функциолал включен в другую./home/zeone/mangos/comp/>autoreconf -f -i
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `aux_config'.
libtoolize: copying file `aux_config/ltmain.sh'
Ким писал(а):эмм.. сорри за беспокойство, но нет ли у кого ссылочки на полный архив распакованных карт клиента 2.3.2??![]()
а то несколько экстракторов пробовал - даже, когда процесс без ошибок проходил, не хватало части карт - естественно никакой игры((
версия мучимого клиента - 2.3.2
экстракторы использовались как приложенные к статье так и ад
З.Ы. особенно интересует папочка maps, но был бы очень благодарен и за dbc и vmaps впридачу. на всякий случай.
Код: Выделить всё
# git clone git://github.com/mangos/mangos.git
# ll mangos/contrib/extractor/
..............
-rwxr-xr-x 1 root wheel 165888 29 май 21:16 ad.exe (в корень клиента и запустить, получишь dbc и maps)
..............
# ll mangos/contrib/vmap_extract_assembler_bin/
total 568
-rw-r--r-- 1 root wheel 1100 29 май 21:16 make vmaps.bat
-rw-r--r-- 1 root wheel 85 29 май 21:16 makevmaps_SIMPLE.bat
-rw-r--r-- 1 root wheel 207 29 май 21:16 readme.txt
-rw-r--r-- 1 root wheel 353 29 май 21:16 splitConfig.txt
-rw-r--r-- 1 root wheel 295424 29 май 21:16 vmap_assembler.exe
-rw-r--r-- 1 root wheel 223232 29 май 21:16 vmapextract_v2.exe
(кинуть все в path/data/ruRU/ , прочитать readme.txt и запустить make vmaps.bat)
Код: Выделить всё
git clone git://github.com/cmangos/mangos-wotlk.git mangos
git clone git://github.com/scriptdev2/scriptdev2.git /usr/home/wow/mangos_wotlk/mangos/src/bindings/ScriptDev2;
cmake ../classic -DCMAKE_INSTALL_PREFIX=/usr/home/wow/mangos_wotlk/mangos/run -DINCLUDE_BINDINGS_DIR=ScriptDev2 -DDEBUG=1 -DCMAKE_CXX_FLAGS='-gdwarf-2 -gstrict-dwarf'
make install clean
Код: Выделить всё
/usr/home/wow/mangos_wotlk/mangos/dep/include/g3dlite/G3D/System.h:123:20: error: field has incomplete type 'struct timeval'
struct timeval m_start;
^
/usr/home/wow/mangos_wotlk/mangos/dep/include/g3dlite/G3D/System.h:123:12: note: forward declaration of 'G3D::timeval'
struct timeval m_start;
^
1 error generated.
*** Error code 1
Stop.
Код: Выделить всё
[ 12%] Building CXX object src/shared/CMakeFiles/shared.dir/PosixDaemon.cpp.o
/usr/home/wow/mangos_wotlk/mangos/src/shared/PosixDaemon.cpp:72:5: error: use of undeclared identifier 'umask'
umask(0);
^
1 error generated.
*** Error code 1
Stop.
Как вариант попробуйте использовать gnu make.killer67 писал(а):Как решить данную задачу?Код: Выделить всё
[ 12%] Building CXX object src/shared/CMakeFiles/shared.dir/PosixDaemon.cpp.o /usr/home/wow/mangos_wotlk/mangos/src/shared/PosixDaemon.cpp:72:5: error: use of undeclared identifier 'umask' umask(0); ^ 1 error generated. *** Error code 1 Stop.
Я имел ввиду команду gmake.killer67 писал(а):Можно по подробнее команду?
Код: Выделить всё
# uname -a
FreeBSD TrinityTest 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
#
#
# pkg install openssl-1.0.2_11 boost-libs-1.55.0_9 cmake-3.4.1 git-2.6.4 mysql56-client-5.6.27 lzlib-1.7 gcc47-4.7.4_3,1
#
# mkdir /wow
# cd /wow/
# git clone git://github.com/cmangos/mangos-wotlk.git mangos
# git clone git://github.com/scriptdev2/scriptdev2.git ./mangos/src/bindings/ScriptDev2
# cd mangos/
# mkdir build
# cd build/
# cmake ../ -DCMAKE_INSTALL_PREFIX=/tc/cmgs-srv
-- This script builds the MaNGOS server.
Options that can be used in order to configure the process:
CMAKE_INSTALL_PREFIX Path where the server should be installed to
PCH Use precompiled headers
DEBUG Include additional debug-code in core
WARNINGS Show all warnings during compile
INCLUDE_BINDINGS_DIR Include a script library in src/bindings/ with the
defined name. the name must corespond to the name of
the folder and the folder must contain a valid
CMakeLists.txt
TBB_USE_EXTERNAL Use external TBB
USE_STD_MALLOC Use standard malloc instead of TBB
ACE_USE_EXTERNAL Use external ACE
To set an option simply type -D<OPTION>=<VALUE> after 'cmake <srcs>'.
Also, you can specify the generator with -G. see 'cmake --help' for more details
For example: cmake .. -DDEBUG=1 -DCMAKE_INSTALL_PREFIX=/opt/mangos
-- Detected 64-bit platform
-- UNIX: Configuring uninstall target
-- UNIX: Created uninstall target
-- UNIX: Detected compiler: /usr/bin/cc
-- Boost version: 1.55.0
-- Found the following Boost libraries:
-- system
-- program_options
-- Using mysql-config: /usr/local/bin/mysql_config
-- Found MySQL library: /usr/local/lib/mysql/libmysqlclient.so
-- Found MySQL headers: /usr/local/include/mysql
-- CMaNGOS-Core revision : 2019799aaba969dbd395f5a9a95a10c33c71dc07
-- Install server to : /tc/cmgs-srv
-- Build script library : No
-- Use PCH : No
-- Build in debug-mode : No (default)
-- Use std malloc : Yes (default)
-- Configuring done
-- Generating done
-- Build files have been written to: /wow/mangos/build
root@TrinityTest:/wow/mangos/build # rm -rf *
root@TrinityTest:/wow/mangos/build # cmake ../ -DCMAKE_INSTALL_PREFIX=/tc/cmgs-srv
-- The C compiler identification is Clang 3.4.1
-- The CXX compiler identification is Clang 3.4.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/CC
-- Check for working CXX compiler: /usr/bin/CC -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- This script builds the MaNGOS server.
Options that can be used in order to configure the process:
CMAKE_INSTALL_PREFIX Path where the server should be installed to
PCH Use precompiled headers
DEBUG Include additional debug-code in core
WARNINGS Show all warnings during compile
INCLUDE_BINDINGS_DIR Include a script library in src/bindings/ with the
defined name. the name must corespond to the name of
the folder and the folder must contain a valid
CMakeLists.txt
TBB_USE_EXTERNAL Use external TBB
USE_STD_MALLOC Use standard malloc instead of TBB
ACE_USE_EXTERNAL Use external ACE
To set an option simply type -D<OPTION>=<VALUE> after 'cmake <srcs>'.
Also, you can specify the generator with -G. see 'cmake --help' for more details
For example: cmake .. -DDEBUG=1 -DCMAKE_INSTALL_PREFIX=/opt/mangos
-- Detected 64-bit platform
-- UNIX: Configuring uninstall target
-- UNIX: Created uninstall target
-- UNIX: Detected compiler: /usr/bin/cc
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Found Git: /usr/local/bin/git (found version "2.6.4")
-- Boost version: 1.55.0
-- Found the following Boost libraries:
-- system
-- program_options
-- Using mysql-config: /usr/local/bin/mysql_config
-- Found MySQL library: /usr/local/lib/mysql/libmysqlclient.so
-- Found MySQL headers: /usr/local/include/mysql
-- Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so (found version "1.0.1p")
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.8")
-- CMaNGOS-Core revision : 2019799aaba969dbd395f5a9a95a10c33c71dc07
-- Install server to : /tc/cmgs-srv
-- Build script library : No
-- Use PCH : No
-- Build in debug-mode : No (default)
-- Use std malloc : Yes (default)
-- Configuring done
-- Generating done
-- Build files have been written to: /wow/mangos/build
# make
..................
[ 99%] Building CXX object src/scriptdev2/CMakeFiles/mangosscript.dir/scripts/world/npc_professions.cpp.o
[100%] Building CXX object src/scriptdev2/CMakeFiles/mangosscript.dir/scripts/world/npcs_special.cpp.o
[100%] Building CXX object src/scriptdev2/CMakeFiles/mangosscript.dir/scripts/world/spell_scripts.cpp.o
[100%] Building CXX object src/scriptdev2/CMakeFiles/mangosscript.dir/scripts/world/world_map_scripts.cpp.o
[100%] Building CXX object src/scriptdev2/CMakeFiles/mangosscript.dir/system/ScriptLoader.cpp.o
[100%] Building CXX object src/scriptdev2/CMakeFiles/mangosscript.dir/system/system.cpp.o
[100%] Linking CXX shared library libmangosscript.so
[100%] Built target mangosscript
# make install
[ 1%] Built target genrev
[ 1%] Built target revision.h
[ 2%] Built target ACE_Project
[ 3%] Built target detour
[ 9%] Built target g3dlite
[ 9%] Built target gsoap
[ 9%] Built target framework
[ 13%] Built target shared
[ 14%] Built target realmd
[ 37%] Built target game
[ 38%] Built target mangosd
[100%] Built target mangosscript
Install the project...
-- Install configuration: "Release"
-- Installing: /tc/cmgs-srv/bin/realmd
-- Set runtime path of "/tc/cmgs-srv/bin/realmd" to "/tc/cmgs-srv/lib:/usr/local/lib:/usr/local/lib/mysql"
-- Installing: /tc/cmgs-srv/etc/realmd.conf.dist
-- Installing: /tc/cmgs-srv/bin/mangosd
-- Set runtime path of "/tc/cmgs-srv/bin/mangosd" to "/tc/cmgs-srv/lib:/usr/local/lib:/usr/local/lib/mysql"
-- Installing: /tc/cmgs-srv/bin/run-mangosd
-- Installing: /tc/cmgs-srv/etc/mangosd.conf.dist
-- Installing: /tc/cmgs-srv/lib/libmangosscript.so
-- Set runtime path of "/tc/cmgs-srv/lib/libmangosscript.so" to "/tc/cmgs-srv/lib"
# ll /tc/cmgs-srv/
total 16
drwxr-xr-x 2 root wheel 512 Mar 8 03:32 bin/
drwxr-xr-x 2 root wheel 512 Mar 8 03:32 etc/
drwxr-xr-x 3 root wheel 512 Mar 8 02:28 include/
drwxr-xr-x 3 root wheel 512 Mar 8 03:32 lib/
# ll /tc/cmgs-srv/bin/
total 16260
-rwxr-xr-x 1 root wheel 13421453 Mar 8 02:48 mangosd*
-rwxr-xr-x 1 root wheel 3134973 Mar 8 02:30 realmd*
-rw-r--r-- 1 root wheel 345 Mar 8 02:19 run-mangosd
Код: Выделить всё
[ 13%] Building CXX object src/server/database/CMakeFiles/database.dir/Updater/DBUpdater.cpp.o
In file included from /wow/TrinityCore/src/server/database/Updater/DBUpdater.cpp:29:
In file included from /wow/TrinityCore/dep/process/boost/process.hpp:20:
In file included from /wow/TrinityCore/dep/process/boost/process/all.hpp:23:
In file included from /wow/TrinityCore/dep/process/boost/process/initializers.hpp:21:
In file included from /wow/TrinityCore/dep/process/boost/process/posix/initializers.hpp:24:
/wow/TrinityCore/dep/process/boost/process/posix/initializers/inherit_env.hpp:30:17: error: use of undeclared identifier 'environ'
e.env = environ;
^
1 error generated.
*** Error code 1
Stop.
make[2]: stopped in /wow/TrinityCore/build
*** Error code 1
Stop.
make[1]: stopped in /wow/TrinityCore/build
*** Error code 1
Stop.
make: stopped in /wow/TrinityCore/build
Код: Выделить всё
[ 3%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Any.cpp.o
In file included from /usr/home/wow/mangos/dep/src/g3dlite/Any.cpp:14:
In file included from /usr/home/wow/mangos/dep/include/g3dlite/G3D/Any.h:18:
In file included from /usr/home/wow/mangos/dep/include/g3dlite/G3D/Table.h:20:
In file included from /usr/home/wow/mangos/dep/include/g3dlite/G3D/Array.h:19:
/usr/home/wow/mangos/dep/include/g3dlite/G3D/System.h:123:20: error: field has incomplete type 'struct timeval'
struct timeval m_start;
^
/usr/home/wow/mangos/dep/include/g3dlite/G3D/System.h:123:12: note: forward declaration of 'G3D::timeval'
struct timeval m_start;
^
1 error generated.
*** Error code 1
Stop.
make[2]: stopped in /usr/home/wow/mangos/build
*** Error code 1
Stop.
make[1]: stopped in /usr/home/wow/mangos/build
*** Error code 1
Stop.
make: stopped in /usr/home/wow/mangos/build
Код: Выделить всё
diff -r 4c8e9fc4c125 dep/g3dlite/source/FileSystem.cpp
--- a/dep/g3dlite/source/FileSystem.cpp Thu Sep 02 06:02:51 2010 +0300
+++ b/dep/g3dlite/source/FileSystem.cpp Fri Sep 03 12:47:47 2010 +0600
@@ -31,6 +31,8 @@
# include <dirent.h>
# include <fnmatch.h>
# include <unistd.h>
+# define O_LARGEFILE 0100000
+# define stat64 stat
# define _getcwd getcwd
# define _stat stat
#endif
Код: Выделить всё
mkdir /usr/home/wow/mangos_wotlk
cd /usr/home/wow/mangos_wotlk
mkdir server
git clone git://github.com/cmangos/mangos-wotlk.git mangos
git clone git://github.com/scriptdev2/scriptdev2.git /usr/home/wow/mangos_wotlk/mangos/src/bindings/ScriptDev2
cd /usr/home/wow/mangos_wotlk/server
cmake /usr/home/wow/mangos_wotlk/mangos/ -DCMAKE_INSTALL_PREFIX=/usr/home/wow/mangos_wotlk/server/ -DPCH=1 -DACE_USE_EXTERNAL=0 -DDEBUG=1 -DTBB_USE_EXTERNAL=0;
make install clean
Код: Выделить всё
#include "G3D/FileNotFound.h"
#include <string>
+#ifdef G3D_FREEBSD
+# include <sys/_timeval.h>
Код: Выделить всё
[ 14%] Built target shared
[ 15%] Built target realmd
[ 15%] Building CXX precompiled header src/game/cotire/game_CXX_prefix.hxx.pch
In file included from /usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.hxx:4:
In file included from /usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.cxx:9:
/usr/include/c++/v1/stdlib.h:115:82: error: use of undeclared identifier 'labs'; did you mean 'abs'?
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/usr/include/c++/v1/stdlib.h:115:44: note: 'abs' declared here
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/usr/include/c++/v1/stdlib.h:117:81: error: use of undeclared identifier 'llabs'
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
^
/usr/include/c++/v1/stdlib.h:120:35: error: unknown type name 'ldiv_t'; did you mean 'dev_t'?
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);}
^
/usr/include/sys/types.h:105:18: note: 'dev_t' declared here
typedef __dev_t dev_t; /* device number or struct cdev */
^
In file included from /usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.hxx:4:
In file included from /usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.cxx:9:
/usr/include/c++/v1/stdlib.h:120:95: error: use of undeclared identifier 'ldiv'; did you mean 'div'?
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);}
^
/usr/include/c++/v1/stdlib.h:120:42: note: 'div' declared here
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);}
^
/usr/include/c++/v1/stdlib.h:122:34: error: unknown type name 'lldiv_t'
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);}
^
/usr/include/c++/v1/stdlib.h:122:94: error: use of undeclared identifier 'lldiv'
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);}
^
In file included from /usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.hxx:4:
In file included from /usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.cxx:18:
In file included from /usr/include/c++/v1/string:437:
/usr/include/c++/v1/cstdio:109:9: error: no member named 'fpos_t' in the global namespace
using ::fpos_t;
~~^
/usr/include/c++/v1/cstdio:112:9: error: no member named 'fclose' in the global namespace; did you mean 'dlclose'?
using ::fclose;
~~^
/usr/include/dlfcn.h:115:6: note: 'dlclose' declared here
int dlclose(void *);
^
In file included from /usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.hxx:4:
In file included from /usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.cxx:18:
In file included from /usr/include/c++/v1/string:437:
/usr/include/c++/v1/cstdio:113:9: error: no member named 'fflush' in the global namespace
using ::fflush;
~~^
/usr/include/c++/v1/cstdio:114:9: error: no member named 'setbuf' in the global namespace
using ::setbuf;
~~^
/usr/include/c++/v1/cstdio:115:9: error: no member named 'setvbuf' in the global namespace
using ::setvbuf;
~~^
/usr/include/c++/v1/cstdio:116:9: error: no member named 'fprintf' in the global namespace
using ::fprintf;
~~^
/usr/include/c++/v1/cstdio:117:9: error: no member named 'fscanf' in the global namespace
using ::fscanf;
~~^
/usr/include/c++/v1/cstdio:118:9: error: no member named 'snprintf' in the global namespace; did you mean 'swprintf'?
using ::snprintf;
~~^
/usr/include/wchar.h:131:5: note: 'swprintf' declared here
int swprintf(wchar_t * __restrict, size_t n, const wchar_t * __restrict,
^
In file included from /usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.hxx:4:
In file included from /usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.cxx:18:
In file included from /usr/include/c++/v1/string:437:
/usr/include/c++/v1/cstdio:119:9: error: no member named 'sprintf' in the global namespace
using ::sprintf;
~~^
/usr/include/c++/v1/cstdio:120:9: error: no member named 'sscanf' in the global namespace
using ::sscanf;
~~^
/usr/include/c++/v1/cstdio:122:9: error: no member named 'vfprintf' in the global namespace
using ::vfprintf;
~~^
/usr/include/c++/v1/cstdio:123:9: error: no member named 'vfscanf' in the global namespace
using ::vfscanf;
~~^
/usr/include/c++/v1/cstdio:124:9: error: no member named 'vsscanf' in the global namespace
using ::vsscanf;
~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
CMake Error at /usr/home/wow/mangos_wotlk/mangos/cmake/macros/cotire.cmake:1783 (message):
cotire: error 1 precompiling
/usr/home/wow/mangos_wotlk/server/src/game/cotire/game_CXX_prefix.hxx.
Call Stack (most recent call first):
/usr/home/wow/mangos_wotlk/mangos/cmake/macros/cotire.cmake:3332 (cotire_precompile_prefix_header)
*** Error code 1
Stop.
make[2]: stopped in /usr/home/wow/mangos_wotlk/server
*** Error code 1
Stop.
make[1]: stopped in /usr/home/wow/mangos_wotlk/server
*** Error code 1
Stop.
make: stopped in /usr/home/wow/mangos_wotlk/server