Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Blastfrog

Attempting to make a custom version of Chocolate Doom...

Recommended Posts

Mods: I'm going to use this thread for help with creating my own source port (trying to get the compiler set up right now, but I'm going to talk about custom features after I get the compiler issue out of the way), so if this doesn't belong here, please move it where it needs to be.

So, I've got the build script, and Cygwin installed, but I'm not sure how to install the compiler. I know I need to get MinGW's version of GCC, but I don't know how to actually configure it and set it up for use with Cygwin. I've done a few Google searches, and nothing useful seems to come up (mostly just how to install Cygwin itself, which I have already done).

Keep in mind, I have everything else that I need (libraries and crap like that), only the compiler is missing.

Share this post


Link to post

Cygwin is supposed to be the development environment, not MinGW. The Chocolate Doom wiki says that the compiler used is supposed to be MinGW's version of GCC, other than that, MinGW has absolutely nothing to do with it.

All I need to know is how to configure Cygwin to use this compiler, that is all.

Share this post


Link to post

people don't generally try to use MinGW with Cygwin as Cygwin already has an included GCC set of tools and MinGW is a fork of Cygwin's version. Also trying to use MinGW with Cygwin kind of defeats the purpose for there to be a MinGW anyway.

Share this post


Link to post

I haven't used cygwin in a very long time, but I remember having to bundle CYGWIN1.DLL with every binary that was compiled under cygwin.

I think the point of mingw is to do away with that restriction, by using Win32 API calls directly instead of going through a translation layer (which is what cygwin basically is).

Share this post


Link to post

Actually, I found the compiler in the install file (I ran it again)

I'm getting this error now: "line 273: sdl-config: command not found".

Share this post


Link to post

You need to install SDL, SDL_mixer, and SDL_net into the cygwin environment. Then configure and compile chocolate-doom. Just compiled it myself a moment ago.

SDL-1.2.14
SDL_mixer-1.2.11
SDL_net-1.2.7

Edit: The compiled version will not require cygwin dlls to run.

Share this post


Link to post

Huh, I can't find any SDL packages in the Cygwin installer. Weird, shouldn't it be there? :?

Also, REALLY stupid question, are you the same Randy that is the author of ZDoom?

Thanks for helping me anyway. :)

Share this post


Link to post

"The Randy that created ZDoom here is called "Graf Zahl""

ha

You can pick up the SDL sources from these links:
http://www.libsdl.org/release/SDL-1.2.14.tar.gz
http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.11.tar.gz
http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.7.tar.gz

Chocolate-Doom 1.6.0 compiles in Code::Blocks just fine if you copy the right SDL libraries to Code::Blocks Mingw directory and rename one file in the chocolate-doom source package.

Share this post


Link to post

Heh. But okay, seriously, I can't find any SDL packages. Like, they're literally not there. Do I need to use a different mirror or something like that?

Share this post


Link to post
Stroggos said:

The Randy that created ZDoom here is called "Graf Zahl"

Wow, that's funny. I haven't laughed so much from a single sentence in days.

Share this post


Link to post

Ah the terror and chaos that happens when you have the wrong name in the windows clipboard... **

Share this post


Link to post

The Cygwin installer has packages for the MingW compiler - just install the gcc packages that have "mingw" in the name (listed on the wiki page).

The SDL libraries aren't in Cygwin as far as I know. The build script will compile them for you automatically. Have you tried running it? If the script isn't working for you then I suggest you paste the error you're getting and I can try to diagnose the problem.

Stroggos said:

people don't generally try to use MinGW with Cygwin as Cygwin already has an included GCC set of tools and MinGW is a fork of Cygwin's version. Also trying to use MinGW with Cygwin kind of defeats the purpose for there to be a MinGW anyway.

Not at all. You've simply misunderstood the way it works. Cygwin is merely used to provide a Unix-like build environment and the tools you need to build the program (make, a Unix shell, Python, etc). The fact that Cygwin is used as a build environment is completely separate from the MingW compiler that's used to compile the program. There's no conflict here although I admit it might seem slightly confusing.

