Forum:Compiling alt.org/competition style Nethack and variants

From NetHackWiki
Jump to navigation Jump to search


It's not essential or the end of the world or anything, but what files do you need to compile a version of Nethack or variants similar to what alt.org or other competition sites/competitions use? If this is not allowed, I'll just practice with standard 3.4.3 or standard variants, but if it is allowed, I'd like to be able to practice in competition style to prepare myself for the real thing. What are the ground rules?

Best regards, Steven.

--StevenAus 00:36, 24 August 2011 (UTC)

Any reason not to just play online, possibly under a different account than you use on tourneys and such? Even if so, the standard 3.4.3 is no different than NAO's version, other than a few trivial interface/message changes. It's the same game. -Ion frigate 01:39, 24 August 2011 (UTC)
First you need to learn how to compile, then patch, after which you can apply the nh343-nao.diff and recompile to get the exact same version as used on NAO. --paxed 09:13, 24 August 2011 (UTC)

How long does it take for patch.exe to apply the na343-nao.diff to the source files? Just so I know how long to wait before I try the 0 or 2 after the -p command ("patch -p1 > nh343-nao.diff").

--StevenAus 13:15, 24 August 2011 (UTC)

If it takes long enough that you have to ask, you're not doing it right. Note that the command is patch -p1 < nh343-nao.diff, notice the less-than sign... --paxed 13:32, 24 August 2011 (UTC)

Yes, sorry about that, I did actually use < when on the Windows command line. I successfully compiled the original 3.4.3 program following the instructions on the Compiling page, and on the Patching page, am up to:

"Start cmd.exe and do the following: cd c:\nh343 path=%path%;c:\mingw\bin patch -p1 < nh343-menucolor.diff"

where I think nh343-nao.diff needs to replace the filename there. However, it says "NetHack is up to date" when compiling after the instructions there, and I can't see any difference in the binary (in fact it doesn't produce an updated binary). What do I need to do differently to get the .diff file to edit some of the source files and then be compiled into an updated binary?

Thanks for all your help!

--StevenAus 14:48, 24 August 2011 (UTC)

Are you getting an error message from the patch command? Also, I think the second line of the cmd instructions should be "set path=%path%;c:\mingw\bin", with an extra "set" at the start; leaving it off is a UNIXism. Ais523 14:52, 24 August 2011 (UTC)
No, not that I can see on the command line. And the original Windows instructions on this site for making an install.bat file for compiling Nethack 3.4.3 used "PATH=" rather than "SET PATH="
I tried using SET PATH/set path on the Windows command line without success. I copied the text and saved in in Notepad2 to make sure it was saved in the right format (even though it said in Notepad++ that the .diff file was already in ANSI format). Any ideas of what to do next? --StevenAus 15:26, 24 August 2011 (UTC)
You might want to re-download the actual patch, in case the < > confusion truncated it to length zero. --Tjr 16:09, 24 August 2011 (UTC)
I'm not sure what the problem is. I am 98% (or more) sure that I didn't confuse the greater/less than signs when on the command line, only when posting on the forum. Anyway I redownloaded patch.exe and the nh343-nao.diff and I still had the problem of patch.exe showing a blank screen and not doing anything. I've successfully compiled base NetHack 3.4.3 TTY. But all the attempts to patch the source files with the nao diff have not worked. Is the patch page up to date with how to patch using a .diff file in Windows (7 32-bit)? --StevenAus 08:37, 25 August 2011 (UTC)

Well, I'm stumped. No matter what I do, it just says that NetHack is up to date. Any suggestions of what to do/try next? --StevenAus 14:32, 26 August 2011 (UTC)

Try make clean or make spotless and retry compiling. --paxed 15:08, 26 August 2011 (UTC)

I've retried compiling, and also used TortoiseSVN to produce a nethack-3.4.3-orig folder, then copied those files into the relevant source folders, but when I try to use the http://alt.org/nethack/userdata/t/tjr4/tjr4.nh343rc file for my defaults.nh (with a few edits to turn on ncurses), it gives syntax errors for the MSGTYPE commands. However, the "NetHack 3.4.3 (Curses Interface)" installation works fine with the newer defaults.nh file, but I think it has a few differences to the nh343-nao.diff changes.

Best regards, Steven.----StevenAus 20:03, 26 August 2011 (UTC)