Raised This Month: $12 Target: $400
 3% 

Compile Extension step by step


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
keygens
Senior Member
Join Date: Mar 2010
Location: Somewhere
Old 06-14-2015 , 07:46   Compile Extension step by step
Reply With Quote #1

Hello guys. I need some help for compilation of extensions. I have flashtools extension source code, and i want to compile it for other engine, for l4d2 (for example). I have been installed ubuntu, gcc, and ide code::blocks. Also sourcemod-central and hl2sdk-l4d2. Well, what i need to do now? I mean, i dont understand, how to setting code::blocks for compile? Someone compile by code:blocks and can help me with settings? How alliedmodders always compile extensions for linux? Thanks in advance
keygens is offline
psychonic

BAFFLED
Join Date: May 2008
Old 06-14-2015 , 09:15   Re: Compile Extension step by step
Reply With Quote #2

Quote:
Originally Posted by keygens View Post
How alliedmodders always compile extensions for linux?
make or ambuild
psychonic is offline
Malak101
Member
Join Date: May 2009
Old 06-16-2015 , 06:08   Re: Compile Extension step by step
Reply With Quote #3

Quote:
Originally Posted by keygens View Post
Hello guys. I need some help for compilation of extensions. I have flashtools extension source code, and i want to compile it for other engine, for l4d2 (for example). I have been installed ubuntu, gcc, and ide code::blocks. Also sourcemod-central and hl2sdk-l4d2. Well, what i need to do now? I mean, i dont understand, how to setting code::blocks for compile? Someone compile by code:blocks and can help me with settings? How alliedmodders always compile extensions for linux? Thanks in advance
1. Open Makefile in your favourite text editor (borrow one if missing it).

2. Set the pathways to your hl2sdk, metamod & sourcemod etc.

Example:
I replace
Code:
 HL2SDK_CSGO = ../../hl2sdk-csgo
with
Code:
HL2SDK_CSGO = /home/malak/sdks/hl2sdk-csgo
3. Just below the pathways you set, you need to add this:
Code:
ENGINE=csgo
Replace csgo with your engine of choice.

4. In your terminal CD the directory containing your Makfile then type/enter this:
Code:
make
5. Compiled bin should be in the root of your directory.

Last edited by Malak101; 06-16-2015 at 06:20.
Malak101 is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 06-16-2015 , 16:12   Re: Compile Extension step by step
Reply With Quote #4

For example (windows):
take this extension https://forums.alliedmods.net/showthread.php?t=159876

Then go to:

Start/Пуск -> Settings (Optional)-> Control Panel/Панель управление -> System/Система -> Advanced/Дополнительные параметры системы -> Environment Variables/Параметры среды

ADD:
HL2SDKOBVALVE C:\...\...\hl2sdk
MMSOURCE C:\...\...\mmsource
SOURCEMOD C:\...\...\sourcemod-central

Most recent sdk packs you can find here:
https://github.com/alliedmodders
kadet.89 is offline
Send a message via Skype™ to kadet.89
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-16-2015 , 22:04   Re: Compile Extension step by step
Reply With Quote #5

Well, hopefully at some point the sample extension that comes with SourceMod will start shipping with AMBuild files. This hopefully will make those more widespread.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
keygens
Senior Member
Join Date: Mar 2010
Location: Somewhere
Old 06-17-2015 , 16:29   Re: Compile Extension step by step
Reply With Quote #6

Thanks so much guys for huge help!
keygens is offline
keygens
Senior Member
Join Date: Mar 2010
Location: Somewhere
Old 09-04-2015 , 23:37   Re: Compile Extension step by step
Reply With Quote #7

