Files
nethack/include/sys.h
nhmall ac6e13fd7a allow run-from-removable-device configuration on Windows
Allow a way to configure NetHack to run entirely from a USB stick
or other removable device in a way that allows everything to
reside entirely on the USB stick, and nothing on the computer's
hard drive. That could be done in versions prior to 3.6.3.

Sample:

i: is a USB stick

i:\nhdist contains the NetHack Windows distribution and a sysconf
file dropped into that distribution with the following entry in it:
	portable_device_top = nethack

No device is included in the portable_device_top entry, the device
is always the device that the nethack exe resides on. If you try
to specify a device in the portable_device_top path, the device
portion will be ignored.

portable_device_top specifies the folder on the device that is writable
by NetHack and as such it cannot be the same folder that the executable
resides in.

i:\nhdist\nethack --showpaths
Variable playground locations:
    [hackdir   ]="i:\nethack\"
    [leveldir  ]="i:\nethack\"
    [savedir   ]="i:\nethack\"
    [bonesdir  ]="i:\nethack\"
    [datadir   ]="i:\nhdist\"
    [scoredir  ]="i:\nethack\"
    [lockdir   ]="i:\nethack\"
    [sysconfdir]="i:\nhdist\"
    [configdir ]="i:\nethack\"
    [troubledir]="i:\nethack\"
NetHack's system configuration file (in sysconfdir):
    "i:\nhdist\sysconf"
The loadable symbols file (in sysconfdir):
    "i:\nhdist\symbols"
Basic data files (in datadir) are collected inside:
    "i:\nhdist\nhdat363"
No end-of-game disclosure file (disabled).
Writable folder for portable device config (sysconf portable_device_top):
    "i:\nethack\"
Your personal configuration file (in configdir):
    "i:\nethack\.nethackrc"

Without that sysconf file in the NetHack distribution folder on the
USB stick with the 'portable_device_top = '  entry, the paths
return to the default locations for 3.6.3 on Windows:

i:\nhdist\nethack --showpaths
Variable playground locations:
    [hackdir   ]="C:\Users\JaneDoe\NetHack\3.6\"
    [leveldir  ]="C:\Users\JaneDoe\AppData\Local\NetHack\3.6\"
    [savedir   ]="C:\Users\JaneDoe\AppData\Local\NetHack\3.6\"
    [bonesdir  ]="C:\ProgramData\NetHack\3.6\"
    [datadir   ]="i:\nhdist\"
    [scoredir  ]="C:\ProgramData\NetHack\3.6\"
    [lockdir   ]="C:\ProgramData\NetHack\3.6\"
    [sysconfdir]="C:\ProgramData\NetHack\3.6\"
    [configdir ]="C:\Users\JaneDoe\NetHack\"
    [troubledir]="C:\Users\JaneDoe\NetHack\3.6\"
NetHack's system configuration file (in sysconfdir):
    "C:\ProgramData\NetHack\3.6\sysconf"
The loadable symbols file (in sysconfdir):
    "C:\ProgramData\NetHack\3.6\symbols"
Basic data files (in datadir) are collected inside:
    "i:\nhdist\nhdat363"
No end-of-game disclosure file (disabled).
Your personal configuration file (in configdir):
    "C:\Users\JaneDoe\NetHack\.nethackrc"
2019-12-17 00:41:55 -05:00

57 lines
2.0 KiB
C

/* NetHack 3.6 sys.h $NHDT-Date: 1449296291 2015/12/05 06:18:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.27 $ */
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
/* NetHack may be freely redistributed. See license for details. */
#ifndef SYS_H
#define SYS_H
struct sysopt {
char *support; /* local support contact */
char *recover; /* how to run recover - may be overridden by win port */
char *wizards; /* space-separated list of usernames */
char *fmtd_wizard_list; /* formatted version of wizards; null or "one"
or "one or two" or "one, two, or three", &c */
char *explorers; /* like wizards, but for access to explore mode */
char *shellers; /* like wizards, for ! command (-DSHELL); also ^Z */
char *genericusers; /* usernames that prompt for user name */
char *debugfiles; /* files to show debugplines in. '*' is all. */
#ifdef DUMPLOG
char *dumplogfile; /* where the dump file is saved */
#endif
#ifdef WIN32
char *portable_device_top; /* nethack configuration for a portable drive */
#endif
int env_dbgfl; /* 1: debugfiles comes from getenv("DEBUGFILES")
* so sysconf's DEBUGFILES shouldn't override it;
* 0: getenv() hasn't been attempted yet;
* -1: getenv() didn't find a value for DEBUGFILES.
*/
int maxplayers;
int seduce;
int check_save_uid; /* restoring savefile checks UID? */
int check_plname; /* use plname for checking wizards/explorers/shellers */
int bones_pools;
/* record file */
int persmax;
int pers_is_uid;
int entrymax;
int pointsmin;
int tt_oname_maxrank;
/* panic options */
char *gdbpath;
char *greppath;
int panictrace_gdb;
int panictrace_libc;
/* enable accessibility options */
int accessibility;
};
extern struct sysopt sysopt;
#define SYSOPT_SEDUCE sysopt.seduce
#endif /* SYS_H */