.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   The RealBot 'Source' (http://forums.bots-united.com/forumdisplay.php?f=52)
-   -   Creating a workspace... (http://forums.bots-united.com/showthread.php?t=1827)

dstruct2k 01-06-2004 00:06

Creating a workspace...
 
Alright, I'm looking for directions on creating the workspace required in MS Visual C++ to be able to compile the Realbot DLL.

I'm also wondering what other packages are required to compile, and where everything must be in order for C++ to compile properly. (HL SDK, MetaMod source.... etc)

Anything else you can think of that would make the source code usable in C++ (and most of all, compilable so the small changes I make can be tested) would be helpful! Thanks! :)

stefanhendriks 01-06-2004 15:26

Re: Creating a workspace...
 
Hmm, i use a metamod source that is changed so you can't just download that version and i can't steer you into several sites and make a handy tutorial.. hmm

Well, lets make it easy then, i will create a simple downloadable source-files-package. You should unzip it, then you also have a RB workspace (you just need to grab the source files via CVS) and you should be on your way.

This is for MSVC though, i don't know about Linux as i had Pierre and Onno working on that issue. You'll see a source download asap in the filebase.

stefanhendriks 01-06-2004 15:43

Re: Creating a workspace...
 
File you need

- Changed HL SDK. You can download this at the RealBot filebase. Its a big download (1.25 Megs). Note this is not the complete HLSDK, it ONLY contains Multiplayer Source...

- Metamod source, You can download this at the RealBot filebase. keep in mind this is not the complete metamod package. It is a stripped version, for a complete version get the metamod zip file from the metamod site and then overwrite that package with this package on the realbot filebase.

THIS IS ALL IN ONE FILE NOW, GETSTARTED.ZIP!

How to set it up

Create a directory, ie like "RealBot"

then into that directory unzip GETSTARTED.ZIP , it will create a sub-dir 'hlsdk' and 'metamod-1.17'. So you have now:

RealBot
|-Hlsdk
|-Metamod
|-realbot_plugin

in realbot_plugin, you should set CVS so you GET the files into there. In that directory you also find realbot_mm.** files, there you have your workspace to open with MSVC and such.

Note, if you cannot grab the source with CVS yet, visit: http://forums.bots-united.com/showthread.php?t=1816

Set your paths
In order to compile this, you need to set the paths to several directories in your HLSDK and metamod., i will use the example directory to give you an idea:

RealBot\Metamod-1.17
RealBot\hlsdk\Multiplayer source\engine
RealBot\hlsdk\Multiplayer source\
RealBot\hlsdk\Multiplayer source\dlls
RealBot\hlsdk\Multiplayer source\common
RealBot\hlsdk\Multiplayer source\pm_shared

minorgod 07-06-2004 03:40

Re: Creating a workspace...
 
I know you said it's coming, but where should I look for help on compiling this on Linux? I'm running Mandrake Linux version 2.4.22-28mdk. Also, I've noticed the CVS was updated and I got a message that a couple of files are missing. Are they deprecated?

stefanhendriks 07-06-2004 07:49

Re: Creating a workspace...
 
the missing files could be of workspace files (dws file). There are no new source files, so you should be able to download/update the files and compile them. I have no clue about Linux though!

evy 07-06-2004 08:50

Re: Creating a workspace...
 
Quote:

Originally Posted by minorgod
I know you said it's coming, but where should I look for help on compiling this on Linux? I'm running Mandrake Linux version 2.4.22-28mdk. Also, I've noticed the CVS was updated and I got a message that a couple of files are missing. Are they deprecated?

For your info, Stefan just changed the CVS repository to contain 'Linux compatible' source code. This compiles under Mandrake 9.0. Please be sure of course to use a compatible CVS (the default one does not support sserver).

My directory structure is:
/HSDK (from Stefan's zip file)
...../multiplayer (I had to rename the directory from Multiplayer Source)
/metamod-1.17 (from Stefan's zip file)
/realbot (contains the CVS repository)

Then, modify the Makefile as:
Code:


#this is gcc 3.2
CPP = gcc
# CPP must be g++ on Linux
CPP = g++
ARCHFLAG = i586
METAMOD_SRCDIR = ../metamod-1.17/metamod
HLSDK_BASEDIR = ../HLSDK

Last step, make ;-)

Hope it helps

-eric

dstruct2k 08-06-2004 05:20

Re: Creating a workspace...
 
By "set your paths", do you mean go into command prompt and type "SET PATH=x" or whatever?

Or is there a part of MSVC++ where you can enter paths?

stefanhendriks 08-06-2004 09:05

Re: Creating a workspace...
 
i use MSVC, so you set the paths in there. I thought via TOOLS->OPTIONS -> (TAB): Directories

dstruct2k 08-06-2004 15:10

Re: Creating a workspace...
 
Found it, thank you. :)

minorgod 09-06-2004 21:57

Re: Creating a workspace...
 
Quote:

Originally Posted by evy
My directory structure is:
/HSDK (from Stefan's zip file)
...../multiplayer (I had to rename the directory from Multiplayer Source)
/metamod-1.17 (from Stefan's zip file)
/realbot (contains the CVS repository)
........

Is that directory structure nested in your steam directory? I've got my server installed at /usr/steam/hlds_l

Should I put the HSDK folder etc. in my steam folder or in my hlds_l folder?

dstruct2k 09-06-2004 23:39

Re: Creating a workspace...
 
Anywhere. Just set paths.

minorgod 10-06-2004 00:09

Re: Creating a workspace...
 
Thanks. It compiled and is running now. I noticed it puts the new shared object file into the "Release" folder. Do I need to worry about anything besides copying the new shared object to the realbot dll folder? I saw a file called realbot_mm.map and wasn't sure if I need that for something. Anway, it appears to be working now. Will be testing tonight and then possibly starting to work on my own tweaks.

dstruct2k 10-06-2004 04:27

Re: Creating a workspace...
 
Only the dll is needed. Other files are generated by VisualStudio during compile.

yangmungi 19-06-2004 22:46

Re: Creating a workspace...
 
--------------------Configuration: realbot_mm - Win32 Release--------------------Compiling...
bot.cpp
C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
(same 12 errors)

is this because its msvc++ 6.0?

MusicMan 19-06-2004 22:51

Re: Creating a workspace...
 
I had that too:) you need to put the realbot paths on top of the list of paths, and it gives them higher priority:)

Hope this helps

yangmungi 20-06-2004 00:35

Re: Creating a workspace...
 
YES!! thank you musicman. time to learn some post college level code..

MusicMan 20-06-2004 10:48

Re: Creating a workspace...
 
no problem :)

