Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
kairunotabi

Compiling FreeDoom?

Recommended Posts

Hello there, I've downloaded a zip copy of the source code for FreeDoom from Github but the only problem is that I don't know how to compile the source code.

I am using Windows 7 so I have Cygwin installed, it seems that in order to compile the source code I will need to use DeuTex but I can't find a working download link. Also, the given link for DeuTex used for the development of FreeDoom was a source code and still needed to be compiled to use.

Is anybody out there who have a compiled FreeDoom before? If so, where can I get a copy of DeuTex and how to use it in order to compile the source code.

Thanks in advance! :D

Share this post


Link to post
kairunotabi said:

Hello there, I've downloaded a zip copy of the source code for FreeDoom from Github but the only problem is that I don't know how to compile the source code.

You're better off using Git to clone the repository, rather than downloading a .zip snapshot. The Freedoom build uses symbolic links and I don't know if they'll be represented in a .zip.

I am using Windows 7 so I have Cygwin installed, it seems that in order to compile the source code I will need to use DeuTex but I can't find a working download link. Also, the given link for DeuTex used for the development of FreeDoom was a source code and still needed to be compiled to use.

I've never heard of anyone building Freedoom on Windows before, so you might be treading into new territory. That said, I believe it should be possible. It's best if you clone chungy's deutex repository from Github. You'll need to compile it from source in Cygwin. Everything else should already be in Cygwin's package repository: you'll need ImageMagick, make and Python.

Share this post


Link to post

Oh, downloaded it ;) thanks buddy! I'll just try to compile Freedoom before moving on to the next phase. I'll be back if there's any problem.

Share this post


Link to post

Aside from deutex everything you need should be in Cygwin, it's just a matter of installing all the right packages. You'll need gcc (c compiler) and make to build deutex.

Share this post


Link to post

I just tried it earlier when I had an opportunity to use a Windows XP system. Nothing was particularly difficult about it:

* Install ImageMagick, Git, Python, gcc, and make via the Cygwin setup utility.
* Using my repo for DeuTex, it's just a straight-forward "./configure; make" to build that. Copy the *.exe files to somewhere in your $PATH
* Clone the Freedoom repository using Cygwin's version of Git, not any non-Cygwin Git. Since there are symbolic links, it does get weird outside of this environment. If you cloned it outside, however, the repository itself shouldn't be anything special, you can do something like "git clone file:///cygdrive/c/Users/Kairu/Documents/freedoom" from within Cygwin to get the repo remade under it, optionally followed by "git remote set-url origin https://github.com/freedoom/freedoom.git" if you want to continue pulling from the upstream. Typing "make" should build Freedoom fine.

Also to follow up on fraggle: Zip does support symbolic links, but you need a suitable version of Info-Zip's Unzip to unpack them properly. Cygwin's unzip package can do it exactly as expected, but non-Cygwin versions of unzip (or other programs) on Windows probably wouldn't extract anything useful. Still, it's easier to just use Git, I think :)

Share this post


Link to post
chungy said:

Also to follow up on fraggle: Zip does support symbolic links, but you need a suitable version of Info-Zip's Unzip to unpack them properly. Cygwin's unzip package can do it exactly as expected, but non-Cygwin versions of unzip (or other programs) on Windows probably wouldn't extract anything useful. Still, it's easier to just use Git, I think :)

And Github's zip downloads include the symlinks, so that should still work. I agree that we should be telling people to use git though, not download zips.

Would it simplify the process if we could just provide prebuilt exes of the Cygwin deutex?

Share this post


Link to post

Hah, that's kind of neat. I didn't realise PrBoom had its own poor-man's deutex.

The answer is essentially yes, we could do that. Ideally something Python based to fit in with the rest of the project. We already have a custom tool for building the TEXTURE lumps which is a big step in that direction. We do need to do things like aggregating level WADs together, which is as bit more complicated than what PrBoom's system is doing, but it might not be a huge amount of work.

One idea I had in the past was to do something like what the NetPBM tools do for graphics conversion. The build process could potentially be broken down into two stages: 1) a set of tools that convert things into .lmp files and 2) a tool that aggregates lots of .lmp files together into a single WAD. Then you can potentially drive the whole thing from a Makefile somehow and do everything in parallel. Might make builds faster as well if you're only changing eg. a single graphic.

