summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-07-06 21:48:01 +0200
committerCarl Hetherington <cth@carlh.net>2024-07-06 21:48:01 +0200
commit3317a9b30752e2e311e7bfe36a8ce8201b07636a (patch)
treebeb12e51bab665f17f04f9aea503dd4ca2311d16
parent5696315078be7a3f61763690ddc201c558ddcd5a (diff)
parentfefcccd526bd4cf12dfdf43ce36ccb62b044528e (diff)
Merge remote-tracking branch 'origin/main' into v2.17.x
-rw-r--r--src/lib/kdm_cli.cc7
-rw-r--r--src/tools/dcpomatic_cli.cc17
-rw-r--r--src/tools/dcpomatic_create.cc4
-rw-r--r--src/tools/dcpomatic_server_cli.cc13
-rw-r--r--src/wx/about_dialog.cc1
-rw-r--r--src/wx/file_picker_ctrl.cc10
-rw-r--r--src/wx/film_name_location_dialog.cc4
-rw-r--r--wscript4
8 files changed, 38 insertions, 22 deletions
diff --git a/src/lib/kdm_cli.cc b/src/lib/kdm_cli.cc
index 0b918266e..551be65e5 100644
--- a/src/lib/kdm_cli.cc
+++ b/src/lib/kdm_cli.cc
@@ -26,6 +26,7 @@
#include "cinema.h"
#include "cinema_list.h"
+#include "cross.h"
#include "config.h"
#include "dkdm_wrapper.h"
#include "email.h"
@@ -468,6 +469,8 @@ optional<string>
kdm_cli (int argc, char* argv[], std::function<void (string)> out)
try
{
+ ArgFixer fixer(argc, argv);
+
boost::filesystem::path output = dcp::filesystem::current_path();
auto container_name_format = Config::instance()->kdm_container_name_format();
auto filename_format = Config::instance()->kdm_filename_format();
@@ -523,7 +526,7 @@ try
{ 0, 0, 0, 0 }
};
- int c = getopt_long (argc, argv, "ho:K:Z:f:t:d:F:pae::zvc:S:C:T:E:G:", long_options, &option_index);
+ int c = getopt_long(fixer.argc(), fixer.argv(), "ho:K:Z:f:t:d:F:pae::zvc:S:C:T:E:G", long_options, &option_index);
if (c == -1) {
break;
@@ -679,7 +682,7 @@ try
throw KDMCLIError ("you must specify --valid-from");
}
- if (optind >= argc) {
+ if (optind >= fixer.argc()) {
throw KDMCLIError ("no film, CPL ID or DKDM specified");
}
diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc
index 49caf5cb2..8b55d6205 100644
--- a/src/tools/dcpomatic_cli.cc
+++ b/src/tools/dcpomatic_cli.cc
@@ -264,6 +264,9 @@ show_jobs_on_console (bool progress)
int
main (int argc, char* argv[])
{
+ ArgFixer fixer(argc, argv);
+ auto const program_name = fixer.argv()[0];
+
boost::filesystem::path film_dir;
bool progress = true;
bool no_remote = false;
@@ -304,7 +307,7 @@ main (int argc, char* argv[])
{ 0, 0, 0, 0 }
};
- int c = getopt_long (argc, argv, "vhfnrt:j:kAs:ldc:BC:D:E", long_options, &option_index);
+ int c = getopt_long(fixer.argc(), fixer.argv(), "vhfnrt:j:kAs:ldc:BC:D:E", long_options, &option_index);
if (c == -1) {
break;
@@ -315,7 +318,7 @@ main (int argc, char* argv[])
cout << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n";
exit (EXIT_SUCCESS);
case 'h':
- help (argv[0]);
+ help(program_name);
exit (EXIT_SUCCESS);
case 'f':
cout << dcpomatic_cxx_flags << "\n";
@@ -391,8 +394,8 @@ main (int argc, char* argv[])
exit (EXIT_SUCCESS);
}
- if (optind >= argc) {
- help (argv[0]);
+ if (optind >= fixer.argc()) {
+ help(program_name);
exit (EXIT_FAILURE);
}
@@ -411,7 +414,7 @@ main (int argc, char* argv[])
exit (EXIT_FAILURE);
}
- film_dir = argv[optind];
+ film_dir = fixer.argv()[optind];
dcpomatic_setup_path_encoding ();
dcpomatic_setup ();
@@ -434,7 +437,7 @@ main (int argc, char* argv[])
film.reset (new Film (film_dir));
film->read_metadata ();
} catch (std::exception& e) {
- cerr << argv[0] << ": error reading film `" << film_dir.string() << "' (" << e.what() << ")\n";
+ cerr << program_name << ": error reading film `" << film_dir.string() << "' (" << e.what() << ")\n";
exit (EXIT_FAILURE);
}
@@ -449,7 +452,7 @@ main (int argc, char* argv[])
auto paths = i->paths();
for (auto j: paths) {
if (!dcp::filesystem::exists(j)) {
- cerr << argv[0] << ": content file " << j << " not found.\n";
+ cerr << program_name << ": content file " << j << " not found.\n";
exit (EXIT_FAILURE);
}
}
diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc
index 5b5f4dba2..e0d5b3973 100644
--- a/src/tools/dcpomatic_create.cc
+++ b/src/tools/dcpomatic_create.cc
@@ -70,10 +70,12 @@ public:
int
main (int argc, char* argv[])
{
+ ArgFixer fixer(argc, argv);
+
dcpomatic_setup_path_encoding ();
dcpomatic_setup ();
- CreateCLI cc (argc, argv);
+ CreateCLI cc(fixer.argc(), fixer.argv());
if (cc.error) {
cerr << *cc.error << "\n";
exit (1);
diff --git a/src/tools/dcpomatic_server_cli.cc b/src/tools/dcpomatic_server_cli.cc
index 25fe59fc7..ea78d41a5 100644
--- a/src/tools/dcpomatic_server_cli.cc
+++ b/src/tools/dcpomatic_server_cli.cc
@@ -66,6 +66,9 @@ help (string n)
int
main (int argc, char* argv[])
{
+ ArgFixer fixer(argc, argv);
+ auto const program_name = fixer.argv()[0];
+
dcpomatic_setup_path_encoding ();
dcpomatic_setup ();
@@ -84,7 +87,7 @@ main (int argc, char* argv[])
{ 0, 0, 0, 0 }
};
- int c = getopt_long (argc, argv, "vht:AB", long_options, &option_index);
+ int c = getopt_long(fixer.argc(), fixer.argv(), "vht:AB", long_options, &option_index);
if (c == -1) {
break;
@@ -95,7 +98,7 @@ main (int argc, char* argv[])
cout << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n";
exit (EXIT_SUCCESS);
case 'h':
- help (argv[0]);
+ help(program_name);
exit (EXIT_SUCCESS);
case 't':
num_threads = atoi (optarg);
@@ -124,12 +127,12 @@ main (int argc, char* argv[])
server.run ();
} catch (boost::system::system_error& e) {
if (e.code() == boost::system::errc::address_in_use) {
- cerr << argv[0] << variant::insert_dcpomatic(": address already in use. Is another %1 server instance already running?\n");
+ cerr << program_name << variant::insert_dcpomatic(": address already in use. Is another %1 server instance already running?\n");
exit (EXIT_FAILURE);
}
- cerr << argv[0] << ": " << e.what() << "\n";
+ cerr << program_name << ": " << e.what() << "\n";
} catch (std::exception& e) {
- cerr << argv[0] << ": failed to start server; " << e.what() << "\n";
+ cerr << program_name << ": failed to start server; " << e.what() << "\n";
}
return 0;
}
diff --git a/src/wx/about_dialog.cc b/src/wx/about_dialog.cc
index 1b55f958c..0c3905097 100644
--- a/src/wx/about_dialog.cc
+++ b/src/wx/about_dialog.cc
@@ -108,6 +108,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
written_by.Add (wxT ("Mart Jansink"));
written_by.Add (wxT ("Ole Laursen"));
written_by.Add (wxT ("Aaron Boxer"));
+ written_by.Add (wxT ("Benjamin Radel"));
add_section (_("Written by"), written_by);
wxArrayString with_help_from;
diff --git a/src/wx/file_picker_ctrl.cc b/src/wx/file_picker_ctrl.cc
index c6aba45b7..39e7669d5 100644
--- a/src/wx/file_picker_ctrl.cc
+++ b/src/wx/file_picker_ctrl.cc
@@ -42,9 +42,9 @@ FilePickerCtrl::FilePickerCtrl(
wxString wildcard,
bool open,
bool warn_overwrite,
- string initial_path_key,
- optional<std::string> initial_filename,
- optional<boost::filesystem::path> override_path
+ std::string initial_path_key,
+ boost::optional<std::string> initial_filename,
+ boost::optional<boost::filesystem::path> override_path
)
: wxPanel (parent)
, _prompt (prompt)
@@ -72,7 +72,7 @@ FilePickerCtrl::FilePickerCtrl(
void
-FilePickerCtrl::set_filename(optional<string> filename)
+FilePickerCtrl::set_filename(boost::optional<string> filename)
{
if (filename) {
_file->SetLabel(std_to_wx(*filename));
@@ -83,7 +83,7 @@ FilePickerCtrl::set_filename(optional<string> filename)
void
-FilePickerCtrl::set_path(optional<boost::filesystem::path> path)
+FilePickerCtrl::set_path(boost::optional<boost::filesystem::path> path)
{
_path = path;
diff --git a/src/wx/film_name_location_dialog.cc b/src/wx/film_name_location_dialog.cc
index 9d309810e..b988d6251 100644
--- a/src/wx/film_name_location_dialog.cc
+++ b/src/wx/film_name_location_dialog.cc
@@ -40,7 +40,7 @@ using boost::bind;
using boost::optional;
-optional<boost::filesystem::path> FilmNameLocationDialog::_directory;
+boost::optional<boost::filesystem::path> FilmNameLocationDialog::_directory;
FilmNameLocationDialog::FilmNameLocationDialog (wxWindow* parent, wxString title, bool offer_templates)
@@ -123,7 +123,7 @@ FilmNameLocationDialog::path () const
}
-optional<string>
+boost::optional<string>
FilmNameLocationDialog::template_name () const
{
if (!_use_template->GetValue() || _template_name->GetSelection() == -1) {
diff --git a/wscript b/wscript
index a92668ee0..79c369a9c 100644
--- a/wscript
+++ b/wscript
@@ -285,6 +285,10 @@ def configure(conf):
lib=['icuio', 'icui18n', 'icudata', 'icuuc'],
uselib_store='ICU')
+ # For ICU version > 75 we need stdc++17
+ if conf.check_cfg(modversion='icu-i18n') >= '75':
+ conf.env.append_value('CXXFLAGS', '-std=c++17')
+
# libsamplerate
conf.check_cfg(package='samplerate', args='--cflags --libs', uselib_store='SAMPLERATE', mandatory=True)