Commit Graph

214 Commits

Author SHA1 Message Date
Moritz Bunkus
a8b1eab3dc
remove remaining occurrences of PCRE2 & JPCRE2 2021-06-27 12:53:38 +02:00
Moritz Bunkus
80cbad698d
remove usage of the magic library
Part of the fix of #3137.
2021-06-16 16:42:01 +02:00
Moritz Bunkus
3caf7deabf
build system: link command line applications against Qt's core library
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:40 +02:00
Moritz Bunkus
0a2cb7d1bd
tests: support skipping tests for certain build configurations 2021-04-09 18:06:57 +02:00
Moritz Bunkus
76f7246087
build system: avoid warnings about files without symbols on macOS 2021-03-14 13:01:03 +01:00
Moritz Bunkus
79bcf14c8f
only link against libstdc++fs if it's actually available
It's neither available nor required on macOS.
2021-02-20 00:43:48 +01:00
Moritz Bunkus
752f66db45
switch from boost::filesystem to std::filesystem 2021-02-19 21:28:23 +01:00
Moritz Bunkus
6a5b4b97db
BCP 47: add ISO 639-3 languages (only those of type "living")
Part of the implementation of #3007.
2021-02-17 22:19:10 +01:00
Moritz Bunkus
c9884c3e77
build system: don't optimize when compiling iso639_language_list.cpp
Even `-O1` causes compilation time & memory usage to skyrocket,
possibly exponentially, with the number of entries to `emplace_back()`
into the vector.

This isn't so bad with the current number of entries (489). In that
case compilation with `-O3` only takes 7.2s.

However, extending the list to cover ISO 639-3 means that the list
will include 7160 entries. With that many entries things are much,
much more severe:

• with `-O1` alone compilation takes 11m 23s already.
• with `-O3` memory usage exceeded 20 GB after six minutes when I had
  to abort due to other running applications getting killed.

Runtime cost is negligible. I ran a micro benchmark. With all 7160
entries and no optimizations (`-O0`) the initialization takes ~1.4
milliseconds for the one-time initialization on startup; with
optimizations (`-O1`) it still took ~570 microseconds.

Part of the implementation of #3007.
2021-02-17 22:18:20 +01:00
Moritz Bunkus
3854feed87
format verifier: ignore one more entry in the Turkish translation
…%100… as a translation for …100%…; the string isn't used in Qt,
therefore OK.
2021-02-14 11:21:07 +01:00
Moritz Bunkus
b0986ba9ff
BCP 47: use emplace_back for initialization of ISO 15924 script list
It's much faster than using the initializer lists. See previous commits
for more details.
2021-01-26 14:53:31 +01:00
Moritz Bunkus
5d04e5bfd5
BCP 47: use emplace_back for initialization of ISO 3166 region list
It's much faster than using the initializer lists. See previous commits
for more details.
2021-01-26 14:53:31 +01:00
Moritz Bunkus
11584c416a
BCP 47: use emplace_back for initialization of IANA language subtag registries
It's much faster than using the initializer lists. See previous commit
for more details.
2021-01-26 14:53:31 +01:00
Moritz Bunkus
5276839f16
BCP 47: use emplace_back for initialization of ISO 639 language list
It's much faster than using the initializer lists. Here's the result
from a micro benchmark I ran:

2021-01-25T23:49:20+01:00
Running ./bench.g++
Run on (8 X 4500 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x4)
  L1 Instruction 32 KiB (x4)
  L2 Unified 256 KiB (x4)
  L3 Unified 8192 KiB (x1)
Load Average: 1.08, 0.72, 0.60
-------------------------------------------------------------
Benchmark                   Time             CPU   Iterations
-------------------------------------------------------------
BM_InitializerList      59667 ns        59625 ns        70526
BM_EmplaceBack          24515 ns        24497 ns       176817
BM_EmplaceBack2         16970 ns        16961 ns       247652
BM_PushBack             52831 ns        52796 ns        79202
BM_PushBack2            52858 ns        52823 ns        79004

The five benchmarks were:

• BM_InitializerList — the old way with initializer lists. Basically
  the same code currently being replaced.

• BM_EmplaceBack — Reserving space & adding each entry with
  g_languages.emplace_back(). A constructor was added to language_t
  struct taking the std::strings as const references (std::string
  const &), assigning them to the member variables normally.

• BM_EmplaceBack2 — Reserving space & adding each entry with
  g_languages.emplace_back(). A constructor was added to language_t
  struct taking the std::strings as rvalue references (std::string &&)
  assigning them to the member variables using std::move().

• BM_PushBack — Reserving space & adding each entry with
  g_languages.push_back(). A constructor was added to language_t
  struct taking the std::strings as const references (std::string
  const &), assigning them to the member variables normally.

• BM_PushBack2 — Reserving space & adding each entry with
  g_languages.push_back(). A constructor was added to language_t
  struct taking the std::strings as rvalue references (std::string &&)
  assigning them to the member variables using std::move().
2021-01-26 14:53:30 +01:00
Moritz Bunkus
68a38909d4
BCP 47: ISO 639 code list: include bool to say if part of ISO 639-2
Part of #3007.
2021-01-26 14:53:30 +01:00
Moritz Bunkus
ed309582ce
BCP 47: various lists: cosmetics (remove superfluous space at end of row) 2021-01-26 14:53:30 +01:00
Moritz Bunkus
b8549432ef
build system: use compiler-style warning output when updating QRC
Allows editors to pick up on them & "go to next warning/error" type
key bindings to work
2020-12-12 13:05:12 +01:00
Ofir Petrushka
962088f59c style: rubocop Style/Encoding
Fix Style/Encoding by rubocop

