Compare commits

..

6 Commits

Author SHA1 Message Date
3bea18708f Bump version, update README.adoc
All checks were successful
Alpine 3.20 Success
Arch Linux Success
Arch Linux AUR Success
Debian Bookworm Success
Fedora 39 Success
OpenBSD 7.5 Success
openSUSE 15.5 Success
2024-12-23 16:53:54 +01:00
ed8ba147ba Improve packaging directory structure
All checks were successful
Arch Linux Success
Arch Linux AUR Success
Debian Bookworm Success
Fedora 39 Success
OpenBSD 7.5 Success
openSUSE 15.5 Success
Alpine 3.20 Success
2024-12-23 16:53:54 +01:00
c221a00c33 Improve MSI package names
All checks were successful
Alpine 3.20 Success
Arch Linux Success
Arch Linux AUR Success
Debian Bookworm Success
Fedora 39 Success
OpenBSD 7.5 Success
openSUSE 15.5 Success
2024-12-23 16:12:35 +01:00
192ffa0de9 Update a comment 2024-07-27 08:43:56 +02:00
bac9fce4e0 Fix argument order in g_malloc0_n() usages
Some checks failed
Arch Linux Success
Arch Linux AUR Success
Debian Bookworm Success
Fedora 39 Success
OpenBSD 7.5 Success
openSUSE 15.5 Success
Alpine 3.20 Scripts failed
2024-07-10 00:30:27 +02:00
2e9ea9b4e2 Do not rely on a particular CWD on Windows
on_app_activate() currently makes use of the CWD we are launched with,
so I'm choosing to not enforce it globally.
2024-07-10 00:29:49 +02:00
8 changed files with 35 additions and 9 deletions

View File

@@ -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:

View File

@@ -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">

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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));

View File

@@ -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,

View File

@@ -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.