Sign in to follow this  
wkuzma

Compiling a windows cod4x server files from github

Recommended Posts

WINDOWS SERVER COMPILE ONLY

(I used Windows 7 to compile the server)

this will assume you already have NASM and MINGW: 'gcc' and 'mingw32-make' already installed on your computer.

This is how I got it to compile

1 download the server and extract it to a directory (mine is c:\CoD4x_Server-master)

I will use my directory as an example

2 go to the C:\CoD4x_Server-master\src\tomcrypt      directory

3 run compile_win32,cmd in that directory (it should already be there)

4 go to the C:\CoD4x_Server-master\src\botlib     directory

5 run comp.cmd in that directory.

6 go to C:\CoD4x_Server-master directory

in that directory make a text file called run.txt

open run.txt and place this inside it

mingw32-make -fmakefile

close run.txt and rename it to run.bat

now run that file and your server should compile and then look in

C:\CoD4x_Server-master\src\bin for the new server files.

it will take a little time to compile

 

If your doing a LINUX server ask someone that knows how to do it with LINUX

 

 

 

 

 

Edited by wkuzma

Share this post


Link to post
Share on other sites
1 hour ago, T-Max said:

copied from what you posted

First enter /src/tomcrypt, and run compile_win32.cmd. Then go to /src/mbedtls, and run build.cmd.

so what is the outdate?

oh sorry I see its now just mingw32-make

Edited by wkuzma

Share this post


Link to post
Share on other sites
2 hours ago, Kingwolf said:

@dpj I have mingw-64... How can i get it to compile on that. I use ming32-make, but it fails.

seems you mistype the command line it would be mingw32-make not ming32-make

also maybe try using mingw64-make  (I am not sure on that but you said you have the 64 bit of ming)

 

Share this post


Link to post
Share on other sites
3 hours ago, dpj said:

https://github.com/callofduty4x/CoD4x_Server/blob/master/appveyor.yml
the appveyor buildscript includes everything needed including how to setup mingw and pexports. its being up to date at all time as that script is used to check if the codebase is building successfully on windows.

what program is needed to allow that script to run?

Share this post


Link to post
Share on other sites
1 hour ago, wkuzma said:

what program is needed to allow that script to run?

it is a yml config for appveyor.com, it is a continuous integration service. if you arent familiar with that i wont explain what it is, sorry. but the appveyor.yml configuration contains powershell commands, just read it. 

Share this post


Link to post
Share on other sites

@T-Max Have mingw64, use  "mingw32-make" in powershell in source folder . Following output shows : 
 

saaaaaaaaa  C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/mingw32-make  tomcrypt
mingw32-make[1]: Entering directory 'B:/Torrents/CoD4x_Server-master_2/CoD4x_Server-master/src/tomcrypt'
TomCrypt start
TomCrypt done
mingw32-make[1]: Leaving directory 'B:/Torrents/CoD4x_Server-master_2/CoD4x_Server-master/src/tomcrypt'
  gcc  obj/version.o
  gcc  bin/cod4x18_dedrun.exe
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/lib\libm.a when searching for -lm
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lm
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/lib\libws2_32.a when searching for -lws2_32
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lws2_32
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/lib\libwsock32.a when searching for -lwsock32
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwsock32
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/lib\libiphlpapi.a when searching for -liphlpapi
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -liphlpapi
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/lib\libgdi32.a when searching for -lgdi32
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgdi32
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/lib\libwinmm.a when searching for -lwinmm
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwinmm
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0\libstdc++.a when searching for -lstdc++
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lstdc++
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/lib\libmingw32.a when searching for -lmingw32
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingw32
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0\libgcc.a when searching for -lgcc
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0\libgcc_eh.a when searching for -lgcc_eh
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc_eh
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/lib\libmoldname.a when searching for -lmoldname
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmoldname
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/lib\libmingwex.a when searching for -lmingwex
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingwex
C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/mingw-w64/x86_64-7.1.0-win32-seh-rt_v5-rev2/min

Note : i the ran compilation on this previously and mtdbels and tomcrypt have probably already been compiled.
This error comes after that..

Share this post


Link to post
Share on other sites

It may be incompatible. Clean all the object and lib files try again. (mingw32-make clean)

P.S. we're using mingw-w64 i686-5.3.0-posix-dwarf-rt_v4-rev0

Share this post


Link to post
Share on other sites
20 minutes ago, madkam said:

make a run.bat file

and paste this is in main dir:

mingw32-make -fmakefile

and run it

 

aand thats exactly what mingw32-make does too. so why xD

Share this post


Link to post
Share on other sites

When i run mingw32-make i get this error

process_begin: CreateProcess(NULL, nasm -f coff -dWin32 --prefix _ src/misc_hooks.asm -o obj/misc_hooks.o, ...) failed.
make (e=2): The system cannot find the file specified.
makefile:181: recipe for target 'obj/misc_hooks.o' failed
mingw32-make: *** [obj/misc_hooks.o] Error 2

Anyone know the issue. Also is there somewhere I can get a compile version of windows server, I just need it to compile plugins for windows

Share this post


Link to post
Share on other sites

@sheep_wizard2 Install NASM and add it to PATH environment variable. Written in prerequsites.

"The system cannot find the file specified." means it can not find nasm.exe

Share this post


Link to post
Share on other sites
10 minutes ago, T-Max said:

@sheep_wizard2 Install NASM and add it to PATH environment variable. Written in prerequsites.

"The system cannot find the file specified." means it can not find nasm.exe

Ok thanks, I though I already had it installed but i guess not ?

Share this post


Link to post
Share on other sites

root@cod4server:/cod4x_server# make
Server start
sh version_make_progress
cd "src/version/" && chmod +x version_make_progress.sh && ./version_make_progress.sh
2068
make mbedtls
make[1]: Entering directory `/cod4x_server/src/mbedtls'
Mbedtls start
Mbedtls done
make[1]: Leaving directory `/cod4x_server/src/mbedtls'
make tomcrypt
make[1]: Entering directory `/cod4x_server/src/tomcrypt'
TomCrypt start
gcc math/bncore.o
math/bncore.c:1:21: fatal error: tommath.h: No such file or directory
 #include <tommath.h>
                     ^
compilation terminated.
make[1]: *** [math/bncore.o] Error 1
make[1]: Leaving directory `/cod4x_server/src/tomcrypt'
make: *** [tomcrypt] Error 2
root@cod4server:/cod4x_server# ^C
root@cod4server:/cod4x_server#
 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this