IPB

Welcome Guest ( Log In | Register )

8 Pages V « < 3 4 5 6 7 > »   
Reply to this topicStart new topic
> HPB_bot2_i486.so, HPBot2 ver 0.5 release 106
Xairoo
post Aug 2 2011, 05:21 AM
Post #81


Member
**

Group: Members
Posts: 12
Joined: 31-May 11
Member No.: 1,990



maybe 2 .so files are linked bad. i'll check this later this day.
go to your orangebox/bin folder and try this:

CODE
cp libtier0.so tier0_i486.so
cp libvstdlib.so vstdlib_i486.so


if it works, run this command after an update too!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Weasel
post Aug 2 2011, 04:26 PM
Post #82


Member
**

Group: Members
Posts: 23
Joined: 14-January 09
From: California, USA
Member No.: 1,445



QUOTE(Xairoo @ Aug 1 2011, 10:21 PM) *

maybe 2 .so files are linked bad. i'll check this later this day.
go to your orangebox/bin folder and try this:
CODE
cp libtier0.so tier0_i486.so
cp libvstdlib.so vstdlib_i486.so

if it works, run this command after an update too!

Thanks for the follow-up! But, still not working...
CODE
Unable to load plugin "../bin/HPB_bot2"
Unable to load plugin "../bin/HPB_bot2"

Seems kind of weird that it says that twice also. I double-checked and I do not have a .VDF file for this, it's just being done with the command-line +plugin_load option.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
TesterYYY
post Feb 9 2013, 01:14 PM
Post #83


Member
**

Group: Members
Posts: 24
Joined: 25-January 13
Member No.: 2,251



Can somebody compile rcbot 0.71 for linux? I find it hard to compile it under linux... Manual how to compile under linux would be also good.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Feb 10 2013, 12:39 AM
Post #84


Admin
*****

Group: Admin
Posts: 3,055
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(TesterYYY @ Feb 9 2013, 02:14 PM) *

Can somebody compile rcbot 0.71 for linux? I find it hard to compile it under linux... Manual how to compile under linux would be also good.

bir3yk is the guy we'd need to talk to but he hasn't been active for more than a year.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Ted
post Mar 19 2013, 09:04 AM
Post #85


Member
**

Group: Members
Posts: 13
Joined: 20-February 13
Member No.: 2,257



QUOTE(Cheeseh @ Feb 10 2013, 12:39 AM) *

bir3yk is the guy we'd need to talk to but he hasn't been active for more than a year.


I've managed to build and run the latest version on Ubuntu. Some changes had to be made to get it to build as the latest version of GCC is a bit more strict regarding syntax.

I also discovered that the RunPlayeroveCommand detouring code for LINUX was causing a segmentation fault since the memory address passed to mprotect needs to be page aligned.

After fixing that issue, I managed to add a bot, but it just stands around. Any idea what may be causing this?

Also for the changes I made, should I send those to you as a diff or do you want the updated files?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Mar 19 2013, 11:02 AM
Post #86


Admin
*****

Group: Admin
Posts: 3,055
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(Ted @ Mar 19 2013, 10:04 AM) *

I've managed to build and run the latest version on Ubuntu. Some changes had to be made to get it to build as the latest version of GCC is a bit more strict regarding syntax.

I also discovered that the RunPlayeroveCommand detouring code for LINUX was causing a segmentation fault since the memory address passed to mprotect needs to be page aligned.

After fixing that issue, I managed to add a bot, but it just stands around. Any idea what may be causing this?

Also for the changes I made, should I send those to you as a diff or do you want the updated files?


I'd like the code you used for mprotect as i'm not sure how it works in linux

As for bots standing around. Runplayermove hook is the most important function needed, so perhaps its not hooking to the correct address or it's an mprotect problem
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Ted
post Mar 20 2013, 07:34 AM
Post #87


Member
**

Group: Members
Posts: 13
Joined: 20-February 13
Member No.: 2,257



QUOTE(Cheeseh @ Mar 19 2013, 11:02 AM) *

I'd like the code you used for mprotect as i'm not sure how it works in linux

As for bots standing around. Runplayermove hook is the most important function needed, so perhaps its not hooking to the correct address or it's an mprotect problem


CODE

#include <sys/mman.h>
#include <errno.h>
#include <unistd.h>
.....

#ifndef __linux__
    VirtualProtect( &pdwNewInterface[vtable], 4, PAGE_EXECUTE_READWRITE, &dwOld );