There is a Unix-like environment based on MingW called MSYS but from what I've seen it's much less functional and rather poorly maintained. Cygwin provides a far more useful environment.

Sodaholic said:

Anyway, instead of bothering with this crap, will it still work if I use Cygwin's version of GCC?

You can try but I certainly won't provide any guarantees. To be honest I think you'll just be making more work for yourself.

Share this post


Link to post

If your new to this Sodaholic, then I would suggest starting with the Code::Blocks method. Code::Blocks is a nice platform independent IDE and should make modification to the source easier. You can instruct Code::Blocks to use cygwin mingw if you wish. Check out http://www.chocolate-doom.org/wiki/index.php/Building_Chocolate_Doom_on_Windows_%28alternative_build%29 for more info.

The only change I had to make to get the entire project compiled was renaming chocolate-doom-1.6.0/setup/setup-manifest.xml.in to setup-manifest.xml

Share this post


Link to post
Randy87 said:

If your new to this Sodaholic, then I would suggest starting with the Code::Blocks method. Code::Blocks is a nice platform independent IDE and should make modification to the source easier. You can instruct Code::Blocks to use cygwin mingw if you wish. Check out http://www.chocolate-doom.org/wiki/index.php/Building_Chocolate_Doom_on_Windows_%28alternative_build%29 for more info.

The only change I had to make to get the entire project compiled was renaming chocolate-doom-1.6.0/setup/setup-manifest.xml.in to setup-manifest.xml

Heh. I know your post is well intentioned and I should clarify in advance that this isn't a personal criticism, but I have to say that I find responses like this to be deeply frustrating. I've actually put a considerable amount of effort into making the process of setting up a build environment to be straightforward, automated, repeatable and properly documented. That's why I wrote that wiki page and the automated build script to do it all automatically.

I guess from my perspective I really don't see what the problem is. The page has fairly simple instructions and the script does 99% of the work for you. I'd really prefer that people didn't use the other build systems if possible - in the past there have been bugs that only affected the Code::Blocks build for example, and as you've noticed yourself they're not always in sync with the main build.

Anyway, it's up to you. If you find that easier then go right ahead. But I'm happy to help out if you're having trouble getting the main build system to work.

Share this post


Link to post

I do want to build it with Cygwin, by the way.

Here's what I'm getting when I try to build it.

Share this post


Link to post

I understand your position Fraggle. I was just trying to get Soda set up with a quick and easy environment that included an IDE. I personally really appreciate the simplicity of using the build script you have set up.

Not sure what is going on in your screenshot Soda. Maybe you didn't get the wget package for cygwin? But I would think that would display an error.

Share this post


Link to post

wget not being installed would certainly explain the problem. The script ought to print an error message if it's not installed though. Looks like a bug I need to fix.

Share this post


Link to post
fraggle said:

Heh. I know your post is well intentioned and I should clarify in advance that this isn't a personal criticism, but I have to say that I find responses like this to be deeply frustrating. I've actually put a considerable amount of effort into making the process of setting up a build environment to be straightforward, automated, repeatable and properly documented. That's why I wrote that wiki page and the automated build script to do it all automatically.



Well, that may be true if you work on Linux - but for me it has always been an endless exercise in frustration to get anything compiled that requires MinGW and doesn't use CMake to maintain its build environment. To the point that I don't even try anymore because it almost never works out.

CMake makes things a lot easier for Windows users because you don't need Unix environment emulation or other crap that more often can't be persuaded to work.

I can compile ZDoom with MinGW without much fuss, precisely due to the use of CMake which is a true cross-platform tool.

Share this post


Link to post

Right now I compiled prboom-plus with mingw. Thanks god it compiles fine without SDL_mixer, withut SDL_net and without bla-bla the rest of libraries. It strongly requires only SDL. I am not able to compile (configure and make) SDL_mixer with mingw for Windows. It fails with some sort of errors. SDL compiles just fine, without any errors.

SDL_mixer config.log
http://pastebin.com/hkTVMK6W

