From c5a0313c1372cac850554a66be6871944ca5ef3a Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Sun, 14 Aug 2011 20:05:00 -0400 Subject: [PATCH] check the dependencies directory version --- build/SConscript.configure | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/build/SConscript.configure b/build/SConscript.configure index e3664ff1..26fe76dd 100644 --- a/build/SConscript.configure +++ b/build/SConscript.configure @@ -21,8 +21,11 @@ if not os.path.exists(configFile): print 'A configuration file must be selected! Have a look at http://www.mitsuba-renderer.org/docs.html' Exit(1) -if (sys.platform == 'win32' or sys.platform == 'darwin') and not os.path.exists(GetBuildPath('#dependencies')): - print 'The dependencies are missing -- see http://www.mitsuba-renderer.org/devblog/archives/11-Build-system-changes.html' +versionFilename = GetBuildPath('#dependencies/version') + +if not os.path.exists(versionFilename): + print 'The dependencies are missing -- please check out https://www.mitsuba-renderer.org/hg/dependencies' + print 'and ensure that the newly created directory is a subdirectory of the main Mitsuba folder' Exit(1) # Parse configuration options @@ -224,6 +227,18 @@ else: print MTS_VERSION Export('MTS_VERSION') +with open(versionFilename) as f: + depVersion = f.readline().strip() + if MTS_VERSION != depVersion: + print '\nThe dependency directory and your Mitsuba codebase have different version numbers!' + print 'Mitsuba has version %s, and the dependencies have version %s. Please bring them ' % (MTS_VERSION, depVersion) + print 'into sync, either by running \n' + print '$ hg update -r v%s\n' % depVersion + print 'in the Mitsuba directory, or by running\n' + print '$ cd dependencies' + print '$ hg update -r v%s\n' % MTS_VERSION + Exit(1) + env = conf.Finish() dist = GetOption('dist') != None