diff --git a/contrib/libdav1d/A00-add-cross-file.patch b/contrib/libdav1d/A00-add-cross-file.patch deleted file mode 100644 index a629d98e6fd2..000000000000 --- a/contrib/libdav1d/A00-add-cross-file.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -Naur /dev/null dav1d-f1b756ef5bdc0bb759b2b140f15362fec024c1ff/x86_64-w64-mingw32.meson ---- /dev/null 2019-02-01 11:36:25.027425148 -0500 -+++ dav1d-f1b756ef5bdc0bb759b2b140f15362fec024c1ff/x86_64-w64-mingw32.meson 2019-02-01 12:10:45.582462644 -0500 -@@ -0,0 +1,15 @@ -+[binaries] -+c = 'x86_64-w64-mingw32-gcc' -+cpp = 'x86_64-w64-mingw32-g++' -+ar = 'x86_64-w64-mingw32-ar' -+strip = 'x86_64-w64-mingw32-strip' -+windres = 'x86_64-w64-mingw32-windres' -+ -+[properties] -+c_link_args = ['-static-libgcc'] -+ -+[host_machine] -+system = 'windows' -+cpu_family = 'x86_64' -+cpu = 'x86_64' -+endian = 'little' -diff -Naur /dev/null dav1d-f1b756ef5bdc0bb759b2b140f15362fec024c1ff/aarch64-w64-mingw32.meson ---- /dev/null 2019-02-01 11:36:25.027425148 -0500 -+++ dav1d-f1b756ef5bdc0bb759b2b140f15362fec024c1ff/aarch64-w64-mingw32.meson 2019-02-01 12:10:45.582462644 -0500 -@@ -0,0 +1,15 @@ -+[binaries] -+c = 'aarch64-w64-mingw32-gcc' -+cpp = 'aarch64-w64-mingw32-g++' -+ar = 'aarch64-w64-mingw32-ar' -+strip = 'aarch64-w64-mingw32-strip' -+windres = 'aarch64-w64-mingw32-windres' -+ -+[properties] -+c_link_args = ['-static-libgcc'] -+ -+[host_machine] -+system = 'windows' -+cpu_family = 'aarch64' -+cpu = 'aarch64' -+endian = 'little' diff --git a/contrib/libdav1d/A01-disable-cross-posix-memalign.patch b/contrib/libdav1d/A01-disable-cross-posix-memalign.patch deleted file mode 100644 index ac3b8faf865e..000000000000 --- a/contrib/libdav1d/A01-disable-cross-posix-memalign.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ur dav1d.orig/x86_64-w64-mingw32.meson dav1då/x86_64-w64-mingw32.meson ---- dav1d.orig/x86_64-w64-mingw32.meson 2020-05-07 20:41:33.000000000 -0400 -+++ dav1d/x86_64-w64-mingw32.meson 2020-05-07 20:44:38.000000000 -0400 -@@ -7,6 +7,7 @@ - - [properties] - c_link_args = ['-static-libgcc'] -+has_function_posix_memalign = false - - [host_machine] - system = 'windows' diff --git a/contrib/libdav1d/P00-darwin-add-applesi-cross-file.patch b/contrib/libdav1d/P00-darwin-add-applesi-cross-file.patch deleted file mode 100644 index def365bdad74..000000000000 --- a/contrib/libdav1d/P00-darwin-add-applesi-cross-file.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 3827c5676f4701af1b4995033d52768f9e225ec2 Mon Sep 17 00:00:00 2001 -Date: Mon, 1 Jun 2020 08:41:42 -0700 -Subject: [PATCH] arm64-cross-file - ---- - arm64-darwin-gcc.meson | 9 +++++++++ - 1 file changed, 9 insertions(+) - create mode 100644 arm64-darwin-gcc.meson - -diff --git a/arm64-darwin-gcc.meson b/arm64-darwin-gcc.meson -new file mode 100644 -index 0000000..2ddbe93 ---- /dev/null -+++ b/arm64-darwin-gcc.meson -@@ -0,0 +1,9 @@ -+[binaries] -+c = 'clang' -+cpp = 'clang++' -+[host_machine] -+system = 'darwin' -+cpu_family = 'aarch64' -+cpu = 'aarch64' -+endian = 'little' -+ --- -2.24.2 (Apple Git-127) diff --git a/contrib/libdav1d/P02-darwin-cross-file.patch b/contrib/libdav1d/P02-darwin-cross-file.patch deleted file mode 100644 index 00c3f6dc2c90..000000000000 --- a/contrib/libdav1d/P02-darwin-cross-file.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/x86_64-darwin-gcc.meson b/x86_64-darwin-gcc.meson -new file mode 100644 -index 0000000..2ddbe93 ---- /dev/null -+++ b/x86_64-darwin-gcc.meson -@@ -0,0 +1,9 @@ -+[binaries] -+c = 'clang' -+cpp = 'clang++' -+[host_machine] -+system = 'darwin' -+cpu_family = 'x86_64' -+cpu = 'x86_64' -+endian = 'little' -+ --- -2.24.2 (Apple Git-127) diff --git a/contrib/libdav1d/module.defs b/contrib/libdav1d/module.defs index b3c8c65b692d..94432b27f233 100644 --- a/contrib/libdav1d/module.defs +++ b/contrib/libdav1d/module.defs @@ -30,11 +30,11 @@ else endif ifeq (darwin,$(HOST.system)) - LIBDAV1D.CONFIGURE.extra += --cross-file=$(call fn.ABSOLUTE,$(LIBDAV1D.EXTRACT.dir/))/$(HOST.machine)-darwin-gcc.meson -Dc_args="-arch $(HOST.machine)" + LIBDAV1D.CONFIGURE.extra += --cross-file=$(call fn.ABSOLUTE,$(SRC/))make/cross/$(HOST.machine)-darwin-gcc.meson -Dc_args="-arch $(HOST.machine)" endif ifeq (1-mingw,$(HOST.cross)-$(HOST.system)) - LIBDAV1D.CONFIGURE.extra += --cross-file=$(call fn.ABSOLUTE,$(LIBDAV1D.EXTRACT.dir/))$(HOST.machine)-w64-mingw32.meson + LIBDAV1D.CONFIGURE.extra += --cross-file=$(call fn.ABSOLUTE,$(SRC/))make/cross/$(HOST.machine)-w64-mingw32.meson endif LIBDAV1D.BUILD.make = $(NINJA.exe) diff --git a/contrib/libdovi/module.defs b/contrib/libdovi/module.defs index ac461b712bf1..8b5bfd30dc0d 100644 --- a/contrib/libdovi/module.defs +++ b/contrib/libdovi/module.defs @@ -24,7 +24,8 @@ endif LIBDOVI.manifest = --manifest-path="$(LIBDOVI.EXTRACT.dir/)dolby_vision/Cargo.toml" LIBDOVI.prefix = --prefix "$(LIBDOVI.CONFIGURE.prefix)" -LIBDOVI.extra = --release --library-type staticlib $(LIBDOVI.prefix) $(LIBDOVI.target) +LIBDOVI.extra = --release --library-type staticlib $(LIBDOVI.prefix) $(LIBDOVI.target) \ + --pkgconfigdir "$(LIBDOVI.CONFIGURE.prefix)/lib/pkgconfig" LIBDOVI.BUILD.make = $(CARGO.exe) cbuild LIBDOVI.BUILD.extra = $(LIBDOVI.extra) diff --git a/gtk/ChangeLog b/gtk/ChangeLog deleted file mode 100644 index c9b8f0e4913d..000000000000 --- a/gtk/ChangeLog +++ /dev/null @@ -1,18 +0,0 @@ -2007-12-28 Johannes Schmid,,, - - reviewed by: - - * project.anjuta: - -2007-12-23 Johannes Schmid,,, - - reviewed by: - - * src/Makefile.am.tpl: - -2007-12-23 Johannes Schmid,,, - - reviewed by: - - * src/Makefile.am.tpl: - diff --git a/gtk/Jamfile b/gtk/Jamfile deleted file mode 100644 index 2d731247802b..000000000000 --- a/gtk/Jamfile +++ /dev/null @@ -1,45 +0,0 @@ -SubDir TOP gtk ; - -#rule GhbConfig -#{ -# Depends $(SUBDIR)/ghb : $(1) ; -#} -#actions GhbConfig -#{ -# cd `dirname $(1)` && -# ./configure --prefix=/usr -#} -#GhbConfig $(SUBDIR)/config.h : $(SUBDIR)/configure ; - -rule GhbApp -{ - Depends all : $(1) ; -} -actions GhbApp -{ - cd `dirname $(1)` && - $(MAKE) -} -GhbApp $(SUBDIR)/ghb : libhb.a $(SUBDIR)/config.h ; - -rule GhbClean -{ - Depends clean : $(1) ; -} -actions GhbClean -{ - cd $(2) && - $(MAKE) clean -} -GhbClean clean_dummy : $(SUBDIR) ; - -rule GhbInstall -{ - Depends install : $(1) ; -} -actions GhbInstall -{ - cd $(2) && - $(MAKE) install -} -GhbInstall install_dummy : $(SUBDIR) ; diff --git a/gtk/Makefile.am b/gtk/Makefile.am deleted file mode 100644 index e053fa2f398d..000000000000 --- a/gtk/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -## Process this file with automake to produce Makefile.in -## Created by Anjuta - -SUBDIRS = src po - -ghbdocdir = ${prefix}/share/doc/ghb - -EXTRA_DIST = $(ghbdoc_DATA) - -# Copy all the spec files. Of course, only one is actually used. -dist-hook: - for specfile in *.spec; do \ - if test -f $$specfile; then \ - cp -p $$specfile $(distdir); \ - fi \ - done - - -ACLOCAL_AMFLAGS = -I m4 diff --git a/gtk/TODO.tasks b/gtk/TODO.tasks deleted file mode 100644 index d1fa282d984c..000000000000 --- a/gtk/TODO.tasks +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/gtk/configure.ac b/gtk/configure.ac deleted file mode 100644 index 152c33379cd9..000000000000 --- a/gtk/configure.ac +++ /dev/null @@ -1,270 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl Created by Anjuta application wizard. - -AC_INIT([ghb], [0.1]) -AM_INIT_AUTOMAKE([-Wall 1.7.9 foreign dist-bzip2 dist-zip]) - -AM_MAINTAINER_MODE - -AC_USE_SYSTEM_EXTENSIONS -AC_PROG_CC(gcc clang) -AC_SEARCH_LIBS([strerror],[cposix]) -AC_PROG_CXX(g++ clang++) - -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_FILES([ -po/Makefile.in -Makefile -src/Makefile -]) - -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.19.8]) - -if test x"$CC_FOR_BUILD" = x; then - if test x"$cross_compiling" = x"yes"; then - AC_CHECK_PROGS(CC_FOR_BUILD, gcc clang, cc) - else - CC_FOR_BUILD="$CC" - fi -fi - -AC_SUBST(CC_FOR_BUILD) - -# introduce the optional configure parameter for the path of libXXX.a -AC_ARG_WITH(hb, - AS_HELP_STRING( - [--with-hb=prefix], - [try this for the hb-library prefix install directory] - ), - hb_PATHSET=1, - hb_PATHSET=0 -) - -if test $hb_PATHSET = 1 ; then - case ${with_hb} in - /*) - HBINC="-I$with_hb/libhb -I$with_hb/contrib/include" - LDFLAGS="$LDFLAGS -L$with_hb/libhb -L$with_hb/contrib/lib" - AC_SUBST(HB_DIR, "$with_hb") - ;; - *) - HBINC='-I$(top_srcdir)/'"$with_hb/libhb "'-I$(top_srcdir)/'"$with_hb/contrib/include" - LDFLAGS="$LDFLAGS "'-L$(top_srcdir)/'"$with_hb/libhb "'-L$(top_srcdir)/'"$with_hb/contrib/lib" - AC_SUBST(HB_DIR, '$(top_srcdir)/'"$with_hb") - ;; - esac -else - HBINC='-I$(top_srcdir)/'"../libhb "'-I$(top_srcdir)/'"../contrib/include" - LDFLAGS="$LDFLAGS "'-L$(top_srcdir)/'"../libhb "'-L$(top_srcdir)/'"../contrib/lib" - AC_SUBST(HB_DIR, '$(top_srcdir)/'"..") -fi - -AC_ARG_ENABLE(flatpak, - AS_HELP_STRING([--enable-flatpak], [enable flatpak packaging]), - use_flatpak=yes, use_flatpak=no) - -AC_ARG_ENABLE(dl, - AS_HELP_STRING([--enable-dl], [enable libdl]), - use_libdl=yes, use_libdl=no) - -AC_ARG_ENABLE(pthread, - AS_HELP_STRING([--enable-pthread], [enable libpthread]), - use_libpthread=yes, use_libpthread=no) - -AC_ARG_ENABLE(fdk-aac, - AS_HELP_STRING([--enable-fdk-aac], [enable fdk aac encoder]), - use_fdk_aac=yes, use_fdk_aac=no) - -AC_ARG_ENABLE(x265, - AS_HELP_STRING([--enable-x265], [enable x265 encoder]), - use_x265=yes, use_x265=no) - -AC_ARG_ENABLE(numa, - AS_HELP_STRING([--enable-numa], [enable x265 NUMA support]), - use_numa=yes, use_numa=no) - -AC_ARG_ENABLE(qsv, - AS_HELP_STRING([--enable-qsv], [enable QSV encoder]), - use_qsv=yes, use_qsv=no) - -AC_ARG_ENABLE(mf, - AS_HELP_STRING([--enable-mf], [enable MediaFoundation encoder]), - use_mf=yes, use_mf=no) - -AC_ARG_ENABLE(libdovi, - AS_HELP_STRING([--enable-libdovi], [enable libdovi]), - use_libdovi=yes, use_libdovi=no) - -AC_ARG_ENABLE(gst, - AS_HELP_STRING([--disable-gst], [disable gstreamer (live preview)]), - gst_disable=yes, gst_disable=no) - -AC_ARG_ENABLE(gtk4, - AS_HELP_STRING([--enable-gtk4], [enable building with gtk4]), - use_gtk4=yes, use_gtk4=no) - -# overwrite global variable (used for Makefile generation) -AC_SUBST(GLOBALCXXFLAGS, $CXXFLAGS ) -AC_SUBST(GLOBALLDFLAGS, $LDFLAGS ) - - - -dnl *************************************************************************** -dnl Internationalization -dnl *************************************************************************** -GETTEXT_PACKAGE=ghb -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) - -LT_INIT - -AC_SYS_LARGEFILE - -case $host in - *-*-mingw*) - GHB_PACKAGES="gthread-2.0 gio-2.0 gmodule-2.0" - mingw_flag=yes - ;; - *) - case "$host_os" in - linux*) - ;; - esac - GHB_PACKAGES="gthread-2.0 gio-2.0 gmodule-2.0" - mingw_flag=no - ;; -esac - -PKG_PROG_PKG_CONFIG - -HAVE_GTK_4_4=0 -HAVE_GTK_3_22=0 -if test "x$use_gtk4" = "xyes" ; then - PKG_CHECK_MODULES([gtk], [gtk4 >= 4.4], [HAVE_GTK_4_4=1], [HAVE_GTK_4_4=0]) -else - PKG_CHECK_MODULES([gtk], [gtk+-3.0 >= 3.22], [HAVE_GTK_3_22=1], [HAVE_GTK_3_22=0]) -fi - -if test "$HAVE_GTK_3_22" -eq 0 -a "$HAVE_GTK_4_4" -eq 0 ; then - AC_MSG_ERROR("GTK 3.22 or above is required) -fi -HB_LIBS="$HB_LIBS $gtk_LIBS" -HB_CPPFLAGS="$HB_CPPFLAGS $gtk_CFLAGS" - -PKG_CHECK_MODULES([GHB], [$GHB_PACKAGES]) -HB_LIBS="$HB_LIBS $GHB_LIBS" -HB_CPPFLAGS="$HB_CPPFLAGS $GHB_CFLAGS" - - -pkg_libxml2="libxml-2.0" -PKG_CHECK_MODULES([libxml2], [$pkg_libxml2], have_libxml2=yes, have_libxml2=no) -if test "x$have_libxml2" = "xyes" ; then - HB_LIBS="$HB_LIBS $libxml2_LIBS" - HB_CPPFLAGS="$HB_CPPFLAGS $libxml2_CFLAGS" -fi - -GST1_MODULES="gstreamer-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 gstreamer-pbutils-1.0" -if test "x$gst_disable" = "xno" ; then - PKG_CHECK_MODULES([gstreamer1], [$GST1_MODULES], use_gst1=yes, use_gst1=no) - if test "x$use_gst1" = "xyes" ; then - HB_LIBS="$HB_LIBS $gstreamer1_LIBS" - HB_CPPFLAGS="$HB_CPPFLAGS $gstreamer1_CFLAGS" - else - gst_disable="yes" - fi -fi - -if test "x$gst_disable" = "xno" ; then - CXXFLAGS="$CXXFLAGS -D_ENABLE_GST" - CFLAGS="$CFLAGS -D_ENABLE_GST" -fi - -AM_CONDITIONAL([GHB_GTK_4_4], [test "$HAVE_GTK_4_4" -eq 1]) -AM_CONDITIONAL([GHB_GTK_3_22], [test "$HAVE_GTK_3_22" -eq 1]) - -AM_CONDITIONAL([MINGW], [test "x$mingw_flag" = "xyes"]) - -HB_LIBS="$HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma -lzimg -lSvtAv1Enc" -HB_CPPFLAGS="$HB_CPPFLAGS $HBINC" - -PKG_CHECK_MODULES([x264], [x264], sys_x264=yes, sys_x264=no) -if test "x$sys_x264" = "xyes" ; then - HB_LIBS="$HB_LIBS $x264_LIBS" - HB_CPPFLAGS="$HB_CPPFLAGS $x264_CFLAGS" -else - # Assume it's built as a libhandbrake contrib package - HB_LIBS="$HB_LIBS -lx264" -fi - -if test "x$use_fdk_aac" = "xyes" ; then - HB_LIBS="$HB_LIBS -lfdk-aac" -fi - -if test "x$use_x265" = "xyes" ; then - HB_LIBS="$HB_LIBS -lx265" -fi - -if test "x$use_qsv" = "xyes" ; then - HB_LIBS="$HB_LIBS -lvpl" -fi - -if test "x$use_libdovi" = "xyes" ; then - HB_LIBS="$HB_LIBS -ldovi" -fi - -case $host in - *-*-mingw*) - if test "x$use_libdl" = "xyes" ; then - HB_LIBS="$HB_LIBS -ldl" - fi - if test "x$use_libpthread" = "xyes" ; then - HB_LIBS="$HB_LIBS -lpthread" - fi - HB_LIBS="$HB_LIBS -lbcrypt -lregex -luuid -lole32" - if test "x$use_mf" = "xyes" ; then - HB_LIBS="$HB_LIBS -lmfplat -lstrmiids" - fi - ;; - *-*-freebsd*) - HB_LIBS="$HB_LIBS -lpthread" - if test "x$use_qsv" = "xyes" ; then - HB_LIBS="$HB_LIBS -lva -lva-drm" - fi - ;; - *-*-netbsd*) - HB_LIBS="$HB_LIBS -pthread" - ;; - *-*-openbsd*) - HB_LIBS="$HB_LIBS -lpthread" - ;; - *-*-linux*) - if test "x$use_qsv" = "xyes" ; then - HB_LIBS="$HB_LIBS -lva -lva-drm" - fi - if test "x$use_x265" = "xyes" ; then - if test "x$use_numa" = "xyes" ; then - HB_LIBS="$HB_LIBS -lnuma" - fi - fi - HB_LIBS="$HB_LIBS -ldl -lpthread" - ;; - *) - HB_LIBS="$HB_LIBS -ldl -lpthread" - ;; -esac - -AM_CONDITIONAL([GHB_FLATPAK], [test "$use_flatpak" = "yes"]) - -if test "x$PYTHON" != "x" ; then - HB_PYTHON="$PYTHON" -else - HB_PYTHON="python3" -fi - -AC_SUBST(HB_PYTHON) -AC_SUBST(HB_LIBS) -AC_SUBST(HB_CPPFLAGS) - -AC_OUTPUT diff --git a/gtk/src/data_res.gresource.xml b/gtk/data/data_res.gresource.xml similarity index 100% rename from gtk/src/data_res.gresource.xml rename to gtk/data/data_res.gresource.xml diff --git a/gtk/src/fr.handbrake.ghb.desktop b/gtk/data/fr.handbrake.ghb.desktop.in similarity index 87% rename from gtk/src/fr.handbrake.ghb.desktop rename to gtk/data/fr.handbrake.ghb.desktop.in index a6a1499fa5f2..1e7545b12516 100644 --- a/gtk/src/fr.handbrake.ghb.desktop +++ b/gtk/data/fr.handbrake.ghb.desktop.in @@ -1,10 +1,11 @@ [Desktop Entry] Name=HandBrake GenericName=Media Transcoder -Comment=Transcodes DVD, Bluray, and other media +Comment=Transcodes DVD, Blu-ray, and other media Exec=ghb %f Icon=fr.handbrake.ghb Terminal=false Type=Application Categories=GTK;AudioVideo;Video; +Keywords=Format Converter;Video Encoder; MimeType=application/ogg;application/x-extension-mp4;application/x-flac;application/x-matroska;application/x-ogg;audio/ac3;audio/mp4;audio/mpeg;audio/ogg;audio/x-flac;audio/x-matroska;audio/x-mp2;audio/x-mp3;audio/x-mpeg;audio/x-vorbis;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/quicktime;video/vnd.divx;video/x-avi;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-wmv;video/ogg;video/x-ogm+ogg;video/x-theora+ogg;x-content/video-dvd;x-content/video-vcd;x-content/video-svcd; diff --git a/gtk/src/fr.handbrake.ghb.metainfo.xml.in.in b/gtk/data/fr.handbrake.ghb.metainfo.xml.in similarity index 61% rename from gtk/src/fr.handbrake.ghb.metainfo.xml.in.in rename to gtk/data/fr.handbrake.ghb.metainfo.xml.in index f2dbf790e28b..94a76b99d17e 100644 --- a/gtk/src/fr.handbrake.ghb.metainfo.xml.in.in +++ b/gtk/data/fr.handbrake.ghb.metainfo.xml.in @@ -1,12 +1,12 @@ - + fr.handbrake.ghb ghb jstebbins.hb_AT_gmail.com fr.handbrake.ghb.desktop CC0-1.0 - GPL-2.0+ + GPL-2.0 HandBrake Video Transcoder @@ -86,39 +86,43 @@ ghb + + keyboard + pointing + + + + touch + + + + medium + + - RELEASE_TAG + + +

