r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: Compiling your r1q2 from source on WIN32
Pages: 1 2 [3] 4  All
Print
Author Topic: Compiling your r1q2 from source on WIN32  (Read 49129 times)
neveride_guest
Guest
« Reply #30 on: September 17, 2008, 04:27:38 am »

Qwazy, I did it.
I downloaded zlib package and unpacked it to Program Files/Gnu32.
I added Program Files/Gnu32/Lib (here i have zlib.lib) to libraries path and Program Files/Gnu32/Include to include path (there is i.e. zlib.h).

After that i added zlib.lib to the linker and changed runtime library (in code generation) to multithreaded. r1q2 compiles (when I comment out ifdef lines with _IsDebuggerPresent - I dont know why it doesnt see it, kernel32.lib is linked properly). After all this operations my executable still asks for zlib1.lib, where in my opinion it should be statically linked. What is the problem?
Logged
neveride_guest
Guest
« Reply #31 on: September 17, 2008, 04:31:15 am »

* after all these operations

* my exe asks for zlib1.dll, I'm writing too fast, I'm sorry.

* dont assume typos or wrong paths, I'm writing them now as I remember, but they have been checked hundred times
Logged
QwazyWabbit
Member

Posts: 402


« Reply #32 on: September 17, 2008, 07:18:12 pm »

Make sure a copy of zlib1.dll is in the same folder as your application or on the Windows path.
%systemroot%\system32 is often a good place to put it. Having multiple versions along the path or multiple versions in multiple folders for different applications is called "dll hell".

Another solution would be to statically link to the DLL's.
« Last Edit: September 17, 2008, 07:29:55 pm by QwazyWabbit » Logged
neveride
Member

Posts: 26


« Reply #33 on: September 18, 2008, 06:32:03 pm »

That's what I want to do, but I cannot manage. I try to link statically, but it keeps asking for zlib1.dll. And even if I put the dll into q2 dir, then q2 runs, but I cannot connect to any server on the internet, because eventually I receive some error about inflateInit() failure or sth like that...I had too much problems iwith that, so can you please tell me how to statically link with the lib? (I wrote few posts earlier what I did to achieve it, so you can refer to that).

Thanks in advance.
N.
Logged
neveride
Member

Posts: 26


« Reply #34 on: September 21, 2008, 06:45:32 am »

thats really ugly and I will never understand this - I changed the name of the file to create from quak2.exe to r1q2nev.exe, I compiled it and in works...I will not even try to understand this. The case now is that my executable doesnt serve anticheat.dll, so I get kicked from any server that requires anticheat module. Is it a proper anticheat policy or there is some way to implement it?

When I add "ANTICHEAT" as a preprocessor definition (which tells to build with anticheat service, right?) I get following errors:

--------------------Configuration: quake2 - Win32 Release--------------------
Linking...
sv_ccmds.obj : error LNK2001: unresolved external symbol _SVCmd_SVACInvalidate_f
sv_ccmds.obj : error LNK2001: unresolved external symbol _SVCmd_SVACUpdate_f
sv_ccmds.obj : error LNK2001: unresolved external symbol _SVCmd_SVACInfo_f
sv_ccmds.obj : error LNK2001: unresolved external symbol _SVCmd_SVACList_f
sv_init.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_WaitForInitialConnect
sv_init.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_Connect
sv_init.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_IsConnected
sv_main.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_IsConnected
sv_user.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_IsConnected
sv_main.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_Disconnect_Client
sv_main.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_Run
sv_main.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_Challenge
sv_main.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_UpdatePrefs
sv_main.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_Disconnect
sv_user.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_QueryClient
sv_user.obj : error LNK2001: unresolved external symbol _anticheat_hashlist_name
sv_user.obj : error LNK2001: unresolved external symbol _antiCheatNumFileHashes
sv_user.obj : error LNK2001: unresolved external symbol _anticheat_client_names
sv_user.obj : error LNK2001: unresolved external symbol _SV_AntiCheat_CheckToken
./build/binaries/release/r1q2nev.exe : fatal error LNK1120: 17 unresolved externals
Error executing link.exe.

r1q2nev.exe - 20 error(s), 0 warning(s)

Where can I get the unresolved functions from?
« Last Edit: September 21, 2008, 07:49:59 am by neveride » Logged
QwazyWabbit
Member

Posts: 402


« Reply #35 on: September 21, 2008, 09:43:43 am »

