Allow debug builds with no internet connection. Also add missing patron.
authorCarl Hetherington <cth@carlh.net>
Wed, 9 Oct 2019 20:08:02 +0000 (22:08 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 9 Oct 2019 20:13:00 +0000 (22:13 +0200)
src/wx/about_dialog.cc
wscript

index 9e790dacbb32c24db727d02549a825fb9fc0a692..0ac5d484f85ec29e19a9972f037a1dc6a8e6c4dd 100644 (file)
@@ -141,6 +141,11 @@ AboutDialog::AboutDialog (wxWindow* parent)
        translated_by.Add (wxT ("Gökhan Aksoy"));
        add_section (_("Translated by"), translated_by);
 
        translated_by.Add (wxT ("Gökhan Aksoy"));
        add_section (_("Translated by"), translated_by);
 
+       wxArrayString patrons;
+       patrons.Add ("Luproduction");
+       patrons.Add ("Lightbender Post");
+       add_section (_("Patrons"), patrons);
+
        wxArrayString subscribers;
        #include "subscribers.cc"
        add_section (_("Subscribers"), subscribers);
        wxArrayString subscribers;
        #include "subscribers.cc"
        add_section (_("Subscribers"), subscribers);
diff --git a/wscript b/wscript
index 70a7c59390da80bddf04c56c9fbc9e75e974b69c..c653369ec52375b5679875bddb2b77acbf7c8a05 100644 (file)
--- a/wscript
+++ b/wscript
@@ -17,6 +17,8 @@
 #    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
 #
 
 #    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+from __future__ import print_function
+
 import subprocess
 import os
 import shlex
 import subprocess
 import os
 import shlex
@@ -544,8 +546,16 @@ def download_supporters(can_fail):
     r = os.system('curl -s -f https://dcpomatic.com/supporters.cc?%s > src/wx/supporters.cc' % urlencode({"until": last_date.strip()}))
     if (r >> 8) == 0:
         r = os.system('curl -s -f https://dcpomatic.com/subscribers.cc?%s > src/wx/subscribers.cc' % urlencode({"until": last_date.strip()}))
     r = os.system('curl -s -f https://dcpomatic.com/supporters.cc?%s > src/wx/supporters.cc' % urlencode({"until": last_date.strip()}))
     if (r >> 8) == 0:
         r = os.system('curl -s -f https://dcpomatic.com/subscribers.cc?%s > src/wx/subscribers.cc' % urlencode({"until": last_date.strip()}))
-    if (r >> 8) != 0 and can_fail:
-        raise Exception("Could not download supporters lists")
+    if (r >> 8) != 0:
+        if can_fail:
+            raise Exception("Could not download supporters lists (%d)" % (r >> 8))
+        else:
+            f = open('src/wx/supporters.cc', 'w')
+            print('supported_by.Add(wxT("Debug build - no supporters lists available"));', file=f)
+            f.close()
+            f = open('src/wx/subscribers.cc', 'w')
+            print('subscribers.Add(wxT("Debug build - no subscribers lists available"));', file=f)
+            f.close()
 
 def build(bld):
     create_version_cc(VERSION, bld.env.CXXFLAGS)
 
 def build(bld):
     create_version_cc(VERSION, bld.env.CXXFLAGS)