#else
    // need page aligned address
    char *addr = reinterpret_cast<char *>(reinterpret_cast<DWORD>(&pdwNewInterface[vtable])
                      - reinterpret_cast<DWORD>(&pdwNewInterface[vtable])
                      % sysconf(_SC_PAGE_SIZE));
    int len = sizeof(DWORD) + reinterpret_cast<DWORD>(&pdwNewInterface[vtable])
      % sysconf(_SC_PAGE_SIZE);
    if (mprotect(addr, len, PROT_EXEC|PROT_READ|PROT_WRITE) == -1) {
      Warning("In VirtualTableHook while calling mprotect for write access: %s.\n",
          strerror(errno));
    } else {
#endif
    dwStor = pdwNewInterface[vtable];
    *(DWORD*)&pdwNewInterface[vtable] = newInterface;
#ifndef __linux__
    VirtualProtect(&pdwNewInterface[vtable], 4, dwOld, &dwOld);
#else
    if (mprotect(addr, len, PROT_EXEC|PROT_READ) == -1) {
      Warning("In VirtualTableHook while calling mprotect to remove write access: %s.\n",
          strerror(errno));
    }
    }
#endif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Mar 22 2013, 12:18 AM
Post #88


Admin
*****

Group: Admin
Posts: 3,055
Joined: 11-September 03
From: uk
Member No.: 1



have a look at sourcemod to see if its the same

CODE

    void Protect(void *addr, size_t length, int prot)
    {
# if defined PLATFORM_WINDOWS
        DWORD ignore;
        VirtualProtect(addr, length, prot, &ignore);
# else
        uintptr_t startPage = AddrToPage(uintptr_t(addr));
        length += (uintptr_t(addr) - startPage);
        mprotect((void*)startPage, length, prot);
# endif
    }

    static inline uintptr_t AddrToPage(uintptr_t address)
    {
        return (address & ~(uintptr_t(sysconf(_SC_PAGE_SIZE) - 1)));
    }

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Ted
post Mar 22 2013, 11:20 PM
Post #89


Member
**

Group: Members
Posts: 13
Joined: 20-February 13
Member No.: 2,257



QUOTE(Cheeseh @ Mar 22 2013, 12:18 AM) *

have a look at sourcemod to see if its the same

CODE

    void Protect(void *addr, size_t length, int prot)
    {
# if defined PLATFORM_WINDOWS
        DWORD ignore;
        VirtualProtect(addr, length, prot, &ignore);
# else
        uintptr_t startPage = AddrToPage(uintptr_t(addr));
        length += (uintptr_t(addr) - startPage);
        mprotect((void*)startPage, length, prot);
# endif
    }

    static inline uintptr_t AddrToPage(uintptr_t address)
    {
        return (address & ~(uintptr_t(sysconf(_SC_PAGE_SIZE) - 1)));
    }



I believe that does the same as what I posted. An address is page aligned if it is a multiple of the page size. Mprotect will throw an EINVAL if a none-page aligned address is given as the input. To page align the address you want to supply mprotect, you decrease the address by the address modulus page size: addr - (addr % page_size).
The snippet from SourceMod uses a bit operator trick to get the same result. For example:

CODE
address    = 6             = 0110
page_size = 4             = 0100

page_size - 1 = 3         = 0011
~(page_size - 1)         = 1100
address & ~(page_size -1) = 4     = 0100
6 - 6 % 4 = 4            = 0100


I believe the reason that they chose this (if I remember correctly from my assembler class) method is that it's an optimized way of getting this calculation because modulus requires more CPU cycles to perform. But the result of this optimization will probably be not noticeable for your case as the calculation is done at most 31 times per game.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Mar 29 2013, 12:03 PM
Post #90


Admin
*****

Group: Admin
Posts: 3,055
Joined: 11-September 03
From: uk
Member No.: 1



Hey Ted. Yeah I thought so too. I've been trying to compile myself on linux so I can test it myself. I've edited the rcbot files so that it compiles under linux however running into frustrations compiling the latest sdk from http://hg.alliedmods.net/hl2sdks/hl2sdk-ob-valve/

had to put
CODE

#if defined(_LINUX) || defined(__APPLE__)
#define NO_MALLOC_OVERRIDE
#endif


in memoverride.cpp as it came up with g_pMemAlloc not defined errors

now coming up with errors in memstack.cpp
CODE

