diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-10-14 23:10:32 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-10-14 23:10:32 +0200 |
| commit | fd192ff95e34630158a4ceb08e65099120629a3b (patch) | |
| tree | 0ff728c3548440d9d63365e1c7d3edc739f25187 /src/wx | |
| parent | f395c664aedb5bf022ddcde91c6e0c6531209a5d (diff) | |
| parent | 2c26dd2573977a940d003a58f2ccd408a5657aab (diff) | |
Merge remote-tracking branch 'origin/main' into v2.17.x
Diffstat (limited to 'src/wx')
| -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 |
5 files changed, 40 insertions, 89 deletions
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: |
