X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_disk.cc;h=92429aa53238c43a75a57bae33328750c895696a;hb=1a7c50245309bb0b99001940b2203a267de942ca;hp=b94d4bf941016c4deb5e898040c7e50995c88fe5;hpb=2da4caba7871455c097c0ed940dd6f2332dbda5d;p=dcpomatic.git diff --git a/src/tools/dcpomatic_disk.cc b/src/tools/dcpomatic_disk.cc index b94d4bf94..92429aa53 100644 --- a/src/tools/dcpomatic_disk.cc +++ b/src/tools/dcpomatic_disk.cc @@ -53,6 +53,10 @@ using std::cout; using std::cerr; using boost::shared_ptr; using boost::optional; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif + class DOMFrame : public wxFrame { @@ -210,6 +214,31 @@ private: DCPOMATIC_ASSERT (_drive->GetSelection() != wxNOT_FOUND); DCPOMATIC_ASSERT (static_cast(_dcp_path)); + bool have_writer = true; + if (!_nanomsg.send(DISK_WRITER_PING "\n", 2000)) { + have_writer = false; + } else { + optional reply = _nanomsg.receive (2000); + if (!reply || *reply != DISK_WRITER_PONG) { + have_writer = false; + } + } + + if (!have_writer) { +#ifdef DCPOMATIC_WINDOWS + MessageDialog* m = new MessageDialog ( + this, + _("DCP-o-matic Disk Writer"), + _("Do you see a 'User Account Control' dialogue asking about dcpomatic2_disk_writer.exe? If so, click 'Yes', then try again.") + ); + m->ShowModal (); + m->Destroy (); + return; +#else + throw CommunicationFailedError (); +#endif + } + Drive const& drive = _drives[_drive->GetSelection()]; if (drive.mounted()) { TryUnmountDialog* d = new TryUnmountDialog(this, drive.description());