about_dialog.cc doesn't always rebuild if supporters.cc changes;
authorCarl Hetherington <cth@carlh.net>
Sun, 15 Apr 2018 21:40:02 +0000 (22:40 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 15 Apr 2018 21:40:02 +0000 (22:40 +0100)
hack around this.  Also make supporters lists right for older versions.

src/wx/about_dialog.cc
wscript

index d34c351fe488be29cd98f214ad18095de59be128..f107c872ae89155a4c958f5e6c2c0cba6ca51a7c 100644 (file)
@@ -137,7 +137,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
        add_section (_("With help from"), with_help_from);
 
        wxArrayString supported_by;
-       #include "../../build/supporters.cc"
+       #include "supporters.cc"
        add_section (_("Supported by"), supported_by);
 
        wxArrayString tested_by;
diff --git a/wscript b/wscript
index 638f8f2fa14477a7e7caff4809b7c27f86956da7..62bbb141345a60d2188afd6ce5c9e59d0acfdc7d 100644 (file)
--- a/wscript
+++ b/wscript
@@ -24,6 +24,7 @@ import sys
 import glob
 import distutils
 import distutils.spawn
+import urllib
 from waflib import Logs, Context
 
 APPNAME = 'dcpomatic'
@@ -601,7 +602,8 @@ def configure(conf):
     Logs.pprint('YELLOW', '')
 
 def download_supporters():
-    os.system('curl https://dcpomatic.com/supporters.cc > build/supporters.cc')
+    last_date = subprocess.Popen(shlex.split('git log -1 --format=%%ai %s' % last_version), stdout=subprocess.PIPE).communicate()[0]
+    os.system('curl https://dcpomatic.com/supporters.cc?%s > src/wx/supporters.cc' % urllib.urlencode({"until": last_date.strip()}))
 
 def build(bld):
     create_version_cc(VERSION, bld.env.CXXFLAGS)