Bundle a fuller installation of Perl/ExifTool
wperl is necessary to get rid of the console window, which is merely one of several issues with the PAR Packer-based ExifTool bundle used in the last commit. The Perl installation could be heavily trimmed down, but it seems to require a very manual process.
This commit is contained in:
parent
1a163bdb8b
commit
7cbd24dd2f
|
@ -61,7 +61,7 @@ Windows
|
||||||
'fiv' can be cross-compiled for Windows, provided that you install a bunch of
|
'fiv' can be cross-compiled for Windows, provided that you install a bunch of
|
||||||
dependencies listed at the beginning of 'msys2-cross-configure.sh',
|
dependencies listed at the beginning of 'msys2-cross-configure.sh',
|
||||||
plus rsvg-convert from librsvg2, and icotool from icoutils.
|
plus rsvg-convert from librsvg2, and icotool from icoutils.
|
||||||
Beware that the build will take up close to a gigabyte of disk space.
|
Beware that the build will take up about a gigabyte of disk space.
|
||||||
|
|
||||||
$ sh -e msys2-cross-configure.sh builddir
|
$ sh -e msys2-cross-configure.sh builddir
|
||||||
$ meson install -C builddir
|
$ meson install -C builddir
|
||||||
|
|
|
@ -188,9 +188,12 @@ info_spawn(GtkWidget *dialog, const char *path, GBytes *bytes_in)
|
||||||
// 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, "exiftool",
|
GSubprocess *subprocess = g_subprocess_new(flags, &error,
|
||||||
"-tab", "-groupNames", "-duplicates", "-extractEmbedded", "--binary",
|
#ifdef G_OS_WIN32
|
||||||
"-quiet", "--", path, NULL);
|
"wperl",
|
||||||
|
#endif
|
||||||
|
"exiftool", "-tab", "-groupNames", "-duplicates", "-extractEmbedded",
|
||||||
|
"--binary", "-quiet", "--", path, NULL);
|
||||||
if (error) {
|
if (error) {
|
||||||
info_redirect_error(dialog, error);
|
info_redirect_error(dialog, error);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -34,10 +34,11 @@ fetch() {
|
||||||
[ -f "packages/$name" ] || curl -#o "packages/$name" "$repository/$name"
|
[ -f "packages/$name" ] || curl -#o "packages/$name" "$repository/$name"
|
||||||
done
|
done
|
||||||
|
|
||||||
name=exiftool-$(curl -# https://exiftool.org/ver.txt).zip
|
version=$(curl -# https://exiftool.org/ver.txt)
|
||||||
status Fetching "$name"
|
name=exiftool-$version.tar.gz remotename=Image-ExifTool-$version.tar.gz
|
||||||
[ -f "$name" ] || curl -#o "$name" "https://exiftool.org/$name"
|
status Fetching "$remotename"
|
||||||
ln -sf "$name" exiftool.zip
|
[ -f "$name" ] || curl -#o "$name" "https://exiftool.org/$remotename"
|
||||||
|
ln -sf "$name" exiftool.tar.gz
|
||||||
}
|
}
|
||||||
|
|
||||||
verify() {
|
verify() {
|
||||||
|
@ -54,7 +55,10 @@ extract() {
|
||||||
do bsdtar -xf "$i" --strip-components 1 mingw64
|
do bsdtar -xf "$i" --strip-components 1 mingw64
|
||||||
done
|
done
|
||||||
|
|
||||||
bsdtar -xOf exiftool.zip > bin/exiftool.exe
|
bsdtar -xf exiftool.tar.gz
|
||||||
|
mv Image-ExifTool-*/exiftool bin
|
||||||
|
mv Image-ExifTool-*/lib/* lib/perl5/site_perl
|
||||||
|
rm -rf Image-ExifTool-*
|
||||||
}
|
}
|
||||||
|
|
||||||
configure() {
|
configure() {
|
||||||
|
@ -111,6 +115,7 @@ cd "$msys2_root"
|
||||||
dbsync
|
dbsync
|
||||||
fetch mingw-w64-x86_64-gtk3 mingw-w64-x86_64-lcms2 \
|
fetch mingw-w64-x86_64-gtk3 mingw-w64-x86_64-lcms2 \
|
||||||
mingw-w64-x86_64-libraw mingw-w64-x86_64-libheif \
|
mingw-w64-x86_64-libraw mingw-w64-x86_64-libheif \
|
||||||
|
mingw-w64-x86_64-perl mingw-w64-x86_64-perl-win32-api \
|
||||||
mingw-w64-x86_64-libwinpthread-git # Because we don't do "provides"?
|
mingw-w64-x86_64-libwinpthread-git # Because we don't do "provides"?
|
||||||
verify
|
verify
|
||||||
extract
|
extract
|
||||||
|
|
|
@ -3,15 +3,17 @@ export LC_ALL=C
|
||||||
cd "$MESON_INSTALL_DESTDIR_PREFIX"
|
cd "$MESON_INSTALL_DESTDIR_PREFIX"
|
||||||
msys2_root=$1
|
msys2_root=$1
|
||||||
|
|
||||||
# Copy libraries we depend on, and a few files required by GLib/GTK+.
|
# Copy binaries we directly or indirectly depend on.
|
||||||
cp -p "$msys2_root"/bin/exiftool.exe .
|
|
||||||
cp -p "$msys2_root"/bin/*.dll .
|
cp -p "$msys2_root"/bin/*.dll .
|
||||||
|
cp -p "$msys2_root"/bin/wperl.exe .
|
||||||
|
cp -p "$msys2_root"/bin/exiftool .
|
||||||
# The console helper is only useful for debug builds.
|
# The console helper is only useful for debug builds.
|
||||||
cp -p "$msys2_root"/bin/gspawn-*-helper*.exe .
|
cp -p "$msys2_root"/bin/gspawn-*-helper*.exe .
|
||||||
cp -pR "$msys2_root"/etc/ .
|
cp -pR "$msys2_root"/etc/ .
|
||||||
|
|
||||||
mkdir -p lib
|
mkdir -p lib
|
||||||
cp -pR "$msys2_root"/lib/gdk-pixbuf-2.0/ lib
|
cp -pR "$msys2_root"/lib/gdk-pixbuf-2.0/ lib
|
||||||
|
cp -pR "$msys2_root"/lib/perl5/ lib
|
||||||
mkdir -p share/glib-2.0/schemas
|
mkdir -p share/glib-2.0/schemas
|
||||||
cp -pR "$msys2_root"/share/glib-2.0/schemas/*.Settings.* share/glib-2.0/schemas
|
cp -pR "$msys2_root"/share/glib-2.0/schemas/*.Settings.* share/glib-2.0/schemas
|
||||||
mkdir -p share
|
mkdir -p share
|
||||||
|
@ -36,8 +38,7 @@ awk 'function whitelist(binary) {
|
||||||
orphans[$0]++
|
orphans[$0]++
|
||||||
while (("find . -type f -path \"./*.[Ee][Xx][Ee]\"" | getline) > 0)
|
while (("find . -type f -path \"./*.[Ee][Xx][Ee]\"" | getline) > 0)
|
||||||
whitelist($0)
|
whitelist($0)
|
||||||
while (("find ./lib/gdk-pixbuf-2.0 -type f " \
|
while (("find ./lib -type f -path \"./*.[Dd][Ll][Ll]\"" | getline) > 0)
|
||||||
"-path \"./*.[Dd][Ll][Ll]\"" | getline) > 0)
|
|
||||||
whitelist($0)
|
whitelist($0)
|
||||||
for (library in orphans)
|
for (library in orphans)
|
||||||
print library
|
print library
|
||||||
|
|
Loading…
Reference in New Issue