Jump to content
TrinityCore

Developing core without compiling source completely


aicam
 Share

Recommended Posts

Hello everyone,

 

I searched through all threads that may help but I could not find any related answer. So I hope this question is not duplicate.

I have developed simple options like custom commands for GM. These developments are straightforward so I could add my preferred command with less than four times compilation.

On the other hand, I want to develop a custom arena join system which work with different structures including: GroupQueueInfo, PlayerQueueInfo (BattlegroundQueue.h). In addition, I need to use other functions like ObjectAccessor::FindPlayerByName. In this regard, I am working with many parts of the source so it is very natural to face many and many bugs and errors. If I want to develop in the way that each time I need to compile the source from scratch, it may takes decades for me to finish the development.

Therefore, I was looking for a solution to minimize compilation as much as is possible. I created custom CMakeLists to include required files separately, however, it seems the source is compiled with custom options so it failed.

I appreciate it if someone could guide me to develop a custom code with minimum compilation or at least options that help to recompile only changed file not all of the source. 

Link to comment
Share on other sites

6 hours ago, aicam said:

Hello everyone,

 

I searched through all threads that may help but I could not find any related answer. So I hope this question is not duplicate.

I have developed simple options like custom commands for GM. These developments are straightforward so I could add my preferred command with less than four times compilation.

On the other hand, I want to develop a custom arena join system which work with different structures including: GroupQueueInfo, PlayerQueueInfo (BattlegroundQueue.h). In addition, I need to use other functions like ObjectAccessor::FindPlayerByName. In this regard, I am working with many parts of the source so it is very natural to face many and many bugs and errors. If I want to develop in the way that each time I need to compile the source from scratch, it may takes decades for me to finish the development.

Therefore, I was looking for a solution to minimize compilation as much as is possible. I created custom CMakeLists to include required files separately, however, it seems the source is compiled with custom options so it failed.

I appreciate it if someone could guide me to develop a custom code with minimum compilation or at least options that help to recompile only changed file not all of the source. 

the amount of recompilation depends of the files you change.

  • Like 1
Link to comment
Share on other sites

8 hours ago, Aokromes said:

the amount of recompilation depends of the files you change.

Thanks for your response. Could you explain how should I setup developing environment that recompilation happens only for changed file? If I use "make" command, it would recompile from scratch

Link to comment
Share on other sites

On 3/16/2022 at 7:23 AM, aicam said:

Thanks for your response. Could you explain how should I setup developing environment that recompilation happens only for changed file? If I use "make" command, it would recompile from scratch

you cannot, the more critical files you change the more files compiles.

  • Like 1
Link to comment
Share on other sites

21 hours ago, Aokromes said:

you cannot, the more critical files you change the more files compiles.

How sure are you about this answer? You mean after decades of invention of C++, there is no solution to have a hot reload or at least inline compilation option???? I wish it is not true because my system is a little out of date so I should wait over 3 hours

Link to comment
Share on other sites

On 3/18/2022 at 8:07 AM, aicam said:

How sure are you about this answer? You mean after decades of invention of C++, there is no solution to have a hot reload or at least inline compilation option???? I wish it is not true because my system is a little out of date so I should wait over 3 hours

What Aokromes said is true.

I will tell you any advices in case you didnt know it:

- Dont use cmake if you only changed any lines in any files. Every time that you use cmake, compilation will take more time to compile.

- Dont clear proyect in visual studio if you didnt add new files in the project or it will compile everything there.

- You can disable tools (map extractors) of source in cmake so it wont compile with the project and it will be faster.

Regards

  • Like 1
Link to comment
Share on other sites

On 3/18/2022 at 8:07 AM, aicam said:

How sure are you about this answer? You mean after decades of invention of C++, there is no solution to have a hot reload or at least inline compilation option???? I wish it is not true because my system is a little out of date so I should wait over 3 hours

100% and i use that percentage rarely.

If you edit

src/server/scripts/EasternKingdoms/zone_undercity.cpp

only that file will be recompiled.

if you edit

src/server/game/Entities/Unit/Unit.cpp

everything will be recompiled.

unless you do full rebuild, then everything will be recompiled.

also 3 hours recompile? what processor you have?

  • Like 1
Link to comment
Share on other sites

On 3/21/2022 at 2:54 AM, Aokromes said:

100% and i use that percentage rarely.

If you edit

src/server/scripts/EasternKingdoms/zone_undercity.cpp

only that file will be recompiled.

if you edit

src/server/game/Entities/Unit/Unit.cpp

everything will be recompiled.

unless you do full rebuild, then everything will be recompiled.

also 3 hours recompile? what processor you have?