Updated missing translations and fixed an issue with QSV hardware detection.

+
+
+ + +

Adds support for the AV1 codec, new encoder profiles and filters, and various user interface improvements.

+
+
+ + +

Fixed an issue with the source tarball that broke Flathub builds.

+
+
+ + +

Updated video engine to preserve chroma sample location information, and updated Intel Quick Sync to use the Intel oneAPI Video Processing Library.

+
+
- - - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - - + + +
diff --git a/gtk/src/internal_defaults.json.template b/gtk/data/internal_defaults.json similarity index 100% rename from gtk/src/internal_defaults.json.template rename to gtk/data/internal_defaults.json diff --git a/gtk/src/makedeps.py b/gtk/data/makedeps.py similarity index 99% rename from gtk/src/makedeps.py rename to gtk/data/makedeps.py index 58c29d4dc767..f23ea264d54c 100644 --- a/gtk/src/makedeps.py +++ b/gtk/data/makedeps.py @@ -3,6 +3,7 @@ import collections import sys import json +import os DepEntry = collections.namedtuple('DepEntry', 'widget dep enable die hide') dep_map = ( @@ -63,6 +64,8 @@ def main(): + os.chdir('data') + try: depsfile = open("widget.deps", "w") except Exception as err: diff --git a/gtk/src/marshalers.list b/gtk/data/marshalers.list similarity index 100% rename from gtk/src/marshalers.list rename to gtk/data/marshalers.list diff --git a/gtk/data/meson.build b/gtk/data/meson.build new file mode 100644 index 000000000000..935ae786bd01 --- /dev/null +++ b/gtk/data/meson.build @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2023 HandBrake Team + +widget_deps = custom_target('widget.deps', + output: ['widget.deps', 'widget_reverse.deps'], + command: find_program('makedeps.py')) + +data = gnome.compile_resources('data_res', 'data_res.gresource.xml', + dependencies: widget_deps, + source_dir: meson.current_build_dir(), + extra_args: '--manual-register', + c_name: 'ghb_data') + +marshalers = gnome.genmarshal('marshalers', + sources: 'marshalers.list', + prefix: 'ghb_marshal', + extra_args: '--quiet') + +i18n.merge_file( + input: 'fr.handbrake.ghb.desktop.in', + output: 'fr.handbrake.ghb.desktop', + install: host_machine.system() not in ['windows', 'haiku'], + install_dir: get_option('datadir') / 'applications', + po_dir: po_dir, + type: 'desktop') + +i18n.merge_file( + input: 'fr.handbrake.ghb.metainfo.xml.in', + output: 'fr.handbrake.ghb.metainfo.xml', + install: host_machine.system() not in ['windows', 'haiku'], + install_dir: get_option('datadir') / 'metainfo', + po_dir: po_dir, + type: 'xml') + +if host_machine.system() not in ['windows', 'haiku'] + meson.add_install_script('post_install.py', + get_option('prefix') / get_option('datadir')) +endif diff --git a/gtk/data/post_install.py b/gtk/data/post_install.py new file mode 100644 index 000000000000..18b31674d9e4 --- /dev/null +++ b/gtk/data/post_install.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 + +import os +import subprocess +import sys + +datadir = sys.argv[1] + +# Packaging tools define DESTDIR and this isn't needed for them +if 'DESTDIR' not in os.environ: + print('Updating icon cache...') + subprocess.call(['gtk-update-icon-cache', '-tf', + os.path.join(datadir, 'icons', 'hicolor')]) + + print('Updating desktop database...') + subprocess.call(['update-desktop-database', + os.path.join(datadir, 'applications')]) diff --git a/gtk/data/version.sh b/gtk/data/version.sh new file mode 100755 index 000000000000..1fe26b582711 --- /dev/null +++ b/gtk/data/version.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +GIT_TAG="`git describe --tags --exact-match HEAD 2>/dev/null || true`" +GIT_REV="`git rev-parse --short HEAD 2>/dev/null`" +if [ -n "$GIT_TAG" ]; then + echo "$GIT_TAG" +else + GIT_TAG="`git describe --tags --abbrev=0 HEAD 2>/dev/null`" + echo "${GIT_TAG:-unknown}${GIT_REV:+-git-$GIT_REV}" +fi +exit 0 diff --git a/gtk/ghb.anjuta b/gtk/ghb.anjuta deleted file mode 100644 index ad7ca27e43c6..000000000000 --- a/gtk/ghb.anjuta +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - diff --git a/gtk/src/icons/24x24/apps/hb-advanced-symbolic.symbolic.png b/gtk/icons/24x24/apps/hb-advanced-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/24x24/apps/hb-advanced-symbolic.symbolic.png rename to gtk/icons/24x24/apps/hb-advanced-symbolic.symbolic.png diff --git a/gtk/src/icons/32x32/apps/fr.handbrake.ghb.png b/gtk/icons/32x32/apps/fr.handbrake.ghb.png similarity index 100% rename from gtk/src/icons/32x32/apps/fr.handbrake.ghb.png rename to gtk/icons/32x32/apps/fr.handbrake.ghb.png diff --git a/gtk/src/icons/32x32/apps/hb-activity-symbolic.symbolic.png b/gtk/icons/32x32/apps/hb-activity-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/32x32/apps/hb-activity-symbolic.symbolic.png rename to gtk/icons/32x32/apps/hb-activity-symbolic.symbolic.png diff --git a/gtk/src/icons/32x32/apps/hb-add-queue-symbolic.symbolic.png b/gtk/icons/32x32/apps/hb-add-queue-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/32x32/apps/hb-add-queue-symbolic.symbolic.png rename to gtk/icons/32x32/apps/hb-add-queue-symbolic.symbolic.png diff --git a/gtk/src/icons/32x32/apps/hb-pause.png b/gtk/icons/32x32/apps/hb-pause.png similarity index 100% rename from gtk/src/icons/32x32/apps/hb-pause.png rename to gtk/icons/32x32/apps/hb-pause.png diff --git a/gtk/src/icons/32x32/apps/hb-picture-symbolic.symbolic.png b/gtk/icons/32x32/apps/hb-picture-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/32x32/apps/hb-picture-symbolic.symbolic.png rename to gtk/icons/32x32/apps/hb-picture-symbolic.symbolic.png diff --git a/gtk/src/icons/32x32/apps/hb-presets-symbolic.symbolic.png b/gtk/icons/32x32/apps/hb-presets-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/32x32/apps/hb-presets-symbolic.symbolic.png rename to gtk/icons/32x32/apps/hb-presets-symbolic.symbolic.png diff --git a/gtk/src/icons/32x32/apps/hb-showqueue-symbolic.symbolic.png b/gtk/icons/32x32/apps/hb-showqueue-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/32x32/apps/hb-showqueue-symbolic.symbolic.png rename to gtk/icons/32x32/apps/hb-showqueue-symbolic.symbolic.png diff --git a/gtk/src/icons/32x32/apps/hb-source-symbolic.symbolic.png b/gtk/icons/32x32/apps/hb-source-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/32x32/apps/hb-source-symbolic.symbolic.png rename to gtk/icons/32x32/apps/hb-source-symbolic.symbolic.png diff --git a/gtk/src/icons/32x32/apps/hb-start.png b/gtk/icons/32x32/apps/hb-start.png similarity index 100% rename from gtk/src/icons/32x32/apps/hb-start.png rename to gtk/icons/32x32/apps/hb-start.png diff --git a/gtk/src/icons/32x32/apps/hb-stop.png b/gtk/icons/32x32/apps/hb-stop.png similarity index 100% rename from gtk/src/icons/32x32/apps/hb-stop.png rename to gtk/icons/32x32/apps/hb-stop.png diff --git a/gtk/src/icons/48x48/apps/hb-advanced-symbolic.symbolic.png b/gtk/icons/48x48/apps/hb-advanced-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/48x48/apps/hb-advanced-symbolic.symbolic.png rename to gtk/icons/48x48/apps/hb-advanced-symbolic.symbolic.png diff --git a/gtk/src/icons/64x64/apps/hb-activity-symbolic.symbolic.png b/gtk/icons/64x64/apps/hb-activity-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/64x64/apps/hb-activity-symbolic.symbolic.png rename to gtk/icons/64x64/apps/hb-activity-symbolic.symbolic.png diff --git a/gtk/src/icons/64x64/apps/hb-add-queue-symbolic.symbolic.png b/gtk/icons/64x64/apps/hb-add-queue-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/64x64/apps/hb-add-queue-symbolic.symbolic.png rename to gtk/icons/64x64/apps/hb-add-queue-symbolic.symbolic.png diff --git a/gtk/src/icons/64x64/apps/hb-pause.png b/gtk/icons/64x64/apps/hb-pause.png similarity index 100% rename from gtk/src/icons/64x64/apps/hb-pause.png rename to gtk/icons/64x64/apps/hb-pause.png diff --git a/gtk/src/icons/64x64/apps/hb-picture-symbolic.symbolic.png b/gtk/icons/64x64/apps/hb-picture-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/64x64/apps/hb-picture-symbolic.symbolic.png rename to gtk/icons/64x64/apps/hb-picture-symbolic.symbolic.png diff --git a/gtk/src/icons/64x64/apps/hb-presets-symbolic.symbolic.png b/gtk/icons/64x64/apps/hb-presets-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/64x64/apps/hb-presets-symbolic.symbolic.png rename to gtk/icons/64x64/apps/hb-presets-symbolic.symbolic.png diff --git a/gtk/src/icons/64x64/apps/hb-showqueue-symbolic.symbolic.png b/gtk/icons/64x64/apps/hb-showqueue-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/64x64/apps/hb-showqueue-symbolic.symbolic.png rename to gtk/icons/64x64/apps/hb-showqueue-symbolic.symbolic.png diff --git a/gtk/src/icons/64x64/apps/hb-source-symbolic.symbolic.png b/gtk/icons/64x64/apps/hb-source-symbolic.symbolic.png similarity index 100% rename from gtk/src/icons/64x64/apps/hb-source-symbolic.symbolic.png rename to gtk/icons/64x64/apps/hb-source-symbolic.symbolic.png diff --git a/gtk/src/icons/64x64/apps/hb-start.png b/gtk/icons/64x64/apps/hb-start.png similarity index 100% rename from gtk/src/icons/64x64/apps/hb-start.png rename to gtk/icons/64x64/apps/hb-start.png diff --git a/gtk/src/icons/64x64/apps/hb-stop.png b/gtk/icons/64x64/apps/hb-stop.png similarity index 100% rename from gtk/src/icons/64x64/apps/hb-stop.png rename to gtk/icons/64x64/apps/hb-stop.png diff --git a/gtk/src/fr.handbrake.ghb.svg b/gtk/icons/fr.handbrake.ghb.svg similarity index 100% rename from gtk/src/fr.handbrake.ghb.svg rename to gtk/icons/fr.handbrake.ghb.svg diff --git a/gtk/src/hb-icon.svg b/gtk/icons/hb-icon.svg similarity index 100% rename from gtk/src/hb-icon.svg rename to gtk/icons/hb-icon.svg diff --git a/gtk/icons/icon_res.gresource.xml b/gtk/icons/icon_res.gresource.xml new file mode 100644 index 000000000000..741deb7e54c3 --- /dev/null +++ b/gtk/icons/icon_res.gresource.xml @@ -0,0 +1,38 @@ + + + + 24x24/apps/hb-advanced-symbolic.symbolic.png + 32x32/apps/hb-source-symbolic.symbolic.png + 32x32/apps/hb-picture-symbolic.symbolic.png + 32x32/apps/hb-add-queue-symbolic.symbolic.png + 32x32/apps/hb-showqueue-symbolic.symbolic.png + 32x32/apps/hb-activity-symbolic.symbolic.png + 32x32/apps/hb-presets-symbolic.symbolic.png + 32x32/apps/hb-start.png + 32x32/apps/hb-stop.png + 32x32/apps/hb-pause.png + 48x48/apps/hb-advanced-symbolic.symbolic.png + 64x64/apps/hb-source-symbolic.symbolic.png + 64x64/apps/hb-picture-symbolic.symbolic.png + 64x64/apps/hb-add-queue-symbolic.symbolic.png + 64x64/apps/hb-showqueue-symbolic.symbolic.png + 64x64/apps/hb-activity-symbolic.symbolic.png + 64x64/apps/hb-presets-symbolic.symbolic.png + 64x64/apps/hb-start.png + 64x64/apps/hb-stop.png + 64x64/apps/hb-pause.png + scalable/apps/hb-advanced-symbolic.svg + scalable/apps/hb-source-symbolic.svg + scalable/apps/hb-picture-symbolic.svg + scalable/apps/hb-add-queue-symbolic.svg + scalable/apps/hb-showqueue-symbolic.svg + scalable/apps/hb-activity-symbolic.svg + scalable/apps/hb-presets-symbolic.svg + scalable/apps/hb-start.svg + scalable/apps/hb-stop.svg + scalable/apps/hb-pause.svg + scalable/apps/hb-complete.svg + scalable/apps/hb-icon.svg + scalable/apps/fr.handbrake.ghb.svg + + diff --git a/gtk/icons/meson.build b/gtk/icons/meson.build new file mode 100644 index 000000000000..5a59ac285ed3 --- /dev/null +++ b/gtk/icons/meson.build @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2023 HandBrake Team + +icon_files = files( + '24x24/apps/hb-advanced-symbolic.symbolic.png', + '32x32/apps/hb-source-symbolic.symbolic.png', + '32x32/apps/hb-picture-symbolic.symbolic.png', + '32x32/apps/hb-add-queue-symbolic.symbolic.png', + '32x32/apps/hb-showqueue-symbolic.symbolic.png', + '32x32/apps/hb-activity-symbolic.symbolic.png', + '32x32/apps/hb-presets-symbolic.symbolic.png', + '32x32/apps/hb-start.png', + '32x32/apps/hb-stop.png', + '32x32/apps/hb-pause.png', + '48x48/apps/hb-advanced-symbolic.symbolic.png', + '64x64/apps/hb-source-symbolic.symbolic.png', + '64x64/apps/hb-picture-symbolic.symbolic.png', + '64x64/apps/hb-add-queue-symbolic.symbolic.png', + '64x64/apps/hb-showqueue-symbolic.symbolic.png', + '64x64/apps/hb-activity-symbolic.symbolic.png', + '64x64/apps/hb-presets-symbolic.symbolic.png', + '64x64/apps/hb-start.png', + '64x64/apps/hb-stop.png', + '64x64/apps/hb-pause.png', + 'scalable/apps/hb-advanced-symbolic.svg', + 'scalable/apps/hb-source-symbolic.svg', + 'scalable/apps/hb-picture-symbolic.svg', + 'scalable/apps/hb-add-queue-symbolic.svg', + 'scalable/apps/hb-showqueue-symbolic.svg', + 'scalable/apps/hb-activity-symbolic.svg', + 'scalable/apps/hb-presets-symbolic.svg', + 'scalable/apps/hb-start.svg', + 'scalable/apps/hb-stop.svg', + 'scalable/apps/hb-pause.svg', + 'scalable/apps/hb-complete.svg', + 'scalable/apps/hb-icon.svg', + 'scalable/apps/fr.handbrake.ghb.svg', +) + +icons = gnome.compile_resources('icon_res', 'icon_res.gresource.xml', + dependencies: icon_files, + extra_args: '--manual-register', + c_name: 'ghb_icons') + +if host_machine.system() not in ['windows', 'haiku'] + install_data('fr.handbrake.ghb.svg', + install_dir: get_option('datadir') / 'icons/hicolor/scalable/apps') +endif diff --git a/gtk/src/icons/scalable/apps/fr.handbrake.ghb.svg b/gtk/icons/scalable/apps/fr.handbrake.ghb.svg similarity index 100% rename from gtk/src/icons/scalable/apps/fr.handbrake.ghb.svg rename to gtk/icons/scalable/apps/fr.handbrake.ghb.svg diff --git a/gtk/src/icons/scalable/apps/hb-activity-symbolic.svg b/gtk/icons/scalable/apps/hb-activity-symbolic.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-activity-symbolic.svg rename to gtk/icons/scalable/apps/hb-activity-symbolic.svg diff --git a/gtk/src/icons/scalable/apps/hb-add-queue-symbolic.svg b/gtk/icons/scalable/apps/hb-add-queue-symbolic.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-add-queue-symbolic.svg rename to gtk/icons/scalable/apps/hb-add-queue-symbolic.svg diff --git a/gtk/src/icons/scalable/apps/hb-advanced-symbolic.svg b/gtk/icons/scalable/apps/hb-advanced-symbolic.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-advanced-symbolic.svg rename to gtk/icons/scalable/apps/hb-advanced-symbolic.svg diff --git a/gtk/src/icons/scalable/apps/hb-complete.svg b/gtk/icons/scalable/apps/hb-complete.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-complete.svg rename to gtk/icons/scalable/apps/hb-complete.svg diff --git a/gtk/src/icons/scalable/apps/hb-icon.svg b/gtk/icons/scalable/apps/hb-icon.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-icon.svg rename to gtk/icons/scalable/apps/hb-icon.svg diff --git a/gtk/src/icons/scalable/apps/hb-pause.svg b/gtk/icons/scalable/apps/hb-pause.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-pause.svg rename to gtk/icons/scalable/apps/hb-pause.svg diff --git a/gtk/src/icons/scalable/apps/hb-picture-symbolic.svg b/gtk/icons/scalable/apps/hb-picture-symbolic.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-picture-symbolic.svg rename to gtk/icons/scalable/apps/hb-picture-symbolic.svg diff --git a/gtk/src/icons/scalable/apps/hb-presets-symbolic.svg b/gtk/icons/scalable/apps/hb-presets-symbolic.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-presets-symbolic.svg rename to gtk/icons/scalable/apps/hb-presets-symbolic.svg diff --git a/gtk/src/icons/scalable/apps/hb-showqueue-symbolic.svg b/gtk/icons/scalable/apps/hb-showqueue-symbolic.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-showqueue-symbolic.svg rename to gtk/icons/scalable/apps/hb-showqueue-symbolic.svg diff --git a/gtk/src/icons/scalable/apps/hb-source-symbolic.svg b/gtk/icons/scalable/apps/hb-source-symbolic.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-source-symbolic.svg rename to gtk/icons/scalable/apps/hb-source-symbolic.svg diff --git a/gtk/src/icons/scalable/apps/hb-start.svg b/gtk/icons/scalable/apps/hb-start.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-start.svg rename to gtk/icons/scalable/apps/hb-start.svg diff --git a/gtk/src/icons/scalable/apps/hb-stop.svg b/gtk/icons/scalable/apps/hb-stop.svg similarity index 100% rename from gtk/src/icons/scalable/apps/hb-stop.svg rename to gtk/icons/scalable/apps/hb-stop.svg diff --git a/gtk/meson.build b/gtk/meson.build new file mode 100644 index 000000000000..6f412015687c --- /dev/null +++ b/gtk/meson.build @@ -0,0 +1,149 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2023 HandBrake Team + +project('handbrake-gtk', 'c', 'cpp', + version: run_command('data/version.sh', check: true).stdout().strip(), + license: 'GPL-2.0-only', + meson_version: '>= 0.51.0', + default_options: ['warning_level=1', 'buildtype=release']) + +# Minimum versions for dependencies +glib_min = '>= 2.56' +gtk4_min = '>= 4.4' +gtk3_min = '>= 3.22' +gst_min = '>= 1.10' + +cc = meson.get_compiler('c') +i18n = import('i18n') +gnome = import('gnome') + +hb_dir = get_option('hb-dir') +if hb_dir == '' + hb_dir = meson.current_build_dir() / '..' +endif + +hb_libdirs = [hb_dir / 'libhb', hb_dir / 'contrib/lib'] + get_option('extra-libdirs') +hb_incdirs = include_directories(hb_dir / 'libhb', hb_dir / 'contrib/include') + +# External dependencies (required) +ghb_deps = [ + cc.find_library('handbrake', dirs: hb_libdirs), + cc.find_library('bz2', dirs: hb_libdirs), + cc.find_library('m', required: false), + cc.find_library('mp3lame', dirs: hb_libdirs), + dependency('dvdnav'), + dependency('dvdread'), + dependency('dav1d'), + dependency('SvtAv1Enc'), + dependency('fribidi'), + dependency('glib-2.0', version: glib_min), + dependency('gio-2.0', version: glib_min), + dependency('gthread-2.0', version: glib_min), + dependency('gmodule-2.0', version: glib_min), + dependency('jansson'), + dependency('libass'), + dependency('libavcodec'), + dependency('libavfilter'), + dependency('libavformat'), + dependency('libavutil'), + dependency('libbluray'), + dependency('liblzma'), + dependency('libpostproc'), + dependency('libswresample'), + dependency('libswscale'), + dependency('libxml-2.0'), + dependency('ogg'), + dependency('opus'), + dependency('speex'), + dependency('theoradec'), + dependency('theoraenc'), + dependency('threads'), + dependency('libturbojpeg'), + dependency('vorbis'), + dependency('vorbisenc'), + dependency('vpx'), + dependency('x264'), + dependency('zimg'), + dependency('zlib'), +] + +if get_option('gtk4') + ghb_deps += dependency('gtk4', version: gtk4_min) +else + ghb_deps += dependency('gtk+-3.0', version: gtk3_min) +endif + +if get_option('gstreamer').enabled() + gst = dependency('gstreamer-1.0', version: gst_min, required: false) + gst_audio = dependency('gstreamer-audio-1.0', required: false) + gst_video = dependency('gstreamer-video-1.0', required: false) + gst_pbutils = dependency('gstreamer-pbutils-1.0', required: false) + if gst_pbutils.found() + ghb_deps += [gst, gst_audio, gst_video, gst_pbutils] + add_project_arguments('-D_ENABLE_GST', language: 'c') + else + message('Preview support disabled as gstreamer-plugins-base was not found.') + endif +endif + +if get_option('libdovi').enabled() + ghb_deps += dependency('dovi') +endif + +if get_option('fdk-aac').enabled() + ghb_deps += dependency('fdk-aac') +endif + +if get_option('qsv').enabled() + if host_machine.system() == 'windows' + ghb_deps += cc.find_library('vpl', dirs: hb_libdirs) + else + ghb_deps += [dependency('vpl'), dependency('libva'), dependency('libva-drm')] + endif +endif + +if get_option('x265').enabled() + ghb_deps += dependency('x265') + if get_option('numa').enabled() + numa = dependency('numa', required: false) + if not numa.found() + numa = cc.find_library('numa') + endif + ghb_deps += numa + endif +endif + +if get_option('mf').enabled() + ghb_deps += [cc.find_library('mfplat'), cc.find_library('strmiids')] +endif + +# OS-specific dependencies + +if host_machine.system() == 'windows' + add_project_link_arguments('-mwindows', language: ['c', 'cpp']) + win_dlls = ['bcrypt', 'ntdll', 'ole32', 'regex', 'userenv', 'uuid', 'ws2_32'] + foreach dll: win_dlls + ghb_deps += cc.find_library(dll) + endforeach +elif not cc.has_function('dlopen') + ghb_deps += cc.find_library('dl') +endif + +if not cc.has_function('iconv') + ghb_deps += cc.find_library('iconv', dirs: get_option('extra-libdirs')) + add_project_arguments('-DLIBICONV_PLUG', language: ['c', 'cpp']) +endif + +if not get_option('c_std').contains('gnu') + add_project_arguments('-D_DEFAULT_SOURCE', language: ['c', 'cpp']) +endif + +link_args = cc.get_supported_link_arguments( + '-Wl,--export-dynamic', '-Wl,--exclude-libs,ALL') + +add_project_link_arguments(link_args, language: ['c', 'cpp']) + +subdir('po') +subdir('icons') +subdir('data') +subdir('src') diff --git a/gtk/meson_options.txt b/gtk/meson_options.txt new file mode 100644 index 000000000000..e2e838e73466 --- /dev/null +++ b/gtk/meson_options.txt @@ -0,0 +1,54 @@ +option('extra-libdirs', + type: 'array', + value: [], + description: 'Extra directories to search for libraries') + +option('fdk-aac', + type: 'feature', + value: 'disabled', + description: 'Enable FDK AAC encoder') + +option('flatpak', + type: 'boolean', + value: false, + description: 'Enable Flatpak packaging') + +option('gstreamer', + type: 'feature', + value: 'disabled', + description: 'Disable gstreamer (live preview)') + +option('gtk4', + type: 'boolean', + value: false, + description: 'Enable building with GTK4') + +option('hb-dir', + type: 'string', + value: '', + description: 'Prefix of libhb install directory') + +option('libdovi', + type: 'feature', + value: 'disabled', + description: 'Enable libdovi for Dolby Vision support') + +option('mf', + type: 'feature', + value: 'disabled', + description: 'Enable MediaFoundation encoder') + +option('numa', + type: 'feature', + value: 'disabled', + description: 'Enable x265 NUMA support') + +option('qsv', + type: 'feature', + value: 'disabled', + description: 'Enable QSV encoder') + +option('x265', + type: 'feature', + value: 'disabled', + description: 'Enable x265 encoder') diff --git a/gtk/module.defs b/gtk/module.defs index 589b82d79b33..6beff796c48e 100644 --- a/gtk/module.defs +++ b/gtk/module.defs @@ -4,11 +4,14 @@ $(eval $(call import.GCC,GTK)) GTK.src/ = $(SRC/)gtk/ GTK.build/ = $(BUILD/)gtk/ -GTK.CONFIGURE.stamp = $(GTK.build/).stamp.configure +GTK.CONFIGURE.stamp = $(GTK.build/)build.ninja -ifeq ($(HOST.system),netbsd) - LDFLAGS += -Wl,-R$(X11BASE)/lib -endif +GTK.CONFIGURE.exe = $(MESON.exe) +GTK.CONFIGURE.extra = -Dc_args="$(call fn.ARGS,GTK.GCC,*D ?extra)" \ + -Dc_link_args="$(call fn.ARGS,GTK.GCC,?extra.exe)" \ + --pkg-config-path=$(call fn.ABSOLUTE,$(BUILD/))contrib/lib/pkgconfig:$(PKG_CONFIG_PATH) \ + --prefix=$(PREFIX) -Dhb-dir=$(call fn.ABSOLUTE,$(BUILD/)) +GTK.CONFIGURE.env = ############################################################################### @@ -18,46 +21,90 @@ BUILD.out += $(GTK.out) ############################################################################### -ifeq (1-mingw,$(HOST.cross)-$(HOST.system)) -GTK.CONFIGURE.extra += --host=$(HOST.spec) -ifeq ($(HAS.dlfcn),1) - GTK.CONFIGURE.extra += --enable-dl +ifneq (none,$(GTK.GCC.g)) + GTK.CONFIGURE.extra += -Ddebug=true +else + GTK.CONFIGURE.extra += -Ddebug=false endif -ifeq ($(HAS.pthread),1) - GTK.CONFIGURE.extra += --enable-pthread + +ifeq (speed,$(GTK.GCC.O)) + ifeq (none,$GTK.GCC.g) + GTK.CONFIGURE.extra += -Doptimization=3 + else + GTK.CONFIGURE.extra += -Doptimization=2 + endif +else + ifneq (,$(filter $(GTK.GCC.O),size size-aggressive)) + GTK.CONFIGURE.extra += -Doptimization=s + else + GTK.CONFIGURE.extra += -Doptimization=0 + endif endif + +ifeq (on,$(GCC.lto)) + GTK.CONFIGURE.extra += -Db_lto=true +else + GTK.CONFIGURE.extra += -Db_lto=false endif -ifeq (0,$(FEATURE.gst)) - GTK.CONFIGURE.extra += --disable-gst +ifeq (1,$(FEATURE.gst)) + GTK.CONFIGURE.extra += -Dgstreamer=enabled +else + GTK.CONFIGURE.extra += -Dgstreamer=disabled endif ifeq (1,$(FEATURE.fdk_aac)) - GTK.CONFIGURE.extra += --enable-fdk-aac + GTK.CONFIGURE.extra += -Dfdk-aac=enabled +else + GTK.CONFIGURE.extra += -Dfdk-aac=disabled endif ifeq (1,$(FEATURE.x265)) - GTK.CONFIGURE.extra += --enable-x265 -ifeq (1,$(FEATURE.numa)) - GTK.CONFIGURE.extra += --enable-numa + GTK.CONFIGURE.extra += -Dx265=enabled +else + GTK.CONFIGURE.extra += -Dx265=disabled endif + +ifeq (1,$(FEATURE.numa)) + GTK.CONFIGURE.extra += -Dnuma=enabled +else + GTK.CONFIGURE.extra += -Dnuma=disabled endif ifeq (1,$(FEATURE.qsv)) - GTK.CONFIGURE.extra += --enable-qsv + GTK.CONFIGURE.extra += -Dqsv=enabled +else + GTK.CONFIGURE.extra += -Dqsv=disabled endif ifeq (1,$(FEATURE.libdovi)) - GTK.CONFIGURE.extra += --enable-libdovi + GTK.CONFIGURE.extra += -Dlibdovi=enabled +else + GTK.CONFIGURE.extra += -Dlibdovi=disabled endif - ifeq (1,$(FEATURE.flatpak)) - GTK.CONFIGURE.extra += --enable-flatpak + GTK.CONFIGURE.extra += -Dflatpak=true +else + GTK.CONFIGURE.extra += -Dflatpak=false endif ifeq (1,$(FEATURE.gtk4)) - GTK.CONFIGURE.extra += --enable-gtk4 + GTK.CONFIGURE.extra += -Dgtk4=true +else + GTK.CONFIGURE.extra += -Dgtk4=false +endif + +ifneq (,$(filter $(HOST.system),freebsd netbsd openbsd)) + GTK.CONFIGURE.extra += -Dextra-libdirs=$(LOCALBASE)/lib +endif + +ifeq (mingw,$(HOST.system)) + GTK.CONFIGURE.extra += -Dprefer_static=true +endif + +ifeq (1,$(HOST.cross)) + GTK.CONFIGURE.extra += --cross-file=$(SRC/)make/cross/$(HOST.spec).meson endif export HB.version HB.repo.date diff --git a/gtk/module.rules b/gtk/module.rules index 7d372af648f8..3cc2532b3d3d 100644 --- a/gtk/module.rules +++ b/gtk/module.rules @@ -7,43 +7,35 @@ uninstall: gtk.uninstall clean: gtk.clean xclean: gtk.xclean -gtk.configure: $(GTK.CONFIGURE.stamp) - -$(GTK.CONFIGURE.stamp): | $(dir $(GTK.CONFIGURE.stamp)) -$(GTK.CONFIGURE.stamp): $(GTK.src/)Makefile.am -$(GTK.CONFIGURE.stamp): $(BUILD/)GNUmakefile -$(GTK.CONFIGURE.stamp): $(GTK.src/)configure.ac $(GTK.src/)src/Makefile.am - set -e; cd $(GTK.src/); NOCONFIGURE=1 autoreconf -fiv - set -e; cd $(GTK.build/); $(call fn.ABSOLUTE,$(GTK.src/))configure \ - $(GTK.CONFIGURE.extra) \ - PKG_CONFIG_PATH=$(BUILD/)contrib/lib/pkgconfig:$(PKG_CONFIG_PATH) \ - CC="$(GCC.gcc)" \ - CXX="$(GCC.gxx)" \ - CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O *D *W ?extra)" \ - LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O ?extra.exe)" \ - PYTHON="$(PYTHON.exe)" \ - --prefix=$(PREFIX) \ - --with-hb=$(call fn.ABSOLUTE,$(BUILD/)) - $(TOUCH.exe) $@ - -gtk.build: | $(GTK.build/) -gtk.build: $(GTK.CONFIGURE.stamp) $(LIBHB.a) - +$(MAKE) -C $(GTK.build/) +gtk.configure: | $(GTK.CONFIGURE.stamp) + +$(GTK.CONFIGURE.stamp): $(BUILD/)GNUmakefile $(LIBHB.a) + if ! [ -e "$(GTK.CONFIGURE.stamp)" ]; then \ + CC="$(GCC.gcc)" CXX="$(GCC.gxx)" $(MESON.exe) setup \ + $(call fn.ABSOLUTE,$(GTK.build/)) $(call fn.ABSOLUTE,$(GTK.src/)) $(GTK.CONFIGURE.extra); \ + else \ + $(MESON.exe) configure \ + $(call fn.ABSOLUTE,$(GTK.build/)) $(GTK.CONFIGURE.extra); \ + fi + +gtk.reconfigure: + $(MESON.exe) setup --reconfigure \ + $(call fn.ABSOLUTE,$(GTK.build/)) $(call fn.ABSOLUTE,$(GTK.src/)) $(GTK.CONFIGURE.extra) + +gtk.build: $(GTK.CONFIGURE.stamp) | $(GTK.setup) + +$(NINJA.exe) -C $(GTK.build/) gtk.install-strip: - $(MAKE) -C $(GTK.build/) prefix=$(PREFIX) install-strip + $(MESON.exe) install -C $(GTK.build/) --strip gtk.install: - $(MAKE) -C $(GTK.build/) prefix=$(PREFIX) install + $(MESON.exe) install -C $(GTK.build/) gtk.uninstall: - $(MAKE) -C $(GTK.build/) uninstall + $(NINJA.exe) uninstall -C $(GTK.build/) gtk.clean: - $(MAKE) -C $(GTK.build/) clean + $(NINJA.exe) clean -C $(GTK.build/) gtk.xclean: - $(MAKE) -C $(GTK.build/) distclean - $(RM.exe) -f $(GTK.out) $(RM.exe) -fr $(GTK.build/) - diff --git a/gtk/po/ChangeLog b/gtk/po/ChangeLog deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/gtk/po/Makefile.in.in b/gtk/po/Makefile.in.in deleted file mode 100644 index 38c293d2ed2f..000000000000 --- a/gtk/po/Makefile.in.in +++ /dev/null @@ -1,483 +0,0 @@ -# Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper -# -# Copying and distribution of this file, with or without modification, -# are permitted in any medium without royalty provided the copyright -# notice and this notice are preserved. This file is offered as-is, -# without any warranty. -# -# Origin: gettext-0.19.8 -GETTEXT_MACRO_VERSION = 0.19 - -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ - -SED = @SED@ -SHELL = /bin/sh -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datarootdir = @datarootdir@ -datadir = @datadir@ -localedir = @localedir@ -gettextsrcdir = $(datadir)/gettext/po - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ - -# We use $(mkdir_p). -# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as -# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, -# @install_sh@ does not start with $(SHELL), so we add it. -# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined -# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake -# versions, $(mkinstalldirs) and $(install_sh) are unused. -mkinstalldirs = $(SHELL) @install_sh@ -d -install_sh = $(SHELL) @install_sh@ -MKDIR_P = @MKDIR_P@ -mkdir_p = @mkdir_p@ - -# When building gettext-tools, we prefer to use the built programs -# rather than installed programs. However, we can't do that when we -# are cross compiling. -CROSS_COMPILING = @CROSS_COMPILING@ - -GMSGFMT_ = @GMSGFMT@ -GMSGFMT_no = @GMSGFMT@ -GMSGFMT_yes = @GMSGFMT_015@ -GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) -MSGFMT_ = @MSGFMT@ -MSGFMT_no = @MSGFMT@ -MSGFMT_yes = @MSGFMT_015@ -MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) -XGETTEXT_ = @XGETTEXT@ -XGETTEXT_no = @XGETTEXT@ -XGETTEXT_yes = @XGETTEXT_015@ -XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) -MSGMERGE = msgmerge -MSGMERGE_UPDATE = @MSGMERGE@ --update -MSGINIT = msginit -MSGCONV = msgconv -MSGFILTER = msgfilter - -POFILES = @POFILES@ -GMOFILES = @GMOFILES@ -UPDATEPOFILES = @UPDATEPOFILES@ -DUMMYPOFILES = @DUMMYPOFILES@ -DISTFILES.common = Makefile.in.in remove-potcdate.sin \ -$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) -DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ -$(POFILES) $(GMOFILES) \ -$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) - -POTFILES = \ - -CATALOGS = @CATALOGS@ - -POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot -POFILESDEPS_yes = $(POFILESDEPS_) -POFILESDEPS_no = -POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) - -DISTFILESDEPS_ = update-po -DISTFILESDEPS_yes = $(DISTFILESDEPS_) -DISTFILESDEPS_no = -DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) - -# Makevars gets inserted here. (Don't remove this line!) - -.SUFFIXES: -.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update - -.po.mo: - @echo "$(MSGFMT) -c -o $@ $<"; \ - $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ - -.po.gmo: - @lang=`echo $* | sed -e 's,.*/,,'`; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo - -.sin.sed: - sed -e '/^#/d' $< > t-$@ - mv t-$@ $@ - - -all: all-@USE_NLS@ - -all-yes: stamp-po -all-no: - -# Ensure that the gettext macros and this Makefile.in.in are in sync. -CHECK_MACRO_VERSION = \ - test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ - || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ - exit 1; \ - } - -# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no -# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because -# we don't want to bother translators with empty POT files). We assume that -# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. -# In this case, stamp-po is a nop (i.e. a phony target). - -# stamp-po is a timestamp denoting the last time at which the CATALOGS have -# been loosely updated. Its purpose is that when a developer or translator -# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, -# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent -# invocations of "make" will do nothing. This timestamp would not be necessary -# if updating the $(CATALOGS) would always touch them; however, the rule for -# $(POFILES) has been designed to not touch files that don't need to be -# changed. -stamp-po: $(srcdir)/$(DOMAIN).pot - @$(CHECK_MACRO_VERSION) - test ! -f $(srcdir)/$(DOMAIN).pot || \ - test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) - @test ! -f $(srcdir)/$(DOMAIN).pot || { \ - echo "touch stamp-po" && \ - echo timestamp > stamp-poT && \ - mv stamp-poT stamp-po; \ - } - -# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', -# otherwise packages like GCC can not be built if only parts of the source -# have been downloaded. - -# This target rebuilds $(DOMAIN).pot; it is an expensive operation. -# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. -# The determination of whether the package xyz is a GNU one is based on the -# heuristic whether some file in the top level directory mentions "GNU xyz". -# If GNU 'find' is available, we avoid grepping through monster files. -$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed - package_gnu="$(PACKAGE_GNU)"; \ - test -n "$$package_gnu" || { \ - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \ - -size -10000000c -exec grep 'GNU @PACKAGE@' \ - /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu=yes; \ - else \ - package_gnu=no; \ - fi; \ - }; \ - if test "$$package_gnu" = "yes"; then \ - package_prefix='GNU '; \ - else \ - package_prefix=''; \ - fi; \ - if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ - msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ - else \ - msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ - fi; \ - case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ - $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ - --files-from=$(srcdir)/POTFILES.in \ - --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --msgid-bugs-address="$$msgid_bugs_address" \ - ;; \ - *) \ - $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ - --files-from=$(srcdir)/POTFILES.in \ - --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_prefix}@PACKAGE@" \ - --package-version='@VERSION@' \ - --msgid-bugs-address="$$msgid_bugs_address" \ - ;; \ - esac - test ! -f $(DOMAIN).po || { \ - if test -f $(srcdir)/$(DOMAIN).pot-header; then \ - sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ - cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \ - rm -f $(DOMAIN).1po; \ - fi; \ - if test -f $(srcdir)/$(DOMAIN).pot; then \ - sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ - sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ - if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ - rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ - else \ - rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ - mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ - fi; \ - else \ - mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ - fi; \ - } - -# This rule has no dependencies: we don't need to update $(DOMAIN).pot at -# every "make" invocation, only create it when it is missing. -# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. -$(srcdir)/$(DOMAIN).pot: - $(MAKE) $(DOMAIN).pot-update - -# This target rebuilds a PO file if $(DOMAIN).pot has changed. -# Note that a PO file is not touched if it doesn't need to be changed. -$(POFILES): $(POFILESDEPS) - @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ - if test -f "$(srcdir)/$${lang}.po"; then \ - test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) \ - && { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ - *) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ - esac; \ - }; \ - else \ - $(MAKE) $${lang}.po-create; \ - fi - - -install: install-exec install-data -install-exec: -install-data: install-data-@USE_NLS@ - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ - for file in $(DISTFILES.common) Makevars.template; do \ - $(INSTALL_DATA) $(srcdir)/$$file \ - $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - for file in Makevars; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi -install-data-no: all -install-data-yes: all - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkdir_p) $(DESTDIR)$$dir; \ - if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ - $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ - echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ - link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ - mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ - for file in *; do \ - if test -f $$file; then \ - ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ - fi; \ - done); \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - else \ - if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ - :; \ - else \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - fi; \ - fi; \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ - ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ - cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ - fi; \ - done; \ - done - -install-strip: install - -installdirs: installdirs-exec installdirs-data -installdirs-exec: -installdirs-data: installdirs-data-@USE_NLS@ - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ - else \ - : ; \ - fi -installdirs-data-no: -installdirs-data-yes: - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkdir_p) $(DESTDIR)$$dir; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ - link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ - mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ - for file in *; do \ - if test -f $$file; then \ - ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ - fi; \ - done); \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - else \ - if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ - :; \ - else \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - fi; \ - fi; \ - fi; \ - done; \ - done - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: uninstall-exec uninstall-data -uninstall-exec: -uninstall-data: uninstall-data-@USE_NLS@ - if test "$(PACKAGE)" = "gettext-tools"; then \ - for file in $(DISTFILES.common) Makevars.template; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi -uninstall-data-no: -uninstall-data-yes: - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - done; \ - done - -check: all - -info dvi ps pdf html tags TAGS ctags CTAGS ID: - -mostlyclean: - rm -f remove-potcdate.sed - rm -f stamp-poT - rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po - rm -fr *.o - -clean: mostlyclean - -distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - rm -f stamp-po $(GMOFILES) - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: - test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) - @$(MAKE) dist2 -# This is a separate target because 'update-po' must be executed before. -dist2: stamp-po $(DISTFILES) - dists="$(DISTFILES)"; \ - if test "$(PACKAGE)" = "gettext-tools"; then \ - dists="$$dists Makevars.template"; \ - fi; \ - if test -f $(srcdir)/$(DOMAIN).pot; then \ - dists="$$dists $(DOMAIN).pot stamp-po"; \ - fi; \ - if test -f $(srcdir)/ChangeLog; then \ - dists="$$dists ChangeLog"; \ - fi; \ - for i in 0 1 2 3 4 5 6 7 8 9; do \ - if test -f $(srcdir)/ChangeLog.$$i; then \ - dists="$$dists ChangeLog.$$i"; \ - fi; \ - done; \ - if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ - for file in $$dists; do \ - if test -f $$file; then \ - cp -p $$file $(distdir) || exit 1; \ - else \ - cp -p $(srcdir)/$$file $(distdir) || exit 1; \ - fi; \ - done - -update-po: Makefile - $(MAKE) $(DOMAIN).pot-update - test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) - $(MAKE) update-gmo - -# General rule for creating PO files. - -.nop.po-create: - @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ - echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ - exit 1 - -# General rule for updating PO files. - -.nop.po-update: - @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ - if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ - tmpdir=`pwd`; \ - echo "$$lang:"; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ - cd $(srcdir); \ - if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ - $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ - *) \ - $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ - esac; \ - }; then \ - if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "msgmerge for $$lang.po failed!" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi - -$(DUMMYPOFILES): - -update-gmo: Makefile $(GMOFILES) - @: - -# Recreate Makefile by invoking config.status. Explicitly invoke the shell, -# because execution permission bits may not work on the current file system. -# Use @SHELL@, which is the shell determined by autoconf for the use by its -# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. -Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ - cd $(top_builddir) \ - && @SHELL@ ./config.status $(subdir)/$@.in po-directories - -force: - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/gtk/po/Makevars b/gtk/po/Makevars deleted file mode 100644 index 624c2301fa68..000000000000 --- a/gtk/po/Makevars +++ /dev/null @@ -1,78 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = HandBrake Team - -# This tells whether or not to prepend "GNU " prefix to the package -# name that gets inserted into the header of the $(DOMAIN).pot file. -# Possible values are "yes", "no", or empty. If it is empty, try to -# detect it automatically by scanning the files in $(top_srcdir) for -# "GNU packagename" string. -PACKAGE_GNU = no - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = https://github.com/HandBrake/Handbrake/issues - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = - -# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' -# context. Possible values are "yes" and "no". Set this to yes if the -# package uses functions taking also a message context, like pgettext(), or -# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. -USE_MSGCTXT = no - -# These options get passed to msgmerge. -# Useful options are in particular: -# --previous to keep previous msgids of translated messages, -# --quiet to reduce the verbosity. -MSGMERGE_OPTIONS = - -# These options get passed to msginit. -# If you want to disable line wrapping when writing PO files, add -# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and -# MSGINIT_OPTIONS. -MSGINIT_OPTIONS = - -# This tells whether or not to regenerate a PO file when $(DOMAIN).pot -# has changed. Possible values are "yes" and "no". Set this to no if -# the POT file is checked in the repository and the version control -# program ignores timestamps. -PO_DEPENDS_ON_POT = no - -# This tells whether or not to forcibly update $(DOMAIN).pot and -# regenerate PO files on "make dist". Possible values are "yes" and -# "no". Set this to no if the POT file and PO files are maintained -# externally. -DIST_DEPENDS_ON_UPDATE_PO = yes diff --git a/gtk/po/POTFILES.in b/gtk/po/POTFILES.in index 32289198c8a3..892226300ce7 100644 --- a/gtk/po/POTFILES.in +++ b/gtk/po/POTFILES.in @@ -1,7 +1,7 @@ # List of source files containing translatable strings. -src/menu.ui -src/ghb3.ui -src/fr.handbrake.ghb.metainfo.xml.in.in +data/fr.handbrake.ghb.desktop.in +src/ui-gtk3/menu.ui +src/ui-gtk3/ghb.ui src/audiohandler.c src/callbacks.c src/chapters.c @@ -12,4 +12,5 @@ src/presets.c src/preview.c src/queuehandler.c src/subtitlehandler.c +src/title-add.c src/videohandler.c diff --git a/gtk/po/Rules-quot b/gtk/po/Rules-quot deleted file mode 100644 index baf652858ad3..000000000000 --- a/gtk/po/Rules-quot +++ /dev/null @@ -1,58 +0,0 @@ -# This file, Rules-quot, can be copied and used freely without restrictions. -# Special Makefile rules for English message catalogs with quotation marks. - -DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot - -.SUFFIXES: .insert-header .po-update-en - -en@quot.po-create: - $(MAKE) en@quot.po-update -en@boldquot.po-create: - $(MAKE) en@boldquot.po-update - -en@quot.po-update: en@quot.po-update-en -en@boldquot.po-update: en@boldquot.po-update-en - -.insert-header.po-update-en: - @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ - if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ - tmpdir=`pwd`; \ - echo "$$lang:"; \ - ll=`echo $$lang | sed -e 's/@.*//'`; \ - LC_ALL=C; export LC_ALL; \ - cd $(srcdir); \ - if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \ - | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \ - { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \ - $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \ - ;; \ - *) \ - $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \ - ;; \ - esac } 2>/dev/null > $$tmpdir/$$lang.new.po \ - ; then \ - if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "creation of $$lang.po failed!" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi - -en@quot.insert-header: insert-header.sin - sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header - -en@boldquot.insert-header: insert-header.sin - sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header - -mostlyclean: mostlyclean-quot -mostlyclean-quot: - rm -f *.insert-header diff --git a/gtk/po/boldquot.sed b/gtk/po/boldquot.sed deleted file mode 100644 index 4b937aa517bc..000000000000 --- a/gtk/po/boldquot.sed +++ /dev/null @@ -1,10 +0,0 @@ -s/"\([^"]*\)"/“\1”/g -s/`\([^`']*\)'/‘\1’/g -s/ '\([^`']*\)' / ‘\1’ /g -s/ '\([^`']*\)'$/ ‘\1’/g -s/^'\([^`']*\)' /‘\1’ /g -s/“”/""/g -s/“/“/g -s/”/”/g -s/‘/‘/g -s/’/’/g diff --git a/gtk/po/en@boldquot.header b/gtk/po/en@boldquot.header deleted file mode 100644 index fedb6a06d129..000000000000 --- a/gtk/po/en@boldquot.header +++ /dev/null @@ -1,25 +0,0 @@ -# All this catalog "translates" are quotation characters. -# The msgids must be ASCII and therefore cannot contain real quotation -# characters, only substitutes like grave accent (0x60), apostrophe (0x27) -# and double quote (0x22). These substitutes look strange; see -# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html -# -# This catalog translates grave accent (0x60) and apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019). -# It also translates pairs of apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019) -# and pairs of quotation mark (0x22) to -# left double quotation mark (U+201C) and right double quotation mark (U+201D). -# -# When output to an UTF-8 terminal, the quotation characters appear perfectly. -# When output to an ISO-8859-1 terminal, the single quotation marks are -# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to -# grave/acute accent (by libiconv), and the double quotation marks are -# transliterated to 0x22. -# When output to an ASCII terminal, the single quotation marks are -# transliterated to apostrophes, and the double quotation marks are -# transliterated to 0x22. -# -# This catalog furthermore displays the text between the quotation marks in -# bold face, assuming the VT100/XTerm escape sequences. -# diff --git a/gtk/po/en@quot.header b/gtk/po/en@quot.header deleted file mode 100644 index a9647fc35c3b..000000000000 --- a/gtk/po/en@quot.header +++ /dev/null @@ -1,22 +0,0 @@ -# All this catalog "translates" are quotation characters. -# The msgids must be ASCII and therefore cannot contain real quotation -# characters, only substitutes like grave accent (0x60), apostrophe (0x27) -# and double quote (0x22). These substitutes look strange; see -# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html -# -# This catalog translates grave accent (0x60) and apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019). -# It also translates pairs of apostrophe (0x27) to -# left single quotation mark (U+2018) and right single quotation mark (U+2019) -# and pairs of quotation mark (0x22) to -# left double quotation mark (U+201C) and right double quotation mark (U+201D). -# -# When output to an UTF-8 terminal, the quotation characters appear perfectly. -# When output to an ISO-8859-1 terminal, the single quotation marks are -# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to -# grave/acute accent (by libiconv), and the double quotation marks are -# transliterated to 0x22. -# When output to an ASCII terminal, the single quotation marks are -# transliterated to apostrophes, and the double quotation marks are -# transliterated to 0x22. -# diff --git a/gtk/po/insert-header.sin b/gtk/po/insert-header.sin deleted file mode 100644 index b26de01f6c88..000000000000 --- a/gtk/po/insert-header.sin +++ /dev/null @@ -1,23 +0,0 @@ -# Sed script that inserts the file called HEADER before the header entry. -# -# At each occurrence of a line starting with "msgid ", we execute the following -# commands. At the first occurrence, insert the file. At the following -# occurrences, do nothing. The distinction between the first and the following -# occurrences is achieved by looking at the hold space. -/^msgid /{ -x -# Test if the hold space is empty. -s/m/m/ -ta -# Yes it was empty. First occurrence. Read the file. -r HEADER -# Output the file's contents by reading the next line. But don't lose the -# current line while doing this. -g -N -bb -:a -# The hold space was nonempty. Following occurrences. Do nothing. -x -:b -} diff --git a/gtk/po/meson.build b/gtk/po/meson.build new file mode 100644 index 000000000000..0b8d424509fa --- /dev/null +++ b/gtk/po/meson.build @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2023 HandBrake Team + +po_dir = meson.current_source_dir() + +if host_machine.system() == 'netbsd' + meson.override_find_program('msgfmt', find_program('/usr/pkg/bin/msgfmt')) +elif host_machine.system() == 'sunos' + meson.override_find_program('msgfmt', find_program('gmsgfmt')) +endif + +i18n.gettext('ghb', + preset: 'glib', + args: ['--package-version=' + meson.project_version(), + '--copyright-holder=HandBrake Team']) diff --git a/gtk/po/quot.sed b/gtk/po/quot.sed deleted file mode 100644 index 0122c46318dc..000000000000 --- a/gtk/po/quot.sed +++ /dev/null @@ -1,6 +0,0 @@ -s/"\([^"]*\)"/“\1”/g -s/`\([^`']*\)'/‘\1’/g -s/ '\([^`']*\)' / ‘\1’ /g -s/ '\([^`']*\)'$/ ‘\1’/g -s/^'\([^`']*\)' /‘\1’ /g -s/“”/""/g diff --git a/gtk/po/remove-potcdate.sin b/gtk/po/remove-potcdate.sin deleted file mode 100644 index 2436c49e786d..000000000000 --- a/gtk/po/remove-potcdate.sin +++ /dev/null @@ -1,19 +0,0 @@ -# Sed script that remove the POT-Creation-Date line in the header entry -# from a POT file. -# -# The distinction between the first and the following occurrences of the -# pattern is achieved by looking at the hold space. -/^"POT-Creation-Date: .*"$/{ -x -# Test if the hold space is empty. -s/P/P/ -ta -# Yes it was empty. First occurrence. Remove the line. -g -d -bb -:a -# The hold space was nonempty. Following occurrences. Do nothing. -x -:b -} diff --git a/gtk/src/Makefile.am b/gtk/src/Makefile.am deleted file mode 100644 index 48cda438860a..000000000000 --- a/gtk/src/Makefile.am +++ /dev/null @@ -1,223 +0,0 @@ -## Process this file with automake to produce Makefile.in - -icons = \ - hb-icon.svg fr.handbrake.ghb.svg - -icons_dep = \ - icons/24x24/apps/hb-advanced-symbolic.symbolic.png \ - icons/32x32/apps/hb-source-symbolic.symbolic.png \ - icons/32x32/apps/hb-picture-symbolic.symbolic.png \ - icons/32x32/apps/hb-add-queue-symbolic.symbolic.png \ - icons/32x32/apps/hb-showqueue-symbolic.symbolic.png \ - icons/32x32/apps/hb-activity-symbolic.symbolic.png \ - icons/32x32/apps/hb-presets-symbolic.symbolic.png \ - icons/32x32/apps/hb-start.png \ - icons/32x32/apps/hb-stop.png \ - icons/32x32/apps/hb-pause.png \ - icons/48x48/apps/hb-advanced-symbolic.symbolic.png \ - icons/64x64/apps/hb-source-symbolic.symbolic.png \ - icons/64x64/apps/hb-picture-symbolic.symbolic.png \ - icons/64x64/apps/hb-add-queue-symbolic.symbolic.png \ - icons/64x64/apps/hb-showqueue-symbolic.symbolic.png \ - icons/64x64/apps/hb-activity-symbolic.symbolic.png \ - icons/64x64/apps/hb-presets-symbolic.symbolic.png \ - icons/64x64/apps/hb-start.png \ - icons/64x64/apps/hb-stop.png \ - icons/64x64/apps/hb-pause.png \ - icons/scalable/apps/hb-advanced-symbolic.svg \ - icons/scalable/apps/hb-source-symbolic.svg \ - icons/scalable/apps/hb-picture-symbolic.svg \ - icons/scalable/apps/hb-add-queue-symbolic.svg \ - icons/scalable/apps/hb-showqueue-symbolic.svg \ - icons/scalable/apps/hb-activity-symbolic.svg \ - icons/scalable/apps/hb-presets-symbolic.svg \ - icons/scalable/apps/hb-start.svg \ - icons/scalable/apps/hb-stop.svg \ - icons/scalable/apps/hb-pause.svg \ - icons/scalable/apps/hb-complete.svg \ - icons/scalable/apps/hb-icon.svg \ - icons/scalable/apps/fr.handbrake.ghb.svg - -hb_menu = fr.handbrake.ghb.desktop - -metainfodir = $(datarootdir)/metainfo -metainfo_in_files = fr.handbrake.ghb.metainfo.xml.in -if ! MINGW -metainfo_DATA = $(metainfo_in_files:.xml.in=.xml) -dist_metainfo_DATA = $(metainfo_files) -endif - -EXTRA_DIST = \ - $(metainfo_in_files) - -DISTCLEANFILES = \ - $(metainfo_files) - -AM_CPPFLAGS = \ - -DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" \ - -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ - -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ - $(HB_CPPFLAGS) - -AM_CFLAGS = -Wall -g - -bin_PROGRAMS = ghb - -# Dummy file, not built. Forces g++ linking -nodist_EXTRA_ghb_SOURCES = dummy.cpp - -ghb_SOURCES = \ - ghbcompat.c \ - ghbcompat.h \ - callbacks.c \ - callbacks.h \ - chapters.c \ - chapters.h \ - title-add.c \ - title-add.h \ - queuehandler.c \ - queuehandler.h \ - videohandler.c \ - videohandler.h \ - audiohandler.c \ - audiohandler.h \ - subtitlehandler.c \ - subtitlehandler.h \ - main.c \ - jobdict.c \ - jobdict.h \ - titledict.c \ - titledict.h \ - settings.c \ - settings.h \ - resources.c \ - resources.h \ - presets.c \ - presets.h \ - preview.c \ - data_res.c \ - data_res.h \ - ui_res.c \ - ui_res.h \ - icon_res.c \ - icon_res.h \ - icons.c \ - icons.h \ - values.c \ - values.h \ - plist.c \ - plist.h \ - hb-backend.c \ - hb-backend.h \ - renderer_button.h \ - renderer_button.c \ - ghb-dvd.c \ - ghb-dvd.h \ - marshalers.c \ - marshalers.h \ - color-scheme.c \ - color-scheme.h \ - power-manager.c \ - power-manager.h - -if MINGW -ghb_LDFLAGS = \ - -mwindows -else -ghb_LDFLAGS = \ - -Wl,--export-dynamic -Wl,--exclude-libs,ALL -endif - -ghb_LDADD = $(HB_LIBS) - -ghb_DEPENDENCIES = $(HB_DIR)/libhb/libhandbrake.a - -icon_res.c : icon_res.gresource.xml $(icons_dep) - glib-compile-resources --generate --target=$@ --c-name ghb_icons --manual-register --sourcedir=$(srcdir) $< - -icon_res.h : icon_res.gresource.xml $(icons_dep) - glib-compile-resources --generate --target=$@ --c-name ghb_icons --manual-register --sourcedir=$(srcdir) $< - -icon_res.o: icon_res.c icon_res.h -icons.o: icon_res.h - -internal_defaults.json : internal_defaults.json.template - cp $(srcdir)/internal_defaults.json.template $@ - -data_res.c : data_res.gresource.xml internal_defaults.json widget.deps widget_reverse.deps - glib-compile-resources --generate --target=$@ --c-name ghb_data --manual-register $< - -data_res.h : data_res.gresource.xml internal_defaults.json widget.deps widget_reverse.deps - glib-compile-resources --generate --target=$@ --c-name ghb_data --manual-register $< - -if GHB_GTK_4_4 -UI=404 -UI_FILE=ghb4.ui -else -if GHB_GTK_3_22 -UI=322 -UI_FILE=ghb3.ui -endif -endif - -ui_res.c : ui_res.gresource.xml ui_res.h $(srcdir)/$(UI_FILE) $(srcdir)/menu.ui - glib-compile-resources --generate --target=$@ --c-name ghb_ui --manual-register $< - -ui_res.h : ui_res.gresource.xml $(srcdir)/$(UI_FILE) $(srcdir)/menu.ui - cp $(srcdir)/menu.ui menu.ui - cp $(srcdir)/$(UI_FILE) ghb.ui - glib-compile-resources --generate --target=$@ --c-name ghb_ui --manual-register $< - -ui_res.o: ui_res.h ui_res.c - -main.o : ui_res.o - -resources.o: data_res.h - -widget_reverse.deps: makedeps.py -widget.deps: makedeps.py - $(HB_PYTHON) $(srcdir)/makedeps.py - -## copy file if msgfmt fails as workaround for outdated version on NetBSD -fr.handbrake.ghb.metainfo.xml: fr.handbrake.ghb.metainfo.xml.in - $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ || cp $< $@ - -fr.handbrake.ghb.metainfo.xml.in: fr.handbrake.ghb.metainfo.xml.in.in - sed -e 's^RELEASE_TAG^^' $< > $@ - -$(srcdir)/marshalers.h: marshalers.list - glib-genmarshal --prefix=ghb_marshal $(srcdir)/marshalers.list --header > $(srcdir)/marshalers.h - -$(srcdir)/marshalers.c: marshalers.list - glib-genmarshal --prefix=ghb_marshal $(srcdir)/marshalers.list --body > $(srcdir)/marshalers.c - -gtk_update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)/$(datadir)/icons/hicolor - -uninstall-local: - for icon in $(icons); do \ - rm -f $(DESTDIR)/$(datadir)/icons/hicolor/scalable/apps/$$icon; \ - done - @-if test -z "$(DESTDIR)"; then \ - echo "Updating Gtk icon cache."; \ - $(gtk_update_icon_cache); \ - else \ - echo "*** Icon cache not updated. After install, run this:"; \ - echo "*** $(gtk_update_icon_cache)"; \ - fi - rm -f $(DESTDIR)/$(datadir)/applications/$(hb_menu) - -install-data-local: - for icon in $(icons); do \ - mkdir -p $(DESTDIR)/$(datadir)/icons/hicolor/scalable/apps/; \ - $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)/$(datadir)/icons/hicolor/scalable/apps/$$icon; \ - done - @-if test -z "$(DESTDIR)"; then \ - echo "Updating Gtk icon cache."; \ - $(gtk_update_icon_cache); \ - else \ - echo "*** Icon cache not updated. After install, run this:"; \ - echo "*** $(gtk_update_icon_cache)"; \ - fi - mkdir -p $(DESTDIR)/$(datadir)/applications/; \ - $(INSTALL_DATA) $(srcdir)/$(hb_menu) $(DESTDIR)/$(datadir)/applications/$(hb_menu) - diff --git a/gtk/src/icon_res.gresource.xml b/gtk/src/icon_res.gresource.xml deleted file mode 100644 index 336ed213049b..000000000000 --- a/gtk/src/icon_res.gresource.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - icons/24x24/apps/hb-advanced-symbolic.symbolic.png - icons/32x32/apps/hb-source-symbolic.symbolic.png - icons/32x32/apps/hb-picture-symbolic.symbolic.png - icons/32x32/apps/hb-add-queue-symbolic.symbolic.png - icons/32x32/apps/hb-showqueue-symbolic.symbolic.png - icons/32x32/apps/hb-activity-symbolic.symbolic.png - icons/32x32/apps/hb-presets-symbolic.symbolic.png - icons/32x32/apps/hb-start.png - icons/32x32/apps/hb-stop.png - icons/32x32/apps/hb-pause.png - icons/48x48/apps/hb-advanced-symbolic.symbolic.png - icons/64x64/apps/hb-source-symbolic.symbolic.png - icons/64x64/apps/hb-picture-symbolic.symbolic.png - icons/64x64/apps/hb-add-queue-symbolic.symbolic.png - icons/64x64/apps/hb-showqueue-symbolic.symbolic.png - icons/64x64/apps/hb-activity-symbolic.symbolic.png - icons/64x64/apps/hb-presets-symbolic.symbolic.png - icons/64x64/apps/hb-start.png - icons/64x64/apps/hb-stop.png - icons/64x64/apps/hb-pause.png - icons/scalable/apps/hb-advanced-symbolic.svg - icons/scalable/apps/hb-source-symbolic.svg - icons/scalable/apps/hb-picture-symbolic.svg - icons/scalable/apps/hb-add-queue-symbolic.svg - icons/scalable/apps/hb-showqueue-symbolic.svg - icons/scalable/apps/hb-activity-symbolic.svg - icons/scalable/apps/hb-presets-symbolic.svg - icons/scalable/apps/hb-start.svg - icons/scalable/apps/hb-stop.svg - icons/scalable/apps/hb-pause.svg - icons/scalable/apps/hb-complete.svg - icons/scalable/apps/hb-icon.svg - icons/scalable/apps/fr.handbrake.ghb.svg - - diff --git a/gtk/src/main.c b/gtk/src/main.c index ae0d23b2867c..421cda2d9941 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -34,7 +34,7 @@ #include #endif -#include +#include "config.h" #include "ghbcompat.h" diff --git a/gtk/src/marshalers.c b/gtk/src/marshalers.c deleted file mode 100644 index 8f118cb4d2c3..000000000000 --- a/gtk/src/marshalers.c +++ /dev/null @@ -1,125 +0,0 @@ -/* This file is generated by glib-genmarshal, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ -#include - -#ifdef G_ENABLE_DEBUG -#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) -#define g_marshal_value_peek_char(v) g_value_get_schar (v) -#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) -#define g_marshal_value_peek_int(v) g_value_get_int (v) -#define g_marshal_value_peek_uint(v) g_value_get_uint (v) -#define g_marshal_value_peek_long(v) g_value_get_long (v) -#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) -#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) -#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) -#define g_marshal_value_peek_enum(v) g_value_get_enum (v) -#define g_marshal_value_peek_flags(v) g_value_get_flags (v) -#define g_marshal_value_peek_float(v) g_value_get_float (v) -#define g_marshal_value_peek_double(v) g_value_get_double (v) -#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) -#define g_marshal_value_peek_param(v) g_value_get_param (v) -#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) -#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) -#define g_marshal_value_peek_object(v) g_value_get_object (v) -#define g_marshal_value_peek_variant(v) g_value_get_variant (v) -#else /* !G_ENABLE_DEBUG */ -/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. - * Do not access GValues directly in your code. Instead, use the - * g_value_get_*() functions - */ -#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int -#define g_marshal_value_peek_char(v) (v)->data[0].v_int -#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint -#define g_marshal_value_peek_int(v) (v)->data[0].v_int -#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint -#define g_marshal_value_peek_long(v) (v)->data[0].v_long -#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong -#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 -#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 -#define g_marshal_value_peek_enum(v) (v)->data[0].v_long -#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong -#define g_marshal_value_peek_float(v) (v)->data[0].v_float -#define g_marshal_value_peek_double(v) (v)->data[0].v_double -#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer -#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer -#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer -#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer -#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer -#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer -#endif /* !G_ENABLE_DEBUG */ - -/* VOID:STRING,STRING (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:2) */ -void -ghb_marshal_VOID__STRING_STRING (GClosure *closure, - GValue *return_value G_GNUC_UNUSED, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint G_GNUC_UNUSED, - gpointer marshal_data) -{ - typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, - gpointer arg1, - gpointer arg2, - gpointer data2); - GCClosure *cc = (GCClosure *) closure; - gpointer data1, data2; - GMarshalFunc_VOID__STRING_STRING callback; - - g_return_if_fail (n_param_values == 3); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback); - - callback (data1, - g_marshal_value_peek_string (param_values + 1), - g_marshal_value_peek_string (param_values + 2), - data2); -} - -/* BOOLEAN:BOXED (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:3) */ -void -ghb_marshal_BOOLEAN__BOXED (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint G_GNUC_UNUSED, - gpointer marshal_data) -{ - typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED) (gpointer data1, - gpointer arg1, - gpointer data2); - GCClosure *cc = (GCClosure *) closure; - gpointer data1, data2; - GMarshalFunc_BOOLEAN__BOXED callback; - gboolean v_return; - - g_return_if_fail (return_value != NULL); - g_return_if_fail (n_param_values == 2); - - if (G_CCLOSURE_SWAP_DATA (closure)) - { - data1 = closure->data; - data2 = g_value_peek_pointer (param_values + 0); - } - else - { - data1 = g_value_peek_pointer (param_values + 0); - data2 = closure->data; - } - callback = (GMarshalFunc_BOOLEAN__BOXED) (marshal_data ? marshal_data : cc->callback); - - v_return = callback (data1, - g_marshal_value_peek_boxed (param_values + 1), - data2); - - g_value_set_boolean (return_value, v_return); -} - diff --git a/gtk/src/marshalers.h b/gtk/src/marshalers.h deleted file mode 100644 index fd05e7b827aa..000000000000 --- a/gtk/src/marshalers.h +++ /dev/null @@ -1,33 +0,0 @@ -/* This file is generated by glib-genmarshal, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */ -#ifndef __GHB_MARSHAL_MARSHAL_H__ -#define __GHB_MARSHAL_MARSHAL_H__ - -#include - -G_BEGIN_DECLS - -/* VOID:STRING (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:1) */ -#define ghb_marshal_VOID__STRING g_cclosure_marshal_VOID__STRING - -/* VOID:STRING,STRING (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:2) */ -extern -void ghb_marshal_VOID__STRING_STRING (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); - -/* BOOLEAN:BOXED (/home/jstebbins/Source/hb/HandBrake/build.dbg/../gtk/src/marshalers.list:3) */ -extern -void ghb_marshal_BOOLEAN__BOXED (GClosure *closure, - GValue *return_value, - guint n_param_values, - const GValue *param_values, - gpointer invocation_hint, - gpointer marshal_data); - - -G_END_DECLS - -#endif /* __GHB_MARSHAL_MARSHAL_H__ */ diff --git a/gtk/src/meson.build b/gtk/src/meson.build new file mode 100644 index 000000000000..cf141b980d88 --- /dev/null +++ b/gtk/src/meson.build @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2023 HandBrake Team + +# Project sources +ghb_src = files( + 'audiohandler.c', + 'callbacks.c', + 'chapters.c', + 'color-scheme.c', + 'ghb-dvd.c', + 'ghbcompat.c', + 'hb-backend.c', + 'icons.c', + 'jobdict.c', + 'main.c', + 'plist.c', + 'power-manager.c', + 'presets.c', + 'preview.c', + 'queuehandler.c', + 'renderer_button.c', + 'resources.c', + 'settings.c', + 'subtitlehandler.c', + 'title-add.c', + 'titledict.c', + 'values.c', + 'videohandler.c', +) + +ui_dir = get_option('gtk4') ? 'ui-gtk4' : 'ui-gtk3' + +ui_files = files( + ui_dir / 'menu.ui', + ui_dir / 'ghb.ui', +) + +config_h = configuration_data() +config_h.set('GHB_FLATPAK', get_option('flatpak'), + description: 'Define if building HandBrake for Flatpak.') +config_h.set_quoted('GETTEXT_PACKAGE', 'ghb', + description: 'GETTEXT package name') +config_h.set('ENABLE_NLS', true, + description: 'Define if translation of program messages is requested.') +config_h.set_quoted('PACKAGE_LOCALE_DIR', + get_option('prefix') / get_option('localedir'), + description: 'The directory to install the translation files in.') + +configure_file(configuration: config_h, output: 'config.h') + +# Generated files + +ui = gnome.compile_resources('ui_res', 'ui_res.gresource.xml', + dependencies: ui_files, + source_dir: ui_dir, + extra_args: '--manual-register', + c_name: 'ghb_ui') + +# Build targets +executable('ghb', + sources: [ghb_src, data, icons, ui, marshalers], + dependencies: ghb_deps, + include_directories: hb_incdirs, + link_language: 'cpp', + link_args: get_option('c_link_args'), + install: true) diff --git a/gtk/src/preview.c b/gtk/src/preview.c index 8c1e2fedc187..944fbd89871f 100644 --- a/gtk/src/preview.c +++ b/gtk/src/preview.c @@ -22,6 +22,7 @@ */ #include "ghbcompat.h" +#include "config.h" #include #include diff --git a/gtk/src/ghb3.ui b/gtk/src/ui-gtk3/ghb.ui similarity index 100% rename from gtk/src/ghb3.ui rename to gtk/src/ui-gtk3/ghb.ui diff --git a/gtk/src/menu.ui b/gtk/src/ui-gtk3/menu.ui similarity index 100% rename from gtk/src/menu.ui rename to gtk/src/ui-gtk3/menu.ui diff --git a/gtk/src/ghb4.ui b/gtk/src/ui-gtk4/ghb.ui similarity index 100% rename from gtk/src/ghb4.ui rename to gtk/src/ui-gtk4/ghb.ui diff --git a/gtk/src/ui-gtk4/menu.ui b/gtk/src/ui-gtk4/menu.ui new file mode 100644 index 000000000000..f807fe719d88 --- /dev/null +++ b/gtk/src/ui-gtk4/menu.ui @@ -0,0 +1,175 @@ + + + + + + + _File +
+ + app.source + Open _Source + <control>O + + + app.single + Open Single _Title + <shift><control>O + + + app.destination + Set _Destination + <control>S + +
+
+
+
+ + app.preferences + _Preferences + + + app.quit + _Quit + <control>Q + +
+
+ + _Queue +
+ + app.queue-add + _Add + <alt>A + + + app.queue-add-all + Add _Multiple + <shift><alt>A + +
+
+ + app.queue-start + _Start Encoding + <control>E + + + app.queue-pause + _Pause Encoding + <control>P + +
+
+ + app.queue-export + S_ave Queue + + + app.queue-import + _Load Queue File + +
+
+ + _View +
+ + app.show-presets + Presets _List + <alt>L + + + app.show-queue + _Queue + <alt>U + + + app.show-preview + _Preview + <alt>R + + + app.show-activity + _Activity Window + <alt>W + +
+
+ + _Presets +
+ + app.preset-default + Set De_fault + +
+
+ + app.preset-save + _Save + + + app.preset-save-as + Save _As + + + app.preset-rename + _Rename + + + app.preset-remove + _Delete + +
+
+ + app.preset-import + _Import + + + app.preset-export + _Export + +
+
+ + app.presets-reload + Reset _Built-in Presets + +
+
+ + _Help +
+ + app.about + _About + + + app.guide + _Guide + F1 + +
+
+
+ +
+ + app.hbfd + HandBrake For _Dummies + +
+
+ +
+ + app.dvd-open + media-optical + +
+
+
diff --git a/make/configure.py b/make/configure.py index 900288c546d1..83738140b77d 100644 --- a/make/configure.py +++ b/make/configure.py @@ -1689,7 +1689,7 @@ class Tools: libtool = ToolProbe( 'LIBTOOL.exe', 'libtool', 'libtool', abort=True ) lipo = ToolProbe( 'LIPO.exe', 'lipo', 'lipo', abort=False ) pkgconfig = ToolProbe( 'PKGCONFIG.exe', 'pkgconfig', 'pkg-config', abort=True, minversion=[0,27,0] ) - meson = ToolProbe( 'MESON.exe', 'meson', 'meson', abort=True, minversion=[0,49,0] ) + meson = ToolProbe( 'MESON.exe', 'meson', 'meson', abort=True, minversion=[0,51,0] ) nasm = ToolProbe( 'NASM.exe', 'asm', 'nasm', abort=True, minversion=[2,13,0] ) ninja = ToolProbe( 'NINJA.exe', 'ninja', 'ninja-build', 'ninja', abort=True ) cargo = ToolProbe( 'CARGO.exe', 'cargo', 'cargo', abort=False ) diff --git a/make/cross/aarch64-w64-mingw32.meson b/make/cross/aarch64-w64-mingw32.meson new file mode 100644 index 000000000000..171544df9962 --- /dev/null +++ b/make/cross/aarch64-w64-mingw32.meson @@ -0,0 +1,22 @@ +[binaries] +c = 'aarch64-w64-mingw32-gcc' +cpp = 'aarch64-w64-mingw32-g++' +rust = ['rustc', '--target', 'aarch64-pc-windows-msvc', '-C', 'linker=aarch64-w64-mingw32-gcc'] +ar = 'aarch64-w64-mingw32-ar' +pkgconfig = 'aarch64-w64-mingw32-pkg-config' +ranlib = 'aarch64-w64-mingw32-ranlib' +strip = 'aarch64-w64-mingw32-strip' +windres = 'aarch64-w64-mingw32-windres' +dlltool = 'aarch64-w64-mingw32-dlltool' + +[builtin_options] +c_link_args = ['-static-libgcc'] + +[properties] +needs_exe_wrapper = true + +[host_machine] +system = 'windows' +cpu_family = 'aarch64' +cpu = 'aarch64' +endian = 'little' diff --git a/make/cross/arm64-darwin-gcc.meson b/make/cross/arm64-darwin-gcc.meson new file mode 100644 index 000000000000..ec728574b6ee --- /dev/null +++ b/make/cross/arm64-darwin-gcc.meson @@ -0,0 +1,9 @@ +[binaries] +c = 'clang' +cpp = 'clang++' + +[host_machine] +system = 'darwin' +cpu_family = 'aarch64' +cpu = 'aarch64' +endian = 'little' diff --git a/make/cross/x86_64-darwin-gcc.meson b/make/cross/x86_64-darwin-gcc.meson new file mode 100644 index 000000000000..a6b1c5fc3f09 --- /dev/null +++ b/make/cross/x86_64-darwin-gcc.meson @@ -0,0 +1,9 @@ +[binaries] +c = 'clang' +cpp = 'clang++' + +[host_machine] +system = 'darwin' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/make/cross/x86_64-w64-mingw32.meson b/make/cross/x86_64-w64-mingw32.meson new file mode 100644 index 000000000000..9ca9b134d95d --- /dev/null +++ b/make/cross/x86_64-w64-mingw32.meson @@ -0,0 +1,23 @@ +[binaries] +c = 'x86_64-w64-mingw32-gcc' +cpp = 'x86_64-w64-mingw32-g++' +rust = ['rustc', '--target', 'x86_64-pc-windows-msvc', '-C', 'linker=x86_64-w64-mingw32-gcc'] +ar = 'x86_64-w64-mingw32-ar' +pkgconfig = 'x86_64-w64-mingw32-pkg-config' +ranlib = 'x86_64-w64-mingw32-ranlib' +strip = 'x86_64-w64-mingw32-strip' +windres = 'x86_64-w64-mingw32-windres' +dlltool = 'x86_64-w64-mingw32-dlltool' + +[builtin_options] +c_link_args = ['-static-libgcc'] + +[properties] +needs_exe_wrapper = true +has_function_posix_memalign = false + +[host_machine] +system = 'windows' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' diff --git a/test/fr.handbrake.HandBrakeCLI.metainfo.xml.in.in b/test/fr.handbrake.HandBrakeCLI.metainfo.xml.in.in index 5571ec82f32c..f434b4b94879 100644 --- a/test/fr.handbrake.HandBrakeCLI.metainfo.xml.in.in +++ b/test/fr.handbrake.HandBrakeCLI.metainfo.xml.in.in @@ -1,10 +1,10 @@ - + fr.handbrake.HandBrakeCLI jstebbins.hb_AT_gmail.com CC0-1.0 - GPL-2.0+ + GPL-2.0 HandBrakeCLI Video Transcoder @@ -64,35 +64,7 @@ RELEASE_TAG - - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - none - +