Jump to content

New build system used by MaNGOS Master/One/Zero


Guest VladimirMangos

Recommended Posts

Starting from [11167] versions MaNGOS Master version use new build system base at cmake usage.

* If you build MaNGOS at Unix/Linux then you need have

installed cmake package and only can build mangos with cmake use:

mkdir build; cd build; cmake .. ; make; make install
as example normal way build in like case.

* If you plan build MaNGOS at Windows then for this time prefered

use old way with Visual Studio projects in win directory. So nothing really changes in this case.

You _can_ use cmake way MaNGOS build at Windows but this experemental mode.

For cmake using build you need have cmake tool installed at Windows (with adding cmake to PATH).

And need run cmake (most simple way run createprojects.bat in MaNGOS root directory)

and then load generated Visual Studio solltion file build/mangos.sln

[added]Mangos One also use cmake from [s0827] revision.

[added2]MaNGOS Zero also use cmake from [z1369] revision

Link to comment
Share on other sites

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

1 >------ Build started: Project: revision.h, Configuration: Release x64 ------

2 >------ Building omitted: Project: uninstall, Configuration: Release x64 ------

2> configure the solution for the selected project are to build.

1> Build log "file: / / c: \\ bin \\ revision.h.dir \\ Release \\ BuildLog.htm" saved.

1> revision.h - Errors: 0, warning: 0

3 >------ Build started: Project: mangosd, Configuration: Release x64 ------

4 >------ Build started: Project: realmd, Configuration: Release x64 ------

4> is the link ...

3> is the link ...

4> ACE.lib (ACE.dll): fatal error LNK1112: 'X86' module to the computer type 'x64' conflicts with target machine type.

3> ACE.lib (ACE.dll): fatal error LNK1112: 'X86' module to the computer type 'x64' conflicts with target machine type.

4> Build log "file: / / c: \\ bin \\ src \\ realmd \\ realmd.dir \\ Release \\ BuildLog.htm" saved.

4> realmd - Errors: 1, warnings: 0

3> Build log "file: / / c: \\ bin \\ src \\ mangosd \\ mangosd.dir \\ Release \\ BuildLog.htm" saved.

3> mangosd - Errors: 1, warnings: 0

5 >------ Build started: Project: mangosscript, Configuration: Release x64 ------

5> is the link ...

5> LINK: fatal error LNK1181: 'mangosd.lib' Can not open input file.

5> Build log "file: / / c: \\ bin \\ src \\ bindings \\ ScriptDev2 \\ mangosscript.dir \\ Release \\ BuildLog.htm" saved.

5> mangosscript - Errors: 1, warnings: 0

6 >------ Building omitted: Project: INSTALL, Configuration: Release x64 ------

6> for this solution configuration to build the project is not selected.

========== Build: 1 succeeded, failed 3, the latest 11, omitted two ==========

i set 64bit

Link to comment
Share on other sites

I have the same questions as Vapula because I compiled with:

cmake .. -DDEBUG=1 -DPREFIX=/home/user/mangos/ -DSYSCONFDIR=/home/user/mangos/etc/ -DDATADIR=/home/user/mangos/data/

And the .conf files are not setting data folder, it's set to "." instead of /home/user/mangos/data/

sysconf folder is the right one, but maybe because of the default settting is "prefix/etc"

Link to comment
Share on other sites

tested cmake on windows although VS support is also available i would like to work with Code::Blocks. But very bad a con for cmake on windows :x

CMake Error at CMakeLists.txt:39 (message):
 Under Windows other compiler than Microsoft Visual Studio are not
 supported.


Configuring incomplete, errors occurred!

Tested with codeblocks+mingw installation, cmake didn't find neither the mingw nor the codeblocks executable although i have all installed on the default way. Also tested mingw standalone, same there.

Btw. have selected it with the Advanced option checked and in the end there was everytime this error at top :x

Link to comment
Share on other sites

about non VS build at windows: main reason that it directly disabled is existing in mangos code expection "Windows" == "VS build". You can remove related check in mangos root dir CMakeLists.txt but you will need fix related code problems for make mangos buildable by non-VS compiler. I also not sure how hard make packages in dep dir build at windows not by VS

Ofc, if you will have some good loking fixed for this Windows==VS-buld limitaiton for code parts will be nice see its as patches in under review section.

Link to comment
Share on other sites

Thank you for your huge work, but I think this will be a step back, at least for windows users. I'm having the first troubles with cmake and visual studio 10, some errors, output weird, compilation is slower (weird think i know, but it's true). We were used to using VS and was wonderful, I think I will have to restore win folder, and update it as I can

Linux Outlaw 73 - If It Works, Don't Touch It

Link to comment
Share on other sites

