Commit Graph

29 Commits

Author SHA1 Message Date
Moritz Bunkus
ecf44d0dbc
configure: fix setting HAVE_QTDBUS if module is found
The m4 macro `AC_DEFINE()` seems to write the definition into a file
that's later evaluated and from which `config.h` is built. This
temporary file must reside in the proper directory, otherwise
`configure` will only know that `HAVE_QTDBUS` might be defined but not
that it should actually be set.

The function checking for Qt6 uses a different temporary directory for
its checks whether `qmake` can compile with certain modules. For the
invocations it changes the current working directory to the temporary
directory. If `AC_DEFINE()` is used while the working directory is
changed, this will break the mechanism described above.

The solution is to only use `AC_DEFINE()` once the current working
directory's been changed back to the original one.

fixes #3744
2024-10-01 12:50:14 +02:00
Moritz Bunkus
ce172cf8bc
configure: don't require Qt's GUI libraries when called with --disable-gui
Fixes #3680.
2024-03-24 21:09:35 +01:00
Moritz Bunkus
f097cd9751
configure: fix variable name in Qt6 error message 2024-01-08 17:55:45 +01:00
Moritz Bunkus
d8356e8c08
remove support for Qt 5 2023-12-10 12:24:33 +01:00
Moritz Bunkus
2c41892286
configure: Qt6 detection: require at least 6.2.0; require 'multimedia' module
See #3649.
2023-12-09 23:37:14 +01:00
Moritz Bunkus
a95d9e844f
configure: Qt6 detection: trash qmake's info messages 2023-12-09 20:30:40 +01:00
Moritz Bunkus
c86e5d1250
Qt6 detection: redirect qmake's STDERR to config.log
See #3649
2023-12-09 11:23:27 +01:00
Moritz Bunkus
9980c4be35
configure: make use of mktemp compatible with e.g. macOS
Fixes #3608
2023-09-02 10:15:09 +02:00
Moritz Bunkus
eade36c82d
configure: Qt6: pass -spec linux-clang/g++ if compiling on Linux
Otherwise `qmake` might add compiler flags that aren't understood by
the other one.

Actual issue that triggered this change: on Arch with Qt 6.5.2 no
matter what `CC`/`CXX` are set to, `qmake` always assumes `g++` & uses
`linux-g++` as the spec, adding `-mno-direct-extern-access`. `clang`'s
equivalent is `-fno-direct-access-external-data`, though.
2023-08-20 16:03:12 +02:00
Moritz Bunkus
7f2e0378d8
GUI: use Fusion style on Windows & remove "disable dark mode" option
Qt 6.5 has been released, and with it proper support for Windows 10's
& 11's dark application mode, but only for those styles that support
it. "Fusion" is one such style, but the old "Windows Vista" that
MKVToolNix had been using until now isn't.

As this is proper support for the dark application mode, the option
for disabling said mode has been removed — also due to it not being
easy to really disable the mode in Qt, nor to retrieve the default
light palette if Windows' dark application mode is on.

