diff options
| -rw-r--r-- | cscript | 27 | ||||
| -rw-r--r-- | src/lib/change_signaller.h | 8 | ||||
| -rw-r--r-- | src/lib/cross.h | 1 | ||||
| -rw-r--r-- | src/lib/email.cc | 2 | ||||
| -rw-r--r-- | src/lib/hints.cc | 19 | ||||
| -rw-r--r-- | src/wx/dolby_doremi_certificate_panel.cc | 110 | ||||
| -rw-r--r-- | src/wx/download_certificate_panel.cc | 1 | ||||
| -rw-r--r-- | src/wx/password_entry.cc | 10 | ||||
| -rw-r--r-- | src/wx/supporters.cc | 6 | ||||
| -rw-r--r-- | src/wx/wscript | 2 | ||||
| -rw-r--r-- | wscript | 2 |
11 files changed, 73 insertions, 115 deletions
@@ -535,7 +535,7 @@ def make_spec(filename, version, target, options, requires=None): print('/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :', file=f) def dependencies(target, options): - deps = [('libdcp', 'v1.9.22', {'c++17': target.platform.startswith('osx')})] + deps = [('libdcp', 'v1.9.23', {'c++17': target.platform.startswith('osx')})] deps.append(('libsub', 'v1.6.52')) deps.append(('leqm-nrt', '30dcaea1373ac62fba050e02ce5b0c1085797a23')) deps.append(('rtaudio', 'f619b76')) @@ -546,21 +546,27 @@ def dependencies(target, options): deps.append(('openssl', '54298369cacfe0ae01c5aa42ace8a463fd2e7a2e')) if can_build_disk(target): deps.append(('lwext4', 'ab082923a791b58478d1d9939d65a0583566ac1f')) - deps.append(('ffcmp', 'd7fabbe7bf85a7fc25963cfbeb9be83eb9edaef3')) + if build_tests(target): + deps.append(('ffcmp', 'abf0c6effd059194709c2d755a61f2d683597644')) return deps option_defaults = { "gui": True, "variant": None } -def configure_options(target, options, for_package=False): - opt = ' --warnings-are-errors' - if for_package or not ( +def build_tests(target): + # Currently we only build tests on macOS, Windows, and some Ubuntu versions + return ( (target.platform == 'linux' and target.distro == 'ubuntu' and target.version in ['18.04', '22.04', '24.04']) or (target.platform == 'osx') or (target.platform == 'windows') - ): - # Currently we only build tests on macOS, Windows, and some Ubuntu versions + ) + + +def configure_options(target, options, for_package=False): + opt = ' --warnings-are-errors' + + if for_package or not build_tests(target): opt += ' --disable-tests' if target.debug: @@ -568,7 +574,9 @@ def configure_options(target, options, for_package=False): if target.platform == 'windows': opt += f' --target-windows-{target.bits}' elif target.platform == 'linux': - opt += ' --static-dcpomatic --static-wxwidgets --static-ffmpeg --static-dcp --static-sub --static-cxml' + opt += ' --static-dcpomatic --static-wxwidgets --static-dcp --static-sub --static-cxml' + if target.distro != 'arch': + opt += ' --static-ffmpeg' if target.distro == 'centos': if target.version == '6.5': opt += ' --static-boost --static-xmlpp' @@ -716,6 +724,9 @@ def build(target, options, for_package): json.dump(desc, outfile) target.command('%s --repo=build/platform/repo build/platform/flatpak build/com.dcpomatic.DCP-o-matic.json' % target.flatpak_builder()) elif target.platform != 'linux' or target.detail == 'appimage' or not for_package: + if target.platform == 'linux' and target.distro == 'arch': + # We're using a special pinned distro FFmpeg on Arch, and this is necessary to find it + target.append_with_colon('PKG_CONFIG_PATH', '/usr/lib/ffmpeg4.4/pkgconfig') target.command('./waf configure --prefix=%s %s' % (target.directory, configure_options(target, options, for_package))) target.command('./waf') target.command('./waf install') diff --git a/src/lib/change_signaller.h b/src/lib/change_signaller.h index 1d7d482df..0b2c1539d 100644 --- a/src/lib/change_signaller.h +++ b/src/lib/change_signaller.h @@ -87,21 +87,19 @@ public: { boost::mutex::scoped_lock lm(_mutex); auto pending = _pending; + _pending.clear(); + _suspended = false; lm.unlock(); for (auto signal: pending) { signal.thing->signal_change(signal.type, signal.property); } - - lm.lock(); - _pending.clear(); - _suspended = false; } static ChangeSignalDespatcher* instance() { static boost::mutex _instance_mutex; - static boost::mutex::scoped_lock lm(_instance_mutex); + boost::mutex::scoped_lock lm(_instance_mutex); static ChangeSignalDespatcher<T, P>* _instance; if (!_instance) { _instance = new ChangeSignalDespatcher<T, P>(); diff --git a/src/lib/cross.h b/src/lib/cross.h index 150199561..78a73b13e 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -25,6 +25,7 @@ #ifndef DCPOMATIC_CROSS_H #define DCPOMATIC_CROSS_H +#include <list> #ifdef DCPOMATIC_OSX #include <IOKit/pwr_mgt/IOPMLib.h> #endif diff --git a/src/lib/email.cc b/src/lib/email.cc index 6b4012c22..7a6e58d91 100644 --- a/src/lib/email.cc +++ b/src/lib/email.cc @@ -237,7 +237,7 @@ Email::send(string server, int port, EmailProtocol protocol, string user, string auto const r = curl_easy_perform (curl); if (r != CURLE_OK) { - throw NetworkError (_("Failed to send email"), string(curl_easy_strerror(r))); + throw NetworkError(_("Failed to send email"), String::compose("%1 sending to %2:%3", curl_easy_strerror(r), server, port)); } curl_slist_free_all (recipients); diff --git a/src/lib/hints.cc b/src/lib/hints.cc index 9a947f98d..4a13f77a0 100644 --- a/src/lib/hints.cc +++ b/src/lib/hints.cc @@ -56,7 +56,6 @@ using std::shared_ptr; using std::string; using std::weak_ptr; using boost::optional; -using boost::bind; using namespace dcpomatic; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; @@ -87,7 +86,7 @@ Hints::Hints (weak_ptr<const Film> weak_film) void Hints::start () { - _thread = boost::thread (bind(&Hints::thread, this)); + _thread = boost::thread(boost::bind(&Hints::thread, this)); } @@ -412,11 +411,11 @@ Hints::scan_content(shared_ptr<const Film> film) } if (check_loudness_done && have_text) { - emit (bind(boost::ref(Progress), _("Examining subtitles and closed captions"))); + emit(boost::bind(boost::ref(Progress), _("Examining subtitles and closed captions"))); } else if (!check_loudness_done && !have_text) { - emit (bind(boost::ref(Progress), _("Examining audio"))); + emit(boost::bind(boost::ref(Progress), _("Examining audio"))); } else { - emit (bind(boost::ref(Progress), _("Examining audio, subtitles and closed captions"))); + emit(boost::bind(boost::ref(Progress), _("Examining audio, subtitles and closed captions"))); } auto player = make_shared<Player>(film, Image::Alignment::COMPACT); @@ -426,9 +425,9 @@ Hints::scan_content(shared_ptr<const Film> film) player->set_ignore_audio(); } else { /* Send auto to the analyser to check loudness */ - player->Audio.connect(bind(&Hints::audio, this, _1, _2)); + player->Audio.connect(boost::bind(&Hints::audio, this, _1, _2)); } - player->Text.connect(bind(&Hints::text, this, _1, _2, _3, _4)); + player->Text.connect(boost::bind(&Hints::text, this, _1, _2, _3, _4)); struct timeval last_pulse; gettimeofday(&last_pulse, 0); @@ -443,7 +442,7 @@ Hints::scan_content(shared_ptr<const Film> film) if (_stop) { return; } - emit(bind(boost::ref(Pulse))); + emit(boost::bind(boost::ref(Pulse))); last_pulse = now; } } @@ -536,7 +535,7 @@ try } dcp::filesystem::remove_all(dcp_dir); - emit (bind(boost::ref(Finished))); + emit(boost::bind(boost::ref(Finished))); } catch (boost::thread_interrupted) { @@ -551,7 +550,7 @@ catch (...) void Hints::hint (string h) { - emit(bind(boost::ref(Hint), h)); + emit(boost::bind(boost::ref(Hint), h)); } diff --git a/src/wx/dolby_doremi_certificate_panel.cc b/src/wx/dolby_doremi_certificate_panel.cc index 405405175..24d8eb31a 100644 --- a/src/wx/dolby_doremi_certificate_panel.cc +++ b/src/wx/dolby_doremi_certificate_panel.cc @@ -64,77 +64,30 @@ DolbyDoremiCertificatePanel::DolbyDoremiCertificatePanel (DownloadCertificateDia static void -try_dcp2000(vector<Location>& locations, string prefix, string serial) +try_common(vector<Location>& locations, string prefix, string serial) { - locations.push_back({ - String::compose("%1%2xxx/Dolby-DCP2000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), - String::compose("Dolby-DCP2000-%1.cert.sha256.pem", serial) - }); - - locations.push_back({ - String::compose("%1%2xxx/Dolby-DCP2000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), - String::compose("Dolby-DCP2000-%1.cert.sha256.pem", serial) - }); - - locations.push_back({ - String::compose("%1%2xxx/Dolby-DCP2000-%3.certs.zip", prefix, serial.substr(0, 3), serial), - String::compose("Dolby-DCP2000-%1.cert.sha256.pem", serial) - }); - - locations.push_back({ - String::compose("%1%2xxx/dcp2000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), - String::compose("dcp2000-%1.cert.sha256.pem", serial) - }); - - locations.push_back({ - String::compose("%1%2xxx/dcp2000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), - String::compose("dcp2000-%1.cert.sha256.pem", serial) - }); - - locations.push_back({ - String::compose("%1%2xxx/dcp2000-%3.certs.zip", prefix, serial.substr(0, 3), serial), - String::compose("dcp2000-%1.cert.sha256.pem", serial) - }); -} - - -static void -try_imb(vector<Location>& locations, string prefix, string serial) -{ - locations.push_back({ - String::compose("%1%2xxx/Dolby-IMB-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), - String::compose("Dolby-IMB-%1.cert.sha256.pem", serial) - }); - - locations.push_back({ - String::compose("%1%2xxx/imb-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), - String::compose("imb-%1.cert.sha256.pem", serial) - }); -} - - -static void -try_ims(vector<Location>& locations, string prefix, string serial) -{ - locations.push_back({ - String::compose("%1%2xxx/Dolby-IMS1000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), - String::compose("Dolby-IMS1000-%1.cert.sha256.pem", serial) - }); - - locations.push_back({ - String::compose("%1%2xxx/Dolby-IMS2000-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), - String::compose("Dolby-IMS2000-%1.cert.sha256.pem", serial) - }); - - locations.push_back({ - String::compose("%1%2xxx/cert_Dolby-IMS3000-%3-SMPTE.zip", prefix, serial.substr(0, 3), serial), - String::compose("cert_Dolby-IMS3000-%1-SMPTE.pem", serial) - }); - - locations.push_back({ - String::compose("%1%2xxx/ims-%3.dcicerts.zip", prefix, serial.substr(0, 3), serial), - String::compose("ims-%1.cert.sha256.pem", serial) - }); + auto files = ls_url(String::compose("%1%2xxx/", prefix, serial.substr(0, 3))); + + auto check = [&locations, prefix, files, serial](string format, string file) { + auto const zip = String::compose(format, serial); + if (find(files.begin(), files.end(), zip) != files.end()) { + locations.push_back({ + String::compose("%1%2xxx/%3", prefix, serial.substr(0, 3), zip), + String::compose(file, serial) + }); + } + }; + + check("Dolby-DCP2000-%1.dcicerts.zip", "Dolby-DCP2000-%1.cert.sha256.pem"); + check("Dolby-DCP2000-%1.certs.zip", "Dolby-DCP2000-%1.cert.sha256.pem"); + check("dcp2000-%1.dcicerts.zip", "dcp2000-%1.cert.sha256.pem"); + check("dcp2000-%1.certs.zip", "dcp2000-%1.cert.sha256.pem"); + check("Dolby-IMB-%1.dcicerts.zip", "Dolby-IMB-%1.cert.sha256.pem"); + check("imb-%1.dcicerts.zip", "imb-%1.cert.sha256.pem"); + check("Dolby-IMS1000-%1.dcicerts.zip", "Dolby-IMS1000-%1.cert.sha256.pem"); + check("Dolby-IMS2000-%1.dcicerts.zip", "Dolby-IMS2000-%1.cert.sha256.pem"); + check("cert_Dolby-IMS3000-%1-SMPTE.zip", "cert_Dolby-IMS3000-%1-SMPTE.pem"); + check("ims-%1.dcicerts.zip", "ims-%1.cert.sha256.pem"); } @@ -217,16 +170,6 @@ try_cp850(vector<Location>& locations, string prefix, string serial) } -static void -try_ims3000(vector<Location>& locations, string prefix, string serial) -{ - locations.push_back({ - String::compose ("%1%2xxx/cert_Dolby-IMS3000-%3-SMPTE.zip", prefix, serial.substr(0, 3), serial), - String::compose("cert_Dolby-IMS3000-%1-SMPTE.pem", serial) - }); -} - - void DolbyDoremiCertificatePanel::do_download () { @@ -252,12 +195,10 @@ DolbyDoremiCertificatePanel::do_download () vector<string> errors; if (starts_with_digit) { - try_dcp2000(locations, prefix, serial); - try_imb(locations, prefix, serial); - try_ims(locations, prefix, serial); + try_common(locations, prefix, serial); + wxYield(); try_cat862(locations, prefix, serial); try_dsp100(locations, prefix, serial); - try_ims3000(locations, prefix, serial); } else if (starting_char == 'H') { try_cat745(locations, prefix, serial); } else if (starting_char == 'F') { @@ -269,6 +210,7 @@ DolbyDoremiCertificatePanel::do_download () bool ok = false; auto location = locations.begin(); while (!ok && location != locations.end()) { + wxYield(); auto error = get_from_zip_url(location->url, location->file, true, true, boost::bind(&DownloadCertificatePanel::load_certificate, this, _1, _2)); ++location; if (error) { diff --git a/src/wx/download_certificate_panel.cc b/src/wx/download_certificate_panel.cc index 643265927..8f826315d 100644 --- a/src/wx/download_certificate_panel.cc +++ b/src/wx/download_certificate_panel.cc @@ -105,6 +105,7 @@ DownloadCertificatePanel::download () /* Hack: without this the SetLabel() above has no visible effect */ wxMilliSleep (200); + wxYield(); signal_manager->when_idle (boost::bind(&DownloadCertificatePanel::do_download, this)); } diff --git a/src/wx/password_entry.cc b/src/wx/password_entry.cc index e148169bf..a6378fdd0 100644 --- a/src/wx/password_entry.cc +++ b/src/wx/password_entry.cc @@ -18,12 +18,14 @@ */ -#include "password_entry.h" + #include "check_box.h" +#include "password_entry.h" #include "wx_util.h" + using std::string; -using boost::bind; + PasswordEntry::PasswordEntry (wxWindow* parent) { @@ -36,7 +38,7 @@ PasswordEntry::PasswordEntry (wxWindow* parent) _panel->SetSizerAndFit (sizer); _show->bind(&PasswordEntry::show_clicked, this); - _text->Bind (wxEVT_TEXT, bind(boost::ref(Changed))); + _text->Bind(wxEVT_TEXT, boost::bind(boost::ref(Changed))); } wxPanel * @@ -57,7 +59,7 @@ PasswordEntry::show_clicked () delete _text; _text = new wxTextCtrl (_panel, wxID_ANY, pass, wxDefaultPosition, wxDefaultSize, _show->GetValue() ? 0 : wxTE_PASSWORD); _text->SetSelection (from, to); - _text->Bind (wxEVT_TEXT, bind(boost::ref(Changed))); + _text->Bind(wxEVT_TEXT, boost::bind(boost::ref(Changed))); sizer->Prepend (_text, 1, wxRIGHT, DCPOMATIC_SIZER_GAP); sizer->Layout (); _panel->Thaw (); diff --git a/src/wx/supporters.cc b/src/wx/supporters.cc index 5d7b2f1e2..2abcb5fdf 100644 --- a/src/wx/supporters.cc +++ b/src/wx/supporters.cc @@ -303,6 +303,7 @@ supported_by.Add (wxT ("Faris Dobrača")); supported_by.Add (wxT ("Roland Doerffer")); supported_by.Add (wxT ("Luca la Donna")); supported_by.Add (wxT ("Jean Dos")); +supported_by.Add (wxT ("Beautiful Dreamer")); supported_by.Add (wxT ("Nils Dresemann")); supported_by.Add (wxT ("Aut-o-Rama Drive-In")); supported_by.Add (wxT ("Sauerbeck Family Drive-In")); @@ -406,6 +407,7 @@ supported_by.Add (wxT ("Ignition Films")); supported_by.Add (wxT ("Sala46 Films")); supported_by.Add (wxT ("Many More Films")); supported_by.Add (wxT ("Caramba Films")); +supported_by.Add (wxT ("Mar Vivo Films")); supported_by.Add (wxT ("Yellow House Films")); supported_by.Add (wxT ("Goldcrest Films")); supported_by.Add (wxT ("Indigo Republic Films")); @@ -570,9 +572,11 @@ supported_by.Add (wxT ("Big Island Drive In")); supported_by.Add (wxT ("Dayton Movies Inc")); supported_by.Add (wxT ("Buttons Sound Inc")); supported_by.Add (wxT ("Paramount Twin Inc")); +supported_by.Add (wxT ("Alliage 3 Entertainment Inc")); supported_by.Add (wxT ("A Cut Above Video Productions, Inc.")); supported_by.Add (wxT ("Mya Studios Inc.")); supported_by.Add (wxT ("Gold Pictures Inc.")); +supported_by.Add (wxT ("Jesters Amusement Kompany Inc.")); supported_by.Add (wxT ("First Nations Film And Video Festival Inc.")); supported_by.Add (wxT ("Special Event Videos Inc.")); supported_by.Add (wxT ("Ariel Montage Inc.")); @@ -672,6 +676,7 @@ supported_by.Add (wxT ("Fosnavåg konserthus")); supported_by.Add (wxT ("Arnold Kopff")); supported_by.Add (wxT ("Frank Koppelmans")); supported_by.Add (wxT ("Jernej Koren")); +supported_by.Add (wxT ("Umpha Koroma")); supported_by.Add (wxT ("Bear Kosik")); supported_by.Add (wxT ("Dieter Kovacic")); supported_by.Add (wxT ("Filip Kovcin")); @@ -1184,6 +1189,7 @@ supported_by.Add (wxT ("Nice Sound")); supported_by.Add (wxT ("BFI Southbank")); supported_by.Add (wxT ("James Spadoni")); supported_by.Add (wxT ("Scott Spears")); +supported_by.Add (wxT ("Christopher Matthew Spencer")); supported_by.Add (wxT ("Vojtech Spevak")); supported_by.Add (wxT ("Spherico")); supported_by.Add (wxT ("Marco Spiaggi")); diff --git a/src/wx/wscript b/src/wx/wscript index 6a0a9ced9..13b0df292 100644 --- a/src/wx/wscript +++ b/src/wx/wscript @@ -332,7 +332,7 @@ def build(bld): obj.name = 'libdcpomatic2-wx' obj.export_includes = ['..'] - obj.uselib = 'BOOST_FILESYSTEM BOOST_THREAD BOOST_REGEX WXWIDGETS DCP SUB ZIP CXML RTAUDIO ICU ' + obj.uselib = 'BOOST_FILESYSTEM BOOST_THREAD BOOST_REGEX WXWIDGETS DCP SUB ZIP CXML RTAUDIO ICU AVUTIL ' if bld.env.TARGET_LINUX: obj.uselib += 'GTK GL GLU ' if bld.env.TARGET_WINDOWS_64 or bld.env.TARGET_WINDOWS_32: @@ -24,8 +24,6 @@ import os import shlex import sys import glob -import distutils -import distutils.spawn try: # python 2 from urllib import urlencode |