its possible to hide the "unused parameter" warnings within enabled debug mode?

and i become a few warnings:

/home/mangos/src/shared/Database/DBCStore.h: In constructor 'SqlDbc::SqlDbc(const std::string*, const std::string*, const std::string*, const char*)':
/home/mangos/src/shared/Database/DBCStore.h:33: warning: 'SqlDbc::sqlIndexPos' will be initialized after
/home/mangos/src/shared/Database/DBCStore.h:30: warning:   'const std::string* SqlDbc::indexName'
/home/mangos/src/shared/Database/DBCStore.h:34: warning:   when initialized here
/home/mangos/src/shared/Database/DBCStore.h:56: warning: comparison between signed and unsigned integer expressions

/home/mangos/src/game/GridNotifiers.h: At global scope:
/home/mangos/src/game/GridNotifiers.h:48: warning: unused parameter 'm'
/home/mangos/src/game/GridNotifiers.h: In constructor 'MaNGOS::NearestGameObjectEntryInPosRangeCheck::NearestGameObjectEntryInPosRangeCheck(const WorldObject&, uint32, float, float, float, float)':
/home/mangos/src/game/GridNotifiers.h:739: warning: 'MaNGOS::NearestGameObjectEntryInPosRangeCheck::i_z' will be initialized after
/home/mangos/src/game/GridNotifiers.h:738: warning:   'uint32 MaNGOS::NearestGameObjectEntryInPosRangeCheck::i_entry'
/home/mangos/src/game/GridNotifiers.h:717: warning:   when initialized here
/home/mangos/src/game/GridNotifiers.h: In constructor 'MaNGOS::GameObjectEntryInPosRangeCheck::GameObjectEntryInPosRangeCheck(const WorldObject&, uint32, float, float, float, float)':
/home/mangos/src/game/GridNotifiers.h:768: warning: 'MaNGOS::GameObjectEntryInPosRangeCheck::i_z' will be initialized after
/home/mangos/src/game/GridNotifiers.h:767: warning:   'uint32 MaNGOS::GameObjectEntryInPosRangeCheck::i_entry'
/home/mangos/src/game/GridNotifiers.h:750: warning:   when initialized here
/home/mangos/src/game/GridNotifiers.h: In member function 'bool MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck::operator()(Creature*)':
/home/mangos/src/game/GridNotifiers.h:1144: warning: suggest parentheses around && within ||
In file included from /home/mangos/src/game/GridNotifiersImpl.h:28,
                from /home/mangos/src/bindings/ScriptDev2/include/sc_grid_searchers.h:14,
                from /home/mangos/src/bindings/ScriptDev2/include/precompiled.h:11,
                from /home/mangos/src/bindings/ScriptDev2/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp:24:
/home/mangos/src/game/SpellAuras.h: At global scope:
/home/mangos/src/game/SpellAuras.h:441: warning: type qualifiers ignored on function return type
/home/mangos/src/bindings/ScriptDev2/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp:39: warning: unused parameter 'pPlayer'
In file included from /home/mangos/src/game/Creature.h:23,
                from /home/mangos/src/bindings/ScriptDev2/include/sc_creature.h:9,
                from /home/mangos/src/bindings/ScriptDev2/include/precompiled.h:9,

Link to comment
Share on other sites

So the wiki http://getmangos.eu/wiki/Compile_MaNGOS_On_Ubuntu is not up to date anymore? I was trying to get the AHbot to work, but i screwed up and deleted tho whole mangos dir. So when i followed the instructions in the wiki, and i get stuck on

~# autoreconf --install --force

. That's when cmake come's in i guess? ANd now i'am stuck. can someone help me with this?

From the wiki:

Compile MaNGOS

Now where going to compile, this takes anywhere from 30 minutes up to a few hours.

This is going to get everything ready, we will compile in the "objdir" so if we are to ever recompile for some reason, we can just remove this folder and have a clean slate.

~# autoreconf --install --force
~# mkdir objdir
~# cd objdirThis will configure MaNGOS. 

~# ../configure --prefix=/opt/mangos --sysconfdir=/opt/mangos/etc --datadir=/opt/mangosThe last step is to start the compiler, this part takes the longest. 

~# make -j [#ofCores]
~# make install

Link to comment
Share on other sites

I think i have made a mistake the first time. that's why it didn't work what Vladimir has writen.

So this whole thing isn't needed anymore? cmake is running btw.

~# autoreconf --install --force
~# mkdir objdir
~# cd objdirThis will configure MaNGOS. 

~# ../configure --prefix=/opt/mangos --sysconfdir=/opt/mangos/etc --datadir=/opt/mangosThe last step is to start the compiler, this part takes the longest. 

~# make -j [#ofCores]
~# make install

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use