configure:12384: gcc -o conftest.exe -g -O2 C:\Program Files\Microsoft SDK\Include\ bla-bla-bla
gcc.exe: C:\Program: No such file or directory
gcc.exe: Files\Microsoft: No such file or directory
gcc.exe: SDK\Include\.;C:\Program: Invalid argument
gcc.exe: Files\Intel\Compiler\C++\9.1\IA32\Include;C:\Program: Invalid argument
gcc.exe: Files\Intel\Compiler\C++\9.1\EM64T\Include: No such file or directory
gcc.exe: C:\Program: No such file or directory
gcc.exe: Files\Microsoft: No such file or directory
gcc.exe: SDK\Include\.;C:\Program: Invalid argument
gcc.exe: Files\Intel\Compiler\C++\9.1\IA32\Include;C:\Program: Invalid argument
gcc.exe: Files\Intel\Compiler\C++\9.1\EM64T\Include: No such file or directory
...
configure:12428: error: *** SDL version 1.2.10 not found!


My configure script:

set path=C:/MinGW/msys/1.0/bin;%path%
set path=C:/MinGW/bin;%path%

set SDL_CONFIG=D:/andre/prg/doom/prboom-plus/branches/prboom-plus-24/!/sdl/sdl-config
set C_INCLUDE_PATH=D:/andre/prg/doom/prboom-plus/branches/prboom-plus-24/!/sdl/include

set LD_LIBRARY_PATH=D:/andre/prg/doom/prboom-plus/branches/prboom-plus-24/!/sdl/build/.libs

sh configure

Share this post


Link to post
entryway said:

configure:12384: gcc -o conftest.exe -g -O2 C:\Program Files\Microsoft SDK\Include\ bla-bla-bla
gcc.exe: C:\Program: No such file or directory
gcc.exe: Files\Microsoft: No such file or directory
gcc.exe: SDK\Include\.;C:\Program: Invalid argument
gcc.exe: Files\Intel\Compiler\C++\9.1\IA32\Include;C:\Program: Invalid argument
gcc.exe: Files\Intel\Compiler\C++\9.1\EM64T\Include: No such file or directory
gcc.exe: C:\Program: No such file or directory
gcc.exe: Files\Microsoft: No such file or directory
gcc.exe: SDK\Include\.;C:\Program: Invalid argument
gcc.exe: Files\Intel\Compiler\C++\9.1\IA32\Include;C:\Program: Invalid argument
gcc.exe: Files\Intel\Compiler\C++\9.1\EM64T\Include: No such file or directory
...
configure:12428: error: *** SDL version 1.2.10 not found!


Seems that GCC can't handle spaces in filepaths cleanly, but tokenizes them, even though a path is supposed to be one continuous string with no parameters. Perhaps wrapping them around quotes will fix the problem?

Share this post


Link to post
Maes said:

Perhaps wrapping them around quotes will fix the problem?

./configure is 500kb of crap.

Share this post


Link to post
entryway said:

./configure is 500kb of crap.


Well, try fixing that one line at a time ;-)

Share this post


Link to post
Maes said:

Well, try fixing that one line at a time ;-)

Ok.

configure:12384: gcc -o conftest.exe -g -O2 C:\Program Files\ bla-bla

12384 is a line number, right?

12384 line of ./configure:

eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""


fix it for me please

Share this post


Link to post

Unix shell scripts don't work well with paths that have spaces in them. There's a note about this on the wiki page for building Chocolate Doom, with a workaround.

Share this post


Link to post
entryway said:

configure:12384: gcc -o conftest.exe -g -O2 C:\Program Files\ bla-bla
fix it for me please


I would rather find the place where you got C:\Program Files\ bla-bla defined and wrap that in quotes first, rather than chasing spurious errors that are caused a-posteriori.

fraggle said:

Unix shell scripts don't work well with paths that have spaces in them. There's a note about this on the wiki page for building Chocolate Doom, with a workaround.


:-/ And I who thought that that Windows' path management was broken...then again quoting paths works well even with .bat file

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
Sign in to follow this  
×