Author Topic: RakNet headers re-organized into include folder  (Read 5418 times)

Wernight

  • Not-a-newbie
  • *
  • Posts: 5
  • Karma: 2
    • View Profile
    • Beroux.com: Video Games But Not Only
RakNet headers re-organized into include folder
« on: November 11, 2008, 02:57:43 AM »
Goal:
- All headers in a /include/RakNet/ folder
- All RakNet include like #include <RakNet/xxxxxxxx.h> instead of #include "xxxxxxxx.h"

Reason:
- It's easier to see which headers are for/from RakNet.
- Binary distribution doesn't need sources (for SVN it also means less files to keep for users)
- Headers and Lib generated should be updated together independently of the source code evolution (headers and cpp files).

How:
- Change #includes inside RakNet to <RakNet/...>.
- Copy all headers to a Include folder as a post-build step.

Further, similar could be done for extensions (like RPC3) which however require compiling some files.

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: RakNet headers re-organized into include folder
« Reply #1 on: November 11, 2008, 09:59:14 AM »
All headers under /Source are needed for RakNet. This makes it easier to setup include paths. I know that Linux usually does it the way you suggest, but this way is easier for Windows. When Linux is the dominant game platform, which may not be long considering how things are going, then I can change over.

Wernight

  • Not-a-newbie
  • *
  • Posts: 5
  • Karma: 2
    • View Profile
    • Beroux.com: Video Games But Not Only
Re: RakNet headers re-organized into include folder
« Reply #2 on: November 11, 2008, 10:02:36 PM »
Even on Windows I think it would be better that way. The RakNet library post-build step would only have to do (supposing it's been moved to a RakNet sub-folder) "copy Source/RakNet/*.h Include/RakNet/".

Apps using RakNet could then simply download/keep (in SVN or not) those:
- RakNet/include
- RakNet/lib

Supposing during the time people use that built lib other guys work the RakNet source to add custom stuff; they may change headers in Source/ folder but that's ok. Once ready a new build would update inc + lib files all at once (well without being a transaction ^^!).

OvermindDL1

  • Anti-Spam Moderator
  • Hero Member
  • ****
  • Posts: 855
  • Karma: 40
  • Programmer
    • View Profile
    • OvermindDL1's Site
Re: RakNet headers re-organized into include folder
« Reply #3 on: December 08, 2008, 03:23:23 AM »
Yea, I use #include <LibraryName/somefile.h> for quite literally every library I use (including raknet since I move things around :P ).

Klaim

  • Jr. Member
  • **
  • Posts: 60
  • Karma: 3
    • View Profile
Re: RakNet headers re-organized into include folder
« Reply #4 on: December 20, 2008, 01:28:16 PM »
The other solution would have been to rename the RakNet files with some prefix. Currently there is no way to be sure that

#include "GetTime.h"

is including Raknet one or another (local to the project or not) one.

In know that some of the headers have Rak prefixes, but the others (older?) are not.