Fixes #3264 and others.
2023-04-04 22:55:50 +02:00
Moritz Bunkus
322510a661
configure: Qt6: hide qmake errors about missing modules when probing 2023-02-08 20:05:56 +01:00
Moritz Bunkus
718290dd7c
configure: Qt6: actively probe for QtDbus & QtMultimedia modules
Relying on QtDbus' presence on non-Windows systems doesn't have to be
OK; e.g. on macOS it isn't present either.
2023-02-08 20:03:45 +01:00
Moritz Bunkus
a03df87fe8
configure: adjust to autoconf 2.71 & require at least 2.69 2022-11-04 18:56:43 +01:00
Moritz Bunkus
95fe2f1f62
configure: define HAVE_QTDBUS for Qt6 on non-Windows
The module itself had already been required anyway, but that wasn't
signalled to the source code.
2022-11-04 15:13:03 +01:00
fauxpark
9a60f4be24 MSYS2 build: Qt 6 2022-07-30 22:40:22 +10:00
fauxpark
80bd29a189 Missed the dash 2022-07-26 15:58:55 +10:00
fauxpark
8a49ecfbe6 Fix typo in qmake6 version check 2022-07-26 15:56:20 +10:00
Moritz Bunkus
1c05841113
SVG icon theme: add SVG variants of most raster icons
Part of the fix of #3335.
2022-04-24 13:41:20 +02:00
Moritz Bunkus
9deee8e6a1
build system: Qt6: try to detect qtmultimedia for mingw, too 2022-04-09 11:42:42 +02:00
Moritz Bunkus
f0521d73c1
configure, GUI: fix detection of & compilation with Qt multimedia ≥ 6.2.0 2022-04-09 11:25:23 +02:00
Moritz Bunkus
9a4119c67b
configure: Qt6: detect if multimedia module is actually available 2022-03-02 19:26:12 +01:00
Moritz Bunkus
f73d30ac51
GUI: Qt6: actively check if QMediaPlayer is available instead of version check 2022-02-21 22:51:16 +01:00
Moritz Bunkus
b489d894fe
build system: Qt6: fix plugin detection for static mingw builds 2022-02-21 22:51:15 +01:00
Moritz Bunkus
e65b7816fd
configure: preliminary support for Qt6 with MXE (mingw cross compiler) 2022-02-19 16:56:54 +01:00
Alex James
8c91bf668a
Qt 6 check: remove $(EXPORT_ARCH_ARGS) from CFLAGS
This fixes compilation with Qt 6 on macOS.
2021-07-11 15:18:13 -05:00
Moritz Bunkus
783229560f
configure: require Qt 5 or 6; add --disable-gui for disabling the GUI
This is in preparation of fixing #3137. The plan is not to use
libfile's MIME type detection but Qt's. As both mkvmerge and the GUI
need to auto-detect the MIME type, this means that the command line
applications will have to be linked against Qt's core library (but not
the GUI libraries).
2021-06-15 22:39:33 +02:00
Moritz Bunkus
7be2231690
Qt 6 check: add missing "Checking for Qt 6" message 2021-05-30 14:33:05 +02:00
Moritz Bunkus
8cf8251d6b
Qt 6 detection: try compiling & linking a test program
Prevents using the system qmake6 in cross-compilation situations.

Also cleans up the paths to `lconvert`, `moc`, `rcc` and `uic` from
the Qt 6 detection so that Qt 5 can detect their own version.

Part of the implementation of #3115.
2021-05-24 21:12:39 +02:00
Moritz Bunkus
2848178815
configure: detect & use Qt 6 if present, prefer over Qt 5
Qt 6

`configure` will look for Qt 6 first and only continue looking for Qt
5 if Qt 6 isn't found or disabled via `--disable-qt6`.

Qt 6 detection works by first looking for the `qmake6` binary. Its location
can be specified with the `--with-qmake6=…` option.

All other Qt 6 related facts (such as compiler & linker flags or the
position of the other required tools such as `lconvert`, `moc`, `rcc` and
`uic`) will be derived from the output generated by `qmake6`.

Note that at this point Qt 6 is not yet supported for the cross-compilation
build to Windows, nor is a static Qt 6 build supported yet.

Note that the command line options `--enable-static-qt`,
`--with-qt-pkg-config-modules` and `--without-qt-pkg-config` only apply to
the Qt 5 and have no effect on Qt 6.

Qt 5

The options for specifying the position of the tools (`--with-moc=…`,
`--with-rcc=…` and `--with-uic=…`) have been removed. Their position
will now be derived from the output generated by `qmake`.

General

Completely disabling the GUI now requires passing both `--disable-qt6`
and `--disable-qt` options.

Part of the implementation of #3115.
2021-05-24 20:53:09 +02:00