Add CRASHREPORT, show contact form on panic/impossible
When calling panic() or impossible(), create the option of opening a browser window with most of the fields already populated. Code for MacOS and linux is included; other ports are affected by argument change to early_init which are done but not tested. To enable, define CRASHREPORT in config.h and set CRASHREPORTURL in sysconf to (for the moment at least) http[s]://www.nethack.org/common/contactcr.html Adds --grep-defined option to makedefs for Makefiles. Adds "bid" (binary identifier), an MD4 of the main nethack binary. This is ONLY for helping (in the future) contact.html to set the "NetHack from" field automatically for our own binaries. This can be faked, but the user can lie so nothing lost. There's nothing magic about MD4; other ports can use anything that prodcues a long apparently random string we can match against. - new option --bidshow for us to get the MD4 of a released binary so I can add it to the website. Only available in wizard mode and not in nethack.6. - typo macos -> macosx in hints file No support for packaging builds as I'm not sure what that would look like. Adds a javascript helper for MacOS. Adds a lua helper for linux (and builds and installs nhlua).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# NetHack 3.7 macOS.370 $NHDT-Date: 1668359835 2022/11/13 17:17:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.116 $
|
||||
# NetHack 3.7 macOS.370 $NHDT-Date: 1693359574 2023/08/30 01:39:34 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.138 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
@@ -97,6 +97,8 @@ NHCFLAGS+=-DNOMAIL
|
||||
#NHCFLAGS+=-DTTY_SOUND_ESCCODES
|
||||
#NHCFLAGS+=-DNO_CHRONICLE
|
||||
#NHCFLAGS+=-DLIVELOG
|
||||
# not NHCFLAGS - needed for makedefs
|
||||
CFLAGS+=-DCRASHREPORT=\"NetHackCrashReport.JavaScript\"
|
||||
|
||||
ifdef MAKEFILE_SRC
|
||||
# default
|
||||
@@ -328,11 +330,14 @@ ROOTCHECK= [[ `id -u` == 0 ]] || ( echo "Must run install with sudo."; exit 1)
|
||||
# make sure we have group GAMEUID and group GAMEGRP
|
||||
PREINSTALL= . sys/unix/hints/macosx.sh user2 $(GAMEUID); \
|
||||
. sys/unix/hints/macosx.sh group2 $(GAMEGRP); \
|
||||
mkdir $(SHELLDIR); chown $(GAMEUID) $(SHELLDIR)
|
||||
(mkdir $(SHELLDIR) || true); chown $(GAMEUID) $(SHELLDIR)
|
||||
POSTINSTALL+= sys/unix/hints/macosx.sh editsysconf sys/unix/sysconf $(HACKDIR)/sysconf; \
|
||||
$(CHOWN) $(GAMEUID) $(HACKDIR)/sysconf; \
|
||||
$(CHGRP) $(GAMEGRP) $(HACKDIR)/sysconf; \
|
||||
chmod $(VARFILEPERM) $(HACKDIR)/sysconf;
|
||||
chmod $(VARFILEPERM) $(HACKDIR)/sysconf; \
|
||||
util/makedefs --grep-defined CRASHREPORT && \
|
||||
( cp win/macosx/NetHackCrashReport.JavaScript $(HACKDIR) && \
|
||||
chmod 0500 $(HACKDIR)/NetHackCrashReport.JavaScript )
|
||||
|
||||
else ifdef WANT_SOURCE_INSTALL
|
||||
|
||||
@@ -348,7 +353,11 @@ CHGRP=/usr/bin/true
|
||||
GAMEPERM = 0700
|
||||
VARFILEPERM = 0600
|
||||
VARDIRPERM = 0700
|
||||
POSTINSTALL+= sys/unix/hints/macosx.sh editsysconf sys/unix/sysconf $(HACKDIR)/sysconf;
|
||||
POSTINSTALL+= sys/unix/hints/macosx.sh editsysconf sys/unix/sysconf $(HACKDIR)/sysconf; \
|
||||
util/makedefs --grep-defined CRASHREPORT && \
|
||||
( cp win/macosx/NetHackCrashReport.JavaScript $(HACKDIR) && \
|
||||
chmod 0500 $(HACKDIR)/NetHackCrashReport.JavaScript )
|
||||
|
||||
# We can use "make all" to build the whole thing - but it misses some things:
|
||||
MOREALL=$(MAKE) install
|
||||
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
||||
@@ -372,11 +381,14 @@ ifdef ($(WANT_DEFAULT),X11)
|
||||
PREINSTALL+= cp -n win/X11/nethack.rc ~/.nethackrc || true;
|
||||
endif # WANT_DEFAULT X11
|
||||
|
||||
PREINSTALL+= mkdir $(SHELLDIR);
|
||||
PREINSTALL+= (mkdir $(SHELLDIR) || true);
|
||||
POSTINSTALL+= sys/unix/hints/macosx.sh editsysconf sys/unix/sysconf $(HACKDIR)/sysconf; \
|
||||
$(CHOWN) $(GAMEUID) $(HACKDIR)/sysconf; \
|
||||
$(CHGRP) $(GAMEGRP) $(HACKDIR)/sysconf; \
|
||||
chmod $(VARFILEPERM) $(HACKDIR)/sysconf;
|
||||
chmod $(VARFILEPERM) $(HACKDIR)/sysconf; \
|
||||
util/makedefs --grep-defined CRASHREPORT && \
|
||||
( cp win/macosx/NetHackCrashReport.JavaScript $(HACKDIR) && \
|
||||
chmod 0500 $(HACKDIR)/NetHackCrashReport.JavaScript )
|
||||
|
||||
endif # !WANT_SHARE_INSTALL
|
||||
|
||||
@@ -719,6 +731,7 @@ build_package_root:
|
||||
install -p doc/recover.6 $(PKGROOT_UG)/man/man6
|
||||
install -p doc/Guidebook $(PKGROOT_UG)/doc
|
||||
install -p dat/nhdat $(PKGROOT_UGLN)
|
||||
#XXX no code to package NetHackCrashReport.JavaScript
|
||||
sys/unix/hints/macosx.sh editsysconf sys/unix/sysconf $(PKGROOT_UGLN)/sysconf
|
||||
cd dat; install -p $(DATNODLB) ../$(PKGROOT_UGLN)
|
||||
# XXX these files should be somewhere else for good Mac form
|
||||
|
||||
Reference in New Issue
Block a user