What i'm doing wrong? Installed: Ubuntu, gcc, g++ and other thing.
Code:
root@ubuntu:/home/test/collisionhook# make ENGINE=original
 if [ "true" = "false" ]; then \
         echo "You must supply one of the following values for ENGINE:"; \
         echo "csgo, left4dead2, left4dead, orangeboxvalve, css, orangebox, or original"; \
         exit 1; \
 fi
 mkdir -p Release.original
 mkdir -p Release.original/sdk
 mkdir -p Release.original/CDetour
 cp -f /home/test/hl2sdk/linux_sdk/vstdlib_i486.so vstdlib_i486.so
 cp -f /home/test/hl2sdk/linux_sdk/tier0_i486.so tier0_i486.so
 make -f /home/test/collisionhook/Makefile mms_ext
 make[1]: Entering directory '/home/test/collisionhook'
 if [ "true" = "false" ]; then \
         echo "You must supply one of the following values for ENGINE:"; \
         echo "csgo, left4dead2, left4dead, orangeboxvalve, css, orangebox, or original"; \
         exit 1; \
 fi
 gcc -I/home/test/hl2sdk/public/dlls -I. -I.. -Isdk  -ICDetour -I/home/test/hl2sdk/public -I/home/test/hl2sdk/public/engine  -I/home/test/hl2sdk/public/tier0 -I/home/test/hl2sdk/public/tier1  -I/home/test/mmsource-1.9/core-legacy  -I/home/test/mmsource-1.9/core-legacy/sourcehook  -I/home/test/sourcemod-1.4/public  -I/home/test/sourcemod-1.4/public/sourcepawn -DSOURCE_ENGINE=1  -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3  -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 -DSE_CSS=6 -DSE_ORANGEBOXVALVE=7  -DSE_LEFT4DEAD=8 -DSE_LEFT4DEAD2=9 -DSE_ALIENSWARM=10 -DPOSIX  -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp  -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf  -D_alloca=alloca -Dstrcmpi=strcasecmp -DCOMPILER_GCC -Wall -Werror  -Wno-overloaded-virtual -Wno-switch -Wno-unused -msse -DSOURCEMOD_BUILD  -DHAVE_STDINT_H -m32 -DNDEBUG -O3 -funroll-loops -pipe  -fno-strict-aliasing -D_LINUX -mfpmath=sse -fvisibility=hidden  -Wno-delete-non-virtual-dtor -Wno-non-virtual-dtor -fno-exceptions  -fno-rtti -fvisibility-inlines-hidden -o Release.original/extension.o -c  extension.cpp
 In file included from sdk/smsdk_ext.h:102:0,
                  from extension.h:6,
                  from extension.cpp:3:
 extension.cpp: In member function ‘virtual bool CollisionHook::SDK_OnMetamodLoad(ISmmAPI*, char*, size_t, bool)’:
 extension.cpp:121:23: error: ‘class ISmmAPI’ has no member named ‘GetPhysicsFactory’
   GET_V_IFACE_CURRENT( GetPhysicsFactory, g_pPhysics, IPhysics, VPHYSICS_INTERFACE_VERSION );
                        ^
 /home/test/mmsource-1.9/core-legacy/ISmmPlugin.h:394:48: note: in definition of macro ‘GET_V_IFACE_CURRENT’
   v_var = (v_type *)ismm->VInterfaceMatch(ismm->v_factory(), v_name); \
                                                 ^
 /home/test/collisionhook/Makefile:197: recipe for target 'Release.original/extension.o' failed
 make[1]: *** [Release.original/extension.o] Error 1
 make[1]: Leaving directory '/home/test/collisionhook'
 Makefile:200: recipe for target 'all' failed
 make: *** [all] Error 2
keygens is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 09-05-2015 , 05:34   Re: Compile Extension step by step
Reply With Quote #8

That extension does not support the EP1 engine.
__________________
asherkin is offline
keygens
Senior Member
Join Date: Mar 2010
Location: Somewhere
Old 09-05-2015 , 07:42   Re: Compile Extension step by step
Reply With Quote #9

Quote:
Originally Posted by asherkin View Post
That extension does not support the EP1 engine.
But its can be modify to convert?
keygens is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode