AM_GNU_GETTEXT([external]) # Gettext, link to system libintl
IT_PROG_INTLTOOL # Intltool
PKG_PROG_PKG_CONFIG # pkg_config
-GTK_DOC_CHECK(1.9) # Gtk-Doc
+GTK_DOC_CHECK(1.11) # Gtk-Doc 1.11 required
# Other utilities used in this package's various make scripts
AC_PROG_AWK
AC_PATH_PROG([PERL], [perl]) # Perl
MKTMPL_OPTIONS =
# Extra options to supply to gtkdoc-mkhtml
-MKHTML_OPTIONS =
+# The --path is because Gtk-doc is broken on non-distcheck vpath builds! Sigh.
+MKHTML_OPTIONS = --path="$(abs_builddir)"
# Extra options to supply to gtkdoc-fixref. Not normally needed.
FIXXREF_OPTIONS =
# Images to copy into HTML directory.
HTML_IMAGES = \
- $(srcdir)/images/fig1.png \
- $(srcdir)/images/fig2.png \
- $(srcdir)/images/fig3a.png \
- $(srcdir)/images/fig3b.png \
- $(srcdir)/images/fig3c.png \
- $(srcdir)/images/fig4a.png \
- $(srcdir)/images/fig4b.png \
- $(srcdir)/images/fig4c.png \
- $(srcdir)/images/fig5-7a.png \
- $(srcdir)/images/fig6.png \
- $(srcdir)/images/fig7b.png \
- $(srcdir)/images/fig7c.png \
- $(srcdir)/images/fig7d.png \
- $(srcdir)/images/fig7e.png \
- $(srcdir)/images/fig8a.png \
- $(srcdir)/images/fig8b.png \
- $(srcdir)/images/fig8c.png \
- $(srcdir)/images/fig9.png \
- $(srcdir)/images/fig10.png \
- $(srcdir)/images/fig11.png
+ images/fig1.png \
+ images/fig2.png \
+ images/fig3a.png \
+ images/fig3b.png \
+ images/fig3c.png \
+ images/fig4a.png \
+ images/fig4b.png \
+ images/fig4c.png \
+ images/fig5-7a.png \
+ images/fig6.png \
+ images/fig7b.png \
+ images/fig7c.png \
+ images/fig7d.png \
+ images/fig7e.png \
+ images/fig8a.png \
+ images/fig8b.png \
+ images/fig8c.png \
+ images/fig9.png \
+ images/fig10.png \
+ images/fig11.png
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
content_files = version.xml \
gitdocdir = $(datadir)/doc/$(PACKAGE)/git
dist_gitdoc_DATA = README.txt
-CLEANFILES = test/*.tmp
+CLEANFILES = version.h test/*.tmp
#TESTS = test/test.sh \
# test/Alabaster.gblorb test/Alabaster.walk test/Alabaster.golden
pkglib_LTLIBRARIES = nitfol.la
nitfol_la_SOURCES = automap.c automap.h binary.h copying.h debug.c debug.h \
decode.c decode.h errmesg.c errmesg.h globals.c globals.h hash.c hash.h \
- iff.c iff.h infix.c infix.h inform.y inform.h init.c init.h io.c \
- linkevil.h main.c main.h nio.h nitfol.h no_blorb.h objects.c objects.h \
- op_call.c op_call.h op_jmp.c op_jmp.h oplist.c oplist.h op_math.c \
- op_math.h op_save.c op_save.h op_table.c op_table.h op_v6.c op_v6.h \
- portfunc.c portfunc.h quetzal.c quetzal.h solve.c solve.h stack.c stack.h \
- struct.c struct.h tokenise.c tokenise.h undo.c undo.h z_io.c z_io.h \
- zscii.c zscii.h \
+ iff.c iff.h infix.c infix.h inform.y inform.h init.c init.h io.c io.h \
+ linkevil.h main.c main.h nitfol.h no_blorb.h objects.c objects.h op_call.c \
+ op_call.h op_jmp.c op_jmp.h oplist.c oplist.h op_math.c op_math.h \
+ op_save.c op_save.h op_table.c op_table.h op_v6.c op_v6.h portfunc.c \
+ portfunc.h quetzal.c quetzal.h solve.c solve.h stack.c stack.h struct.c \
+ struct.h tokenise.c tokenise.h undo.c undo.h z_io.c z_io.h zscii.c zscii.h \
$(GRAPHICS) \
$(BLORB) \
$(SOUND)
nitfol_TEXINFOS = dbg_help.texi options.texi
# man_MANS = nitfol.6
-BUILT_SOURCES = copying.c dbg_help.h startunix.c
-CLEANFILES = $(BUILT_SOURCES) dbg_help.texi nitfol.6 options.texi
+BUILT_SOURCES = copying.c dbg_help.h startunix.c dbg_help.texi options.texi
+CLEANFILES = $(BUILT_SOURCES) nitfol.6
dbg_help.h: inform.y y2help.pl
$(PERL) $(srcdir)/y2help.pl $(srcdir)/inform.y
-This is nitfol.info, produced by makeinfo version 4.13 from nitfol.texi.
+This is ../../../interpreters/nitfol/nitfol.info, produced by makeinfo
+version 4.13 from ../../../interpreters/nitfol/nitfol.texi.
INFO-DIR-SECTION Games
START-INFO-DIR-ENTRY
\1f
Tag Table:
-Node: Top\7f205
-Node: Invoking nitfol\7f1544
-Node: Features\7f8420
-Node: Preferences\7f9069
-Node: Infinite undo/redo\7f10425
-Node: Aliases\7f11199
-Node: Abbreviation Expansion\7f13723
-Node: Typo correction\7f14840
-Node: Automapping\7f16754
-Node: Quetzal\7f22533
-Node: Blorb\7f24254
-Node: Debugger\7f24680
-Node: Bugs\7f31655
-Node: Thanks\7f34710
-Node: Games Cited\7f35126
+Node: Top\7f263
+Node: Invoking nitfol\7f1602
+Node: Features\7f8478
+Node: Preferences\7f9127
+Node: Infinite undo/redo\7f10483
+Node: Aliases\7f11257
+Node: Abbreviation Expansion\7f13781
+Node: Typo correction\7f14898
+Node: Automapping\7f16812
+Node: Quetzal\7f22591
+Node: Blorb\7f24312
+Node: Debugger\7f24738
+Node: Bugs\7f31713
+Node: Thanks\7f34768
+Node: Games Cited\7f35184
\1f
End Tag Table
-DG_LOG_DOMAIN=\"Chimara\" \
-DLOCALEDIR=\""$(datadir)/locale"\" \
-DPLUGINDIR=\""$(pkglibdir)"\" \
+ -DPLUGINSOURCEDIR=\""$(abs_builddir)/../interpreters"\" \
-I$(top_srcdir)
libchimara_la_CFLAGS = @CHIMARA_CFLAGS@ $(AM_CFLAGS)
libchimara_la_LIBADD = @CHIMARA_LIBS@
/**
* chimara_glk_reset:
+ * @self: The ChimaraGLK widget to reset
+ *
* Resets the widget back to it's origional state. IE: it resets all the private data.
- * @param self: The ChimaraGLK widget to reset
*/
void
chimara_glk_reset(ChimaraGlk *self)
ChimaraIFInterpreter interpreter = priv->preferred_interpreter[format];
gchar *pluginfile = g_strconcat(plugin_names[interpreter], "." G_MODULE_SUFFIX, NULL);
+ gchar *pluginpath;
+#ifdef DEBUG
/* If there is a plugin in the source tree, use that */
- gchar *pluginpath = g_build_filename("..", "interpreters", plugin_names[interpreter], LT_OBJDIR, pluginfile, NULL);
+ pluginpath = g_build_filename(PLUGINSOURCEDIR, plugin_names[interpreter], LT_OBJDIR, pluginfile, NULL);
if( !g_file_test(pluginpath, G_FILE_TEST_EXISTS) )
{
g_free(pluginpath);
+#endif
pluginpath = g_build_filename(PLUGINDIR, pluginfile, NULL);
if( !g_file_test(pluginpath, G_FILE_TEST_EXISTS) )
{
g_set_error(error, CHIMARA_ERROR, CHIMARA_PLUGIN_NOT_FOUND, _("No appropriate %s interpreter plugin was found"), interpreter_names[interpreter]);
return FALSE;
}
+#ifdef DEBUG
}
+#endif
g_free(pluginfile);
/* Decide what arguments to pass to the interpreters; currently only the
GHashTable *current_text_buffer_styles = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_object_unref);
GtkTextTag *tag;
- /* Create the CSS file scanner */
- GScanner *scanner = g_scanner_new(NULL);
-
- int f = open(glk_data->css_file, O_RDONLY);
- g_return_if_fail(f != -1);
- g_scanner_input_file(scanner, f);
- scanner->input_name = glk_data->css_file;
- scanner->config->cset_identifier_first = G_CSET_a_2_z G_CSET_A_2_Z "#";
- scanner->config->cset_identifier_nth = G_CSET_a_2_z G_CSET_A_2_Z "-_" G_CSET_DIGITS;
- scanner->config->symbol_2_token = TRUE;
- scanner->config->cpair_comment_single = NULL;
- scanner->config->scan_float = FALSE;
-
/* Initialise the default styles for a text grid */
tag = gtk_text_tag_new("normal");
g_object_set(tag, "font-desc", glk_data->monospace_font_desc, NULL);
g_object_set(tag, "foreground", "#0000ff", "underline", PANGO_UNDERLINE_SINGLE, "underline-set", TRUE, NULL);
g_hash_table_insert(default_text_buffer_styles, "hyperlink", tag);
-
glk_data->default_styles->text_grid = default_text_grid_styles;
glk_data->default_styles->text_buffer = default_text_buffer_styles;
- /* Run the scanner over the CSS file, overriding defaults */
- while( g_scanner_peek_next_token(scanner) != G_TOKEN_EOF) {
- if( !style_accept_style_selector(scanner) )
- break;
+ /* Create the CSS file scanner */
+ GScanner *scanner = g_scanner_new(NULL);
+
+ int f = open(glk_data->css_file, O_RDONLY);
+ if(f != -1)
+ {
+ g_scanner_input_file(scanner, f);
+ scanner->input_name = glk_data->css_file;
+ scanner->config->cset_identifier_first = G_CSET_a_2_z G_CSET_A_2_Z "#";
+ scanner->config->cset_identifier_nth = G_CSET_a_2_z G_CSET_A_2_Z "-_" G_CSET_DIGITS;
+ scanner->config->symbol_2_token = TRUE;
+ scanner->config->cpair_comment_single = NULL;
+ scanner->config->scan_float = FALSE;
+
+ /* Run the scanner over the CSS file, overriding defaults */
+ while( g_scanner_peek_next_token(scanner) != G_TOKEN_EOF) {
+ if( !style_accept_style_selector(scanner) )
+ break;
+ }
+
+ g_scanner_destroy(scanner);
}
+ else
+ g_warning("Could not find CSS file");
/* Set the current style to a copy of the default style */
g_hash_table_foreach(default_text_grid_styles, style_table_copy, current_text_grid_styles);
glk_data->current_styles->text_grid = current_text_grid_styles;
glk_data->current_styles->text_buffer = current_text_buffer_styles;
- g_scanner_destroy(scanner);
-
glk_data->style_initialized = TRUE;
}
# List of source files containing translatable strings.
libchimara/chimara-glk.c
-tests/chimara.glade
+libchimara/chimara-if.c
+libchimara/init.c
+tests/chimara.ui
# but don't.
interpreters/nitfol/inform.c
-tests/chimara.ui
+tests/glulxercise.ui
test_multisession_LDADD = @TEST_LIBS@ $(top_builddir)/libchimara/libchimara.la
glulxercise_SOURCES = glulxercise.c error.c error.h
-glulxercise_CFLAGS = @TEST_CFLAGS@ $(AM_CFLAGS)
+glulxercise_CPPFLAGS = $(AM_CPPFLAGS) -DPACKAGE_SRC_DIR=\""$(srcdir)"\"
+glulxercise_CFLAGS = @TEST_CFLAGS@ $(AM_CFLAGS)
glulxercise_LDADD = @TEST_LIBS@ $(top_builddir)/libchimara/libchimara.la
plugin_loader_SOURCES = plugin-loader.c
gtk_tree_model_get(model, &iter, 1, &filename, -1);
g_object_unref(model);
- if( !chimara_if_run_game(CHIMARA_IF(w->interp), filename, &error) )
+ gchar *fullpath = g_build_filename(PACKAGE_SRC_DIR, filename, NULL);
+
+ if( !chimara_if_run_game(CHIMARA_IF(w->interp), fullpath, &error) )
{
error_dialog(GTK_WINDOW(w->window), error, "Error starting Glk library: ");
gtk_main_quit();
}
+ g_free(fullpath);
gtk_widget_set_sensitive(w->go, FALSE);
gtk_widget_set_sensitive(w->stop, TRUE);
gtk_init(&argc, &argv);
GtkBuilder *builder = gtk_builder_new();
- if(!gtk_builder_add_from_file(builder, "glulxercise.ui", &error))
+ if(!gtk_builder_add_from_file(builder, PACKAGE_SRC_DIR "/glulxercise.ui", &error))
{
error_dialog(NULL, error, "Failed to build interface: ");
return 1;
GError *error = NULL;
builder = gtk_builder_new();
- if( !gtk_builder_add_from_file(builder, "chimara.ui", &error) ) {
+ if( !gtk_builder_add_from_file(builder, PACKAGE_SRC_DIR "/chimara.ui", &error) ) {
error_dialog(NULL, error, "Error while building interface: ");
return;
}
gtk_action_group_add_action_with_accel(actiongroup, GTK_ACTION(load_object(ptr[0])), ptr[1]);
uimanager = gtk_ui_manager_new();
- if( !gtk_ui_manager_add_ui_from_file(uimanager, "chimara.menus", &error) ) {
+ if( !gtk_ui_manager_add_ui_from_file(uimanager, PACKAGE_SRC_DIR "/chimara.menus", &error) ) {
error_dialog(NULL, error, "Error while building interface: ");
return;
}