Discussion:
Portable (USB) install using 3.6.7 from nethack.org?
(too old to reply)
cookie
2023-07-21 18:14:29 UTC
Permalink
Returning to NetHack after a while, I am trying to configure the standard 3.6.7 windows build (NetHackW.exe) to run from a root folder on a USB stick - is this still possible? Whatever I try it seems to insist on creating and using files in windoze folders (ProgramData and user profile). I just want a single user setup that I can run from a USB stick...
E.g. using "sysconf" to redirect all folders:
CONFIGDIR=d:\games\nethack\config
TROUBLEDIR=d:\games\nethack\trouble
HACKDIR=d:\games\nethack
LEVELDIR=d:\games\nethack\temp
SAVEDIR=d:\games\nethack\saves
BONESDIR=d:\games\nethack\bones
SCOREDIR=d:\games\nethack\scores
LOCKDIR=d:\games\nethack\temp
...still recreates and uses the profile .nethackrc.
Have I missed something obvious? There's nothing helpful on reddit and nethackwiki.com doesn't have anything relevant either.
Any help appreciated. Mark C
Pat Rankin
2023-07-21 22:14:05 UTC
Permalink
[...]
Any help appreciated. Mark C
I believe that the sysconf directive 'PORTABLE_DEVICE_PATHS' is
supposed to do exactly what you're asking for.

I've never tried it. I think you need to both uncomment it (remove
the leading hash) and change the value from 0 to 1.
cookie
2023-07-22 12:07:22 UTC
Permalink
Post by Pat Rankin
[...]
Any help appreciated. Mark C
I believe that the sysconf directive 'PORTABLE_DEVICE_PATHS' is
supposed to do exactly what you're asking for.
Thanks very much Pat! This is not in the sysconf.template but I do remember reading about this - I found it again buried around line 5624 in the guidebook.txt.

Now to try not to die too often as I remember how to play...
B. R. 'BeAr' Ederson
2023-07-22 17:10:52 UTC
Permalink
Post by cookie
I just want a single user setup that I can run from a USB stick...
[...]
Post by cookie
HACKDIR=d:\games\nethack
LEVELDIR=d:\games\nethack\temp
BONESDIR=d:\games\nethack\bones
In addition to the sysconfig "PORTABLE_DEVICE_PATHS = 1" setting Pat
already mentioned, you probably should consider using relative path
entries to get a _real_ portable setup, like:

HACKDIR=.
LEVELDIR=.\temp
BONESDIR=.\bones

Please note, that path settings from .nethackrc (user settings) override
these from sysconfig (system settings). Best to check that every path
points to the intended location with:

NetHackW.exe --showpaths

Some information on Windows (portable) settings can be found here:
https://www.nethack.org/v367/bugmore/WinFilePaths.txt

BeAr
--
===========================================================================
= What do you mean with: "Perfection is always an illusion"? =
===============================================================--(Oops!)===
Loading...