* The user manual, in its Info and HTML versions, now includes
graphical output examples and screenshots.
+ * New command SHOW SYSTEM to easily print system information useful
+ in bug reports.
+
* Build changes:
- Perl is no longer required to build.
doc/pspp-figures/independent-samples-t.sps \
doc/pspp-figures/reliability.sps \
doc/pspp-figures/select-if.sps \
+ doc/pspp-figures/show-system.sps \
doc/pspp-figures/sort-cases.sps \
doc/pspp-figures/split.sps \
doc/pspp-figures/temporary.sps \
A high-quality bug report allows the developers to understand,
reproduce, and ultimately fix the problem. We recommend
including the following:
+
@itemize @bullet
-@item The version of @pspp{} in which you encountered the problem
-That means the precise version number. ``The latest version''
-is often too ambiguous because
-releases happen quickly, and bug reports are archived indefinitely.
+@item
+The version of @pspp{} in which you encountered the problem. It also
+often helps to know some information about how @pspp{} was built.
+
+With @pspp{} command syntax, @code{SHOW SYSTEM.} will output
+everything we ordinarily need. In the PSPPIRE GUI,
+@clicksequence{Help @click{} System Info} produces the same output.
+
@item The operating system and type of computer on which it is running.
+
@item A sample of the syntax which causes the problem or, if it is a user
interface problem, the sequence of steps required to reproduce it.
Screenshots can be helpful for reporting bugs in the graphical user
interface, especially since GUI bugs can arise on some systems but
not others, but they do not usually help fixing other kinds of bugs.
+
@item A description of what you think is wrong: What happened that you
- didn't expect, and what did you expect to happen?
+ didn't expect, and what did you expect to happen? Include any error
+ messages that @pspp{} output.
@end itemize
Here is one example of a bug report that includes all of the elements above:
@cartouche
@example
-When I run PSPP 0.8.4 on my GNU/Linux system, executing the following
-syntax:
+I'm running PSPP on a system where @code{SHOW SYSTEM.} outputs the
+following:
+
+@psppoutput{show-system}
+
+The bug I'm seeing is that executing the following syntax:
DATA LIST FREE /x *.
BEGIN DATA.
--- /dev/null
+SHOW SYSTEM.
\ No newline at end of file
[MXWARNS]
[N]
[SCOMPRESSION]
+ [SYSTEM]
[TEMPDIR]
[UNDEFINED]
[VERSION]
@item @subcmd{N}
Reports the number of cases in the active dataset. The reported number is not
weighted. If no dataset is defined, then @samp{Unknown} is reported.
+@item @subcmd{SYSTEM}
+Shows information about how PSPP was built. This information is
+useful in bug reports. @xref{Bugs}, for details.
@item @subcmd{TEMPDIR}
Shows the path of the directory where temporary files are stored.
@item @subcmd{VERSION}
#include <time.h>
#include <unistd.h>
-#include "gl/ftoastr.h"
-#include "gl/vasnprintf.h"
-
#include "data/casereader.h"
#include "data/data-in.h"
#include "data/data-out.h"
#include "output/journal.h"
#include "output/pivot-table.h"
+#include "gl/ftoastr.h"
#include "gl/minmax.h"
+#include "gl/relocatable.h"
+#include "gl/vasnprintf.h"
#include "gl/xalloc.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
+#define N_(msgid) (msgid)
struct setting
{
return xstrdup (output_get_subtitle ());
}
-static char *
-show_SYSTEM (const struct dataset *ds UNUSED)
-{
- return xstrdup (host_system);
-}
-
static char *
show_TEMPDIR (const struct dataset *ds UNUSED)
{
{
fputs (copyleft, stdout);
}
+
+static void
+add_row (struct pivot_table *table, const char *attribute,
+ const char *value)
+{
+ int row = pivot_category_create_leaf (table->dimensions[0]->root,
+ pivot_value_new_text (attribute));
+ if (value)
+ pivot_table_put1 (table, row, pivot_value_new_user_text (value, -1));
+}
+
+static void
+show_system (const struct dataset *ds UNUSED)
+{
+ struct pivot_table *table = pivot_table_create (N_("System Information"));
+ pivot_dimension_create (table, PIVOT_AXIS_ROW, N_("Attribute"));
+
+ add_row (table, N_("Version"), version);
+ add_row (table, N_("Host System"), host_system);
+ add_row (table, N_("Build System"), build_system);
+ add_row (table, N_("Locale Directory"), relocate (locale_dir));
+ add_row (table, N_("Compiler Version"),
+#ifdef __VERSION__
+ __VERSION__
+#else
+ "Unknown"
+#endif
+ );
+ pivot_table_submit (table);
+}
\f
static const struct setting settings[] = {
{ "BASETEXTDIRECTION", parse_BASETEXTDIRECTION, NULL },
{ "SCOMPRESSION", parse_SCOMPRESSION, show_SCOMPRESSION },
{ "SEED", parse_SEED, NULL },
{ "SMALL", parse_SMALL, show_SMALL },
- { "SYSTEM", NULL, show_SYSTEM },
{ "TEMPDIR", NULL, show_TEMPDIR },
{ "TNUMBERS", parse_TNUMBERS, show_TNUMBERS },
{ "TVARS", parse_TVARS, show_TVARS },
show_warranty (ds);
else if (lex_match_id (lexer, "COPYING") || lex_match_id (lexer, "LICENSE"))
show_copying (ds);
+ else if (lex_match_id (lexer, "SYSTEM"))
+ show_system (ds);
else if (lex_match_id (lexer, "TITLE"))
{
struct setting s = { .name = "TITLE", .show = show_TITLE };
#include "libpspp/copyleft.h"
#include "libpspp/message.h"
#include "libpspp/version.h"
+#include "ui/gui/executor.h"
#include "ui/gui/help-menu.h"
+#include "ui/gui/psppire-data-window.h"
#include "gl/configmake.h"
#include "gl/relocatable.h"
}
#endif
+static void
+about_system_info (GtkMenuItem *mmm, GtkWindow *parent)
+{
+ execute_const_syntax_string (psppire_default_data_window (), "SHOW SYSTEM.");
+}
+
static void
about_new (GtkMenuItem *mmm, GtkWindow *parent)
{
GtkWidget *menu = gtk_menu_new ();
GtkWidget *help_about = gtk_menu_item_new_with_mnemonic (_("_About"));
+ GtkWidget *help_system_info = gtk_menu_item_new_with_mnemonic (_("_System Information"));
GtkWidget *help_ref = gtk_menu_item_new_with_mnemonic (_("_Reference Manual"));
GtkAccelGroup *accel_group = gtk_accel_group_new ();
GTK_ACCEL_VISIBLE);
gtk_menu_attach (GTK_MENU (menu), help_ref, 0, 1, 0, 1);
- gtk_menu_attach (GTK_MENU (menu), help_about, 0, 1, 1, 2);
+ gtk_menu_attach (GTK_MENU (menu), help_system_info, 0, 1, 1, 2);
+ gtk_menu_attach (GTK_MENU (menu), help_about, 0, 1, 2, 3);
g_signal_connect (help_about, "activate", G_CALLBACK (about_new), toplevel);
+ g_signal_connect (help_system_info, "activate", G_CALLBACK (about_system_info), toplevel);
g_signal_connect (help_ref, "activate", G_CALLBACK (reference_manual), NULL);
g_object_set (menuitem, "submenu", menu, NULL);