diff options
Diffstat (limited to 'src/cgg.c')
| -rw-r--r-- | src/cgg.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -108,6 +108,7 @@ main (int argc, char* argv[]) time_t time_start = time (NULL); time_t time_stop; gchar *s; + gchar *templates_basedir; TPathInfo *path_info; /* @@ -141,10 +142,17 @@ main (int argc, char* argv[]) fprintf (stderr, "error: could not parse gallery settings file\n"); return -2; } + setup->design = parse_design_setup_xml (setup->design_setup_file); + if (! setup->design) { + fprintf (stderr, "error: could not parse design setup file\n"); + return -6; + } + if (! validate_design_setup (setup->design)) + return -7; - setup->real_templates_dir = find_templates_directory (setup); - if (setup->real_templates_dir == NULL) { - fprintf (stderr, "error: could not determine templates directory\n"); + templates_basedir = find_design_directory (setup); + if (templates_basedir == NULL) { + fprintf (stderr, "error: could not determine design templates directory\n"); return -3; } @@ -172,6 +180,7 @@ main (int argc, char* argv[]) setup->override_nofullsize = fullsize; path_info = g_malloc0 (sizeof (TPathInfo)); + path_info->templates_root = templates_basedir; path_info->source_root = g_strdup (source_dir); path_info->src_dir = g_strdup (source_dir); path_info->dest_root = g_strdup (dst_dir); |