minorgod 21-06-2004 00:33

Re: Creating a workspace...
 
:o Thanks. I thought I had tried that already, but I had missed one of the include files so only two of the three MS includes were below the realbot includes. I fixed it and it finally compiled. Yay! Now I don't feel like I wasted an entire Sunday.=)

EDIT: Sorry...wrong thread

[BBB]sluggo 10-08-2004 14:06

Re: Creating a workspace...
 
Ok, bare with me now.... I'm totaly new to this.
When I try to compile realbot with visual-MinGW 0.56 I get errors... I'm not surpriced 9_9

This is what I get when trying to build.
./HLSDK/Multiplayer/dlls/extdll.h:62: No such file or directory
./HLSDK/Multiplayer/dlls/extdll.h:63: No such file or directory
./HLSDK/Multiplayer/dlls/extdll.h:64: No such file or directory
./HLSDK/Multiplayer/dlls/extdll.h:78: No such file or directory
./HLSDK/Multiplayer/dlls/extdll.h:79: No such file or directory
./HLSDK/Multiplayer/dlls/extdll.h:80: No such file or directory
./HLSDK/Multiplayer/dlls/extdll.h:83: No such file or directory
./HLSDK/Multiplayer/dlls/enginecallback.h:19: No such file or directory
./HLSDK/Multiplayer/dlls/player.h:19: No such file or directory
./HLSDK/Multiplayer/dlls/animation.cpp:29: No such file or directory
./HLSDK/Multiplayer/dlls/animation.cpp:30: No such file or directory
./HLSDK/Multiplayer/dlls/animation.cpp:31: No such file or directory
./HLSDK/Multiplayer/dlls/animation.cpp:32: No such file or directory
./HLSDK/Multiplayer/dlls/animation.cpp:34: No such file or directory
./HLSDK/Multiplayer/dlls/client.cpp:36: No such file or directory
./HLSDK/Multiplayer/dlls/client.cpp:38: No such file or directory

..... and so on. The include files are there somewhere in different dirs exept "malloc.h" or something, I don't have that one?
Well never mind, it crashed now and It refuses to open my project again :'(