./utils/RCBot2/../../tier1/memstack.cpp
<command-line>:0:8: warning: extra tokens at end of #undef directive [enabled by default]
<command-line>:0:8: warning: extra tokens at end of #undef directive [enabled by default]
<command-line>:0:6: warning: extra tokens at end of #undef directive [enabled by default]
../utils/RCBot2/../../tier1/memstack.cpp:29:48: error: expected constructor, destructor, or type conversion before ‘;’ token
../utils/RCBot2/../../tier1/memstack.cpp: In member function ‘bool CMemoryStack::Init(unsigned int, unsigned int, unsigned int, unsigned int)’:
../utils/RCBot2/../../tier1/memstack.cpp:120:80: error: ‘MemAlloc_AllocAligned’ was not declared in this scope
../utils/RCBot2/../../tier1/memstack.cpp: In member function ‘void CMemoryStack::Term()’:
../utils/RCBot2/../../tier1/memstack.cpp:170:33: error: ‘MemAlloc_FreeAligned’ was not declared in this scope
make[1]: *** [obj/HPB_bot2_i486/us/RCBot2/tier1/memstack.o] Error 1


I don't really want to be editing non-rcbot files as I'm not sure about all this tier stuff
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Ted
post Mar 30 2013, 12:04 AM
Post #91


Member
**

Group: Members
Posts: 13
Joined: 20-February 13
Member No.: 2,257



Actually, I found that you don't really need to include the memoverride and memstack objects for compilation. The current LINUX RCBot2 code base does not use any of the functions from those objects.

Also I found it easier to just specify the project as a plugin object rather than go through the mod project route as specified by the Makefile posted in the forum. This allows you skip building vcpm project, which is severely outdated. The only draw back is that you will have to manually update the Makeifle.plugin file.

QUOTE(Cheeseh @ Mar 29 2013, 12:03 PM) *

Hey Ted. Yeah I thought so too. I've been trying to compile myself on linux so I can test it myself. I've edited the rcbot files so that it compiles under linux however running into frustrations compiling the latest sdk from http://hg.alliedmods.net/hl2sdks/hl2sdk-ob-valve/

had to put
CODE

#if defined(_LINUX) || defined(__APPLE__)
#define NO_MALLOC_OVERRIDE
#endif


in memoverride.cpp as it came up with g_pMemAlloc not defined errors

now coming up with errors in memstack.cpp
CODE

./utils/RCBot2/../../tier1/memstack.cpp
<command-line>:0:8: warning: extra tokens at end of #undef directive [enabled by default]
<command-line>:0:8: warning: extra tokens at end of #undef directive [enabled by default]
<command-line>:0:6: warning: extra tokens at end of #undef directive [enabled by default]
../utils/RCBot2/../../tier1/memstack.cpp:29:48: error: expected constructor, destructor, or type conversion before ‘;’ token
../utils/RCBot2/../../tier1/memstack.cpp: In member function ‘bool CMemoryStack::Init(unsigned int, unsigned int, unsigned int, unsigned int)’:
../utils/RCBot2/../../tier1/memstack.cpp:120:80: error: ‘MemAlloc_AllocAligned’ was not declared in this scope
../utils/RCBot2/../../tier1/memstack.cpp: In member function ‘void CMemoryStack::Term()’:
../utils/RCBot2/../../tier1/memstack.cpp:170:33: error: ‘MemAlloc_FreeAligned’ was not declared in this scope
make[1]: *** [obj/HPB_bot2_i486/us/RCBot2/tier1/memstack.o] Error 1


I don't really want to be editing non-rcbot files as I'm not sure about all this tier stuff
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Apr 4 2013, 11:53 AM
Post #92


Admin
*****

Group: Admin
Posts: 3,055
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(Ted @ Mar 30 2013, 01:04 AM) *

Actually, I found that you don't really need to include the memoverride and memstack objects for compilation. The current LINUX RCBot2 code base does not use any of the functions from those objects.

Also I found it easier to just specify the project as a plugin object rather than go through the mod project route as specified by the Makefile posted in the forum. This allows you skip building vcpm project, which is severely outdated. The only draw back is that you will have to manually update the Makeifle.plugin file.


well i've updated the source files on the svn to fix the linux compile issues, and removed dependencies on the tier1 source, (just use the lib). I've run into compile problems yet again where it says "libtier0_srv.so could not read symbols: File in wrong format " garrh, I'm compiling in 64-bit ubuntu but using lib32 libs with -m32 flag, dunno what else I need to check.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Ted
post Apr 10 2013, 09:25 AM
Post #93


Member
**

Group: Members
Posts: 13
Joined: 20-February 13
Member No.: 2,257