R1ch can correct me if I am wrong but self-built R1q2 clients cannot be built to include anticheat.dll because alteration of the client code from source could allow faking/mutation or corruption of the anticheat methods.

If your goal is to fork r1q2 server for Linux or Windows then building from source makes sense.
If your goal is to fork r1q2 client then you will have to do it without anticheat.

R1ch will not release the anticheat.lib that you will need to link the anticheat functions.
Logged
neveride
Member

Posts: 26


« Reply #36 on: September 21, 2008, 09:54:23 am »

hm, that's too bad. in aprq2 there is variable cl_health that holds amount of health for the player. It would be useful for me to have it, but on aprq2 I have ~50fps less, which is a lot when timedemo returns 150fps. moreover r1ch wrote that he wont include cl_health in r1q2 and I understand his explanation, but if I really want to do that in my fork, I should be able to use this fork on servers, what is impossible without anticheat service. moreover, who compiles other q2-clients which serve anticheat module? do they have to have anticheat.lib or not?

EDIT:
I was a little too fast. All the functions are in sv_server.c, so it was enough to add it to the project. the problem now is that it disconnects me from all the servers and there is one that doesnt do this, but when I type aclist, I can see that I dont have anticheat module loaded...how to overcome this?

« Last Edit: September 21, 2008, 11:50:52 am by neveride » Logged
neveride
Member

Posts: 26


« Reply #37 on: September 22, 2008, 04:17:42 pm »

http://pancake.sggw.waw.pl/~gagatek/4u/r1q2_executables.rar, here you have two executables compiled by me. I even changed the name from r1q2 (mod) to r1q2, cuz I thought that it might have an influence, but it does not....

the difference in size (~800kB and ~500kB) is because of /MT and/MTd compiler option (libraries), but I dont see any difference, so I dont know which one to use...

why dont they load anticheat?
Logged
wision
Member

Posts: 237



« Reply #38 on: September 23, 2008, 12:34:30 am »

it doesn't load anticheat because it fails the hash check.. or whatever it uses to check the client
Logged
neveride
Member

Posts: 26


« Reply #39 on: September 23, 2008, 03:49:58 am »

oh I c.
I thought that the clients have to be compatible with anticheat not the other way around. If that's the case, then I should be able to make it work. The question is: how? Rich?
Logged
wision
Member

Posts: 237



« Reply #40 on: September 23, 2008, 11:24:23 am »

if i may ask, what's so special on your client that you want it to be valid for anticheat?
Logged
mhanor
Member

Posts: 120


« Reply #41 on: September 23, 2008, 12:40:53 pm »

wision: neveride hasn't yet understood the essential things

neveride: you should read again all that is to be read about anticheat (what is it, how it works, what is a valid client, how a client becomes valid), including your own thread... also search the forum for other discussions about it; after you understand all that you must understand, you will not be able to ask for anticheat support, for your client, unless you're deadly serious about releasing to the public a very special client, with many new and exciting features, that R1Q2 doesn't have
« Last Edit: September 23, 2008, 12:45:42 pm by mhanor » Logged
wision
Member

Posts: 237



« Reply #42 on: September 23, 2008, 12:46:01 pm »

yeah.. was too lazy to write that :b
Logged
neveride
Member

Posts: 26


« Reply #43 on: September 23, 2008, 01:28:19 pm »

wision: neveride hasn't yet understood the essential things

neveride: you should read again all that is to be read about anticheat (what is it, how it works, what is a valid client, how a client becomes valid), including your own thread... also search the forum for other discussions about it; after you understand all that you must understand, you will not be able to ask for anticheat support, for your client, unless you're deadly serious about releasing to the public a very special client, with many new and exciting features, that R1Q2 doesn't have


aprq2 allows triggering and has cl_health variable that allows scripting. i would change to aprq2 because of that, if my computer was better and performed well enough on this client. somebody asked for including this in r1q2, but rich said no and I understood his explanation. but there was also somebody else who said that if you want some option in r1q2 then add it and compile it on your own. that's what i wanted to do, bu t i cannot because somebody else has monopolly for saying whether a client is good or not. i dont think it's a good solution, and to tell truth it's ridiculous. bad anticheat design, but i cannot make it better so i will stay quiet.
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #44 on: September 23, 2008, 04:53:48 pm »

Triggers are implemented in the next R1Q2 release, however cl_health and other "stat" access is not planned.
Logged
Pages: 1 2 [3] 4  All
Print
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: Compiling your r1q2 from source on WIN32
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines