Downloading and compiling just q3map2.


(hyp3rfocus) #1

I’ve been making maps for Quake3 using Blender’s .map export script and then compiling them with a q3map2 binary that I found on the internet. Now I’d like to build my own q3map2 binary. The thing is, I don’t need gtkradiant at all, so it seems a bit wasteful downloading the entire gtkradiant svn code when I’m only interested in q3map2. Is there some way I could just download the q3map2 stuff and then compile just that?

Thanks for your time.


(kamikazee) #2

You can. Use Subversion as you normally would, but point it to this url instead:
https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk/tools/quake3/

This will only download the Q3Map2 source. I don’t know if it would work though, maybe there are some build files in a folder that is higher up.


(jalisko) #3

q3map2 source is using some #defines from the gtkradiant source (like radiant version). Only thing you can do is define the stuff yourselfm then it will build on its own. I always hated this dependency of radiant source too.


(ACROBAT) #4

You’re going to map entirely in blender?

wow. maybe i need to learn that program.


(valkyr) #5

I’ve just finished successfully compiling this standalone, and decided to note down the steps required for future reference. This is for the ZeroRadiant (2.5.11) version, but I’m guessing the GTKRadiant version will be pretty much the same.


CHECK OUT:
https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/ZeroRadiant/tools/quake3/q3map2/
https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/ZeroRadiant/tools/quake3/common/
https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/ZeroRadiant/include/
https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/ZeroRadiant/libs/

So, assuming you’ve now got 4 top-level directories (q3map2 / common / include / libs), the following files need copied :


COPY FILE > (TO FOLDER(S)):
libs/md5lib.h > (q3map2) (libs/md5lib)
libs/ddslib.h > (q3map2) (libs/ddslib)
libs/l_net/l_net.h > (common)
libs/mathlib.h > (common) (libs/mathlib)
libs/bytebool.h > (common) (libs/mathlib)
libs/picomodel.h > (q3map2) (libs/picomodel)


That then lets you build the supporting libraries :


BUILD:
libs/md5lib
libs/ddslib
libs/l_net
libs/mathlib
libs/picomodel

Which need copied to the q3map2 folder :


COPY FILE > (TO FOLDER):
libs/md5lib/build/Release/libs/md5lib.lib > (q3map2)
libs/ddslib/build/Release/libs/ddslib.lib > (q3map2)
libs/l_net/build/Release/libs/l_net.lib > (q3map2)
libs/mathlib/build/Release/libs/mathlib.lib > (q3map2)
libs/picomodel/build/Release/libs/picomodel.lib > (q3map2)

Along with the remaining headers :


COPY FILE (TO FOLDER):
include/version.h > (q3map2)
include/stream_version.h > (common)

common/cmdlib.h > (q3map2)
common/scriplib.h > (q3map2)
common/polylib.h > (q3map2)
common/imagelib.h > (q3map2)
common/qthreads.h > (q3map2)
common/inout.h > (q3map2)
common/vfs.h > (q3map2)

Finally you can then build q3map2. You’ll get 1 error at the end of the compilation, but it’s nothing to worry about - the build script is simply trying to copy the .exe to a directory that doesn’t exist.


(quakewiki) #6

Hi, followed the tutorial but to no avail. Still lots of errors. Could you provide a standalone modified source? Like the one you managed to build? Thanks.


(valkyr) #7

To be honest I didn’t realise that the ZeroRadiant version was so old (2.5.11) before I built it, otherwise I wouldn’t have bothered. Dunno why they’re using such an old version, as GTKRadiant 1.5 comes with (I think) 2.5.15.

You’d be best just getting the version with NetRadiant though, (2.5.17n - the newest and most advanced). It’s well worth it for the reduced map compile times if nothing else, and they have pre-compiled binaries of the latest SVN revision.

(I recognise your name BTW - I still read up on Quake1 now and again (old-time player) :))


(quakewiki) #8

Yeah, I know about NetRadiant, I have the latest SVN version, but I wanted q3map2 standalone, as I don’t use NetRadiant for level design. I could have used an older (but standalone) version of q3map2, and I would have merged the latest version into 2.5.11.

I’ll give it a shot one more time with NetRadiant, and see if I can remove all dependencies from q3map2. My goal is to have a customized q3map2 and maybe some kind of Q3Map2Toolz, maybe write one myself.

EDIT: Come to think about it, I didn’t try with 2.5.11. I tried with .17, latest version. Hmm, worth a try. :slight_smile: Oh, and glad to meet an old-time player.


(valkyr) #9

That’s maybe why it didn’t work… (I did give the SVN links for ZeroRadiant / .11)

Or maybe you didn’t have the dependencies package? The Compile guide tells you but I didn’t mention it in my post.

Anyway, I’ve spent ****ing hours on this, and for no good reason either, but as a result have managed to compile 2.5.17 from the GTKRadiant 1.5 branch, from what I believe to be the minimum number of required files.

New instructions ahead…


(valkyr) #10

Compiling q3map2 standalone

I used Visual Studio Express 2008, but the project files are for 2005 so that should work also.

From SVN

[ul]