QUOTE(Cheeseh @ Apr 4 2013, 11:53 AM) *

well i've updated the source files on the svn to fix the linux compile issues, and removed dependencies on the tier1 source, (just use the lib). I've run into compile problems yet again where it says "libtier0_srv.so could not read symbols: File in wrong format " garrh, I'm compiling in 64-bit ubuntu but using lib32 libs with -m32 flag, dunno what else I need to check.



Here is my Makefile:

CODE

#
# SDK Makefile for x86 Linux
#
#

#############################################################################
# Developer configurable items
#############################################################################

# the name of the mod binary (_i486.so is appended to the end)
NAME = HPB_bot2

# the location of the vcproj that builds the mod
MOD_PROJ = ../utils/RCBot2/HPB_Bot2.vcproj
# the name of the mod configuration (typically <proj name>_<build type><build target>)
MOD_CONFIG = HPB_bot2_ReleaseWin32

# the directory the base binaries (tier0_i486.so, etc) are located
# this should point to your orange box subfolder of where you have srcds installed.
SRCDS_DIR = ~/srcds/orangebox

# the path to your mods directory
# set this so that 'make install' or 'make installrelease' will copy your binary over automatically.
GAME_DIR = $(SRCDS_DIR)/
GCC_VER = 4.7
# compiler options (gcc 3.4.1 or above is required - 4.1.2+ recommended)
CC = /usr/bin/gcc-$(GCC_VER)
CPLUS = /usr/bin/gcc-$(GCC_VER)
CLINK = /usr/bin/gcc-$(GCC_VER)
CPP_LIB_DIR = /usr/lib/gcc/x86_64-linux-gnu/4.7/32
CPP_LIB = #"$(CPP_LIB_DIR)/libstdc++.a $(CPP_LIB_DIR)/libgcc_eh.a"

VSTD_LIB=libvstdlib_srv.so
STEAM_LIB=libsteam.so
TIER0_LIB=libtier0_srv.so

# put any compiler flags you want passed here
USER_CFLAGS =

# link flags for your mod, make sure to include any special libraries here
LDFLAGS = "-lm -ldl $(LIB_DIR)/particles_i486.a $(LIB_DIR)/dmxloader_i486.a $(LIB_DIR)/mathlib_i486.a $(TIER0_LIB) $(VSTD_LIB) $(LIB_DIR)/tier1_i486.a $(LIB_DIR)/tier2_i486.a $(LIB_DIR)/tier3_i486.a $(LIB_DIR)/choreoobjects_i486.a $(STEAM_LIB)"

# XERCES 2.6.0 or above ( http://xml.apache.org/xerces-c/ ) is used by the vcproj to makefile converter
# it must be installed before being able to run this makefile
# if you have xerces installed already you should be able to use the two lines below
XERCES_INC_DIR = /usr/include
XERCES_LIB_DIR = /usr/lib

# Change this to true if you want to build debug binaries for everything
# The only exception is the mod/game as MOD_CONFIG determines if it's a debug build or not
DEBUG = false

#############################################################################
# Things below here shouldn't need to be altered
#############################################################################
MAKE = make
AR = "ar rvs"

# the dir we want to put binaries we build into
BUILD_DIR = .
# the place to put object files
BUILD_OBJ_DIR = $(BUILD_DIR)/obj

# the location of the source code
SRC_DIR = ..
# the location of the Linux static libraries
LIB_DIR = $(SRC_DIR)/lib/linux

# the CPU target for the build, must be i486 for now
ARCH = i486
ARCH_CFLAGS = -mtune=i686 -march=pentium3 -mmmx -m32

DEFINES = -D_LINUX -DLINUX -DVPROF_LEVEL=1 -DSWDS -D_finite=finite -Dstricmp=strcasecmp -D_stricmp=strcasecmp \
    -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -DGNUC
UNDEF = -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE

BASE_CFLAGS = -fno-strict-aliasing -Wall -Wconversion -Wno-non-virtual-dtor -Wno-invalid-offsetof
SHLIBEXT = so
SHLIBCFLAGS = -fPIC
SHLIBLDFLAGS = -shared -Wl,-Map,$@_map.txt -Wl

# Flags passed to the c compiler
CFLAGS = $(DEFINES) $(ARCH_CFLAGS) -g $(BASE_CFLAGS)
ifdef USER_CFLAGS
    CFLAGS += $(USER_CFLAGS)
endif
CFLAGS += $(UNDEF)

# Debug flags
DBG_DEFINES = "-D_DEBUG -DDEBUG"
DBG_CFLAGS = "$(DEFINES) $(ARCH_CFLAGS) -g -ggdb $(BASE_CFLAGS) $(UNDEF)"

# define list passed to make for the sub makefile
BASE_DEFINES = CC=$(CC) AR=$(AR) CPLUS=$(CPLUS) CPP_LIB=$(CPP_LIB) DEBUG=$(DEBUG) \
    BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) SRC_DIR=$(SRC_DIR) \
    LIB_DIR=$(LIB_DIR) SHLIBLDFLAGS=$(SHLIBLDFLAGS) SHLIBEXT=$(SHLIBEXT) \
    CLINK=$(CLINK) CFLAGS="$(CFLAGS)" DBG_CFLAGS=$(DBG_CFLAGS) LDFLAGS=$(LDFLAGS) \
    DEFINES="$(DEFINES)" DBG_DEFINES=$(DBG_DEFINES) \
    ARCH=$(ARCH) SRCDS_DIR=$(SRCDS_DIR) MOD_CONFIG=$(MOD_CONFIG) NAME=$(NAME) \
    XERCES_INC_DIR=$(XERCES_INC_DIR) XERCES_LIB_DIR=$(XERCES_LIB_DIR) \
    TIER0_LIB=$(TIER0_LIB) VSTD_LIB=$(VSTD_LIB)

# Project Makefile
MAKE_SERVER = Makefile.server
MAKE_VCPM = Makefile.vcpm
MAKE_PLUGIN = Makefile.plugin
MAKE_TIER1 = Makefile.tier1
MAKE_MATH = Makefile.mathlib
MAKE_CHOREO = Makefile.choreo

all: check vcpm mod

check:    $(TIER0_LIB) $(STEAM_LIB) $(VSTD_LIB) tier1 mathlib choreo
    if [ -x "$(CC)" ]; then echo "Compiler not defined."; exit; fi
    if [ ! -d $(BUILD_DIR) ];then mkdir -p $(BUILD_DIR);fi
#    cd $(BUILD_DIR)
#    if [ ! -e "$(LIB_DIR)/tier1_i486.a" ]; then $(MAKE) tier1;fi
#    if [ ! -e "$(LIB_DIR)/mathlib_i486.a" ]; then $(MAKE) mathlib;fi
#    if [ ! -e "$(LIB_DIR)/choreoobjects_i486.a" ]; then $(MAKE) choreo;fi

%.so: $(SRCDS_DIR)/bin/%.so
    ln -s $(SRCDS_DIR)/bin/$@

vcpm:
    $(MAKE) -f $(MAKE_VCPM) $(BASE_DEFINES)

mod: check vcpm
    export LD_LIBRARY_PATH=./ && ./vcpm $(MOD_PROJ)
    $(MAKE) -f $(MAKE_SERVER) $(BASE_DEFINES)

plugin: check
    $(MAKE) -f $(MAKE_PLUGIN) $(BASE_DEFINES)

tier1: $(LIB_DIR)/tier1_i486.a
    $(MAKE) -f $(MAKE_TIER1) $(BASE_DEFINES)

mathlib: $(LIB_DIR)/mathlib_i486.a
    $(MAKE) -f $(MAKE_MATH) $(BASE_DEFINES)

choreo: $(LIB_DIR)/choreoobjects_i486.a
    $(MAKE) -f $(MAKE_CHOREO) $(BASE_DEFINES)

install:
    cp -f $(NAME)_$(ARCH).$(SHLIBEXT) $(GAME_DIR)/bin/$(NAME)_$(ARCH).$(SHLIBEXT)

installrelease:
    cp -f $(NAME)_$(ARCH).$(SHLIBEXT) $(GAME_DIR)/bin/$(NAME)_$(ARCH).$(SHLIBEXT)
    strip $(GAME_DIR)/bin/$(NAME)_$(ARCH).$(SHLIBEXT)

clean:
    $(MAKE) -f $(MAKE_VCPM) $(BASE_DEFINES) clean
    $(MAKE) -f $(MAKE_PLUGIN) $(BASE_DEFINES) clean
    $(MAKE) -f $(MAKE_SERVER) $(BASE_DEFINES) clean
    $(MAKE) -f $(MAKE_TIER1) $(BASE_DEFINES) clean
    $(MAKE) -f $(MAKE_MATH) $(BASE_DEFINES) clean
    $(MAKE) -f $(MAKE_CHOREO) $(BASE_DEFINES) clean
    rm $(TIER0_LIB) $(STEAM_LIB) $(VSTD_LIB)
    rmdir obj


