summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-10-09 22:08:02 +0200
committerCarl Hetherington <cth@carlh.net>2019-10-09 22:13:00 +0200
commitf9fe318f3c79e2fc244de56bf6fe0dc1c05fd252 (patch)
tree06fd083f01bff5645d681ce2e6748a127d4c373b /wscript
parent15dbbbf49486d372368079d738d76a6d4743b7c4 (diff)
Allow debug builds with no internet connection. Also add missing patron.
Diffstat (limited to 'wscript')
-rw-r--r--wscript14
1 files changed, 12 insertions, 2 deletions
diff --git a/wscript b/wscript
index 70a7c5939..c653369ec 100644
--- a/wscript
+++ b/wscript
@@ -17,6 +17,8 @@
# along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import print_function
+
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()}))
- 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)