Editing the source

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Galaxy_Stranger
Posts: 21
Joined: Thu Dec 01, 2005 23:00
Contact:

Editing the source

Post by Galaxy_Stranger »

I've begun looking at the source code. I've read all the documentation that comes with Randy's release, (which everyone should do, heh). I've got a few small changes I'd like to be able to make of my own. So, I want to learn how the engine works.

My first problem, is I can't get either ZDoom or GZDoom to compile - they both give me similar errors concerning FLAC.

Code: Select all

FLAC error PRJ0019: A tool returned an error code from "Assembling d:\Internet\USBContent\Games\GZDoomSrc1.0.03\Flac\ia32\lpc_asm.nasm..."
I looked at the Help and it didn't make a ton of sense to me because I don't know how everything is organized and what it's trying to do. I also get this one:

Code: Select all

gzdoom error PRJ0019: A tool returned an error code from "Assembling d:\Internet\USBContent\Games\GZDoomSrc1.0.03\src\tmap3.nas..."
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Are you sure you have set up NASM correctly? VC has a nasty habit of giving rather useless error messages if an external tool fails for some reason.
User avatar
Galaxy_Stranger
Posts: 21
Joined: Thu Dec 01, 2005 23:00
Contact:

Post by Galaxy_Stranger »

That's probably the problem - what's NASM?

I forgot to mention I'm using Visual Studio.Net 2003.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Try Google!
User avatar
MartinHowe
Posts: 154
Joined: Tue Aug 30, 2005 22:07
Location: East Suffolk (UK)

Post by MartinHowe »

Galaxy_Stranger wrote:what's NASM?
Ouch! :shock:

Seriously, NASM is the Netwide Assembler, a freeware assembler distributed under the LGPL. You can, IIRC, compile both ZDoom and GZDoom without any assembler code, but the C routines that are then used instead are of course slower.

The NASM site is down at the moment (http://nasm.sourceforge.net), so I have put a copy of the latest version at http://www.martinsobservationpost.net/system/nasm.zip for the moment.

Once you have extracted the archive and moved the resulting folder to wherever you want it, put the pathname of the folder in your path, as makefiles for various command-line compilers will be expecting it.

To do this

1. Start|Run and then put regedit in the open field of the dialog. Click OK.
2. Use the left-hand pane of regedit to navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
3. In the right-hand pane, double-click Path
4. Use the END key to go to the right-hand side of the string;
5. Add a semicolon, followed immediately by the full pathname of the folder in which NASM resides; for example, change

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem.

to

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\documents and settings\galaxy_stranger\my documents\nasm.

Case is not important, but do NOT use quotes!

6. Click OK. If anything unexpected happens during this process, click Cancel instead of OK and try again. Messing around with the PATH setting can mess up a system BIG TIME if you do it wrong; it's about time MS had a proper GUI path-editing utility with safeguards and stuff.
7. You don't need to restart the system, but you do need to log off then log back on again.

If you are ONLY compiling from within the MSVC IDE, then you don't need to add it to the PATH.

You then need to use the Tools|Options|Projects page, select VC++ directories and then select Platform as Win32 and Show directories for as Executable files. ("Directory" is the technical word for "folder"; old-timers like me still use it, and it seems MS do as well, at least in their development products). Click the "new folder" icon and browse to the same directory where NASM is. When you are there you won't be able to see any files (though you will see subfolders), but the folder name (e.g., nasm) will appear in the Look in field of the dialog. Click Open then OK.

Then try rebuilding it. If it doesn't work, sacrifice a couple of imps to Baal and ask for the slow and painful death of Bill Gates :P
Locked

Return to “GZDoom”