Signed-off-by: Cody Coder <cody.coder@gitcodebuddy.com>
2020-10-07 11:58:06 +11:00
Moritz Bunkus
82b4c7eaf9
Rakefile: remove debug output 2020-09-07 17:53:37 +02:00
Moritz Bunkus
2156af77fa
Rakefile: add dev target for updating all lists 2020-09-07 17:49:33 +02:00
Moritz Bunkus
1decaad545
BCP 47 language_c: support for UN M.49 region codes without ISO 3166 alpha codes
Part of the implementation of #2919.
2020-09-07 17:49:32 +02:00
Moritz Bunkus
4fd4d56374
ISO 3166: rename from countries to regions
Preparation for adding UN M.49 regions that don't have an ISO 3166-1
country code.

Part of the implementation of #2919.
2020-09-07 17:49:32 +02:00
Moritz Bunkus
19e61a2d2e
IANA language subtag registry: make registry download & parsing reusable
Part of the implementation of #2919.
2020-09-07 17:49:32 +02:00
Moritz Bunkus
941e47d97c
build system: look for & require the PCRE2 library 2020-08-20 13:29:29 +02:00
Moritz Bunkus
d5dbdb0a7e
replace outdated link to GPLv2 with current one 2020-08-01 18:03:54 +02:00
Moritz Bunkus
dff305d136
IANA Language Subtag Registry: add extended language subtags
Part of the implementation of #2419.
2020-07-05 11:35:31 +02:00
Moritz Bunkus
bf89f72189
ISO 639 code: move to namespace mtx::iso639
Part of the implementation of #2419.
2020-07-05 11:35:20 +02:00
Moritz Bunkus
908329f1ca
Rakefile: use range with explicit upper end for older Ruby versions 2020-07-02 19:34:46 +02:00
Moritz Bunkus
ef1a803687
Rakefile: add target for generating IANA language subtag registry 2020-07-02 19:09:47 +02:00
Moritz Bunkus
c8742e80d3
Rakefile: add target for generating list of ISO 3166 countries 2020-07-02 19:09:47 +02:00
Moritz Bunkus
d5239fabb9
Rakefile: add target for generating list of ISO 15924 scripts 2020-07-02 19:09:47 +02:00
Moritz Bunkus
572bf8d552
Rakefile: fix name/description of target generating ISO 639 language list 2020-07-02 19:09:47 +02:00
Moritz Bunkus
d34d87804c
build system: fix dependencies of QRC files wrt. icons 2020-06-21 20:23:11 +02:00
Moritz Bunkus
3e4f59d3ab
build system: add dev target for updating ISO 639 language list 2020-06-02 19:33:10 +02:00
Moritz Bunkus
a8139750c5
build system: look for and use libdvdread if found
This library is required for reading chapters from DVDs.

Part of the implementation of #2808.
2020-05-03 11:53:20 +02:00
Moritz Bunkus
080dfeda57
source: use std::regex instead of boost::regex 2019-12-31 15:53:03 +01:00
Moritz Bunkus
e9d65b182b
build system: add dependencies for Qt resource files 2019-11-08 11:12:53 +01:00
Moritz Bunkus
64d2f5e112
GUI: Windows: add dark mode with help of QDarkStyleSheet project
The dark mode is only turned on if Windows 10's own dark mode is
enabled. This manual dark mode configuration is necessary as Qt itself
doesn't support Windows' dark mode yet; see the following bug:

https://bugreports.qt.io/browse/QTBUG-72028

This isn't a problem for other operating systems (Linux, macOS…) as Qt
uses the system colors there and will use dark colors when the
system's colors are set to dark colors, too.
2019-10-12 23:32:03 +02:00
Moritz Bunkus
95f7d12f48
Revert "build system: verify configured host type is same as current host type"
This reverts commit af744cea80.
2019-09-27 18:02:13 +02:00
Moritz Bunkus
9c50085e3f
all: macOS: normalize file & path names to NFD
Fixes #2620.
2019-09-27 17:27:16 +02:00
Moritz Bunkus
af744cea80
build system: verify configured host type is same as current host type 2019-09-27 17:01:22 +02:00
Moritz Bunkus
6a8246e7eb
build system: include git commit number since last release in version for dev builds 2019-09-11 20:27:47 +02:00
Moritz Bunkus
61b8dfd203
build system: create ebml_export.h if using internal libEBML 2019-05-25 12:24:38 +02:00
Moritz Bunkus
3cbd95b003
build system: move compiler flag determination to Rakefile
Logic's more straight forward to implement there instead of having to
check in `configure`, adding a variable to `build-local.in` and using
that variable later on. The logic's the same in both places anyway.
2019-02-23 21:11:19 +01:00
Moritz Bunkus
0830be34db
build sys: include globally-required modules from single place 2019-02-05 13:45:34 +01:00
Moritz Bunkus
2d7d27f504
build system: fix building with non-UTF-8 locales
Fixes #2474.
2019-01-05 15:10:14 +01:00
Moritz Bunkus
d6707da459
build system: protect digest calls from re-entry
The code for Ruby's Digest module seems to be racy
wrt. multi-threading. See e.g.
https://github.com/aws/aws-sdk-ruby/issues/525 for details.
2018-12-04 21:13:17 +01:00
Moritz Bunkus
cc7b32a6f4
build system: implement fmt::format & Qt verification in translation files 2018-12-04 17:18:50 +01:00
Moritz Bunkus
6e7f04a142
fmt conversion: integrate bundled fmt into build system 2018-11-20 21:30:27 +01:00
Moritz Bunkus
d1cd5f2ffe
build system: handle OS-specific source file names everywhere
…and not just in the src/mkvtoolnix-gui sub-directory.
2018-11-04 18:58:06 +01:00