Such a sad news :(

I am using Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz which is not appropriate I guess.

I have also another laptop with Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz   2.30 GHz, however I am using it as windows system to open the game.

Is there any solution to compile in stronger laptop and run it on weaker?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By PavelFreeman
      Hello, I want to compile Trinity, but I get this errors...

      Did everything according to the documentation (https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130077/Installation+Guide) for Windows 10.

      Visual Studio 2019.
    • By blackmetalz
      Hi guys, I'm going to buy new hardware for reducing compile time in Trinity core. I have heard about Ryzen, it had more core and threads but haven't tested its performance. I just want to ask anyone have Ryzen CPU can share compile time?
       
    • By zsemi02
      hi. i want to compile the core in Microsoft Visual Studio 2013, but i get rhis error:

      Warning    1    warning C4805: '==' : unsafe mix of type 'bool' and type 'uint16' in operation    C:\test\source\source\src\server\game\Entities\Unit\Unit.cpp    15688    1    game Error    2    error C2903: 'result' : symbol is neither a class template nor a function template (C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp)    C:\local\boost_1_55_0\boost\utility\result_of.hpp    186    1    game Error    3    error C2039: 'result' : is not a member of 'TaxiPathGraph::GetCompleteNodeRoute::<lambda_b66f1e4d2625bde789c6e1f8e8bffd24>' (C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp)    C:\local\boost_1_55_0\boost\utility\result_of.hpp    186    1    game Error    4    error C2504: 'result' : base class undefined (C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp)    C:\local\boost_1_55_0\boost\utility\result_of.hpp    186    1    game Error    5    error C2143: syntax error : missing ',' before '<' (C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp)    C:\local\boost_1_55_0\boost\utility\result_of.hpp    186    1    game Error    6    error C2783: 'boost::transform_value_property_map<Func,PM,Ret> boost::make_transform_value_property_map(const Func &,const PM &)' : could not deduce template argument for 'Ret'    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    7    error C2893: Failed to specialize function template 'boost::transform_value_property_map<Func,PM,boost::result_of<const Func(property_traits<PA>::reference)>::type> boost::make_transform_value_property_map(const Func &,const PM &)'    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    8    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,graph_traits<G>::vertex_descriptor,const boost::bgl_named_params<T,Tag,Base> &)' : expects 3 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    9    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,graph_traits<G>::vertex_descriptor,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor)' : expects 11 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    10    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,SourceInputIter,SourceInputIter,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor)' : expects 12 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    11    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,graph_traits<G>::vertex_descriptor,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor,ColorMap)' : expects 12 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    12    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,SourceInputIter,SourceInputIter,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor,ColorMap)' : expects 13 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    13    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,graph_traits<G>::vertex_descriptor,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor,const boost::bgl_named_params<T,Tag,Base> &,enable_if_c<(boost::is_base_and_derived<boost::vertex_list_graph_tag,boost::graph_traits<G>::traversal_category>::value,boost::graph::detail::no_parameter>::type)' : expects 13 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    14    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,SourceInputIter,SourceInputIter,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor,const boost::bgl_named_params<T,Tag,Base> &,enable_if_c<(boost::is_base_and_derived<boost::vertex_list_graph_tag,boost::graph_traits<G>::traversal_category>::value,boost::graph::detail::no_parameter>::type)' : expects 14 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    15    error LNK1181: cannot open input file '..\game\Release\game.lib'    C:\test\build\src\server\worldserver\LINK    worldserver  
      error.txt
    • By skeezix
      Hello -
      Does anyone mess with this particular flavor? I installed a new Debian 8.5 server, nothing but the basics. I installed the needed packages, setup a git clone for brand trinity-wotlk-ai (3.3.5), and tried to compile. I can compile this on Windows, but not linux. I can, though, compile the normal trinity build. I tried this a few days ago but not sure which commit/build as I deleted it once I knew I could at least compile it. (sorry!)
      I didn't really look through the build logs on Windows since it compiled fine, but I assume the issues below are existent there as well, but just don't stop it from finishing. In linux, I'll see warnings from compiling some of it, but then it gets all the way to 100% progress then dumps the whole thing.
      Here's the output of cmake - http://pastebin.com/c96LMDBE
      Here's the output of make (errors/warnings only) - http://pastebin.com/tUH1L0bn
      This server is a virtual machine, 22 cores and 32GB memory. The commit I'm grabbing for mangosbot is 9fefd30dabd9d5e8be82651e288feeb9b5025c22 and I also tried the previous, which is 55b583d1726fe70d55c4b9efab476d3fa0710ae4 and got the same errors.
      The directions for mangosbot were to clone whatever branch you want for it, then follow the same directions for compiling/installing TrinityCore. I went through these step-by-step and cannot find anything else I could do. Anyone have any ideas? I'm with limited coding knowledge.
      Note - I also tried Ubuntu 16.04, as well as Fedora (23 I think? whatever is the latest at this point) and got the same compile errors on those as well.
      Thanks!
    • By Stasicheck
      We need to create free (open source) World of Warcraft client. Do not talk about copyright. We can use code to open MPQs. Only MPQs are under copyright (images, sounds, etc.), but no other client parts (i think). I think, if we can develop normal server, we can develop normal client.
      Code to open MPQ and BLP already developed.
      P. S. I can host the server, but I cannot play the game. Very bad. I like 3.3.5a (12340) version. I try to create better Azeroth but my attempt is failed because no source code is available.
      P. P. S. If we have client source code, we can create all WoW features: trial version, test server features (if they exists) and other.
      Do not read: My email is [email protected], note for me because it is temporary.
×
×
  • Create New...