I will try to convince the ppl at work to give me one of our licences for MS visual c++ ... I don't think that will help but I don't want to spend any more time on this right now.. I will throw the computer out the window if I keep trying to get this right. (not a joke, I spent the last 10 waken hours on this and it has gotten me nowhere, exept some experience on how NOT to do things :) )

evy 10-08-2004 16:46

Re: Creating a workspace...
 
Regarding Windows compilation, I'm also using MinGW (but not the visual one) and my Makefile:

Code:

# Based on a Makefile from Hacker Harry (for MinGW32 support)

# and the original Makefile from Stefan (?)

#

# Merge by eric@vyncke.org on $Date: 2004/07/20 19:29:24 $

#

# It is a Makefile for MinGW32 only

#

CPP = g++

ARCHFLAG = i386

METAMOD_SRCDIR = /d/sierra/metamod-1.17/metamod

HLSDK_BASEDIR = /d/sierra/HLSDK

BASEFLAGS = -Dstricmp=strcasecmp -Dstrcmpi=strcasecmp

CPPFLAGS = ${BASEFLAGS} -march=${ARCHFLAG} -O2 -w -I"${METAMOD_SRCDIR}" -I"${HLSDK_BASEDIR}/multiplayer/common" -I"${HLSDK_BASEDIR}/multiplayer/dlls" -I"${HLSDK_BASEDIR}/multiplayer/engine" -I"${HLSDK_BASEDIR}/multiplayer/pm_shared"

OBJ = NodeMachine.o \

bot.o \

bot_buycode.o \

bot_client.o \

bot_func.o \

bot_navigate.o \

dll.o \

engine.o \

game.o \

util.o \

build.o \

ChatEngine.o \

IniParser.o

realbot_mm.dll: ${OBJ}

dllwrap -k -mwindows --add-stdcall-alias -o $@ ${OBJ}

install: realbot_mm.dll

cp realbot_mm.dll /d/Sierra/Counter-Strike/realbot/dll

clean:

rm -f *.o

rm -f *.so

rm -f *.dll

%.o: %.cpp

${CPP} ${CPPFLAGS} -c %4$slt; -o $@

%.o: %.c

${CPP} ${CPPFLAGS} -c %4$slt; -o $@



Whistler 10-08-2004 16:51

Re: Creating a workspace...
 
edit the makefile and set the path to the correct dir.
Also it isn't "visual-MingW", it's just "MinGW" or simply "GCC for Windows".
About MSVC: You can actually download the beta version of MSVC Express from M$: (this only supports Windows 2000/XP and you can only download it if you are using DSL)
http://lab.msdn.microsoft.com/expres...c/default.aspx
(Note that M$ doesn't let your release any of the files compiled with it.)

[BBB]sluggo 10-08-2004 17:50

Re: Creating a workspace...
 
Yes, i have used your make file Evy, and changed the paths and I have let the program create the makefile, and I have edited It myself. Allways the same result.
It can't find the #include files... Or at least that is what i think... Like I said, I'm totaly new to this, I have tried it before but with the same result.
But this time I won't give up until i get it right. And KNOW WHY it works, so it isn't a fluke.

Before it crashed... In desperation I took all "*.h" files from realbot+metamod+hlsdk and put in the same directory and pointed to that as some sort of "object directory".. :o Well, I'm lost but I will read some more and then give it another go.... I'll ask you guys for help if (rather WHEN) i get lost again.

Ok it isn't visual-mingw that compiles but i'm using that as a "frontend" to mingw. http://visual-mingw.sourceforge.net/
I'll give it another go tonight.

[BBB]sluggo 11-08-2004 15:14

Re: Creating a workspace...
 
:D realbot_mm.dll - 0 error(s), 0 warning(s) :D

I did it, it compiles and works! Now I just have to figure out why it didn't work before ???:(
Thanks for your time!

dstruct2k 11-08-2004 18:55

Re: Creating a workspace...
 
I'm having issues with MSVC, maybe your fix might help me too!

My problem: [link]

[BBB]sluggo 11-08-2004 20:50

Re: Creating a workspace...
 
Hmm, sorry!
I had a look but to be honest i really don't know what made it work for me. I got MSVC from work, and i figured out some paths i got wrong before. But other than that i have no clue.

dstruct2k 11-08-2004 23:37

Re: Creating a workspace...
 
Meh, I just downloaded the beta of Whidbey from Microsoft... I think this'll work. :)


All times are GMT +2. The time now is 22:08.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.