Compare commits
6 Commits
b34fe63198
...
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
3bea18708f
|
|||
|
ed8ba147ba
|
|||
|
c221a00c33
|
|||
|
192ffa0de9
|
|||
|
bac9fce4e0
|
|||
|
2e9ea9b4e2
|
@@ -38,6 +38,9 @@ You can get a package with the latest development version using Arch Linux's
|
|||||||
https://aur.archlinux.org/packages/fiv-git[AUR],
|
https://aur.archlinux.org/packages/fiv-git[AUR],
|
||||||
or as a https://git.janouch.name/p/nixexprs[Nix derivation].
|
or as a https://git.janouch.name/p/nixexprs[Nix derivation].
|
||||||
|
|
||||||
|
https://janouch.name/cd[Windows installers can be found here],
|
||||||
|
you want the _x86_64_ version.
|
||||||
|
|
||||||
Building and Running
|
Building and Running
|
||||||
--------------------
|
--------------------
|
||||||
Build-only dependencies:
|
Build-only dependencies:
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ q:lang(en):after { content: "’"; }
|
|||||||
<p class="details">
|
<p class="details">
|
||||||
<span id="author">Přemysl Eric Janouch</span><br>
|
<span id="author">Přemysl Eric Janouch</span><br>
|
||||||
<span id="email"><a href="mailto:p@janouch.name">p@janouch.name</a></span><br>
|
<span id="email"><a href="mailto:p@janouch.name">p@janouch.name</a></span><br>
|
||||||
<span id="revnumber">version 0.0.0,</span>
|
<span id="revnumber">version 1.0.0,</span>
|
||||||
<span id="revdate">2023-04-17</span>
|
<span id="revdate">2023-04-17</span>
|
||||||
|
|
||||||
<p class="figure"><img src="fiv.webp" alt="fiv in browser and viewer modes">
|
<p class="figure"><img src="fiv.webp" alt="fiv in browser and viewer modes">
|
||||||
|
|||||||
@@ -828,9 +828,18 @@ thumbnailer_next(Thumbnailer *t)
|
|||||||
"--thumbnail", fiv_thumbnail_sizes[self->item_size].thumbnail_spec_name,
|
"--thumbnail", fiv_thumbnail_sizes[self->item_size].thumbnail_spec_name,
|
||||||
"--", uri, NULL};
|
"--", uri, NULL};
|
||||||
|
|
||||||
|
GSubprocessLauncher *launcher =
|
||||||
|
g_subprocess_launcher_new(G_SUBPROCESS_FLAGS_STDOUT_PIPE);
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
gchar *prefix = g_win32_get_package_installation_directory_of_module(NULL);
|
||||||
|
g_subprocess_launcher_set_cwd(launcher, prefix);
|
||||||
|
g_free(prefix);
|
||||||
|
#endif
|
||||||
|
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
t->minion = g_subprocess_newv(t->target->icon ? argv_faster : argv_slower,
|
t->minion = g_subprocess_launcher_spawnv(
|
||||||
G_SUBPROCESS_FLAGS_STDOUT_PIPE, &error);
|
launcher, t->target->icon ? argv_faster : argv_slower, &error);
|
||||||
|
g_object_unref(launcher);
|
||||||
if (error) {
|
if (error) {
|
||||||
g_warning("%s", error->message);
|
g_warning("%s", error->message);
|
||||||
g_error_free(error);
|
g_error_free(error);
|
||||||
|
|||||||
@@ -185,15 +185,24 @@ info_spawn(GtkWidget *dialog, const char *path, GBytes *bytes_in)
|
|||||||
if (bytes_in)
|
if (bytes_in)
|
||||||
flags |= G_SUBPROCESS_FLAGS_STDIN_PIPE;
|
flags |= G_SUBPROCESS_FLAGS_STDIN_PIPE;
|
||||||
|
|
||||||
|
GSubprocessLauncher *launcher = g_subprocess_launcher_new(flags);
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
|
// Both to find wperl, and then to let wperl find the nearby exiftool.
|
||||||
|
gchar *prefix = g_win32_get_package_installation_directory_of_module(NULL);
|
||||||
|
g_subprocess_launcher_set_cwd(launcher, prefix);
|
||||||
|
g_free(prefix);
|
||||||
|
#endif
|
||||||
|
|
||||||
// TODO(p): Add a fallback to internal capabilities.
|
// TODO(p): Add a fallback to internal capabilities.
|
||||||
// The simplest is to specify the filename and the resolution.
|
// The simplest is to specify the filename and the resolution.
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GSubprocess *subprocess = g_subprocess_new(flags, &error,
|
GSubprocess *subprocess = g_subprocess_launcher_spawn(launcher, &error,
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
"wperl",
|
"wperl",
|
||||||
#endif
|
#endif
|
||||||
"exiftool", "-tab", "-groupNames", "-duplicates", "-extractEmbedded",
|
"exiftool", "-tab", "-groupNames", "-duplicates", "-extractEmbedded",
|
||||||
"--binary", "-quiet", "--", path, NULL);
|
"--binary", "-quiet", "--", path, NULL);
|
||||||
|
g_object_unref(launcher);
|
||||||
if (error) {
|
if (error) {
|
||||||
info_redirect_error(dialog, error);
|
info_redirect_error(dialog, error);
|
||||||
return;
|
return;
|
||||||
|
|||||||
2
fiv-io.c
2
fiv-io.c
@@ -976,7 +976,7 @@ static uint32_t *
|
|||||||
parse_mpf_index_entries(const struct tiffer *T, struct tiffer_entry *entry)
|
parse_mpf_index_entries(const struct tiffer *T, struct tiffer_entry *entry)
|
||||||
{
|
{
|
||||||
uint32_t count = entry->remaining_count / 16;
|
uint32_t count = entry->remaining_count / 16;
|
||||||
uint32_t *offsets = g_malloc0_n(sizeof *offsets, count + 1), *out = offsets;
|
uint32_t *offsets = g_malloc0_n(count + 1, sizeof *offsets), *out = offsets;
|
||||||
for (uint32_t i = 0; i < count; i++) {
|
for (uint32_t i = 0; i < count; i++) {
|
||||||
// 5.2.3.3.3. Individual Image Data Offset
|
// 5.2.3.3.3. Individual Image Data Offset
|
||||||
uint32_t offset = parse_mpf_mpentry(entry->p + i * 16, T);
|
uint32_t offset = parse_mpf_mpentry(entry->p + i * 16, T);
|
||||||
|
|||||||
@@ -962,6 +962,8 @@ gl_draw(FivView *self, cairo_t *cr)
|
|||||||
// XXX: Native GdkWindows send this to the software fallback path.
|
// XXX: Native GdkWindows send this to the software fallback path.
|
||||||
// XXX: This only reliably alpha blends when using the software fallback,
|
// XXX: This only reliably alpha blends when using the software fallback,
|
||||||
// such as with a native window, because 7237f5d in GTK+ 3 is a regression.
|
// such as with a native window, because 7237f5d in GTK+ 3 is a regression.
|
||||||
|
// (Introduced in 3.24.39, reverted in 3.24.42.)
|
||||||
|
//
|
||||||
// We had to resort to rendering the checkerboard pattern in the shader.
|
// We had to resort to rendering the checkerboard pattern in the shader.
|
||||||
// Unfortunately, it is hard to retrieve the theme colours from CSS.
|
// Unfortunately, it is hard to retrieve the theme colours from CSS.
|
||||||
GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(self));
|
GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(self));
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# vim: noet ts=4 sts=4 sw=4:
|
# vim: noet ts=4 sts=4 sw=4:
|
||||||
project('fiv', 'c',
|
project('fiv', 'c',
|
||||||
default_options : ['c_std=gnu99', 'warning_level=2'],
|
default_options : ['c_std=gnu99', 'warning_level=2'],
|
||||||
version : '0.1.0',
|
version : '1.0.0',
|
||||||
meson_version : '>=0.57')
|
meson_version : '>=0.57')
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
@@ -363,10 +363,12 @@ elif meson.is_cross_build()
|
|||||||
'ProjectURL' : application_url,
|
'ProjectURL' : application_url,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
msi = meson.project_name() + '-' + meson.project_version() + \
|
||||||
|
'-' + host_machine.cpu() + '.msi'
|
||||||
custom_target('package',
|
custom_target('package',
|
||||||
output : 'fiv.msi',
|
output : msi,
|
||||||
command : [meson.current_source_dir() / 'msys2-package.sh',
|
command : [meson.current_source_dir() / 'msys2-package.sh',
|
||||||
host_machine.cpu(), 'fiv.msi', wxs],
|
host_machine.cpu(), msi, wxs],
|
||||||
env : ['MESON_BUILD_ROOT=' + meson.current_build_dir(),
|
env : ['MESON_BUILD_ROOT=' + meson.current_build_dir(),
|
||||||
'MESON_SOURCE_ROOT=' + meson.current_source_dir()],
|
'MESON_SOURCE_ROOT=' + meson.current_source_dir()],
|
||||||
console : true,
|
console : true,
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
cd "$MESON_BUILD_ROOT"
|
cd "$MESON_BUILD_ROOT"
|
||||||
arch=$1 msi=$2 files=package-files.wxs destdir=$(pwd)/package
|
arch=$1 msi=$2 files=package-files.wxs
|
||||||
|
destdir=$(pwd)/package/${msi%.*}
|
||||||
shift 2
|
shift 2
|
||||||
|
|
||||||
# We're being passed host_machine.cpu(), which will be either x86 or x86_64.
|
# We're being passed host_machine.cpu(), which will be either x86 or x86_64.
|
||||||
|
|||||||
Reference in New Issue
Block a user