Merge master.
authorCarl Hetherington <cth@carlh.net>
Thu, 9 May 2013 14:14:08 +0000 (15:14 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 9 May 2013 14:14:08 +0000 (15:14 +0100)
16 files changed:
ChangeLog
dvdomatic_batch.desktop.in [new file with mode: 0644]
run/dvdomatic_batch [new file with mode: 0755]
src/lib/job.cc
src/lib/job.h
src/lib/util.cc
src/lib/util.h
src/tools/dcpomatic.cc
src/tools/wscript
src/wx/job_manager_view.cc
src/wx/job_manager_view.h
src/wx/wx_util.cc
src/wx/wx_util.h
windows/installer.nsi.32.in
windows/installer.nsi.64.in
wscript

index 5d4d60c98e524f0e1f5f66891c16245caf86ac8e..e75dd06211e9fd7812fcfe68e1fbedec57a3328a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2013-05-06  Carl Hetherington  <cth@carlh.net>
+
+       * Fix resizing / redraw problems in audio viewer
+       on Windows.
+
+2013-05-06  Carl Hetherington  <cth@carlh.net>
+
+       * Version 0.89 released.
+
+2013-05-04  Carl Hetherington  <cth@carlh.net>
+
+       * Version 0.89beta1 released.
+
+2013-05-04  Carl Hetherington  <cth@carlh.net>
+
+       * Very simple batch converter added (#127).
+
+       * Add preference for CPL issuer and creator (#122).
+
+       * Add preference for default format and DCP content
+       type (#133).
+
 2013-04-28  Carl Hetherington  <cth@carlh.net>
 
        * Version 0.88 released.
diff --git a/dvdomatic_batch.desktop.in b/dvdomatic_batch.desktop.in
new file mode 100644 (file)
index 0000000..8150fe8
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Exec=@PREFIX@/bin/dvdomatic_batch
+Name=DVD-o-matic Batch Converter
+Icon=dvdomatic
+Comment=Batch DCP generator
+Categories=AudioVideo;Video
diff --git a/run/dvdomatic_batch b/run/dvdomatic_batch
new file mode 100755 (executable)
index 0000000..7b6ef93
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+export LD_LIBRARY_PATH=build/src/lib:build/src/wx:build/src/asdcplib/src:$LD_LIBRARY_PATH
+if [ "$1" == "--debug" ]; then
+    shift
+    gdb --args build/src/tools/dvdomatic_batch "$*"
+elif [ "$1" == "--valgrind" ]; then
+    shift
+    valgrind --tool="memcheck" build/src/tools/dvdomatic_batch $*
+elif [ "$1" == "--i18n" ]; then
+    shift
+    LANGUAGE=fr_FR.UTF8 LANG=fr_FR.UTF8 build/src/tools/dvdomatic_batch "$*"
+else
+    build/src/tools/dvdomatic_batch
+fi
index 812380594ec0ea247661951d93909773fbce2201..2e6385d62e8499a37ed427fb3650c1e22aec5196 100644 (file)
@@ -26,6 +26,7 @@
 #include <libdcp/exceptions.h>
 #include "job.h"
 #include "util.h"
+#include "cross.h"
 
 #include "i18n.h"
 
@@ -153,6 +154,13 @@ Job::finished_cancelled () const
        return _state == FINISHED_CANCELLED;
 }
 
+bool
+Job::paused () const
+{
+       boost::mutex::scoped_lock lm (_state_mutex);
+       return _state == PAUSED;
+}
+       
 /** Set the state of this job.
  *  @param s New state.
  */
@@ -188,6 +196,10 @@ Job::set_progress (float p)
        _progress_unknown = false;
        _stack.back().normalised = p;
        boost::this_thread::interruption_point ();
+
+       if (paused ()) {
+               dcpomatic_sleep (1);
+       }
 }
 
 /** @return fractional overall progress, or -1 if not known */
@@ -324,3 +336,19 @@ Job::cancel ()
        _thread->interrupt ();
        _thread->join ();
 }
+
+void
+Job::pause ()
+{
+       if (running ()) {
+               set_state (PAUSED);
+       }
+}
+
+void
+Job::resume ()
+{
+       if (paused ()) {
+               set_state (RUNNING);
+       }
+}
index 2119db2f3e71a67e6e3ac64f6103e317e0081f02..40e90b73c72b3c136f0570cf7198018746610a29 100644 (file)
@@ -47,6 +47,8 @@ public:
        virtual void run () = 0;
        
        void start ();
+       void pause ();
+       void resume ();
        void cancel ();
 
        bool is_new () const;
@@ -55,6 +57,7 @@ public:
        bool finished_ok () const;
        bool finished_in_error () const;
        bool finished_cancelled () const;
+       bool paused () const;
 
        std::string error_summary () const;
        std::string error_details () const;
@@ -79,6 +82,7 @@ protected:
        enum State {
                NEW,            ///< the job hasn't been started yet
                RUNNING,        ///< the job is running
+               PAUSED,         ///< the job has been paused
                FINISHED_OK,    ///< the job has finished successfully
                FINISHED_ERROR, ///< the job has finished in error
                FINISHED_CANCELLED ///< the job was cancelled
index ec1fd47bd7f03bdca133d791b6201d824f252cab..6c8166143e90daff8ff492ad5972b7b1de1ace6d 100644 (file)
@@ -280,7 +280,7 @@ mo_path ()
 #endif
 
 void
-dcpomatic_setup_i18n (string lang)
+dcpomatic_setup_gettext_i18n (string lang)
 {
 #ifdef DCPOMATIC_POSIX
        lang += ".UTF8";
index 0edfe2076b3bd8ce80f6077df102d1b3d2564f17..51ccbba999545bd755547a08e5fafe98378fb4ce 100644 (file)
@@ -56,7 +56,7 @@ extern void stacktrace (std::ostream &, int);
 extern std::string dependency_version_summary ();
 extern double seconds (struct timeval);
 extern void dcpomatic_setup ();
-extern void dcpomatic_setup_i18n (std::string);
+extern void dcpomatic_setup_gettext_i18n (std::string);
 extern std::vector<std::string> split_at_spaces_considering_quotes (std::string);
 extern std::string md5_digest (boost::filesystem::path);
 extern std::string md5_digest (void const *, int);
index 4312139f1498a9c19b3e358a87733076045c6b31..71c29072f43c4009ee15e6d6bf3cff4d15e5fcfc 100644 (file)
@@ -63,7 +63,6 @@ static std::string log_level;
 static std::string film_to_load;
 static std::string film_to_create;
 static wxMenu* jobs_menu = 0;
-static wxLocale* locale = 0;
 
 static void set_menu_sensitivity ();
 
@@ -226,7 +225,7 @@ public:
 
                film_editor = new FilmEditor (film, panel);
                film_viewer = new FilmViewer (film, panel);
-               JobManagerView* job_manager_view = new JobManagerView (panel);
+               JobManagerView* job_manager_view = new JobManagerView (panel, static_cast<JobManagerView::Buttons> (0));
 
                _top_sizer = new wxBoxSizer (wxHORIZONTAL);
                _top_sizer->Add (film_editor, 0, wxALL, 6);
@@ -463,49 +462,6 @@ static const wxCmdLineEntryDesc command_line_description[] = {
 };
 #endif
 
-void
-setup_i18n ()
-{
-       int language = wxLANGUAGE_DEFAULT;
-
-       ofstream f ("c:/users/carl hetherington/foo", std::ios::app);
-       f << "Hello.\n";
-
-       boost::optional<string> config_lang = Config::instance()->language ();
-       if (config_lang && !config_lang->empty ()) {
-               f << "Configured language " << config_lang.get() << "\n";
-               wxLanguageInfo const * li = wxLocale::FindLanguageInfo (std_to_wx (config_lang.get ()));
-               f << "LanguageInfo " << li << "\n";
-               if (li) {
-                       language = li->Language;
-                       f << "language=" << language << " cf " << wxLANGUAGE_DEFAULT << " " << wxLANGUAGE_ENGLISH << "\n";
-               }
-       }
-       if (wxLocale::IsAvailable (language)) {
-               f << "Language is available.\n";
-               locale = new wxLocale (language, wxLOCALE_LOAD_DEFAULT);
-
-#ifdef DCPOMATIC_WINDOWS
-               locale->AddCatalogLookupPathPrefix (std_to_wx (mo_path().string()));
-#endif         
-
-               locale->AddCatalog (wxT ("libdcpomatic-wx"));
-               locale->AddCatalog (wxT ("dcpomatic"));
-               
-               if (!locale->IsOk()) {
-                       f << "Locale is not ok.\n";
-                       delete locale;
-                       locale = new wxLocale (wxLANGUAGE_ENGLISH);
-                       language = wxLANGUAGE_ENGLISH;
-               }
-       }
-
-       if (locale) {
-               dcpomatic_setup_i18n (wx_to_std (locale->GetCanonicalName ()));
-       }
-}
-
 class App : public wxApp
 {
        bool OnInit ()
@@ -526,7 +482,7 @@ class App : public wxApp
                   hasn't yet been called and there aren't any scalers, filters etc.
                   set up yet.
                */
-               setup_i18n ();
+               dcpomatic_setup_i18n ();
 
                /* Set things up, including scalers / filters etc.
                   which will now be internationalised correctly.
index 466f2903191b203196dd2fe7cc355427841be77e..cddd07b7db71447cce08ca3bf610a4b826b5ca77 100644 (file)
@@ -13,7 +13,7 @@ def build(bld):
         obj.target = t
 
     if not bld.env.DISABLE_GUI:
-        for t in ['dcpomatic', 'dcpomatic_server']:
+        for t in ['dcpomatic', 'dcpomatic_batch', 'dcpomatic_server']:
             obj = bld(features = 'cxx cxxprogram')
             obj.uselib = 'DCP CXML OPENJPEG AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC'
             obj.includes = ['..']
index c339d26bbf2a0b60da3167004e37bf41901c001e..1594dfc91e62a51523d033b281015c7dbc7903ca 100644 (file)
@@ -34,15 +34,21 @@ using std::map;
 using boost::shared_ptr;
 
 /** Must be called in the GUI thread */
-JobManagerView::JobManagerView (wxWindow* parent)
+JobManagerView::JobManagerView (wxWindow* parent, Buttons buttons)
        : wxScrolledWindow (parent)
+       , _buttons (buttons)
 {
        _panel = new wxPanel (this);
        wxSizer* sizer = new wxBoxSizer (wxVERTICAL);
        sizer->Add (_panel, 1, wxEXPAND);
        SetSizer (sizer);
+
+       int N = 5;
+       if (buttons & PAUSE) {
+               ++N;
+       }
        
-       _table = new wxFlexGridSizer (5, 6, 6);
+       _table = new wxFlexGridSizer (N, 6, 6);
        _table->AddGrowableCol (1, 1);
        _panel->SetSizer (_table);
 
@@ -78,22 +84,34 @@ JobManagerView::update ()
                        _table->Insert (index, m, 0, wxALIGN_CENTER_VERTICAL | wxALL, 6);
                        
                        JobRecord r;
+                       int n = 1;
                        r.finalised = false;
                        r.scroll_nudged = false;
                        r.gauge = new wxGauge (_panel, wxID_ANY, 100);
-                       _table->Insert (index + 1, r.gauge, 1, wxEXPAND | wxLEFT | wxRIGHT);
+                       _table->Insert (index + n, r.gauge, 1, wxEXPAND | wxLEFT | wxRIGHT);
+                       ++n;
                        
                        r.message = new wxStaticText (_panel, wxID_ANY, std_to_wx (""));
-                       _table->Insert (index + 2, r.message, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
+                       _table->Insert (index + n, r.message, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
+                       ++n;
 
                        r.cancel = new wxButton (_panel, wxID_ANY, _("Cancel"));
                        r.cancel->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (JobManagerView::cancel_clicked), 0, this);
-                       _table->Insert (index + 3, r.cancel, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
-
+                       _table->Insert (index + n, r.cancel, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
+                       ++n;
+
+                       if (_buttons & PAUSE) {
+                               r.pause = new wxButton (_panel, wxID_ANY, _("Pause"));
+                               r.pause->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (JobManagerView::pause_clicked), 0, this);
+                               _table->Insert (index + n, r.pause, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
+                               ++n;
+                       }
+                       
                        r.details = new wxButton (_panel, wxID_ANY, _("Details..."));
                        r.details->Connect (wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (JobManagerView::details_clicked), 0, this);
                        r.details->Enable (false);
-                       _table->Insert (index + 4, r.details, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
+                       _table->Insert (index + n, r.details, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
+                       ++n;
                        
                        _job_records[*i] = r;
 
@@ -143,6 +161,9 @@ JobManagerView::update ()
                }
 
                index += 5;
+               if (_buttons & PAUSE) {
+                       ++index;
+               }
        }
 
        _table->Layout ();
@@ -174,3 +195,21 @@ JobManagerView::cancel_clicked (wxCommandEvent& ev)
                }
        }
 }
+
+void
+JobManagerView::pause_clicked (wxCommandEvent& ev)
+{
+       wxObject* o = ev.GetEventObject ();
+       for (map<boost::shared_ptr<Job>, JobRecord>::iterator i = _job_records.begin(); i != _job_records.end(); ++i) {
+               if (i->second.pause == o) {
+                       if (i->first->paused()) {
+                               i->first->resume ();
+                               i->second.pause->SetLabel (_("Pause"));
+                       } else {
+                               i->first->pause ();
+                               i->second.pause->SetLabel (_("Resume"));
+                       }
+               }
+       }
+}
+       
index 6343d78af070471b898ffa4feb37e56b67ebd3bc..3d1ad30c07f60e60a53d4473b374fe7d82c13f39 100644 (file)
@@ -33,13 +33,18 @@ class Job;
 class JobManagerView : public wxScrolledWindow
 {
 public:
-       JobManagerView (wxWindow *);
+       enum Buttons {
+               PAUSE = 0x1,
+       };
+               
+       JobManagerView (wxWindow *, Buttons);
 
        void update ();
 
 private:
        void periodic (wxTimerEvent &);
        void cancel_clicked (wxCommandEvent &);
+       void pause_clicked (wxCommandEvent &);
        void details_clicked (wxCommandEvent &);
 
        boost::shared_ptr<wxTimer> _timer;
@@ -49,10 +54,12 @@ private:
                wxGauge* gauge;
                wxStaticText* message;
                wxButton* cancel;
+               wxButton* pause;
                wxButton* details;
                bool finalised;
                bool scroll_nudged;
        };
                
        std::map<boost::shared_ptr<Job>, JobRecord> _job_records;
+       Buttons _buttons;
 };
index e0d7d843ff51fb31f06881592e670f3adab6dbce..5691d341a0eba0ff0bd501c666c5032e050648cb 100644 (file)
@@ -25,6 +25,8 @@
 #include <wx/filepicker.h>
 #include <wx/spinctrl.h>
 #include "wx_util.h"
+#include "config.h"
+#include "util.h"
 
 using namespace std;
 using namespace boost;
@@ -66,7 +68,7 @@ error_dialog (wxWindow* parent, wxString m)
 bool
 confirm_dialog (wxWindow* parent, wxString m)
 {
-       wxMessageDialog* d = new wxMessageDialog (parent, m, _("DVD-o-matic"), wxYES_NO | wxICON_QUESTION);
+       wxMessageDialog* d = new wxMessageDialog (parent, m, _("DCP-o-matic"), wxYES_NO | wxICON_QUESTION);
        int const r = d->ShowModal ();
        d->Destroy ();
        return r == wxID_YES;
@@ -211,3 +213,39 @@ checked_set (wxRadioButton* widget, bool value)
                widget->SetValue (value);
        }
 }
+
+void
+dcpomatic_setup_i18n ()
+{
+       int language = wxLANGUAGE_DEFAULT;
+
+       boost::optional<string> config_lang = Config::instance()->language ();
+       if (config_lang && !config_lang->empty ()) {
+               wxLanguageInfo const * li = wxLocale::FindLanguageInfo (std_to_wx (config_lang.get ()));
+               if (li) {
+                       language = li->Language;
+               }
+       }
+
+       wxLocale* locale = 0;
+       if (wxLocale::IsAvailable (language)) {
+               locale = new wxLocale (language, wxLOCALE_LOAD_DEFAULT);
+
+#ifdef DCPOMATIC_WINDOWS
+               locale->AddCatalogLookupPathPrefix (std_to_wx (mo_path().string()));
+#endif         
+
+               locale->AddCatalog (wxT ("libdcpomatic-wx"));
+               locale->AddCatalog (wxT ("dcpomatic"));
+               
+               if (!locale->IsOk()) {
+                       delete locale;
+                       locale = new wxLocale (wxLANGUAGE_ENGLISH);
+                       language = wxLANGUAGE_ENGLISH;
+               }
+       }
+
+       if (locale) {
+               dcpomatic_setup_gettext_i18n (wx_to_std (locale->GetCanonicalName ()));
+       }
+}
index b3ab706df0687eb1810776a8d7d9144ced69e97b..bff11647edb653c92eade0b72ac6d3a939f04538 100644 (file)
@@ -36,6 +36,7 @@ extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, wxString, int pr
 extern wxStaticText* add_label_to_grid_bag_sizer (wxGridBagSizer *, wxWindow *, wxString, wxGBPosition, wxGBSpan span = wxDefaultSpan);
 extern std::string wx_to_std (wxString);
 extern wxString std_to_wx (std::string);
+extern void dcpomatic_setup_i18n ();
 
 /** @class ThreadedStaticText
  *
index ba98929ce2fed0ab6a4dbe9cab094f9895e90021..a7867c6183c246ca0ac80e91010271899efc0462 100644 (file)
@@ -84,6 +84,7 @@ File "%deps%/bin/cxml.dll"
 File "%binaries%/src/wx/dcpomatic-wx.dll"
 File "%binaries%/src/lib/dcpomatic.dll"
 File "%binaries%/src/tools/dcpomatic.exe"
+File "%binaries%/src/tools/dcpomatic_batch.exe"
 File "%binaries%/src/tools/dcpomatic_server_cli.exe"
 File "%binaries%/src/tools/dcpomatic_server.exe"
 
@@ -112,11 +113,13 @@ File "%binaries%/src/wx/mo/sv_SE/libdcpomatic-wx.mo"
 File "%binaries%/src/tools/mo/sv_SE/dcpomatic.mo"
 
 CreateShortCut "$DESKTOP\DCP-o-matic.lnk" "$INSTDIR\bin\dcpomatic.exe" ""
+CreateShortCut "$DESKTOP\DCP-o-matic batch converter.lnk" "$INSTDIR\bin\dcpomatic_batch.exe" ""
 CreateShortCut "$DESKTOP\DCP-o-matic encode server.lnk" "$INSTDIR\bin\dcpomatic_server.exe" ""
  
 CreateDirectory "$SMPROGRAMS\DCP-o-matic"
 CreateShortCut "$SMPROGRAMS\DCP-o-matic\Uninstall DCP-o-matic.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
 CreateShortCut "$SMPROGRAMS\DCP-o-matic\DCP-o-matic.lnk" "$INSTDIR\bin\dcpomatic.exe" "" "$INSTDIR\bin\dcpomatic.exe" 0
+CreateShortCut "$SMPROGRAMS\DCP-o-matic\DCP-o-matic batch converter.lnk" "$INSTDIR\bin\dcpomatic.exe" "" "$INSTDIR\bin\dcpomatic_batch.exe" 0
 CreateShortCut "$SMPROGRAMS\DCP-o-matic\DCP-o-matic encode server.lnk" "$INSTDIR\bin\dcpomatic_server.exe" "" "$INSTDIR\bin\dcpomatic_server.exe" 0
  
 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DCP-o-matic" "DisplayName" "DCP-o-matic (remove only)"
@@ -132,6 +135,7 @@ Section "Uninstall"
 RMDir /r "$INSTDIR\*.*"    
 RMDir "$INSTDIR"
 Delete "$DESKTOP\DCP-o-matic.lnk"
+Delete "$DESKTOP\DCP-o-matic batch converter.lnk"
 Delete "$DESKTOP\DCP-o-matic encode server.lnk"
 Delete "$SMPROGRAMS\DCP-o-matic\*.*"
 RmDir  "$SMPROGRAMS\DCP-o-matic"
index 9a2e78f0e5127fd38ceb9c5ae8f33ea13051c37e..34b7fe8f6b0f0f57b8db2da6795928666110bbfa 100644 (file)
@@ -94,6 +94,7 @@ File "%deps%/bin/cxml.dll"
 File "%binaries%/src/wx/dcpomatic-wx.dll"
 File "%binaries%/src/lib/dcpomatic.dll"
 File "%binaries%/src/tools/dcpomatic.exe"
+File "%binaries%/src/tools/dcpomatic_batch.exe"
 File "%binaries%/src/tools/dcpomatic_server_cli.exe"
 File "%binaries%/src/tools/dcpomatic_server.exe"
 
@@ -122,11 +123,13 @@ File "%binaries%/src/wx/mo/sv_SE/libdcpomatic-wx.mo"
 File "%binaries%/src/tools/mo/sv_SE/dcpomatic.mo"
 
 CreateShortCut "$DESKTOP\DCP-o-matic.lnk" "$INSTDIR\bin\dcpomatic.exe" ""
+CreateShortCut "$DESKTOP\DCP-o-matic batch converter.lnk" "$INSTDIR\bin\dcpomatic_batch.exe" ""
 CreateShortCut "$DESKTOP\DCP-o-matic encode server.lnk" "$INSTDIR\bin\dcpomatic_server.exe" ""
  
 CreateDirectory "$SMPROGRAMS\DCP-o-matic"
 CreateShortCut "$SMPROGRAMS\DCP-o-matic\Uninstall DCP-o-matic.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
 CreateShortCut "$SMPROGRAMS\DCP-o-matic\DCP-o-matic.lnk" "$INSTDIR\bin\dcpomatic.exe" "" "$INSTDIR\bin\dcpomatic.exe" 0
+CreateShortCut "$SMPROGRAMS\DCP-o-matic\DCP-o-matic batch converter.lnk" "$INSTDIR\bin\dcpomatic.exe" "" "$INSTDIR\bin\dcpomatic_batch.exe" 0
 CreateShortCut "$SMPROGRAMS\DCP-o-matic\DCP-o-matic encode server.lnk" "$INSTDIR\bin\dcpomatic_server.exe" "" "$INSTDIR\bin\dcpomatic_server.exe" 0
  
 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DCP-o-matic" "DisplayName" "DCP-o-matic (remove only)"
@@ -142,6 +145,7 @@ Section "Uninstall"
 RMDir /r "$INSTDIR\*.*"    
 RMDir "$INSTDIR"
 Delete "$DESKTOP\DCP-o-matic.lnk"
+Delete "$DESKTOP\DCP-o-matic batch converter.lnk"
 Delete "$DESKTOP\DCP-o-matic encode server.lnk"
 Delete "$SMPROGRAMS\DCP-o-matic\*.*"
 RmDir  "$SMPROGRAMS\DCP-o-matic"
diff --git a/wscript b/wscript
index ebdfa2290f0a26bc04ba09c267b5e78404e2dcc0..169e462579db96ad11f3530cbbdfa676569e596e 100644 (file)
--- a/wscript
+++ b/wscript
@@ -55,7 +55,7 @@ def configure(conf):
         conf.env.append_value('CXXFLAGS', '-O2')
 
     if not conf.options.static:
-        conf.check_cfg(package = 'libdcp', atleast_version = '0.45', args = '--cflags --libs', uselib_store = 'DCP', mandatory = True)
+        conf.check_cfg(package = 'libdcp', atleast_version = '0.49', args = '--cflags --libs', uselib_store = 'DCP', mandatory = True)
         conf.check_cfg(package = 'libcxml', atleast_version = '0.01', args = '--cflags --libs', uselib_store = 'CXML', mandatory = True)
         conf.check_cfg(package = 'libavformat', args = '--cflags --libs', uselib_store = 'AVFORMAT', mandatory = True)
         conf.check_cfg(package = 'libavfilter', args = '--cflags --libs', uselib_store = 'AVFILTER', mandatory = True)
@@ -232,7 +232,13 @@ def build(bld):
     obj.target = 'dcpomatic.desktop'
     obj.dict = d
 
-    bld.install_files('${PREFIX}/share/applications', 'dcpomatic.desktop')
+    obj = bld(features = 'subst')
+    obj.source = 'dcpomatic_batch.desktop.in'
+    obj.target = 'dcpomatic_batch.desktop'
+    obj.dict = d
+
+    bld.install_files('${PREFIX}/share/applications', ['dcpomatic.desktop', 'dcpomatic_batch.desktop'])
+
     for r in ['22x22', '32x32', '48x48', '64x64', '128x128']:
         bld.install_files('${PREFIX}/share/icons/hicolor/%s/apps' % r, 'icons/%s/dcpomatic.png' % r)