Forum:Patching help

From NetHackWiki
Jump to navigation Jump to search


I run NetHack from Linux via sudo apt-get install. Is there a way for me to apply patches? — Preceding unsigned comment added by Jubilex (talkcontribs)

Not directly. `apt-get install` is giving you a binary (i.e. pre-compiled) version that you can't patch against, because you aren't running the compiler yourself. However, what you can do is to download the source separately, and patch/compile/install that. It's possible to do this via apt, but I wouldn't recommend that because it's quite complex; downloading the source from nethack.org and following the instructions there may be easier. Ais523 (talk) 18:08, 27 August 2015 (UTC)
Patching can be a bit arduous. You can encounter problems, like patches that have to be applied on older obsolete versions and requiring to edit some stuff here and there. Beater follow the individual instructions that come with the patch.--Quantum Immortal (talk) 00:11, 28 August 2015 (UTC)

Will I have to uninstall the NetHack already running? Jubilex (talk) 18:36, 27 August 2015 (UTC)

It depends on how you install the new version. If you install the new version in a subdirectory of your home directory, you won't have to uninstall the old one (although things like saves, bones, etc., won't be shared between the two versions); I recommend doing this anyway as it means you won't need root access to install and that it'll be easier to avoid messing up your system by mistake. This is how I make patches to NetHack, when I'm working on the DevTeam-released versions and not a variant. Ais523 (talk)
You can rename the patched nethack to something else. This way the system will treat it like a different program. I would recommend you use the "checkinstall" utility, it creates and installs a sloppy deb package, instead of just copying files. And try not to forget to sing when you start a post in the Forum.--Quantum Immortal (talk) 00:11, 28 August 2015 (UTC)