.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > POD-Bot mm > Releases, Installers, Docs & Coding
Releases, Installers, Docs & Coding Where the official development happens

Thread Tools
Re: How to compile binaries (dll, so) under windows
Status: Offline
Posts: 54
Join Date: Oct 2008
Default Re: How to compile binaries (dll, so) under windows - 15-01-2018

is it possible to compile these sources using Visual C + + 2008,the link of vcproj file died, anybody please reupload it ? thanks

Originally Posted by KWo View Post
Here is my vcproj file for MS Visual C++ 2008 Express.
If You have directories the same way created like I described for MINGW, this vcproj file should work for You.
Reply With Quote
Re: How to compile binaries (dll, so) under windows
tschumann's Avatar
Status: Offline
Posts: 275
Join Date: Apr 2011
Location: Australia
Default Re: How to compile binaries (dll, so) under windows - 15-01-2018

Probably - you could create an empty project though you'd need to copy across whatever settings are in the Makefile.
Reply With Quote
Re: How to compile binaries (dll, so) under windows
Developer of PODBot mm
KWo's Avatar
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: How to compile binaries (dll, so) under windows - 20-01-2018

Try this one. It is actually for Microsoft Visual C++ 2012 Express. Right now I don't have time to support You to get it to work on Your PC. I believe there are at the forum some people able to help You. Sorry.
Attached Files
File Type: zip PodBot_mm_vcxproj.zip (2.4 KB, 988 views)
Reply With Quote
Re: How to compile binaries (dll, so) under windows
Status: Offline
Posts: 54
Join Date: Oct 2008
Default Re: How to compile binaries (dll, so) under windows - 21-01-2018

Thank you very much for your help,i really appreciate it
there are some error appears when i open the project but i will try solving it
Reply With Quote
Re: How to compile binaries (dll, so) under windows
Status: Offline
Posts: 6
Join Date: Feb 2020
Default Re: How to compile binaries (dll, so) under windows - 16-11-2020

Originally Posted by KWo View Post
How to compile binaries (win/linux/amd64) using WIN OS.

This topic is dedicated to compile podbot sources, but it may be used as an good example also for oother metamod bots.
Topic could be created only because of big help T(+)rget (from AMX Dev team) gave me and because of his article dedicated mingw and cygwin. That article/procedure of usage mingw/cygwin You can find here: http://www.xake.dk/target/tools.html
Also big credits belongs to Jussi Kivilinna (ghost_of_evilspy, Hullu) - he teached T(+)rget and prepared for him some makefile, based on T(+)rget prepared the makefile for me for podbot mm.

Lets begin

A. The first part - Downloading all tools.
1. The first thing You need to have to compile podbot sources is... podbot mm sources
The sources of the latest release are available in filebase here: http://filebase.bots-united.com/inde...ct=view&id=380

2. The next step - download HL SDK and sources of metamod (podbot mm calls in its code a lot of HL and metamod functions,
so You need to link HL SDK and metamod in the file for compilation - more explanation later). Because for compilation we will use mingw - it's a GNU GCC software - the HL SDK version will need to be GNU GCC compliant (otherwise the compilation may finish OK , but *dll and *so files may not work). Will Day prepared it and You can download it here - from metamod site:
and the sources of metamod - currently it's mm 1.19 You can find here:
Because windows mm sourcres are formatted by some editor which leaves some special characters at the line end, I recommend to use the sources of for linux version version - it's "normally" formatted.

3. Third step - download all utilities You will need to make compilation:
a) MinGW - the latest version from here: http://sourceforge.net/projects/ming...d?source=files
b) MSYS - shell for MinGW (You can also compile binaries without it - from command line - cmd.exe under Windows XP, 2000), but it's a useful tool and it's recommended to use it with MinGW - http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe
d) CYGWIN - http://www.cygwin.com/setup.exe
e) Linux crosscompiller for Cygwin - http://mirror.transact.net.au/source....6-tls.tar.bz2

B. The second part - Preparing the workspace and installing tools.

4. Now You need to prepare the workspace - need to choose some drive and directory You want to have everything installed. I did it this way - I preapred on my D: drive the directory called "COMPILE" and I created such subfolders in it: MINGW, MSYS, CYGWIN. These are directories where everything will be installed.

5. Lets begin the installation with MinGW - just let it to be installed in the directory You prepared for it (just hit enter
on the file MinGW-xxxx.exe and show the target directory). In my case it was:

6. Your MINGW is almost ready - just missing only one thing - Your system need to know where it is installed (it needs to be added to system paths) - to let You call some MINGW commands from command line. To do this You need to add this line into Your autoexec.bat file existing on C drive:
path = %path%;D:\COMPILE\MINGW\BIN
In my case there is "D:\COMPILE" , but if You installed it somewhere else You need to write Your path. Notice there is a path to MINGW\bin (there are located some exe file which will be used during compilation).

7. MinGW is ready - now You need to install MSYS - as it was mentioned before - You can compile without it, but it's a useful tool. Just hit enter on MSYS-1.0.10.exe and show the installer where is installed Your MINGW and where MSYS needs to be installed. In my case it's D:\COMPILE\MSYS
a) start MSYS installation by hit Enter
b) input: y then press: Return/Enter for post installation
c) input: y then press: Return/Enter for MinGW is installed
d) input: d:/COMPILE//MINGW - if thats where you installed it!
e) if all is successful You should see: "Oh joy, you do not have c:/MinGW/bin/make.exe". Keep it that way (it's a normal message). If You don't need to compile bot linux binaries (You need dll only) You may skip these follwing 2 steps.

8. Hit enter on cygwin's setup.exe and show it the target directory. Because it's installation from the internet - You will need to have some patience during process installation. On fast internet connection the installation may consume about 15 minutes, but if You don't have luck, it may take about 1hr. . The installation of cygwin is the hardest step You need to do if You want to compile linux binaries correctly! You need to mark some options (different than defaults):
a) choose Install from Internet
b) install in D:\COMPILE\cygwin (or the directory You preapred in the step 4)
c) continue until You see the Select Packages
d) click the "+" near "Libs"
e) make sure this file: "libpcre0: Perl-Compatible Regular Expressions library" is set on "4.5-1". If not - click on "skip"
(to mark it).
f) click the "+" near "Devel"
g) find "make": The GNU version of the "make" utility
h) click on: "skip" (to mark it) - it should change to a version number, which should be: "3.80-1"
i) find "nasm: The Netwide Assembler"
j) click on: "skip" (to mark it) - it should change to a version number, which should be: "0.98.39-1"
k) click "next" to finish installing cygwin
The cygwin is installed, but You need to crosscompiler tool to correctly compile linux binaries on Windows based PC.

9. To install crosstool:
a) move this file: cygwin-gcc-linux.tar.bz2 into: D:\Compile\CYGWIN - if thats where you installed it!
b) open up Cygwin Bash Shell (just left mouse button click on the icon created by installtor ine Your Menu STart or go to Your CYGWIN
directory and hit enter on cygwin.bat)
c) in the Bash Shell type:
cd d:/compile/cygwin
(notice the slashes direction!!!)
if it will not say You "not such file or directory" - it will mean You are in correct directory
d) in the bash shell type:
tar -jxvf cygwin-gcc-linux.tar.bz2
After doing it the crosscompiler tool will be automatically installed. There are some directories called as "i686-unknown-linux-gnu" - it's the correct name and You may not to be afraid something installed incorrectly. This package also contains the gcc 2.95 version necessary to make correct linux binaries compilation (it's because HL SDK is GCC 2.95 compliant - more info about that ask Pierre-Marie Baty or Whistler).
Every tools You have installed already , now You need to place somwhere Your bot's sources and HL SDK and metamod sources.

10. I created the folder called "PROJ" and I placed it in MINGW directory, but it may be placed in any place You want.
a) Into the "PROJ" directory unzip the contents of the file hlsdk-2.3-p3.zip. Then You should have now the new subfolder in "PROJ"
called hlsdk-2.3-p3 - rename it to HLSDK (if HL SDK wll be patched or updated again, You will not need to change anything in makefile
- some of next steps)
b) Unzip Your metamod-1.19-linux-src.tar.gz into PROJ directory - then You should see the subfolder called metamod-1.19 - rename it to
metamod - this way You just can easy update the contents of folder by the newer metamod sources without necessuty changing anything in the "makefile" (same as with HLSDK).
c) create the folder PODBOT in "PROJ" and unzip Your podbot sources into it (if in the zip file there is no directory called podbot - if there is such folder - just unzip it exactly into "PROJ")
d) download attached to this post the file called "makefile" and place it into PROJ\PODBOT directory.
e) open up that file and check if all directories used there are the same You are using (otheriwse something may not work for You).

Now You are ready to compile podbot_mm.

C. The third part - Compilation.

11. The first binary You may want to create as a *dll (windows binary). There are two ways two compile it.
a) The first one is - compilation from Windows command shell (Menu Start -> Run -> cmd.exe). when You have opened it already, type:
d:[hit Enter-key]
cd compile\proj\podbot[hit Enter-key] (this is the example of my path - remember to type the correct path to Your project bot sources)
mingw32-make[hit Enter-key]
and the compilation should start for You
b) Fire-up MSYS (You should see the link to it in Menu Start after installation), then type in Bash shell:
cd /d/compile/mingw/proj/podbot[hit Enter-key] (path - see the info like in 12.a)
make[hit Enter-key]
and the compilation should start for You.
In both cases You should see (if everything happened OK) the podbot_mm.dll file inside d:\compile\mingw\proj\podbot\obj.win32 folder.
(or in your_folder\obj.win32 You prepared).
After compilation there are some files *.o in that win32.obj - before trying to compile the sources again You need to delete them manually or in msys' Bash shell by command:
make clean[hit Enter-key]
or in command shell under windows:
mingw32-make clean[hit Enter-key]

12. The next binary You may need is linux *i386.so. I call it as *i386.so, but it's really compiled as i586 , but I do it because of the compatibility with metamod's plugins.ini file (to don't change everytime - according to the compilation parameters - the line
linux addons/podbot/podbot_mm_i386.so
It might be a bit confusing for linux users - they are used to calling file name according to the optimizations parameters of the compilation, but I hope it's not big violation of linux rules.
Lets begin to compile linux binary...
Fire-up Your cygwin and type in the Bash shell:
cd d:/compile/mingw/proj/podbot[hit Enter-key] (the info like above - use correct directory here)
make[hit Enter-key]
and the compilation of the linux *so file shoud start for You. If everything happened OK - You should see inside
d:\compile\mingw\proj\podbot\linux.obj directory the podbot_mm_i386.so file. After compilation there are some files *.o in that linux.obj - before trying to compile the sources again (notes as with compilation dll) You need to delete them manually or write the command in cygwin's Bash shell:
make clean[hit Enter-key]

13 The last thing You may need is the amd64 linux compilation. Fire-up the cygwin (if You have it closed) and type in Bash shell:
cd d:/compile/mingw/proj/podbot[hit Enter-key] (the info like above - use correct directory here)
make arch=amd64[hit Enter-key] (note - look - arch=amd64 shouln't be in capitalize!!!)
If everything happend ok You should see in d:\compile\mingw\proj\podbot\linux.obj directory the podbot_mm_amd64.so file.
The same rules for deleting *.o files before compiling amd64.so file again as in point 13.

That's all. Now You have everything described to make Your podbot binary Your-self. The "makefile" isn't yet perfect, but as it was mentioned before - if someone help me with it, I'll fix some issues with it (cleaning up *.o files doesn't work, dll properties aren't displayed by right mouse click to see everything from *.rc file).

[EDIT=KWo - 2006.01.05]
Re-edited text to divide it into some parts.
Fixed problem with windows dll properties (WIN_RES)
Fixed problem with cleaning up *.o files by make clean command.
Updated makefile in attachment.
[EDIT2=KWo - 2006.11.19]
Updated the description for mm 1.19
Updated again the makefile in the attachment
[EDIT3=KWo - 2010.09.09]
Updated the description for the latest mingw version
Removed the makefile - use the latest from the sources of podbot mm
[EDIT4=KWo - 2013.06.04]
Updated the description for the latest mingw version
Fixed broken links.
Thanks KWo. Though its much easier to compile using MSVS, I'll retry again the "traditional" method of compiling he he. Free, open source compilers like GCC/MingW and Cygwin are the best, and the builds are much optimized than MSVC, ICC, etc.
Reply With Quote

Currently Active Users Viewing This Thread: 8 (0 members and 8 guests)
Thread Tools

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

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com