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:
nhkeni
2023-08-07 13:26:27 -04:00
parent 9f16eaa0a5
commit 8c095b009a
30 changed files with 633 additions and 204 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 extern.h $NHDT-Date: 1689629242 2023/07/17 21:27:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1279 $ */
/* NetHack 3.7 extern.h $NHDT-Date: 1693359531 2023/08/30 01:38:51 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.1281 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -24,7 +24,7 @@ extern unsigned FITSuint_(unsigned long long, const char *, int);
/* ### allmain.c ### */
extern void early_init(void);
extern void early_init(int, char *[]);
extern void moveloop_core(void);
extern void moveloop(boolean);
extern void stop_occupation(void);
@@ -814,6 +814,11 @@ extern struct kinfo *find_delayed_killer(int);
extern void dealloc_killer(struct kinfo *);
extern void save_killers(NHFILE *);
extern void restore_killers(NHFILE *);
#ifdef CRASHREPORT
extern boolean submit_web_report(const char *, char *);
extern void crashreport_init(int, char *[]);
extern void crashreport_bidshow(void);
#endif
extern char *build_english_list(char *);
#if defined(PANICTRACE) && !defined(NO_SIGNAL)
extern void panictrace_setsignals(boolean);