EDIT: Braindump of possibly related thoughts about Freedoom's build system that have been swimming round my head for years that I made to IRC earlier:

16:48 < Giomancer> I should see about msys
18:22 < fraggle> please don't use msys, afaict it's not maintained
18:23 < fraggle> and msys means no symlinks so that's not going to work
18:23 < fraggle> i'd kind of like to just get rid of symlinks but i think 
                 deutex doesn't let you specify subdirs
18:25 < fraggle> ideally the buildcfg.txt file should be less centralised and 
                 monolithic, i'd like to be able to split it out into lots of 
                 small configs by directory
18:25 < fraggle> like there should be a directory per monster containing the 
                 sprites for that monster and configuration (x/y offsets)
18:25 < fraggle> then all those get aggregated together to build the full wad
18:26 < fraggle> same for things like level metadata
18:27 < fraggle> there should be a single metadata config file per level that 
                 specifies level name, par time, music track to use, etc.
18:28 < fraggle> ultimately though what we have works and it's probably too 
                 much effort to make any huge changes
18:34 < Giomancer> fraggle: as far as MSYS goes, they're actually working on it 
                   still
18:34 < Giomancer> fraggle: but you are right about symlinks

Share this post


Link to post

I'd like to eventually give SLADE 3 a "command-line" mode where it just runs a bunch of console commands without going into GUI mode. There would of course be console commands for all basic operations (open archive, import file, add offsets, etc.) and there's the Lua integration (not sure if sirjuddington finished it, though) which could handle anything else. Once everything's in place, it could even be made to handle DEUTEX's build files.

Share this post


Link to post

Well, DavidPH has a command-line tool, DH-wad, that can easily build an IWAD from .lmp files. Perhaps you'd like to take a look at it, fraggle? It could at least form a base for something.

EDIT: Meh, Python. My brain skipped that part. In that case, yeah, why not just have a prebuilt deutex binary? Seems like it'd help.

Share this post


Link to post

I'm having a problem during the compilation process, I used the downloaded zip from the Freedom Git Repository.

The compilation process was good at the beginning but after reaching the Text/Font Graphics part, cygwin gave me errors, yes, I have ImageMagick.

EDIT: After compiling DeuTex, it requires me to have a copy of cygwin1.dll to run it. Is it natural? If not, why can't we just upload a pre-compiled DeuTex executables?

Share this post


Link to post

Do it entirely from within the Cygwin environment, don't venture outside. For example, use unzip from within Cygwin, or clone the Git repository from within Cygwin. Also yes, if you compile programs using Cygwin's standard GCC, they'll depend on cygwin1.dll, which isn't much of a problem if you stick to that environment.

It may be possible to have DeuTex on Windows that doesn't require Cygwin, but with Freedoom's use of symbolic links, it wouldn't help whatsoever (in fact, it'd hurt since it'd be unaware of Cygwin's symlinks). This is a build system that wasn't designed to run on Windows, but Cygwin provides sufficient emulation of all the POSIX features it needs.

If you're still having troubles, please post the error messages. Nothing can be done otherwise :)

Share this post


Link to post

You need to provide more information. Are you running make from a Cygwin shell? Do you have the Cygwin versions of Python and ImageMagick installed?

Gez said:

It works differently enough that none of the Freedoom build toolchain supports them directly, so it's a moot point. (Cygwin actually supports them for reading.)

Share this post


Link to post
kairunotabi said:

Okay, so, why can't I compile the Text/Font Graphic part? Do I need a python wrapper instead of ImageMagick?

You need both Python and ImageMagick to build.

Share this post


Link to post

Alright, So how do I configure the build-cfg? Which should I uncomment to build for DOOM 2?

So, after configuring the build-cfg, All I have to do is to type MAKE in Cygwin?

Share this post


Link to post

What are you trying to do?

Assuming that you have all the software required, building the Freedoom IWADs shouldn't require anything more than simply typing "make" after checking out a clean tree (done automatically with "git clone"...)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×