aboutsummaryrefslogtreecommitdiff
path: root/fiv.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-08-11 11:36:31 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-08-11 16:10:04 +0200
commit1a163bdb8b4878f456fb04b33978a92f3fcd8e91 (patch)
tree52d44049003bc1a338244282f8f77a1b4eaf6f47 /fiv.c
parentcf19f8287547c523f65879b9e9477950c81a9eed (diff)
downloadfiv-1a163bdb8b4878f456fb04b33978a92f3fcd8e91.tar.gz
fiv-1a163bdb8b4878f456fb04b33978a92f3fcd8e91.tar.xz
fiv-1a163bdb8b4878f456fb04b33978a92f3fcd8e91.zip
Resolve a few issues with MSYS2 cross-builds
- Fix launching of subprocesses (missing gspawn helpers). - Discard unused GSettings schemas. - Make the program find its user guide. - Bundle a somewhat suboptimal version of ExifTool.
Diffstat (limited to 'fiv.c')
-rw-r--r--fiv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fiv.c b/fiv.c
index 92047bc..670661e 100644
--- a/fiv.c
+++ b/fiv.c
@@ -1166,7 +1166,13 @@ static void
show_help_contents(void)
{
gchar *filename = g_strdup_printf("%s.html", PROJECT_NAME);
+#ifdef G_OS_WIN32
+ gchar *prefix = g_win32_get_package_installation_directory_of_module(NULL);
+ gchar *path = g_build_filename(prefix, PROJECT_DOCDIR, filename, NULL);
+ g_free(prefix);
+#else
gchar *path = g_build_filename(PROJECT_DOCDIR, filename, NULL);
+#endif
g_free(filename);
GError *error = NULL;
gchar *uri = g_filename_to_uri(path, NULL, &error);
@@ -1945,7 +1951,7 @@ output_thumbnail(gchar **uris, gboolean extract, const char *size_arg)
#ifdef G_OS_WIN32
_setmode(fileno(stdout), _O_BINARY);
-#endif // G_OS_WIN32
+#endif
GError *error = NULL;
GFile *file = g_file_new_for_uri(uris[0]);