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 allmain.c $NHDT-Date: 1688415115 2023/07/03 20:11:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.219 $ */
|
||||
/* NetHack 3.7 allmain.c $NHDT-Date: 1693359544 2023/08/30 01:39:04 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.220 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -26,9 +26,14 @@ static void debug_fields(const char *);
|
||||
static void dump_enums(void);
|
||||
#endif
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
early_init(void)
|
||||
early_init(int argc UNUSED, char *argv[] UNUSED)
|
||||
{
|
||||
#ifdef CRASHREPORT
|
||||
// Do this as early as possible, but let ports do other things first.
|
||||
crashreport_init(argc, argv);
|
||||
#endif
|
||||
decl_globals_init();
|
||||
objects_globals_init();
|
||||
monst_globals_init();
|
||||
@@ -906,6 +911,9 @@ static const struct early_opt earlyopts[] = {
|
||||
#ifdef WIN32
|
||||
{ ARG_WINDOWS, "windows", 4, TRUE },
|
||||
#endif
|
||||
#ifdef CRASHREPORT
|
||||
{ ARG_BIDSHOW, "bidshow", 7, FALSE },
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -990,6 +998,11 @@ argcheck(int argc, char *argv[], enum earlyarg e_arg)
|
||||
dump_glyphids();
|
||||
return 2;
|
||||
#endif
|
||||
#ifdef CRASHREPORT
|
||||
case ARG_BIDSHOW:
|
||||
crashreport_bidshow();
|
||||
return 2;
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
case ARG_WINDOWS:
|
||||
if (extended_opt) {
|
||||
|
||||
Reference in New Issue
Block a user