diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-08-14 00:12:22 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-08-17 12:51:26 +0200 |
| commit | 0b4bffff846efe967110477797218c170ffb3166 (patch) | |
| tree | f3cb1bbf1e3c86905afe42b159284d2d2c299476 | |
| parent | 11456e09fd0a18ff9bd4c8421514b707d5d0c2fe (diff) | |
Add option to use relative content paths (#2856).
| -rw-r--r-- | src/lib/atmos_mxf_content.cc | 5 | ||||
| -rw-r--r-- | src/lib/atmos_mxf_content.h | 9 | ||||
| -rw-r--r-- | src/lib/config.cc | 4 | ||||
| -rw-r--r-- | src/lib/config.h | 9 | ||||
| -rw-r--r-- | src/lib/content.cc | 28 | ||||
| -rw-r--r-- | src/lib/content.h | 9 | ||||
| -rw-r--r-- | src/lib/dcp_content.cc | 4 | ||||
| -rw-r--r-- | src/lib/dcp_content.h | 9 | ||||
| -rw-r--r-- | src/lib/dcp_subtitle_content.cc | 5 | ||||
| -rw-r--r-- | src/lib/dcp_subtitle_content.h | 9 | ||||
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 4 | ||||
| -rw-r--r-- | src/lib/ffmpeg_content.h | 9 | ||||
| -rw-r--r-- | src/lib/film.cc | 7 | ||||
| -rw-r--r-- | src/lib/image_content.cc | 5 | ||||
| -rw-r--r-- | src/lib/image_content.h | 9 | ||||
| -rw-r--r-- | src/lib/path_behaviour.h | 34 | ||||
| -rw-r--r-- | src/lib/playlist.cc | 4 | ||||
| -rw-r--r-- | src/lib/playlist.h | 3 | ||||
| -rw-r--r-- | src/lib/string_text_file_content.cc | 4 | ||||
| -rw-r--r-- | src/lib/string_text_file_content.h | 9 | ||||
| -rw-r--r-- | src/lib/video_mxf_content.cc | 5 | ||||
| -rw-r--r-- | src/lib/video_mxf_content.h | 9 | ||||
| -rw-r--r-- | src/wx/full_config_dialog.cc | 12 | ||||
| m--------- | test/data | 0 | ||||
| -rw-r--r-- | test/threed_test.cc | 2 |
25 files changed, 175 insertions, 32 deletions
diff --git a/src/lib/atmos_mxf_content.cc b/src/lib/atmos_mxf_content.cc index 1283961ee..55ceddb8c 100644 --- a/src/lib/atmos_mxf_content.cc +++ b/src/lib/atmos_mxf_content.cc @@ -37,6 +37,7 @@ using std::list; using std::make_shared; using std::string; using std::shared_ptr; +using boost::optional; using namespace dcpomatic; @@ -98,10 +99,10 @@ AtmosMXFContent::summary () const void -AtmosMXFContent::as_xml(xmlpp::Element* element, bool with_paths) const +AtmosMXFContent::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour path_behaviour, optional<boost::filesystem::path> film_directory) const { cxml::add_text_child(element, "Type", "AtmosMXF"); - Content::as_xml(element, with_paths); + Content::as_xml(element, with_paths, path_behaviour, film_directory); atmos->as_xml(element); } diff --git a/src/lib/atmos_mxf_content.h b/src/lib/atmos_mxf_content.h index e6225a355..4d2d9f509 100644 --- a/src/lib/atmos_mxf_content.h +++ b/src/lib/atmos_mxf_content.h @@ -39,7 +39,14 @@ public: void examine (std::shared_ptr<const Film> film, std::shared_ptr<Job> job) override; std::string summary () const override; - void as_xml(xmlpp::Element* element, bool with_path) const override; + + void as_xml( + xmlpp::Element* element, + bool with_paths, + PathBehaviour path_behaviour, + boost::optional<boost::filesystem::path> film_directory + ) const override; + dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override; dcpomatic::DCPTime approximate_length () const override; diff --git a/src/lib/config.cc b/src/lib/config.cc index 180ce5c55..b30006498 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -216,6 +216,7 @@ Config::set_defaults () _isdcf_name_part_length = 14; _enable_player_http_server = false; _player_http_server_port = 8080; + _relative_paths = false; _allowed_dcp_frame_rates.clear (); _allowed_dcp_frame_rates.push_back (24); @@ -655,6 +656,7 @@ try _isdcf_name_part_length = f.optional_number_child<int>("ISDCFNamePartLength").get_value_or(14); _enable_player_http_server = f.optional_bool_child("EnablePlayerHTTPServer").get_value_or(false); _player_http_server_port = f.optional_number_child<int>("PlayerHTTPServerPort").get_value_or(8080); + _relative_paths = f.optional_bool_child("RelativePaths").get_value_or(false); #ifdef DCPOMATIC_GROK if (auto grok = f.optional_node_child("Grok")) { @@ -1130,6 +1132,8 @@ Config::write_config () const cxml::add_text_child(root, "EnablePlayerHTTPServer", _enable_player_http_server ? "1" : "0"); /* [XML] PlayerHTTPServerPort Port to use for player HTTP server (if enabled) */ cxml::add_text_child(root, "PlayerHTTPServerPort", raw_convert<string>(_player_http_server_port)); + /* [XML] RelativePaths 1 to write relative paths to project metadata files, 0 to use absolute paths */ + cxml::add_text_child(root, "RelativePaths", _relative_paths ? "1" : "0"); #ifdef DCPOMATIC_GROK if (_grok) { diff --git a/src/lib/config.h b/src/lib/config.h index 1b9f51f6e..52fe47b3f 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -678,6 +678,10 @@ public: return _player_http_server_port; } + bool relative_paths() const { + return _relative_paths; + } + /* SET (mostly) */ void set_master_encoding_threads (int n) { @@ -1225,6 +1229,10 @@ public: maybe_set(_player_http_server_port, port); } + void set_relative_paths(bool relative) { + maybe_set(_relative_paths, relative); + } + void changed (Property p = OTHER); boost::signals2::signal<void (Property)> Changed; @@ -1465,6 +1473,7 @@ private: int _isdcf_name_part_length; bool _enable_player_http_server; int _player_http_server_port; + bool _relative_paths; #ifdef DCPOMATIC_GROK boost::optional<Grok> _grok; diff --git a/src/lib/content.cc b/src/lib/content.cc index 496a68a63..067a4cffc 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -140,14 +140,29 @@ Content::Content (vector<shared_ptr<Content>> c) void -Content::as_xml(xmlpp::Element* element, bool with_paths) const +Content::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour path_behaviour, optional<boost::filesystem::path> film_directory) const { boost::mutex::scoped_lock lm (_mutex); if (with_paths) { for (size_t i = 0; i < _paths.size(); ++i) { + auto path = _paths[i]; + switch (path_behaviour) { + case PathBehaviour::MAKE_ABSOLUTE: + DCPOMATIC_ASSERT(film_directory); + if (path.is_relative()) { + path = boost::filesystem::canonical(path, *film_directory); + } + break; + case PathBehaviour::MAKE_RELATIVE: + DCPOMATIC_ASSERT(film_directory); + path = boost::filesystem::relative(path, *film_directory); + break; + case PathBehaviour::KEEP: + break; + } auto p = cxml::add_child(element, "Path"); - p->add_child_text (_paths[i].string()); + p->add_child_text(path.string()); p->set_attribute ("mtime", raw_convert<string>(_last_write_times[i])); } } @@ -290,7 +305,7 @@ Content::clone () const /* This is a bit naughty, but I can't think of a compelling reason not to do it ... */ xmlpp::Document doc; auto node = doc.create_root_node ("Content"); - as_xml (node, true); + as_xml(node, true, PathBehaviour::KEEP, {}); /* notes is unused here (we assume) */ list<string> notes; @@ -355,7 +370,10 @@ Content::set_paths (vector<boost::filesystem::path> paths) { boost::mutex::scoped_lock lm (_mutex); - _paths = paths; + _paths.clear(); + for (auto path: paths) { + _paths.push_back(boost::filesystem::canonical(path)); + } _last_write_times.clear (); for (auto i: _paths) { boost::system::error_code ec; @@ -550,7 +568,7 @@ void Content::add_path (boost::filesystem::path p) { boost::mutex::scoped_lock lm (_mutex); - _paths.push_back (p); + _paths.push_back(boost::filesystem::canonical(p)); boost::system::error_code ec; auto last_write = dcp::filesystem::last_write_time(p, ec); _last_write_times.push_back (ec ? 0 : last_write); diff --git a/src/lib/content.h b/src/lib/content.h index d4b99d39e..a14c35774 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -30,6 +30,7 @@ #include "change_signaller.h" #include "dcpomatic_time.h" +#include "path_behaviour.h" #include "signaller.h" #include "user_property.h" #include "text_type.h" @@ -100,7 +101,13 @@ public: */ virtual std::string technical_summary () const; - virtual void as_xml(xmlpp::Element* element, bool with_paths) const; + virtual void as_xml( + xmlpp::Element* element, + bool with_paths, + PathBehaviour path_behaviour, + boost::optional<boost::filesystem::path> film_directory + ) const; + virtual dcpomatic::DCPTime full_length (std::shared_ptr<const Film>) const = 0; virtual dcpomatic::DCPTime approximate_length () const = 0; virtual std::string identifier () const; diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index b4e979481..35b175736 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -363,11 +363,11 @@ DCPContent::technical_summary () const void -DCPContent::as_xml(xmlpp::Element* element, bool with_paths) const +DCPContent::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour path_behaviour, optional<boost::filesystem::path> film_directory) const { cxml::add_text_child(element, "Type", "DCP"); - Content::as_xml(element, with_paths); + Content::as_xml(element, with_paths, path_behaviour, film_directory); if (video) { video->as_xml(element); diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index be2c72002..023b5d194 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -76,7 +76,14 @@ public: void examine (std::shared_ptr<const Film> film, std::shared_ptr<Job>) override; std::string summary () const override; std::string technical_summary () const override; - void as_xml(xmlpp::Element*, bool with_paths) const override; + + void as_xml( + xmlpp::Element* element, + bool with_paths, + PathBehaviour path_behaviour, + boost::optional<boost::filesystem::path> film_directory + ) const override; + std::string identifier () const override; void take_settings_from (std::shared_ptr<const Content> c) override; diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc index d381ca7cb..58007ac34 100644 --- a/src/lib/dcp_subtitle_content.cc +++ b/src/lib/dcp_subtitle_content.cc @@ -38,6 +38,7 @@ using std::list; using std::make_shared; using std::shared_ptr; using std::string; +using boost::optional; using dcp::raw_convert; using namespace dcpomatic; @@ -140,10 +141,10 @@ DCPSubtitleContent::technical_summary () const } void -DCPSubtitleContent::as_xml(xmlpp::Element* element, bool with_paths) const +DCPSubtitleContent::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour path_behaviour, optional<boost::filesystem::path> film_directory) const { cxml::add_text_child(element, "Type", "DCPSubtitle"); - Content::as_xml(element, with_paths); + Content::as_xml(element, with_paths, path_behaviour, film_directory); if (only_text()) { only_text()->as_xml(element); diff --git a/src/lib/dcp_subtitle_content.h b/src/lib/dcp_subtitle_content.h index 068b6dbac..a3cd78b39 100644 --- a/src/lib/dcp_subtitle_content.h +++ b/src/lib/dcp_subtitle_content.h @@ -30,7 +30,14 @@ public: void examine (std::shared_ptr<const Film> film, std::shared_ptr<Job>) override; std::string summary () const override; std::string technical_summary () const override; - void as_xml(xmlpp::Element*, bool with_paths) const override; + + void as_xml( + xmlpp::Element* element, + bool with_paths, + PathBehaviour path_behaviour, + boost::optional<boost::filesystem::path> film_directory + ) const override; + dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override; dcpomatic::DCPTime approximate_length () const override; diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index c2bb5ffe4..61a7dd4df 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -198,10 +198,10 @@ FFmpegContent::FFmpegContent (vector<shared_ptr<Content>> c) void -FFmpegContent::as_xml(xmlpp::Element* element, bool with_paths) const +FFmpegContent::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour path_behaviour, optional<boost::filesystem::path> film_directory) const { cxml::add_text_child(element, "Type", "FFmpeg"); - Content::as_xml(element, with_paths); + Content::as_xml(element, with_paths, path_behaviour, film_directory); if (video) { video->as_xml(element); diff --git a/src/lib/ffmpeg_content.h b/src/lib/ffmpeg_content.h index ce067f2d3..1b3d3376e 100644 --- a/src/lib/ffmpeg_content.h +++ b/src/lib/ffmpeg_content.h @@ -70,7 +70,14 @@ public: void take_settings_from (std::shared_ptr<const Content> c) override; std::string summary () const override; std::string technical_summary () const override; - void as_xml(xmlpp::Element* element, bool with_paths) const override; + + void as_xml( + xmlpp::Element* element, + bool with_paths, + PathBehaviour path_behaviour, + boost::optional<boost::filesystem::path> film_directory + ) const override; + dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override; dcpomatic::DCPTime approximate_length () const override; diff --git a/src/lib/film.cc b/src/lib/film.cc index 06be5bf1e..a6db71465 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -474,7 +474,12 @@ Film::metadata (bool with_content_paths) const if (_audio_language) { cxml::add_text_child(root, "AudioLanguage", _audio_language->to_string()); } - _playlist->as_xml(cxml::add_child(root, "Playlist"), with_content_paths); + _playlist->as_xml( + cxml::add_child(root, "Playlist"), + with_content_paths, + Config::instance()->relative_paths() ? PathBehaviour::MAKE_RELATIVE : PathBehaviour::MAKE_ABSOLUTE, + directory() + ); return doc; } diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc index 1ac6e085b..034ccb98d 100644 --- a/src/lib/image_content.cc +++ b/src/lib/image_content.cc @@ -43,6 +43,7 @@ using std::make_shared; using std::shared_ptr; using std::string; using std::vector; +using boost::optional; using namespace dcpomatic; @@ -99,10 +100,10 @@ ImageContent::technical_summary () const void -ImageContent::as_xml(xmlpp::Element* element, bool with_paths) const +ImageContent::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour path_behaviour, optional<boost::filesystem::path> film_directory) const { cxml::add_text_child(element, "Type", "Image"); - Content::as_xml(element, with_paths); + Content::as_xml(element, with_paths, path_behaviour, film_directory); if (video) { video->as_xml(element); diff --git a/src/lib/image_content.h b/src/lib/image_content.h index 140159bfa..6208a0053 100644 --- a/src/lib/image_content.h +++ b/src/lib/image_content.h @@ -40,7 +40,14 @@ public: void examine (std::shared_ptr<const Film> film, std::shared_ptr<Job>) override; std::string summary () const override; std::string technical_summary () const override; - void as_xml(xmlpp::Element*, bool with_paths) const override; + + void as_xml( + xmlpp::Element* element, + bool with_paths, + PathBehaviour path_behaviour, + boost::optional<boost::filesystem::path> film_directory + ) const override; + dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override; dcpomatic::DCPTime approximate_length () const override; diff --git a/src/lib/path_behaviour.h b/src/lib/path_behaviour.h new file mode 100644 index 000000000..90390e015 --- /dev/null +++ b/src/lib/path_behaviour.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2024 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + + +#ifndef DCPOMATIC_PATH_BEHAVIOUR_H +#define DCPOMATIC_PATH_BEHAVIOUR_H + + +enum class PathBehaviour { + MAKE_ABSOLUTE, + MAKE_RELATIVE, + KEEP +}; + + +#endif + diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index d2af000e5..b6b796840 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -282,10 +282,10 @@ Playlist::set_from_xml (shared_ptr<const Film> film, cxml::ConstNodePtr node, in * @param with_content_paths true to include <Path> nodes in <Content> nodes, false to omit them. */ void -Playlist::as_xml(xmlpp::Element* element, bool with_content_paths) +Playlist::as_xml(xmlpp::Element* element, bool with_content_paths, PathBehaviour path_behaviour, optional<boost::filesystem::path> film_directory) { for (auto i: content()) { - i->as_xml(cxml::add_child(element, "Content"), with_content_paths); + i->as_xml(cxml::add_child(element, "Content"), with_content_paths, path_behaviour, film_directory); } } diff --git a/src/lib/playlist.h b/src/lib/playlist.h index 3868c0b51..79c140145 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -26,6 +26,7 @@ #include "change_signaller.h" #include "dcpomatic_time.h" #include "frame_rate_change.h" +#include "path_behaviour.h" #include "types.h" #include <libcxml/cxml.h> #include <boost/signals2.hpp> @@ -50,7 +51,7 @@ public: Playlist (Playlist const&) = delete; Playlist& operator= (Playlist const&) = delete; - void as_xml(xmlpp::Element*, bool with_content_paths); + void as_xml(xmlpp::Element*, bool with_content_paths, PathBehaviour path_behaviour, boost::optional<boost::filesystem::path> film_directory); void set_from_xml (std::shared_ptr<const Film> film, cxml::ConstNodePtr node, int version, std::list<std::string>& notes); void add (std::shared_ptr<const Film> film, std::shared_ptr<Content>); diff --git a/src/lib/string_text_file_content.cc b/src/lib/string_text_file_content.cc index c6639936c..6ae9fc627 100644 --- a/src/lib/string_text_file_content.cc +++ b/src/lib/string_text_file_content.cc @@ -122,10 +122,10 @@ StringTextFileContent::technical_summary () const void -StringTextFileContent::as_xml(xmlpp::Element* element, bool with_paths) const +StringTextFileContent::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour path_behaviour, optional<boost::filesystem::path> film_directory) const { cxml::add_text_child(element, "Type", "TextSubtitle"); - Content::as_xml(element, with_paths); + Content::as_xml(element, with_paths, path_behaviour, film_directory); if (only_text()) { only_text()->as_xml(element); diff --git a/src/lib/string_text_file_content.h b/src/lib/string_text_file_content.h index 8a5d9946a..2edf475c3 100644 --- a/src/lib/string_text_file_content.h +++ b/src/lib/string_text_file_content.h @@ -45,7 +45,14 @@ public: void examine (std::shared_ptr<const Film> film, std::shared_ptr<Job>) override; std::string summary () const override; std::string technical_summary () const override; - void as_xml(xmlpp::Element*, bool with_paths) const override; + + void as_xml( + xmlpp::Element* element, + bool with_paths, + PathBehaviour path_behaviour, + boost::optional<boost::filesystem::path> film_directory + ) const override; + dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override; dcpomatic::DCPTime approximate_length () const override; std::string identifier () const override; diff --git a/src/lib/video_mxf_content.cc b/src/lib/video_mxf_content.cc index 822d37214..9ae439be5 100644 --- a/src/lib/video_mxf_content.cc +++ b/src/lib/video_mxf_content.cc @@ -38,6 +38,7 @@ using std::list; using std::make_shared; using std::shared_ptr; using std::string; +using boost::optional; using namespace dcpomatic; @@ -121,10 +122,10 @@ VideoMXFContent::identifier () const void -VideoMXFContent::as_xml(xmlpp::Element* element, bool with_paths) const +VideoMXFContent::as_xml(xmlpp::Element* element, bool with_paths, PathBehaviour path_behaviour, optional<boost::filesystem::path> film_directory) const { cxml::add_text_child(element, "Type", "VideoMXF"); - Content::as_xml(element, with_paths); + Content::as_xml(element, with_paths, path_behaviour, film_directory); video->as_xml(element); } diff --git a/src/lib/video_mxf_content.h b/src/lib/video_mxf_content.h index 1731942a6..d45ec591a 100644 --- a/src/lib/video_mxf_content.h +++ b/src/lib/video_mxf_content.h @@ -40,7 +40,14 @@ public: std::string summary () const override; std::string technical_summary () const override; std::string identifier () const override; - void as_xml(xmlpp::Element* element, bool with_paths) const override; + + void as_xml( + xmlpp::Element* element, + bool with_paths, + PathBehaviour path_behaviour, + boost::optional<boost::filesystem::path> film_directory + ) const override; + dcpomatic::DCPTime full_length (std::shared_ptr<const Film> film) const override; dcpomatic::DCPTime approximate_length () const override; void add_properties (std::shared_ptr<const Film> film, std::list<UserProperty>& p) const override; diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index 955ea6493..7f95d9bb4 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -134,6 +134,10 @@ private: table->Add(_default_add_file_location, wxGBPosition(r, 1)); ++r; + _relative_paths = new CheckBox(_panel, _("Write relative content paths")); + table->Add(_relative_paths, wxGBPosition(r, 0), wxGBSpan(1, 2)); + ++r; + #ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG _analyse_ebur128 = new CheckBox (_panel, _("Find integrated loudness, true peak and loudness range when analysing audio")); table->Add (_analyse_ebur128, wxGBPosition (r, 0), wxGBSpan (1, 2)); @@ -159,6 +163,7 @@ private: _server_encoding_threads->Bind (wxEVT_SPINCTRL, boost::bind (&FullGeneralPage::server_encoding_threads_changed, this)); export_cinemas->Bind (wxEVT_BUTTON, boost::bind (&FullGeneralPage::export_cinemas_file, this)); + _relative_paths->bind(&FullGeneralPage::relative_paths_changed, this); #ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG _analyse_ebur128->bind(&FullGeneralPage::analyse_ebur128_changed, this); #endif @@ -171,6 +176,7 @@ private: checked_set (_master_encoding_threads, config->master_encoding_threads ()); checked_set (_server_encoding_threads, config->server_encoding_threads ()); + checked_set (_relative_paths, config->relative_paths()); #ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG checked_set (_analyse_ebur128, config->analyse_ebur128 ()); #endif @@ -194,6 +200,11 @@ private: } } + void relative_paths_changed() + { + Config::instance()->set_relative_paths(_relative_paths->get()); + } + #ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG void analyse_ebur128_changed () { @@ -260,6 +271,7 @@ private: wxSpinCtrl* _server_encoding_threads; FilePickerCtrl* _config_file; FilePickerCtrl* _cinemas_file; + CheckBox* _relative_paths; #ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG CheckBox* _analyse_ebur128; #endif diff --git a/test/data b/test/data -Subproject 4bb1b94fd1eda87051242a54309ca59a34c7b6e +Subproject 6852489c035e5af96191e66dd9972e3b6307cc8 diff --git a/test/threed_test.cc b/test/threed_test.cc index fda883164..13bdf3fa0 100644 --- a/test/threed_test.cc +++ b/test/threed_test.cc @@ -212,7 +212,7 @@ BOOST_AUTO_TEST_CASE (threed_test7) } } BOOST_REQUIRE (failed); - BOOST_CHECK_EQUAL (failed->error_summary(), String::compose("The content file %1 is set as 3D but does not appear to contain 3D images. Please set it to 2D. You can still make a 3D DCP from this content by ticking the 3D option in the DCP video tab.", content_path.string())); + BOOST_CHECK_EQUAL (failed->error_summary(), String::compose("The content file %1 is set as 3D but does not appear to contain 3D images. Please set it to 2D. You can still make a 3D DCP from this content by ticking the 3D option in the DCP video tab.", boost::filesystem::canonical(content_path).string())); while (signal_manager->ui_idle ()) {} |