[LIST]
[li]https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/1.5/include/stream_version.h > \GtkRadiant\branches\1.5\include\stream_version.h[/li][li]http://www.qeradiant.com/cgi-bin/trac.cgi/browser/GtkRadiant/trunk/include/version.h > \GtkRadiant\branches\1.5\include\version.h[/li][/ul]

[li]From https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/1.5/tools/quake3/common/ :[/li]

[ul]
[li]cmdlib.c[/li][li]cmdlib.h[/li][li]imagelib.c[/li][li]imagelib.h[/li][li]inout.c[/li][li]inout.h[/li][li]mutex.c[/li][li]mutex.h[/li][li]polylib.c[/li][li]polylib.h[/li][li]qfiles.h[/li][li]qthreads.h[/li][li]scriplib.c[/li][li]scriplib.h[/li][li]threads.c[/li][li]unzip.c[/li][li]unzip.h[/li][li]vfs.c[/li][li]vfs.h[/li][/ul]

> [I]\GtkRadiant\branches\1.5 ools\quake3\common[/I]

[li]From https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/1.5/libs/ :[/li]

[ul]
[li]ddslib/[/li][li]jpeg6/[/li][li]l_net/[/li][li]mathlib/[/li][li]picomodel/[/li]
[li]bytebool.h[/li][li]ddslib.h[/li][li]mathlib.h[/li][li]picomodel.h[/li][li]radiant_jpeglib.h[/li][/ul]

> [I]\GtkRadiant\branches\1.5\libs[/I]

[li]https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/1.5/tools/quake3/q3map2 > \GtkRadiant\branches\1.5 ools\quake3\q3map2[/li][/LIST]

Dependencies

[ul]
[li]From gtkradiant-1.5-dependencies-1.0.zip :[/li]

  • [li]gtk2-2.10/[/li][li]libxml2-2.6/[/li][li]mhash-0.9/[/li][/ul]
    > [I]\GtkRadiant\branches[/I]

Building

[ul]
[li]Build each library in [I]\GtkRadiant\branches\1.5\libs[/I][/li][li]Copy the resulting .lib files from the build directory > \GtkRadiant\branches\1.5 ools\quake3\q3map2[/li][li]Go to q3map2 project properties > Configuration properties > Linker > Input > Additional dependencies, and add each of the library files built previously to the string.[/li][li]Build solution and pray.[/li][/ul]

Here’s an archive of the SVN files required. Follow the instructions above from the dependencies step.


(quakewiki) #11

Thanks Valkyr, can’t wait to set it up and build it. Gonna do this tomorrow, first thing in the morning.


(valkyr) #12

Here’s the DLL’s required to run the build BTW. Get the most recent version of each, except for libpng.

[ul]
[li]libglib-2.0-0.dll
[/li][li]zlib1.dll
[/li][li]libxml2.dll
[/li][li]libpng13.dll (latest with v13 is 1.2.8)
[/li][li]libmhash.dll (no binary version available from developer site)
[/li][/ul]

Might as well put the finished package up as well after all that : q3map2-2.5.17-SVN-rev332-win.7z


(valkyr) #13

…and a quick test of it versus 2.5.17n (NetRadiant) :

2.5.17 - SVN332
-BSP
Wrote 12.0 MB (12625752 bytes)
62 seconds elapsed
-VIS
Wrote 13.2 MB (13845664 bytes)
20 seconds elapsed
-LIGHT
Wrote 16.6 MB (17382944 bytes)
229 seconds elapsed

Total - 311 seconds / 21.6MB

2.5.17n
-BSP
Wrote 11.8 MB (12413648 bytes)
50 seconds elapsed
-VIS
Wrote 13.0 MB (13584492 bytes)
11 seconds elapsed
-LIGHT
Wrote 16.3 MB (17072640 bytes)
267 seconds elapsed

Total - 328 seconds / 20.5MB

So for this one map it actually ends up performing (slightly) better than 2.5.17n, while making (slightly) bigger files. Pretty amazing considering the result of the last test I did.


(quakewiki) #14

Got it! Managed to build it and run it on a test map. Looks sharp. Now, I need to add my modifications and optimizations. The only thing that got in my way was me unable to build it standalone. Thanks.

EDIT: You also need iconv.dll. I’m using QuArK and it need it. Don’t know why, yet. I’ll know in a few days, though :slight_smile:


(valkyr) #15

Good to hear you got it working.

Hmm. I’ve got the GTK runtime installed (which provides that DLL)… but then it also provides libglib-2.0-0.dll and zlib1.dll, so I wonder why it didn’t find those…


(valkyr) #16

Actually just renamed iconv.dll in the GTK runtime and q3map2 still works, so it looks like my version doesn’t need it for some reason.

It also means that q3map2 isn’t finding the GTK runtime at all. It would be better if it could, and use the available required files from there first. That’s the whole idea of using a shared library after all…


(outcastgamer) #17

Could someone please re-post this? Compiling this thing is giving me the chills. ;/


(valkyr) #18

It’s still there :confused:


(outcastgamer) #19

Realy? Both firefox and opera give me a this page cant be displayed ;/


(valkyr) #20

Oh wait, my bad. I did make some changes to the domain yesterday which mustn’t have propagated their way to you yet.

Just use the IP address instead…

http://95.154.246.106/archive/q3map2-2.5.17-SVN-rev332-win.7z