Makefile.plugin
CODE

#
# Sample server plugin for SRC engine
#
# October 2004, alfred@valvesoftware.com
#

NAME = HPB_Bot2

PLUGIN_SRC_DIR = $(SRC_DIR)/utils/RCBot2
PUBLIC_SRC_DIR = $(SRC_DIR)/public
TIER0_PUBLIC_SRC_DIR = $(SRC_DIR)/public/tier0
TIER1_PUBLIC_SRC_DIR = $(SRC_DIR)/public/tier1

PLUGIN_OBJ_DIR = $(BUILD_OBJ_DIR)/$(NAME)_$(ARCH)
TIER0_OBJ_DIR = $(PLUGIN_OBJ_DIR)/tier0

INCLUDEDIRS = -I$(PUBLIC_SRC_DIR) -I$(TIER0_PUBLIC_SRC_DIR) -I$(TIER1_PUBLIC_SRC_DIR) -I$(PUBLIC_SRC_DIR)/mathlib -I$(SRC_DIR)/game/shared -I$(SRC_DIR)/game/server -I$(PUBLIC_SRC_DIR)/game/server -I$(PUBLIC_SRC_DIR)/engine

LDFLAGS_PLG = -lm -ldl $(TIER0_LIB) $(VSTD_LIB) $(LIB_DIR)/mathlib_i486.a $(LIB_DIR)/tier1_i486.a $(LIB_DIR)/tier2_i486.a

DO_CC = $(CPLUS) $(INCLUDEDIRS) -DARCH=$(ARCH)

ifeq "$(DEBUG)" "true"
    DO_CC += $(DBG_DEFINES) $(DBG_CFLAGS)
else
    DO_CC += -DNDEBUG $(CFLAGS)
endif

DO_CC += -o $@ -c $<

#####################################################################

PLUGIN_OBJS = \
    $(PLUGIN_OBJ_DIR)/bot.o \
    $(PLUGIN_OBJ_DIR)/bot_accessclient.o \
    $(PLUGIN_OBJ_DIR)/bot_buttons.o \
    $(PLUGIN_OBJ_DIR)/bot_client.o \
    $(PLUGIN_OBJ_DIR)/bot_commands.o \
    $(PLUGIN_OBJ_DIR)/bot_configfile.o \
    $(PLUGIN_OBJ_DIR)/bot_coop.o \
    $(PLUGIN_OBJ_DIR)/bot_css_bot.o \
    $(PLUGIN_OBJ_DIR)/bot_dod_bot.o \
    $(PLUGIN_OBJ_DIR)/bot_events.o \
    $(PLUGIN_OBJ_DIR)/bot_fortress.o \
    $(PLUGIN_OBJ_DIR)/bot_ga.o \
    $(PLUGIN_OBJ_DIR)/bot_ga_ind.o \
    $(PLUGIN_OBJ_DIR)/bot_getprop.o \
    $(PLUGIN_OBJ_DIR)/bot_globals.o \
    $(PLUGIN_OBJ_DIR)/bot_hl1dmsrc.o \
    $(PLUGIN_OBJ_DIR)/bot_hldm_bot.o \
    $(PLUGIN_OBJ_DIR)/bot_kv.o \
    $(PLUGIN_OBJ_DIR)/bot_main.o \
    $(PLUGIN_OBJ_DIR)/bot_mods.o \
    $(PLUGIN_OBJ_DIR)/bot_mtrand.o \
    $(PLUGIN_OBJ_DIR)/bot_navmesh.o \
    $(PLUGIN_OBJ_DIR)/bot_perceptron.o \
    $(PLUGIN_OBJ_DIR)/bot_profile.o \
    $(PLUGIN_OBJ_DIR)/bot_profiling.o \
    $(PLUGIN_OBJ_DIR)/bot_schedule.o \
    $(PLUGIN_OBJ_DIR)/bot_script.o \
    $(PLUGIN_OBJ_DIR)/bot_som.o \
    $(PLUGIN_OBJ_DIR)/bot_strings.o \
    $(PLUGIN_OBJ_DIR)/bot_task.o \
    $(PLUGIN_OBJ_DIR)/bot_usercmd.o \
    $(PLUGIN_OBJ_DIR)/bot_utility.o \
    $(PLUGIN_OBJ_DIR)/bot_visibles.o \
    $(PLUGIN_OBJ_DIR)/bot_waypoint.o \
    $(PLUGIN_OBJ_DIR)/bot_waypoint_locations.o \
    $(PLUGIN_OBJ_DIR)/bot_waypoint_visibility.o \
    $(PLUGIN_OBJ_DIR)/bot_weapons.o \
    $(PLUGIN_OBJ_DIR)/bot_wpt_dist.o \
    $(PLUGIN_OBJ_DIR)/bot_zombie.o \

TIER0_OBJS =

all: dirs $(NAME)_$(ARCH).$(SHLIBEXT)

dirs:
    -mkdir -p $(BUILD_OBJ_DIR)
    -mkdir -p $(PLUGIN_OBJ_DIR)
    -mkdir -p $(TIER0_OBJ_DIR)

$(NAME)_$(ARCH).$(SHLIBEXT): $(PLUGIN_OBJS) $(TIER0_OBJS)
    $(CLINK) -o $(BUILD_DIR)/$@ -m32 $(SHLIBLDFLAGS) $(PLUGIN_OBJS) $(TIER0_OBJS) $(PUBLIC_OBJS) $(CPP_LIB) $(LDFLAGS_PLG) $(CPP_LIB)

$(PLUGIN_OBJ_DIR)/%.o: $(PLUGIN_SRC_DIR)/%.cpp
    $(DO_CC)

$(TIER0_OBJ_DIR)/%.o: $(TIER0_PUBLIC_SRC_DIR)/%.cpp
    $(DO_CC)

clean:
    -rm -rf $(PLUGIN_OBJ_DIR)
    -rm -f $(NAME)_$(ARCH).$(SHLIBEXT)


I turned off the compiler optimzer -O3 in order to debug and turned on debugging flags.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Apr 13 2013, 12:16 AM
Post #94


Admin
*****

Group: Admin
Posts: 3,055
Joined: 11-September 03
From: uk
Member No.: 1



cheers Ted, I had to make a few changes though, and for some reason says "gcc-4.7 -shared false -o ..." unknown command false . obv something missing, and couldn't find that in the makefile. Anyway I just copied and pasted it into the terminal and removed 'false' and it compiled.

Would anyone care to try? For dods in linux: the rcbot_runplayer_cmd_dods must be 415 for non steampipe otherwise it will crash

http://rcbot.bots-united.com/downloads/HPB..._i486.so.tar.gz
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
RMCvik
post Oct 17 2013, 02:14 PM
Post #95


Member
**

Group: Members
Posts: 12
Joined: 13-October 13
Member No.: 2,311



hi guys new to this
downloaded the bots for dods

followed all th einstructions fo rinstalling to a rented linux server

when i ran the command i got this show up in concole any help would be appreciated im dying to get these running

] rcon plugin_load HPB_bot2_i486.so<<<< was the command i used

failed to dlopen /home/games/dods/1071250/178.32.80.157:27015/orangebox/bin/HPB_bot2_i486.so error=/home/games/dods/1071250/178.32.80.157:27015/orangebox/bin/HPB_bot2_i486.so: ELF file OS ABI invalid
failed to dlopen HPB_bot2_i486.so error=bin/HPB_bot2_i486.so: ELF file OS ABI invalid
Unable to load plugin "HPB_bot2_i486.so"
U

so what went worng
what does ELF file OS ABI invalid mean. im stuck and dont know how to get the bots to work:(
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
RMCvik
post Oct 30 2013, 05:17 PM
Post #96


Member
**

Group: Members
Posts: 12
Joined: 13-October 13
Member No.: 2,311



ok now i did this in console

] rcon plugin_load rcbot_mm_i586 .so

this is what appeared inthe console

Loaded plugin "rcbot_mm_i586"

then i added this line


rcbotd addbot

server shut down and rebooted itself

plz help as i ma lost now
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
madmax2
post Nov 1 2013, 06:47 PM
Post #97


RCBot Guru
*****

Group: Waypointers
Posts: 956
Joined: 2-March 12
From: USA, WA state
Member No.: 2,162



Hi RMCvik,

I'm not sure if there is a linux build that will work on rented servers right now? I believe the last release for linux was .75r2. The rcbot folder must still be installed to your home folder with that version, which may not be accessable on a rented server?

A few things to check:

I think the rcbot_runplayer_cmd_dods & rcbot_runplayer_cmd_tf2 settings are currently the same, the sourcemodplugins.org site for dods is wrong. currently windows=417 & linux=418

If it crashes when adding a bot, do this manually... start the game server running and load the rcbot2 plugin with the -insecure switch, then manually enter the rcbot_runplayer_cmd & variable (rcbot_runplayer_cmd_dods 418), then try rcbotd addbot. Cross your fingers...

Check these threads, it's windows but still good info...

See Cheesehs Post #9

http://rcbot.bots-united.com/forums/index....amp;#entry12150

and this one on steamcmd, rcbot .76 is the solution for windows, the rcbot folder can be relocated to the server folder instead of the user/home folder...

http://rcbot.bots-united.com/forums/index....amp;#entry12321

Again, I'm not sure this will work on a rented linux server, even if you do have access to the home folder...? rcbot2 .76 is suppose to fix this issue (rented servers)...

Good Luck,
max



User is offlineProfile CardPM
Go to the top of the page
+Quote Post
RMCvik
post Nov 1 2013, 07:02 PM
Post #98


Member
**

Group: Members
Posts: 12
Joined: 13-October 13
Member No.: 2,311



QUOTE(madmax2 @ Nov 1 2013, 07:47 PM) *

Hi RMCvik,

I'm not sure if there is a linux build that will work on rented servers right now? I believe the last release for linux was .75r2. The rcbot folder must still be installed to your home folder with that version, which may not be accessable on a rented server?

A few things to check:

I think the rcbot_runplayer_cmd_dods & rcbot_runplayer_cmd_tf2 settings are currently the same, the sourcemodplugins.org site for dods is wrong. currently windows=417 & linux=418

If it crashes when adding a bot, do this manually... start the game server running and load the rcbot2 plugin with the -insecure switch, then manually enter the rcbot_runplayer_cmd & variable (rcbot_runplayer_cmd_dods 418), then try rcbotd addbot. Cross your fingers...

Check these threads, it's windows but still good info...

See Cheesehs Post #9

http://rcbot.bots-united.com/forums/index....amp;#entry12150

and this one on steamcmd, rcbot .76 is the solution for windows, the rcbot folder can be relocated to the server folder instead of the user/home folder...

http://rcbot.bots-united.com/forums/index....amp;#entry12321

Again, I'm not sure this will work on a rented linux server, even if you do have access to the home folder...? rcbot2 .76 is suppose to fix this issue (rented servers)...

Good Luck,
max

whats the -insecure swich plz? and thanks for replaying thought i was talking to a dead world lol
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
RMCvik
post Nov 2 2013, 05:14 PM
Post #99


Member
**

Group: Members
Posts: 12
Joined: 13-October 13
Member No.: 2,311



dint work mate:(
i need someone to go into my ftp to check igot the right files int he right place and guide me thorugh it as if i ws a 5 year old spastic
im not the greatest techie
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
madmax2
post Nov 3 2013, 03:31 AM
Post #100


RCBot Guru
*****

Group: Waypointers
Posts: 956
Joined: 2-March 12
From: USA, WA state
Member No.: 2,162



QUOTE(RMCvik @ Nov 1 2013, 11:02 AM) *

whats the -insecure swich plz? and thanks for replaying thought i was talking to a dead world lol

-insecure disables "Valve Anti Cheat" (VAC) for your game server. Rcbot2 needs sv_cheats enabled to work. RCbot2 is not an "approved" plugin...

Heh heh, well it's not quite a dead world... Activity here seems to go up & down with the seasons...

I'm not the greatest techie either, I feel like the blind leading the blind when it comes to this stuff...rolleyes.gif

Don't think I can be much more help on this, as I don't know linux, or Source engine dedi setups or rented servers. Just been going by what I've read here & HL1 LAN dedi experience. I haven't seen any confirmation anyone has got the linux build of rcbot2 running correctly on a rented server. I haven't even seen positive feedback for the latest windows build (.76) running on a rented server. Although Cheeseh did provide a dll with .76 that looks for the rcbot2 folder above the mod folder, .75r2 won't do that...

Where has the rcbot2 folder been installed on your server, what path?

The path to the hpb_bot2_i486.so looks odd to me, with the IP address & i guess an account number inbedded into the path, but maybe thats ok? The hpb_bot2_i486.so should be in the bin folder next to the dod game/mod folder.

What does your bot_mods.ini dod part say?

Just so you know, this could be a complete waist of time, you may need a rcbot2 .76 linux build, to make it work... I take it that you don't have a windows option for the rented server?


User is offlineProfile CardPM
Go to the top of the page
+Quote Post

8 Pages V « < 3 4 5 6 7 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 09:57 AM